Next Article in Journal
Control and Diagnostics System Generator for Complex FPGA-Based Measurement Systems
Next Article in Special Issue
Virtual Reality-Based Therapy Improves Fatigue, Impact, and Quality of Life in Patients with Multiple Sclerosis. A Systematic Review with a Meta-Analysis
Previous Article in Journal
Single Commercially Available IC-Based Electronically Controllable Voltage-Mode First-Order Multifunction Filter with Complete Standard Functions and Low Output Impedance
Previous Article in Special Issue
Comparison of Mathematical Methods for Compensating a Current Signal under Current Transformers Saturation Conditions
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Digital Impedance Emulator for Battery Measurement System Calibration

Engineering Department, University of Perugia, 06125 Perugia, Italy
*
Author to whom correspondence should be addressed.
Sensors 2021, 21(21), 7377; https://doi.org/10.3390/s21217377
Submission received: 20 October 2021 / Revised: 2 November 2021 / Accepted: 3 November 2021 / Published: 6 November 2021
(This article belongs to the Collection Instrument and Measurement)

Abstract

:
Meaningful information on the internal state of a battery can be derived by measuring its impedance. Accordingly, battery management systems based on electrochemical impedance spectroscopy are now recognized as a feasible solutions for online battery control and diagnostic. Since the impedance of a battery is always changing along with its state of charge and aging effects, it is important to have a stable impedance reference in order to calibrate and test a battery management system. In this work we propose a programmable impedance emulator that in principle could be used for the calibration of any battery management system based on electrochemical impedance spectroscopy. A digital finite-impulse-response filter is implemented, whose frequency response is programmed so as to reproduce exactly the impedance of a real battery in the frequency domain. The whole design process of the filter is presented in detail. An analytical expression for the impedance of real battery in the frequency domain is derived from an equivalent circuit model. The model is validated both through numerical simulations and experimental tests. In particular, the filter is implemented on a low-cost microcontroller unit, and the emulated impedance is measured by means of a custom-made electrochemical impedance spectroscopy measuring system, and verified by using standard commercial bench instruments. Results on this prototype show the feasibility of using the proposed emulator as a fully controllable and low-cost reference for calibrating battery impedance measurement systems.

1. Introduction

Measuring the impedance of a battery is being increasingly recognized as a fundamental step for its online diagnostic [1,2], i.e., when it is connected and operating in any battery-powered electric/electronic system. It is well known that Electrochemical Impedance Spectroscopy (EIS) data can provide meaningful information on the internal state of a battery [3,4]. Different portions of the impedance curve in the frequency domain are indeed related to different internal components and processes that can be modeled by means of equivalent circuits, and that are correlated with the battery State-of-Charge (SOC) and the State-of-Health. Yet as much as this topic has been widely investigated, most of the published experimental results are obtained by means of standard laboratory bench equipment that is not suited for online applications [5]. Online battery control and diagnostic systems, standardly referred to as Battery Management Systems (BMSs), are a key component in many applications, the automotive sector in particular being presently the subject of extensive research [6,7]. The integration of online EIS measurements into BMSs is an important development that is currently being investigated by several authors, with some promising solutions that have already been published [8,9,10,11,12].
Calibration and test under several working conditions are unavoidable stages in the developing process of a BMS [13,14]. The use of real batteries at this stage is not feasible, since the internal state of a battery and its response to external signals and solicitations change among different batteries (even of the same brand and model). Moreover, the characteristics of a single battery are not stable enough when repeated measurements are performed. A fully controllable reference is thus needed. Commercial bench instruments, such as the Keithley 2281S Series or ITECH IT6400 Series, are DC power supplies allowing for both current sourcing and sinking, which can simulate the voltage of a battery according to a predefined discharge curve [15]. These instruments are well suited to test charge and discharge cycles, but they do not emulate the impedance of a real battery and cannot be used to simulate the time transients expected in operating conditions.
A BMS testing approach frequently discussed in the literature is based on the so-called Hardware-In-the Loop paradigm (HIL) [16,17,18]. In general, a HIL simulator is a hardware that emulates all the input and outputs of the actual system under consideration. In this case, the HIL is designed to emulate a battery or a battery pack, its voltage, current, frequency response, state-of-charge, aging and failures. The BMS under test is interfaced to the HIL, and it can then be operated as if it were connected to an actual battery pack. The HIL is a piece of hardware fast enough to calculate and reproduce in real time the outputs of a real battery according with all the external inputs and solicitations. In general, a HIL simulator is a complex modular system that has to be designed and assembled for specific operations and requirements. Widely used commercial equipment is provided by dSPACE GmbH. In particular, the dSPACE EV1077 emulation board can emulate four cells and in principle can be programmed according to any mathematical model, such as equivalent circuit models including temperature and aging effects. Less complex and even low-cost solutions have also been presented in the literature [19,20,21].
In [22], a programmable setup implementing impedance emulation is proposed for the calibration of LCR meters. A power supply is used to sink the current supplied by the LCR meter, while a voltage generator and a current generator are used to emulate the voltage drop V generated by a current I across an arbitrary impedance Z. Both V and I are then measured by the LCR-meter in order to estimate Z = V I . In this work, we propose an even simpler method to emulate the impedance of a battery that can be used as a reference to calibrate an EIS based BMS or other EIS equipment. The basic idea is to program a Finite Impulse Response filter (FIR), so that its frequency response would match exactly the impedance of the battery that has to be emulated. A general overview of the method is presented in Section 2. An experimental realization will be presented in Section 4.
The main difference of the proposed emulator with respect to the other reviewed solutions is that it does not source or sink any current. As regards the advantages, the emulator can be simply connected in place of the battery to the EIS equipment. It is programmable virtually with any impedance curve, so as to provide a reference for any state of a real battery. Finally, it is a low-cost solution requiring minimal equipment and components, that can be easily replicated to emulate multiple batteries.

2. General Overview of the Impedance Emulation Method

We refer to the BMS/EIS equipment presented in [11], since it is a very simple system possibly representing the basic scheme of a class of BMSs to be developed. The reference EIS equipment is illustrated in Figure 1. It essentially consists of a controllable current source and two differential Analog-to-Digital Converters (ADCs). A controlled current I is injected into the battery through a shunt resistor R s h u n t of known value. The injected current is estimated by measuring with ADC1 the voltage difference V s h u n t across the shunt. ADC2 measures the voltage difference V o u t across the battery. Thus, the complex impedance can be obtained as
Z ω = V o u t ω I ω = R s h u n t V o u t ω V s h u n t ω ,
where ω is the angular frequency in rad/s.
The impedance emulator, sketched on the right of Figure 1, is designed to be connected in place of the real battery, with the only difference that the current I is not injected into the emulator, but flows directly towards the ground through a load resistor R l o a d . By means of an ADC, the emulator acquires the voltage V i n across the load, and outputs a voltage V o u t through a Digital-to-Analog Converter (DAC). A Microcontroller Unit (MCU) is programmed to generate V o u t according with a predefined impedance model. A picture of the built prototype is shown in Figure 2.
The MCU acts as a digital FIR filter, acquiring V i n at a sample rate F s = 1 T s , obtaining as input and output the discrete time sequences x n = V i n n T s and y n = V o u t n T s , which are related as:
y n = k = 0 N 1 h k x n k ,
where h n is the impulse response of the system in the time domain, and N is the total number of samples. It is well known from the theory of digital filters [23] that h n is related to the frequency response of the system Z ω by the Discrete Fourier Transform (DFT) as:
Z ω k = n = 0 N 1 h n e i 2 π k n N ,
where ω k = 2 π F s N k . Thus, the MCU is programmed so as to keep the ratio of V o u t ω over V i n ω always equal (numerically) to the battery impedance Z ω that one wants to emulate, independently of the value selected for R l o a d . When the emulated impedance is measured by means of the EIS equipment, the following relations hold:
Z ω = V o u t ω V i n ω = V o u t ω R l o a d I ω = R s h u n t R l o a d V o u t ω V s h u n t ω .
Thus, once programmed, the same emulator could be in principle adapted to different EIS instruments by just selecting a suitable R l o a d .
A reference impedance model Z ω has to be chosen. It can be obtained from the measured impedance of a real battery as it will be illustrated below. Then, the coefficients h n are obtained by inverting the DFT and stored in the non-volatile memory of the MCU. Each time a sample of V i n is acquired by the ADC, the convolution sum (2) is calculated, and the resulting V o u t is written on the DAC register. The length of the sequence N is upper bounded by the memory capacity, and also by the clock frequency of the MCU, since the convolution sum has to be computed in a time shorter than the sampling period T s ; N is also lower bounded in accordance with the frequency resolution Δ f = F s N required by any particular application. The full design process of the FIR filter is illustrated step-by-step in Section 3, while the experimental implementation of a test prototype is presented in Section 4.

3. Design of the Fir Filter

The impedance emulating FIR filter has been designed by going through the following steps. A paragraph will be devoted to the details of each step.
  • Modeling the impedance of a battery. Since the aim of the filter is to emulate a real battery, it has been designed to reproduce an experimental impedance. An analytical model facilitates the design process, and allows for more control, thus, the measured impedance has been fitted to an equivalent circuit model.
  • Choosing the number of samples and the sampling rate. This has to be done according to the frequency range of interest for the impedance, and with the memory capacity and the clock frequency of the MCU.
  • Definition of the impulse response. It has been derived from the impedance curve in the frequency domain by an Inverse DFT.
  • A numerical simulation of the filter response. This has been performed on MATLAB in order to verify that the model is correct.

3.1. Step 1: Modeling the Impedance of the Battery

As reference, we used the battery model ICR18650-26J by Samsung, that had been already used to test our custom EIS equipment in [11]. The chosen excitation current signal was a multisine whose frequency components were logarithmically spaced: [0.1, 0.2, 0.4, 1, 2, 4, 10, 20, 40, 100, 200, 400] Hz. We measured the impedance Z ω for SOC 100% and 20%.
The experimental results are shown in Figure 3. The choice of the two SOCs is motivated by the fact that they are associated with two impedance curves that are significantly different, practically being at the extremes of the range of variation of the battery impedance. Hence, we wanted to check the performance of the system at both the extremes (see Section 5.1). The battery has been modeled as the equivalent circuit shown in the same figure. It is a model commonly used in the literature, which we had previously verified to fit well the experimental impedance curves of the Samsung battery [24]; it implements some fractional order components, i.e., two Constant Phase Elements (CPEs) and a Warburg element. The complex impedance of the equivalent circuit is:
Z s = R 0 + s L + R 1 1 + R 1 Q 1 s α 1 + R 2 1 + R 2 Q 2 s α 1 + 2 A w s 0.5 ,
where s = i ω . The model has thus nine parameters θ = R 0 , L , R 1 , Q 1 , α 1 , R 2 , Q 2 , α 2 , A w that have to be fitted to experimental data. The solid curves plotted in Figure 3 have been calculated by using Formula (5), after θ had been estimated through a non-linear least-squares fitting algorithm. The chosen frequency interval allows detection of the two main features of the impedance curve: the semicircle at higher frequencies and the straight line at 45 at lower frequencies.

3.2. Step 2: Choosing the Number of Samples and the Sampling Rate

The number of samples N and the sampling rate F s cannot be selected independently, since they both define the frequency resolution as Δ f = F s N . The frequency range of interest is 0.1–400 Hz, hence, in order to meet the Nyquist condition, the sampling rate should be F s > 800 Sa/s. We chose F s = 1000 Sa/s. Given the memory capacity of the MCU used to implement the prototype (see the experimental Section 4), we set N = 30,000 Sa. Thus, the frequency resolution of our impedance emulator is Δ f = 33 mHz, which is enough to even discriminate between the two lower frequency components (100 and 200 mHz). On the chosen MCU, the computation of (2) with N = 30,000 requires 827 μ s, which is compatible with the chosen sampling period T s = 1 ms. In case of a different frequency range of interest or different MCU for other applications, the parameters should be reconfigured accordingly to the following analogous criteria. The parameters of the prototype configuration are summarized in Table 1 in the experimental Section 4.

3.3. Step 3: Definition of the Impulse Response

By construction, the frequency response of the FIR filter (i.e., numerically, the impedance that we want to emulate) is the DFT of the impulse response h n . Thus, by means of (5), the impedance Z f k can be calculated for the frequency values f k = F s N s [ 0 , 1 , , k , , N 2 ] (i.e., N equally spaced frequency values in the range 0– F s 2 ), then the coefficients h n are calculated by performing the inverse DFT of Z f k and stored in the non-volatile memory of the MCU.
A problem arises with the impedance of the Warburg element Z w s = 2 A w s 0.5 , since it is not defined for f 0 = 0 . Thus, the inverse DFT
h n = 1 N k = 0 N 1 Z f k e i 2 π k n N n
cannot be computed. The solution is to use the low-frequency approximation of s 0.5 given in [25]:
Z i = 2 A w s 4 + 36 s 3 + 126 s 2 + 84 s + 9 9 s 4 + 84 s 3 + 126 s 2 + 36 s + 1 ,
i.e., the fractional order response is approximated with an integer order one. Let us define:
Z ˜ w f = Z i f f < 1 Hz Z w f f 1 Hz
Hence, by defining Z r = Z Z w , the impedance can be approximated as Z Z r + Z ˜ w . A very good approximation is thus obtained, as shown in Figure 4.

3.4. Step 4: A Numerical Simulation of the Filter Response

The emulator model has been simulated with MATLAB in order to verify that numerical and discretization errors, as well as the noise will not significantly affect the results. Since on the MCU all the computations will be performed using 32-bit single-precision representation of numbers, in MATLAB the 32-bit precision was also explicitly selected, the 64-bit precision being the default.
Both the signal acquisition with the EIS equipment, and the acquisition and processing of the emulator have to be simulated. The simulation can be divided into three stages:
  • A simulated signal V i n is acquired by the EIS equipment at a sampling rate F a q , and by the emulator at sampling rate F s . ADC signal quantization is simulated;
  • The signal V o u t is computed by summing (2), and the DAC output is synthesized as a Zero-Order-Hold signal (ZOH);
  • The acquisition of V o u t by the EIS equipment at sampling rate F a q is simulated. The impedance is estimated as the ratio of the DFTs of V o u t and V i n .

3.4.1. Simulation Stage 1

Sampling rates and ADC ranges are reported in Table 1 and Table 2 on the experimental Section 4. F s = 1 kSa/s, and initially F a q = 10 kSa/s. The acquisition window is 30 s (number of samples N a q = 300,000). A multisine signal V i n was generated with frequency components [0.1, 0.2, 0.4, 1, 2, 4, 10, 20, 40, 50, 80, 100, 200, 400] Hz. The amplitude of each component is 50 mV. Signal quantization was simulated as:
V i n q = V i n + ϵ ADC range ADC levels ,
where indicates the floor function, while ϵ is a zero-mean Gaussian noise with variance σ 2 . Simulations were performed by setting σ = 0 and 3 mV. The second value for the noise was used since it is comparable to the random noise observed on experimental measurements. The simulated input signal is shown in Figure 5 for σ = 3 mV.

3.4.2. Simulation Stage 2

The output V o u t resulting from (2) is shown in Figure 6. The solid blue line is the ZOH signal generated by the DAC with period T s , and σ = 3 mV. The green line with dot markers is the simulation result of the DAC signal as acquired by the EIS measurement system with sampling period T a q = 10 T s . Additionally, the ADC quantization for V o u t was simulated as it was done for V i n . The analogous results for σ = 0 are also reported in the plot. It can be noted that V o u t as synthesized by the DAC is very stable when going from σ = 0 to σ = 3 mV; this is explained by the fact that V o u t is approximately an order of magnitude lesser than V i n , hence the noise acquired with V i n is reduced accordingly, and it almost disappears given the finite resolution of the DAC. Then, the noise is added again as the DAC signal is re-acquired by the EIS system.

3.4.3. Simulation Stage 3

The frequency spectra of both input and output signals are obtained by applying a Fast Fourier Transform (FFT) to the sampled sequences of measured voltages: V i n f k = F F T V i n q n and V o u t f k = F F T V o u t q n , where f k = F a q N a q [ 0 , 1 , , k , , N a q 2 ] . The spectrum of V o u t has to be corrected for the distortion introduced by the ZOH as
V o u t f k V o u t f k exp i 2 π f k T s T a q sinc f k T a q sinc f k T s .
This correction is explained and formally derived in Appendix A. The ratio between the corrected V o u t f k (10) and V i n f k yields the FIR frequency response.

3.4.4. Simulation Results and Discussion

In Figure 7, the simulated response of the FIR filter is reported and compared with the analytical response function (5). For σ = 0 the agreement is very good for both amplitude and phase. For σ = 3 mV, the agreement is still very good for the amplitude, but some errors are introduced in the phase, in particular at higher frequencies f > 20 Hz. Regardless, in the worst case, the relative error affecting m Z is 9%, while the mean relative error is 3%. The relative error on e Z is negligible, its mean value being 0.2%, and 0.4% in the worst case.
The simulation was performed assuming that signal acquisitions on the EIS measurement system and on the emulator are perfectly synchronous. Although it would be possible, in principle, to implement the synchronization on the actual system, the emulator is intended to be a portable instrument applicable to different equipment, also when the synchronization is not possible. When the two systems are not synchronized, the sampling instant of the emulator can fluctuate with a flat distribution within the T a q sampling period of the EIS equipment. This results in a random delay or anticipation between V i n and V o u t affecting the phase of the impedance. Several simulations have been performed by including between V i n and V o u t a random delay Δ t in the interval T a q 2 , T a q 2 . The Bode plots of the frequency response for a couple of simulations are shown in Figure 8. The response amplitude is not affected at all, but for F a q = 10 kSa/s, the phase measured at higher frequencies is not repeatable because of the random delay fluctuations. The only solution to this problem, if synchronization is not feasible, is to use a higher sampling frequency, such as F a q = 100 kSa/s, as shown on the right of Figure 8.

4. Experimental Implementation

4.1. Implementation of the Impedance Emulator on an MCU

The impedance emulation method described above could be in principle implemented on any MCU equipped with an ADC and a DAC, provided that its specifications such as clock frequency, ADC sampling rate, resolution, and so on, meet the requirements of the particular application it is intended to be used for. In order to test the devised method, we used the low-cost development board LAUNCHXL-F28379D by Texas Instruments, mounting the 32-bit, 200 MHz dual-core microcontroller TMS320F28379D. All the relevant specification and settings of this implementation are summarized in Table 1. Important configuration details have already been discussed on Section 3.2. Here we add that the duration of the ADC sample and hold window had to be set at least to 125 μ s as reported, otherwise, for shorter times, the acquired signal was to noisy, resulting in unacceptable measurement errors.
The computation of the convolution sum (2) was performed as follows. The ADC buffer consists of N 16-bit unsigned integer memory locations storing the sequence x n , while the impulse response h n is stored in a constant buffer consisting of N 32-bit floating point memory locations. In order to store the continuously updating x n , circular buffering was used, i.e., a pointer to an address of the ADC buffer is incremented by one at each acquisition, and when the end of the buffer is reached, the pointer returns to the beginning of the buffer; hence, after N acquisitions, older values start to be overwritten, since they are not needed anymore. In order to exploit the dual-core parallelism of the MCU, the convolution was split into two separate sums, one over the even terms, computed by core 1, and one over the odd terms, computed by core 2. The sequence of the iterations performed for both sums is illustrated in Figure 9, starting from the memory location labeled as t storing the last acquired sample.

4.2. The Acquisition System

The DAQ of our custom EIS equipment is the 16-bit U2351A data acquisition board from Keysight. The setting we used to test the impedance emulator by acquiring V i n and V o u t are summarized in Table 2. The application of the FFT and the computation of the impedance, as illustrated on Section 3.4.3, are performed in post-processing by using MATLAB. No windowing has been applied, since the sampling rates and the number of samples were chosen as to always acquire an integer number of periods of each sinusoidal component [11]. The DAQ board also mounts a DAC that we used to pilot the voltage-controlled current pump in order to generate the multisine excitation signal. The amplitude of each current component was 50 mA. The shunt and load resistor values were R s h u n t = 200 m Ω , and R l o a d = 5 Ω .
In order to check the reproducibility of the results, we also tested the emulator by using a bench waveform generator to generate V i n , and a bench oscilloscope to acquire V i n and V o u t . Resistors R s h u n t and R l o a d were not used in this phase. The settings of the oscilloscope are reported in Table 2. The clocks of the two instruments were synchronized by wiring the oscilloscope external-clock input connector to the clock output connector of the waveform generator.
After some preliminary measurements, and by following the analysis presented in Section 3.4.4, we decided to measure the emulated impedance in two separate stages, one for the lower and one for the higher frequencies. Indeed, at lower frequencies, a longer acquisition time is needed in order to acquire several periods of the slower sinusoidal components, hence, the sampling rate F a q = 10 kSa/s was used in order to limit the total number of samples. At frequencies greater than 20 Hz, we instead used the sampling rate F a q = 100 kSa/s, in order to avoid phase fluctuations of the kind shown in Figure 8. The results were then combined into a unique impedance curve over the whole frequency interval 0.1–400 Hz.
As a last point, in simulations, V o u t was treated as it were generated instantly as V i n was acquired by the ADC of the emulator. Of course, this is not the case in the real system, that has instead a latency due to the time required to compute (2), introducing a delay T c = 827 μ s between V i n and V o u t . Since the Laplace transform of a delayed function is simply:
L f t T c s = exp s T c L f t s ,
the effect of the MCU latency on the impedance Z f k is corrected by just multiplying V o u t f k by the phase factor exp i 2 π f k T c .

5. Results and Discussion

5.1. Results Obtained on the Custom EIS Measurement System

The emulated impedance for the SOC 100%, as measured by means of the custom EIS equipment, is reported in Figure 10 for seven repeated measurements. It can immediately be noticed that, although the fluctuations due to random noise are small, there are, however, considerable systematic phase distortions at higher frequencies. Points measured at frequencies greater then 100 Hz looks like complete outliers, while at smaller frequencies, it seems that a linear phase distortion exp i 2 π f k T d is present. This can be verified by applying the following calibration procedure:
  • Phase calibration. Let us consider the column vector of the measured phases φ m = φ f 0 , φ f 1 , m T , where the index m is used to indicate each one of the repeated measurements, and the vector defined by arranging all the φ m in a single column, φ = φ 1 , φ 2 , T . Let us also consider the analogous vector φ 0 of the expected phases computed analitically. Finally, the column vector f of all the frequencies f k repeated many times on a column as the number of repeated measurements (i.e., f , φ and φ 0 have the same number of elements). The difference between the measured and the expected phase can then be written as the following linear system in the single unknown T d :
    2 π f T d = φ 0 φ .
    The least-squares solution is T d = 29.7 μ s. Only the frequencies up to 100 Hz were included in the equation system.
  • Amplitude calibration. Since the ADCs of the acquisition system and of the emulator are different, and can produce different results on equal signals, in general, the amplitude has to be calibrated. As above, let us consider the column vector of the measured amplitudes A m = A f 0 , A f 1 , m T , then again the single column arrangement A = A 1 , A 2 , T , and finally the vector A 0 of the expected amplitudes computed analytically. The amplitude correction is given by a calibration constant k A determined by the following linear system:
    A k A = A 0 .
    The least-squares solution is k A = 0.9938 , very close to 1. Indeed, in this case, as it can be seen in Figure 10, the amplitudes were already well matching the expected curve even without calibration.
By applying the calibration procedure, the corrected results shown in Figure 11 were obtained. The good agreement of the measured and expected curves up to 100 Hz proves that the hypothesis of a linear phase distortion was right. Nevertheless, the non-linear systematic phase distortion above 100 Hz remains. By keeping the values of T d and k A just computed, and measuring the emulated impedance for the SOC 20%, again a good matching is obtained, as shown in Figure 12. This suggests that the calibration is linked to the EIS system, and does not depend on the response programmed in the filter. In any case, the origin of such a strong phase distortion is not clear. In order to verify that it is due to the EIS system, and not to the emulator, we performed a set of measurements with a bench oscilloscope.

Results Obtained on the Oscilloscope

The emulated SOC 100% was measured by means of the oscilloscope, and the same calibration procedure described in Section 5.1 was applied, obtaining T d = 3 μ s, and k A = 1.02 . The results are reported for two different numbers of samples in Figure 13 and Figure 14, showing a good agreement between measured and expected curves. The slight phase distortion is within the time resolution set on the oscilloscope ( T a q = 10 μ s at higher frequencies), and might be due to the fact that there is no clock synchronization between the oscilloscope and the impedance emulator. The mean and standard deviation over five repeated measurements of the amplitude and phase of the emulated impedance are reported in Figure 15 and Figure 16. As expected, the error is lower for a greater number of samples. Systematic distortions are at any rate present also in the results obtained with the oscilloscope. However, the phase distortion above 100 Hz in this case is much smaller than that observed with the custom EIS system in Figure 13 and Figure 14. This indicates that the distortion at high frequency is due to the EIS system, and not to the emulator.

6. Conclusions

We presented a method to emulate the impedance of a battery by means of a digital filter. All the details of the design are described. A low-cost prototype of the impedance emulator has been implemented and tested. A good agreement between the programmed and measured impedance was obtained when the emulator was tested by means of a bench oscilloscope. A relevant non-linear phase distortion was instead observed when the emulator was tested on a custom EIS measurement system. Such distortion is clearly linked with the EIS equipment and will need further investigation. Additionally, other excitation signals (e.g., binary sequences [10]) still need to be investigated on the emulator.
Overall, however, results show the feasibility of using the proposed emulator as a fully controllable and low-cost reference for calibrating battery impedance measurement systems. An immediate continuation of this work will be the implementation of the emulator on a better performing MCU or on a single-board computer, in order to increase both the sampling rate F s and the number of samples N s . This should allow emulation of the impedance at frequencies higher than 400 Hz, at the same time reducing the phase distortion.

Author Contributions

Conceptualization, F.S., A.D.A., A.M., P.C.; software and simulations, F.S.; development of the measuring system and experiments; A.D.A., F.S.; writing—original draft preparation, F.S.; writing—review and editing, F.S., A.D.A., A.M., P.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded in part by the University of Perugia grant “Identificazione e caratterizzazione accurata di sistemi e segnali, Ricerca di Base,” 2019 and 2020.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available on request from the corresponding author. The data are not publicly available because they have not been ordered and stored in a clear and manageable form.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A. Sampling the DAC Signal

First, we briefly review some basic notions on ZOH signals. Let X f be the Fourier transform of any continuous time (c.t.) signal x t , and X z o h f the Fourier transform of its respective c.t. ZOH signal x z o h t , sampled with period T. It is also assumed that the sampling rate F = 1 / T and the bandwidth of the c.t. signal satisfy the Nyquist criterion. Hence, the following relation holds [23]:
X z o h f = X f exp i π f T sinc f T ,
i.e., the ZOH signal has a delay of T / 2 with respect to the original signal x t , and also its amplitude is distorted by the sinc f T . In general, given the ZOH spectrum X z o h f , the spectrum of the original signal X f can be reconstructed by inverting (A1).
From now on, we always assume that the frequencies of all the spectral components, the sampling rates, and the duration of the acquisition window, are chosen in order to always acquire an integer number of cycles for each component, and that an integer number of samples is acquired at each cycle. Thus, the spectral components of the DFT with rectangular windowing, divided by the number of samples, are the same as the spectral components of the c.t. signals.
The DAC signal of Figure 6 is a c.t. ZOH with period T s , generated from the sequence V o u t n T s as computed by the FIR filter. Let us indicate as V o u t n T a q the sequence obtained by sampling the DAC signal with sampling rate F a q = 1 / T a q = 10 kHz (the EIS samples of Figure 6). To calculate the impedance, we need to calculate DFT V o u t n T s f , where the sequence V o u t n T s could be simply obtained by decimating V o u t n T a q . However, we want to keep all the samples, since, in general, this has an averaging effect on the noise, thus producing better results. We then derive a different method. One might think that (A1) could be inverted as
1 N s DFT V o u t n T s f = 1 N a q DFT V o u t n T a q f exp i π f T s sinc f T s ,
where N a q is the number of acquired samples, while N s = N a q T a q / T s is the decimated number of samples. Although it is correct to identify X f DFT V o u t n T s f / N s , this inversion does not yield correct results. Indeed, DFT V o u t n T a q f / N a q cannot be identified with the spectrum X z o h f of the c.t. ZOH signal of the DAC, since X z o h f is not band-limited. The two spectra might be considered the same when T a q T s , and (A2) would thus be correct to a very good approximation. In any case, as we will see in the following, the problem has an exact solution, and it is not necessary to use an approximation, whatever the values of T a q and T s might be.
Intuitively, the solution can be derived as follows. The DAC output can be viewed as a c.t. ZOH signal with period T a q and constant for N periods, with N = T s / T a q = N a q / N s . Hence, in accordance with the general Formula (A1), its Fourier transform can be written as:
X z o h f = 1 N a q DFT V o u t n T a q f exp i π f T a q sinc f T a q .
Since, by construction, the c.t. ZOH signal with period T a q is the same as the c.t. ZOH signal with period T s , their spectrum is the same, hence, we can invert (A1) as:
1 N s DFT V o u t n T s f = X z o h f exp i π f T s sinc f T s = = 1 N a q DFT V o u t n T a q f exp i π f T s T a q sinc f T a q sinc f T s
that is the same as the correction (10) that we applied in Section 3.4.3. Let us now derive the same result more formally.
For the sake of brevity, we define X s f DFT V o u t n T s f , and X a q f DFT V o u t n T a q f . Let us also define the zero-padded sequence:
V o u t z p m T a q = V o u t n T s m = n N 0 otherwise ,
and let X a q z p f be its DFT. It is a known result in the theory of signal processing that X a q z p f = X s f [23]. The sequence V o u t n T a q can be rewritten as a sum of translated zero-padded sequences:
V o u t m T a q = k = 0 N 1 V o u t z p m k T a q ,
and its DFT can thus be expressed as:
X a q f = X s f k = 0 N 1 exp i 2 π f k T a q .
Clearly, since X s f is band-limited, so it is X a q f . The last summation is also a known result, it being the DFT of the discrete-time rectangular function with N samples:
k = 0 N 1 exp i 2 π f k T a q = exp i π f N 1 T a q sin N π f T a q sin π f T a q = = exp i π f T s T a q N a q N s sinc f T s sinc f T a q .
Thus, finally:
1 N s X s f = 1 N a q X a q f exp i π f T s T a q sinc f T a q sinc f T s ,
i.e., the same result is obtained as that in (A4) and (10).

References

  1. Tran, M.-K.; Fowler, M. A Review of Lithium-Ion Battery Fault Diagnostic Algorithms: Current Progress and Future Challenges. Algorithms 2020, 13, 62. [Google Scholar] [CrossRef] [Green Version]
  2. Guha, A.; Patra, A. Online estimation of the electrochemical impedance spectrum and remaining useful life of lithium-ion batteries. IEEE Trans. Instrum. Meas. 2018, 67, 1836–1849. [Google Scholar] [CrossRef]
  3. Babaeiyazdi, I.; Rezaei-Zare, A.; Shokrzadeh, S. State of charge prediction of EV Li-ion batteries using EIS: A machine learning approach. Energy 2021, 223, 120116. [Google Scholar] [CrossRef]
  4. Galeotti, M.; Cinà, L.; Giammanco, C.; Cordiner, S.; Di Carlo, A. Performance analysis and SOH (state of health) evaluation of lithium polymer batteries through electrochemical impedance spectroscopy. Energy 2015, 89, 678–686. [Google Scholar] [CrossRef]
  5. Koleti, U.R.; Dinh, T.Q.; Marco, J. A new on-line method for lithium plating detection in lithium-ion batteries. J. Power Sources 2020, 451, 227798. [Google Scholar] [CrossRef]
  6. Wang, X.; Wei, X.; Zhu, J.; Dai, H.; Zheng, Y.; Xu, X.; Chen, Q. A Review of Modeling, Acquisition, and Application of Lithium-ion Battery Impedance for Onboard Battery Management. eTransportation 2020, 7, 100093. [Google Scholar] [CrossRef]
  7. Komsiyska, L.; Buchberger, T.; Diehl, S.; Ehrensberger, M.; Hanzl, C.; Hartmann, C.; Hölzle, M.; Kleiner, J.; Lewerenz, M.; Liebhart, B.; et al. Critical Review of Intelligent Battery Systems: Challenges, Implementation, and Potential for Electric Vehicles. Energies 2021, 14, 5989. [Google Scholar] [CrossRef]
  8. Gong, Z.; Liu, Z.; Wang, Y.; Gupta, K.; da Silva, C.; Liu, T.; Zheng, Z.H.; Zhang, W.P.; van Lammeren, J.P.M.; Bergveld, H.J.; et al. IC for online EIS in automotive batteries and hybrid architecture for high-current perturbation in low-impedance cells. In Proceedings of the APEC 2018, San Antonio, TX, USA, 4–8 March 2018; IEEE: Piscataway, NJ, USA, 2018; pp. 1922–1929. [Google Scholar] [CrossRef]
  9. Carbonnier, H.; Barde, H.; Riga, L.; Carre, A. Electrochemical Impedance Spectroscopy for Online Satellite Battery Monitoring Using Square Wave Excitation. In Proceedings of the 2019 European Space Power Conference (ESPC), Côte d’Azur, France, 30 September–4 October 2019; pp. 1–6. [Google Scholar] [CrossRef]
  10. Crescentini, M.; De Angelis, A.; Ramilli, R.; De Angelis, G.; Tartagni, M.; Moschitta, A.; Traverso, P.A.; Carbone, P. Online EIS and Diagnostics on Lithium-Ion Batteries by Means of Low-Power Integrated Sensing and Parametric Modeling. IEEE Trans. Instrum. Meas. 2021, 70, 1–11. [Google Scholar] [CrossRef]
  11. De Angelis, A.; Buchicchio, E.; Santoni, F.; Moschitta, A.; Carbone, P. Practical Broadband Measurement of Battery EIS. In Proceedings of the 2021 IEEE International Workshop on Metrology for Automotive (MetroAutomotive), Bologna, Italy, 1–2 July 2021; pp. 25–29. [Google Scholar] [CrossRef]
  12. Olarte, J.; Martínez de Ilarduya, J.; Zulueta, E.; Ferret, R.; Fernández-Gámiz, U.; Lopez-Guede, J.M. A Battery Management System with EIS Monitoring of Life Expectancy for Lead–Acid Batteries. Electronics 2021, 10, 1228. [Google Scholar] [CrossRef]
  13. Allen, J. Simulation and Test Systems for Validation of Electric Drive and Battery Management Systems. In Proceedings of the SAE Technical Paper, SAE 2012 Aerospace Electronics and Avionics Systems Conference, Phoenix, AZ, USA, 30 October–1 November 2012. [Google Scholar] [CrossRef]
  14. Fleischer, C.; Sauer, D.U.; Barreras, J.V.; Schaltz, E.; Christensen, A.E. Development of software and strategies for Battery Management System testing on HIL simulator. In Proceedings of the 2016 Eleventh International Conference on Ecological Vehicles and Renewable Energies (EVER), Monte Carlo, Monaco, 6–8 April 2016; pp. 1–12. [Google Scholar] [CrossRef]
  15. Huesca-Nieto, E.A.; Villa-Villaseñor, N.; López-Hernández, J. Arbitrary Waveform Generation Based on Direct Digital Synthesis for Automotive Battery Voltage Transient Simulation. In Proceedings of the 2020 IEEE International Autumn Meeting on Power, Electronics and Computing (ROPEC), Ixtapa, Mexico, 4–6 November 2020; pp. 1–6. [Google Scholar] [CrossRef]
  16. Bui, T.M.N.; Niri, M.F.; Worwood, D.; Dinh, T.Q.; Marco, J. An Advanced Hardware-in-the-Loop Battery Simulation Platform for the Experimental Testing of Battery Management System. In Proceedings of the 2019 23rd International Conference on Mechatronics Technology (ICMT), Salerno, Italy, 23–26 October 2019; pp. 1–6. [Google Scholar] [CrossRef] [Green Version]
  17. Barreras, J.V.; Swierczynski, M.; Schaltz, E.; Andreasen, S.J.; Fleisher, C.; Sauer, D.U.; Elkær, A. Functional analysis of Battery Management Systems using multi-cell HIL simulator. In Proceedings of the 2015 Tenth International Conference on Ecological Vehicles and Renewable Energies (EVER), 31 March–2 April 2015; pp. 1–10. [Google Scholar] [CrossRef] [Green Version]
  18. Barreras, J.V.; Fleischer, C.; Christensen, A.E.; Swierczynski, M.; Schaltz, E.; Andreasen, S.J.; Sauer, D.U. An Advanced HIL Simulation Battery Model for Battery Management System Testing. IEEE Trans. Ind. Appl. 2016, 52, 5086–5099. [Google Scholar] [CrossRef]
  19. Buccolini, L.; Orcioni, S.; Longhi, S.; Conti, M. Cell Battery Emulator for Hardware-in-the-Loop BMS Test. In Proceedings of the 2018 IEEE International Conference on Environment and Electrical Engineering and 2018 IEEE Industrial and Commercial Power Systems Europe (EEEIC/I&CPS Europe), Palermo, Italy, 12–15 June 2018; pp. 1–5. [Google Scholar] [CrossRef]
  20. Vergori, E.; Mocera, F.; Somà, A. Battery Modelling and Simulation Using a Programmable Testing Equipment. Computers 2018, 7, 20. [Google Scholar] [CrossRef] [Green Version]
  21. Di Rienzo, R.; Roncella, R.; Morello, R.; Baronti, F.; Saletti, R. Low-cost modular battery emulator for battery management system testing. In Proceedings of the 2018 IEEE International Conference on Industrial Electronics for Sustainable Energy Systems (IESES), Hamilton, New Zealand, 31 January–2 February 2018. [Google Scholar] [CrossRef] [Green Version]
  22. Overney, F.; Jeanneret, B. Calibration of an LCR-Meter at Arbitrary Phase Angles Using a Fully Automated Impedance Simulator. Proc. IEEE Trans. Instrum. Meas. 2017, 66, 1516–1523. [Google Scholar] [CrossRef]
  23. Haykin, S.; Van Veen, B. Signals and Systems, 2nd ed.; John Wiley & Sons: Hoboken, NJ, USA, 2002. [Google Scholar]
  24. Santoni, F.; De Angelis, A.; Moschitta, A.; Carbone, P. Analysis of the Uncertainty of EIS Battery Data Fitting to an Equivalent Circuit Model. In Proceedings of the 2021 IEEE 6th International forum on Research and Technology for Society and Industry (RTSI), Online Forum, 6–9 September 2021. [Google Scholar]
  25. Vinagre, B.M.; Podlubny, I.; Hernández, A.; Feliu, V. Some approximations of fractional order operators used in control theory and applications. Fract. Calc. Appl. Anal. 2000, 3, 231–248. [Google Scholar]
Figure 1. (Left): The scheme of the actual EIS measurement system connected to a battery. (Right): the same EIS instrument, but connected to the battery emulator implemented by means of a microcontroller unit provided with a unipolar ADC and a DAC.
Figure 1. (Left): The scheme of the actual EIS measurement system connected to a battery. (Right): the same EIS instrument, but connected to the battery emulator implemented by means of a microcontroller unit provided with a unipolar ADC and a DAC.
Sensors 21 07377 g001
Figure 2. A picture of the prototype EIS measurement instrument and the impedance emulator. The EIS instrument consists of a custom-made current source with its power supply, and a Data Acquisition board (DAQ) that provides two differential ADCs (cf. Figure 1) and is also used to control the current source. The impedance emulator is implemented on a Texas Instruments MCU development board. A simple breadboard is used to connect the shunt resistor and to interface the BMS to the impedance emulator.
Figure 2. A picture of the prototype EIS measurement instrument and the impedance emulator. The EIS instrument consists of a custom-made current source with its power supply, and a Data Acquisition board (DAQ) that provides two differential ADCs (cf. Figure 1) and is also used to control the current source. The impedance emulator is implemented on a Texas Instruments MCU development board. A simple breadboard is used to connect the shunt resistor and to interface the BMS to the impedance emulator.
Sensors 21 07377 g002
Figure 3. Measured impedance curve of the Samsung battery at SOC 100% and 20%. The equivalent circuit model shown on the right has been fitted to experimental data. A picture of the actual battery is also shown.
Figure 3. Measured impedance curve of the Samsung battery at SOC 100% and 20%. The equivalent circuit model shown on the right has been fitted to experimental data. A picture of the actual battery is also shown.
Sensors 21 07377 g003
Figure 4. FIR frequency response obtained by using the approximation (7) compared with the experimental data. The components Z r , Z w and Z i are also reported as to show the goodness of the approximation Z w Z i for f < 1 Hz.
Figure 4. FIR frequency response obtained by using the approximation (7) compared with the experimental data. The components Z r , Z w and Z i are also reported as to show the goodness of the approximation Z w Z i for f < 1 Hz.
Sensors 21 07377 g004
Figure 5. (Left): The power spectrum of the generated V i n . (Right): A portion of V i n in the time domain. The sampled and quantized sequences are renormalized for ADC ranges and levels, in order to be shown together with the original signal.
Figure 5. (Left): The power spectrum of the generated V i n . (Right): A portion of V i n in the time domain. The sampled and quantized sequences are renormalized for ADC ranges and levels, in order to be shown together with the original signal.
Sensors 21 07377 g005
Figure 6. V o u t resulting from (2) simulated as a zero-order-hold signal generated by the DAC and sampled with the ADC2 of the EIS instrument. See Section 3.4.2 for more details.
Figure 6. V o u t resulting from (2) simulated as a zero-order-hold signal generated by the DAC and sampled with the ADC2 of the EIS instrument. See Section 3.4.2 for more details.
Sensors 21 07377 g006
Figure 7. (Left): Nyquist plot of the simulated FIR frequency response compared with the analytical response. (Right): Bode plots of amplitude and phase of the FIR frequency response.
Figure 7. (Left): Nyquist plot of the simulated FIR frequency response compared with the analytical response. (Right): Bode plots of amplitude and phase of the FIR frequency response.
Sensors 21 07377 g007
Figure 8. Effects of the non-synchronization of the EIS board with the emulator board. A random delay or anticipation has been inserted between V i n and V o u t in the simulation. (Left): Simulation results for amplitude and phase of the FIR frequency response when the sampling period of the EIS board is set to T a q = 100   μ s. (Right): Simulation results when T a q = 10   μ s.
Figure 8. Effects of the non-synchronization of the EIS board with the emulator board. A random delay or anticipation has been inserted between V i n and V o u t in the simulation. (Left): Simulation results for amplitude and phase of the FIR frequency response when the sampling period of the EIS board is set to T a q = 100   μ s. (Right): Simulation results when T a q = 10   μ s.
Sensors 21 07377 g008
Figure 9. The sequence of the iterations performed to compute the convolution (2), split into two separate sums over the even and odd terms, respectively. The first term of the summation is indicated in green, that is, the memory location storing the last acquired sample, i.e., the sample at current time t. The last term is indicated in red.
Figure 9. The sequence of the iterations performed to compute the convolution (2), split into two separate sums over the even and odd terms, respectively. The first term of the summation is indicated in green, that is, the memory location storing the last acquired sample, i.e., the sample at current time t. The last term is indicated in red.
Sensors 21 07377 g009
Figure 10. The emulated impedance as measured by the custom EIS system for seven repeated measurements.
Figure 10. The emulated impedance as measured by the custom EIS system for seven repeated measurements.
Sensors 21 07377 g010
Figure 11. The emulated impedance as measured by the custom EIS measurement system after the calibration illustrated in Section 5.1.
Figure 11. The emulated impedance as measured by the custom EIS measurement system after the calibration illustrated in Section 5.1.
Sensors 21 07377 g011
Figure 12. The emulated impedance as measured by the custom EIS measurement system after the calibration illustrated in Section 5.1.
Figure 12. The emulated impedance as measured by the custom EIS measurement system after the calibration illustrated in Section 5.1.
Sensors 21 07377 g012
Figure 13. The emulated impedance as measured by means of a bench oscilloscope after the calibration illustrated in Section 5.1.
Figure 13. The emulated impedance as measured by means of a bench oscilloscope after the calibration illustrated in Section 5.1.
Sensors 21 07377 g013
Figure 14. The emulated impedance as measured by means of a bench oscilloscope after the calibration illustrated in Section 5.1.
Figure 14. The emulated impedance as measured by means of a bench oscilloscope after the calibration illustrated in Section 5.1.
Sensors 21 07377 g014
Figure 15. Mean and standard deviation over five repeated measurement of the emulated impedance.
Figure 15. Mean and standard deviation over five repeated measurement of the emulated impedance.
Sensors 21 07377 g015
Figure 16. Mean and standard deviation over five repeated measurement of the emulated impedance.
Figure 16. Mean and standard deviation over five repeated measurement of the emulated impedance.
Sensors 21 07377 g016
Table 1. Technical features of the impedance emulator prototype.
Table 1. Technical features of the impedance emulator prototype.
FeatureValue
ADC range3 V, unipolar
ADC resolution12 bit
ADC sampling rate F s 1000 Sa/s
ADC sample & hold time125 μ s
DAC range0–3 V
DAC resolution12 bit
Number of samples N30,000
CPU cores2
CPU clock frequency200 MHz
Table 2. Settings of the data acquisition system.
Table 2. Settings of the data acquisition system.
FeatureEIS Equipment/Keysight DAQBench Oscilloscope
ADC1 range5 V, bipolar1.2 V, bipolar
ADC2 range1.25 V, bipolar0.12 V, bipolar
ADC1/2 resolution16 bit8 bit
ADC1/2 sampling rate F a q 10 and 100 kSa/s10 and 100 kSa/s
Number of samples N a q 2 MSa2 and 5 MSa
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Santoni, F.; De Angelis, A.; Moschitta, A.; Carbone, P. Digital Impedance Emulator for Battery Measurement System Calibration. Sensors 2021, 21, 7377. https://doi.org/10.3390/s21217377

AMA Style

Santoni F, De Angelis A, Moschitta A, Carbone P. Digital Impedance Emulator for Battery Measurement System Calibration. Sensors. 2021; 21(21):7377. https://doi.org/10.3390/s21217377

Chicago/Turabian Style

Santoni, Francesco, Alessio De Angelis, Antonio Moschitta, and Paolo Carbone. 2021. "Digital Impedance Emulator for Battery Measurement System Calibration" Sensors 21, no. 21: 7377. https://doi.org/10.3390/s21217377

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop