#### IMPEDANCE TESTING OF EV BATTERY PACK

Welcome to the application example of an impedance testing of battery packs. Here, we employ a current perturbation technique to capture the impedance spectroscopy of the battery at various frequencies.

To obtain the impedance across the frequencies, Fourier analysis is done on the input and the output to obtain the impedance spectroscopy.

In this example, we utilize the internal parameter values of a battery and design an impedance testing method in MATLAB Simulink to test EV battery packs using Impedyme’s Combined Hardware-in the-loop and Power hardware-in-the-loop (CHP) technology.

Fig 1. Simulink Implementation of Impedance Spectroscopy

#### IMPEDANCE TESTING MODEL IMPLEMENTATION:

Battery Model:

Battery models are crucial tools in understanding and optimizing performance in various applications, typically in electric vehicles. One commonly used model is the single RC model, which represents the battery's behavior using a resistor (R) and capacitor (C) in series. However, conventional single RC models often assume fixed internal parameters regardless of the battery's state of charge (SoC). To address this limitation, a dynamic single RC battery model for each sub-module of the battery pack has been developed, where internal parameters and open circuit voltage (OCV) are adapted based on the battery's SoC.

Fig 2. Battery pack’s sub-module equivalent Circuit

In the dynamic battery model, the internal parameters (resistance and capacitance) of the battery are selected according to the battery's SoC [1]. To accurately capture these dynamics, the model continuously updates the internal parameters based on the changes in input SoC, ensuring a more realistic representation of the battery's behavior.

In addition to auto-selection of internal parameters, the battery model also incorporates SoC-dependent OCV behavior. The open circuit voltage of a battery varies with the state of charge. As the SoC is varied, the OCV curve shifts accordingly. By incorporating this SoC-dependent OCV behavior into the model, it can accurately model the battery under different charge and discharge conditions.

Current Perturbation and Injection:

The Simulink model of the current perturbator is shown in the figure below. The model utilizes Simulink functions to generate multi-frequency sinusoidal signals for the test. There are essentially three Simulink functions: Variable Frequency Generator, Amplitude & Phase Generator, and Input Generator.

Fig 4. Simulink Solar PV Model

### Fourier Calculator Model:

The Fourier Calculator model is a MATLAB function designed to compute Fourier coefficients for a given signal. Operating in a stateful manner, it initializes internal variables to track the progression of calculations across function calls.

The block iterates through each point of the input signal, calculating Fourier coefficients based on the provided frequency and total number of points. Fourier coefficients are computed separately for cosine and sine components using the standard formulas.

Upon completing the waveform, the block finalizes the calculation by averaging the accumulated cosine and sine terms over the entire waveform and scales them by the total number of points. The function uses the following formulae to calculate the Fourier cos and sin coefficients:

The Response Plotter block is a MATLAB function designed for signal analysis, gain, and phase calculation, as well as visualization. Central to its operation is the updating of a persistent state array, ‘state_array’, which acts as a repository for crucial signal information. Upon invocation, the function processes input parameters including the current index, frequency, sine, and cosine components.

Leveraging this data, it computes gain and phase values, which are then stored in the ‘state_array.’ Notably, the function employs trigonometric functions to accurately determine phase angles while addressing potential phase wrapping issues, ensuring precise representation of the signal's phase characteristics.

Additionally, the Response Plotter model function offers flexibility by incorporating conditional checks to manage the execution flow. It intelligently handles scenarios where the state machine might be disabled, enabling graceful termination without altering the current state array. Moreover, the function provides an optional plotting capability, allowing users to visualize gain and phase trends against frequency, as well as generate Nyquist plots.

These visualizations are used for gaining insights into signal behavior, facilitating informed decision-making in signal processing applications. Hence, the Response Plotter block is a tool for signal analysis and visualization within the Simulink environment.

#### IMPEDYME’S CHP TECHNOLOGY

Fig 7. Impedyme’s CHP Cabinet

The Impedyme’s emulation solutions mimic your MATLAB Simulink models that can be used for high power tests, up to a few Mega Watts scale, for bandwidths up to 20 kHz. Simply connect the optical links to our cabinets and deploy your models to begin the testing. The cabinets have multiple optical links each up to 12.5 giga-bits per second.

For simulations with ultra-low step-times, the equipment supports FPGA-based tests, that allows you to have time steps as low as a few nanoseconds. Moreover, the FPGA brings in a better performance for your real-time emulation since the processing speed of an FPGA is much higher than that of a CPU.

Also, for high-speed emulations, the individual FPGAs of the drawers can communicate among them. The testing using Impedyme’s CHP is straightforward as it uses Simulink designs. Our products come with a wide range of pre-designed models, which you can customize the designs according to your needs and requirements.

Furthermore, if we were to emulate both the input and the output side of the power systems, we can have a circulating power flow. Since the power is recirculated, we only must feed in power losses from the grid.

By having such a technology can reduce the power requirements of your lab for testing large power systems. Moreover, during the real-time emulation of your models, our integrated thermal management utilizes an advanced liquid + air cooling technology that ensures that does not require any additional chiller for cooling. Thus, we use Impedyme’s CHP to emulate the developed impedance testing model. Now that we have developed the models, let us see how the connections are given to kickstart the testing process.

Fig. 8. Battery Impedance testing Emulation: CHP Connection Diagram

We allocate the first two drawers, that is the two top-most drawers, for the current perturbation model. Likewise, the third drawer is dedicated to the battery model. The last two, that is the two bottom-most drawers are dedicated for the Active Front end Converters that provide the DC coupling for the impedance testing. Now, let’s see how the connections are made to allocate these drawers. the power connections are given on the backside of the cabinets.

The DC supply from the active front end drawers is given to the current perturbation drawers. These drawers emulate the action of an input current perturbation injector circuit. Next, we bring the perturbed current signals to the battery to perform the spectroscopy. Finally, the DC link is brough back to the active front end for the recirculation power flow. Since the connections are complete, we are now ready to test.

The first block, that is, the variable-frequency generator is responsible to select the appropriate frequency after each set is done generating. The input generator picks these frequencies and generates sinusoidal signals that is fed to the battery pack for testing. Likewise, the amplitude & phase generator is responsible for creating an amplitude and phase shift between the signal sets.

### Response Plotter Block:

Fig 6. Response Plotter Block

#### TEST PARAMETERS & EXPERIMENT RESULTS

If the battery pack is readily available, you can also connect the external battery pack hardware to Impedyme’s CHP and test the impedance of your battery pack.

REFERENCES

[1] K. S. Song, S. -J. Park and F. -S. Kang, "Internal Parameter Estimation of Lithium-Ion Battery Using AC Ripple With DC Offset Wave in Low and High Frequencies," in IEEE Access, vol. 9, pp. 76083-76096, 2021, doi: 10.1109/ACCESS.2021.3082148.

[2] Estaller J, Kersten A, Kuder M, Thiringer T, Eckerle R, Weyh T. Overview of Battery Impedance Modeling Including Detailed State-of-the-Art Cylindrical 18650 Lithium-Ion Battery Cell Comparisons. Energies. 2022; 15(10):3822. https://doi.org/10.3390/en15103822

[3] Westerhoff, Uwe, et al. "Analysis of lithium‐ion battery models based on electrochemical impedance spectroscopy." Energy Technology 4.12 (2016): 1620-1630.

Fig 3. Battery Simulink Model

Where, N is the total number of points, f is the frequency of the signal, and xk(t) is the value of the signal at the given time instant.

Additionally, it resets internal state variables to prepare for subsequent calculations. The function provides flexibility by allowing an enable signal to control when calculations occur, ensuring efficiency in computation. Overall, the Fourier Calculator block facilitates the analysis of periodic signals by extracting their frequency components through Fourier analysis. There are essentially two functions inside this model, one each for the input and the other for the output Fourier calculations.

Fig 5. Fourier Calculator Model

Fig. 11. Nyquist Plot for Entire Spectrum 0.01 to 10kHz

Fig. 12. Nyquist Plot for different SoC

Fig. 10. Bode Plot for High Frequency Spectrum

Fig. 9. Bode Plot for low Frequency Spectrum

Fig 13. Battery Impedance testing: CHP Connection Diagram

With Impedyme's Cutting-Edge Hardware Platform (CHP), conducting precise impedance testing for your Electric Vehicle (EV) battery pack becomes seamlessly achievable. This advanced setup ensures accuracy and reliability, eliminating the complexities often associated with impedance measurements. By employing Simulink Models in the Impedyme’s CHP cabinets, along with your EV battery, you're equipped with everything necessary for thorough testing.

Impedyme's CHP offers a sophisticated solution tailored to the demands of modern battery testing. The innovative design integrates seamlessly with Simulink Models, facilitating a streamlined testing process. The inclusion of Impedyme’s CHP cabinets ensures robustness and efficiency, providing a stable and controlled environment for accurate impedance measurements. Simply integrate your Simulink Models, connect them to Impedyme’s CHP cabinets, and interface with your EV battery packs.

All sub-modules of the battery impedance testing models have now been built, and before proceeding to the tests, let us get introduced to Impedyme’s CHP technology.

CHP seamlessly integrates hardware-in-the-loop (HIL) and power hardware-in-the-loop (PHIL) capabilities, offering unparalleled accuracy and efficiency in EV development. With CHP, engineers can simulate real-world scenarios with precision, testing EV components and systems under dynamic conditions.

From battery management systems to motor controllers, CHP empowers manufacturers to optimize performance, enhance reliability, and accelerate time-to-market for their EVs. Its modular design ensures flexibility to adapt to evolving testing needs, while its intuitive Simulink interface streamlines the testing.