Online Impedance Measurement of Lithium-Ion Battery: Applying Broadband Injection With Specified Fourier Amplitude Spectrum

State parameters such as the state-of-charge (SOC) and state-of-health (SOH) play important role in the operation of Li-ion batteries, and accurate estimate of the parameters is of prime importance in evaluating the battery condition and guaranteeing the safe use. While it is difficult to measure the SOC and SOH directly, the battery internal impedance can be used to obtain the parameters. Recent studies have shown methods based on pseudo-random binary sequence (PRBS) with which the battery impedance can be rapidly measured in real time. Using this method, the battery is charged and recharged according to the excitation waveform and Fourier methods are applied to obtain the impedance. The PRBS often produces accurate impedance measurements, but the method may require a high perturbation amplitude, which may easily interfere with the nominal battery operation and create nonlinear distortions. This article proposes the use of discrete-interval-binary sequence (DIBS) for measuring the battery impedance. The DIBS is a computer-optimized binary sequence in which the power spectral densities are maximized at specified frequencies without increasing the signal time-domain amplitude. Experimental measurements of a commercial Li-ion battery are presented to demonstrate the effectiveness of the proposed method.


I. INTRODUCTION
I N RECENT years, lithium-ion (Li-ion) batteries have be- come widely used in many consumer and industrial powerelectronic applications.The batteries have become a significant factor particularly in electric transport due to continuously tightening emission restrictions.The advantages of the Li-ion batteries include high power and high energy density [1].
Electric vehicles have experienced massive increase in sales and investment in recent years [2].However, increased use of Li-ion batteries in automotive applications has caused significant environmental impact as most batteries are landfilled upon reaching end of life [3].While it is possible to reuse end-of-life batteries from electric vehicles, there currently exists no efficient method to determine the battery health and optimal reuse in second-life applications.Health monitoring of Li-ion batteries also becomes a critical function as the batteries contribute for a high proportion of the total cost of an electric vehicle.
State parameters such as the state-of-charge (SOC) and stateof-health (SOH) are typically used for optimizing the battery performance.The SOC provides important information of the amount of charge that can be drawn from the battery and the SOH can be used to study the battery suitability to a second-life application [4], [5], [6].Accurate real-time monitoring of the SOC and SOH is particularly useful in electric vehicles due to the consideration for both driving distance and lifetime capabilities.A real-time and low-cost method with which the battery dynamics can be rapidly evaluated could potentially enable more efficient usage of Li-ion batteries in electric vehicles.
While it is difficult to directly measure the battery SOC and SOH, recent studies have shown that battery internal impedance can be used to obtain the SOH and SOC [7], [8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], [19], [20].The impedance is conventionally measured using electrochemical impedance spectroscopy (EIS) in which sinusoidal perturbations are injected on top of the battery nominal output current.The resulting output voltage and current are measured, and Fourier transform is applied to obtain the battery impedance at various frequencies.Although the EIS provides an accurate impedance estimate, the method is limited due to impractical and costly implementation.As a sinusoidal wave carries energy for only one frequency at a time, the EIS-based measurement takes a long measurement time, which would be impractical for measuring a battery with fast-changing dynamical states.
Recent studies have demonstrated broadband methods such as the pseudo-random binary sequence (PRBS) to measure the battery impedance [21], [22], [23], [24].Since the PRBS contains energy at several frequencies, the impedance can be measured in a fraction of the time required for traditional EIS (seconds instead of minutes).Additionally, as the PRBS is in binary form, the excitation is very easy to apply in practice using a low-cost signal generator the output of which can only cope with a small number of signal levels [25], [26].When applying an external perturbation to measure the battery impedance, it is important to use small enough perturbation amplitude so that the measurement process does not create too strong nonlinear distortions.However, the perturbation amplitude must be high enough to produce an adequate signal-to-noise ratio (SNR).The drawback using the PRBS is that the signal energy is distributed over many harmonic frequencies.In order to produce a higher SNR, either the injection amplitude has to be increased to produce more perturbation, or more injection periods and averaging techniques have to be applied.Both methods may become difficult in practice; increasing the excitation amplitude can drive the system out of linear operating range and increasing the number of injection periods requires longer measurement time and computing power.
This article proposes the application of discrete-interval binary sequence (DIBS) for measuring the internal impedance of Li-ion batteries.The DIBS is a computer-optimized broadband binary signal in which as much power as possible is pushed into the specified harmonic frequencies without increasing the signal time-domain amplitude [27], [28], [29], [30].The DIBS resembles the conventional PRBS in the time domain as both signals are binary.In the frequency domain, however, the DIBS can have (typically) 4-8 times more energy at user-specified harmonic frequencies (while having the same time-domain amplitude as the PRBS).
This article is a revised and extended version of a presentation at ECCE2022 [31].The revised version contains more experimental work to verify the proposed method and more detailed analysis of the experimental results.
The remainder of the article is organized as follows.Section II gives a theoretical background for battery dynamical states characterization based on the internal impedance.Section III describes the methods for battery impedance measurement.Section IV presents experimental measurements based on a commercial Li-ion battery.Finally, Section V draws conclusions.

II. THEORY
Studies have shown that the battery internal impedance provides key information of the battery cell conditions [7], [8], [11], [20], [32], [33].Fig. 1 shows a typical impedance spectra of a Li-ion battery as a Nyquist plot.The imaginary axis is usually inverted so that the capacitive property, which corresponds to low-frequency behavior, is displayed in the first quadrant of the complex plane.The impedance curve can be divided into several regions that signify various chemical processes in the battery.At low frequencies of less than a few hundred mHz, the electrodes are dominated by diffusion of Li-ions in the crystals.Such processes are represented by a 46 • rising line in the Nyquist plot.The mid-frequency region, which usually ranges from several mHz to a few kHz, describes the ion movement between the solid-electrolyte interphase (SEI) layers and the electrodes, known as the charge-transfer (CT) processes.At higher frequencies, inductive behavior starts to dominate and characterizes the overall conduction parts of the battery cell.
Studies have shown close relations between the battery internal impedance and the battery SOC and SOH [10], [12], [13], [14], [15], [16], [17], [18], [19].The battery equivalent circuit model (ECM) is a widely used approach for modeling and analyzing the battery impedance [8], [19], [34], [35].Fig. 2 gives an example of a battery ECM consisting of an open-circuit voltage source (V oc ) and passive electrical components.In the circuit diagram, the battery dynamics can be approximated by using a bulk resistor (R bulk ) and a bulk inductance (L bulk ) for the ohmic and inductive region, a parallel circuit of a resistor (R SEI ) and a constant-phase element (CPE SEI ) for the SEI region, a combination of a resistor (R CT ), a Warburg element (W diffusion ) and a constant-phase element (CPE electrode ) for the CT and diffusion regions [36], [37].The ECM parameter values can be used to derive the SOC and SOH parameters [10], [12], [13], [14], [15], [16], [17], [18], [19].Studies have also demonstrated the interdependency between the battery state parameters to show that the states can be reliably determined by analyzing the impedance [9], [18].III.METHODS Fig. 3 demonstrates the basic principle for measuring the battery internal impedance.An external power source applies a current disturbance to charge and discharge a battery cell.The current injection produces a voltage response at the cell terminals.Such voltage response from the current injection characterizes the internal impedance of the cell.Both cell current and voltage are measured and stored as sequences of realnumber values.Discrete Fourier Transform is then applied to the measured current and voltage sequences.Each element in the Fourier transform sequence represents a complex-number value at a harmonic frequency in the spectrum, counting from zero frequency to the Nyquist frequency of the sampling rate.At each harmonic frequency, the Fourier-transform value of the voltage is divided by the Fourier-transform value of the current to obtain the corresponding impedance value.Several periods of perturbations are typically injected so that the impedance calculation for each period can be combined to produce an average impedance value at each harmonic frequency.

A. Broadband Impedance Measurement
A conventional technique for measuring the battery impedance is to apply electrochemical impedance spectroscopy (EIS) [37].In the EIS, external sinusoidal current waves at various frequencies are sequentially applied to the battery terminals in accordance to Fig. 3.While the EIS usually provides accurate measurement results, injecting single-frequency sinusoidal waves one by one requires a relatively long measurement time (typically tens of minutes).Another drawback of using sinusoids is that a sinusoidal waveform contains a large number of different values (signal levels) in the waveform construction, the implementation of which is difficult using practical low-cost electronic components.
Recent studies have shown broadband methods such as the pseudo-random binary sequence (PRBS) to rapidly measure the battery impedance (typically in a few seconds) [21], [22], [23], [24].The PRBS offers several attractive benefits in battery impedance measurement.Since the signal contains only two signal levels, the signal can be implemented with low-cost signal generators the output of which have a limited number of signal levels [25], [26].Another advantage compared to other perturbation signals is that the PRBS has the lowest possible peak factor.Signals with low peak factors are suitable for measuring sensitive systems where the system linear operation can be easily violated under high disturbance amplitude.
The problem with applying the PRBS is that the signal total energy is spread over many harmonic frequencies.When measuring the battery impedance with high level of noise floor, insufficient energy per harmonic frequency results in the excitation masked behind measurement noise, which leads to an inaccurate measurement result.Increasing the time-domain injection amplitude can improve the noise sensitivity but can easily drift the system out of its linear operating range.Another method for mitigating the effect of noise is to increase the number of injection periods and apply averaging but this method requires longer measurement time and higher computing power.

B. Discrete-Interval Binary Sequence
The discrete-interval binary sequence (DIBS) is one class of pseudo-random sequences where the signal is optimized to obtain maximum power densities in the user-specified harmonic frequencies without increasing the signal time-domain amplitude [27], [28], [29], [30].Compared to the PRBS of the same sequence length and amplitude, the DIBS contains much higher energy at the specified harmonics.Despite losing effective frequency resolution due to less energy at the other harmonics, the DIBS power spectrum is much more tolerant to external noise.An additional benefit of the sequence is that the target frequency harmonics can be chosen, for example, according to a logarithmic scale.
The optimization procedure for synthesizing the DIBS can be formulated as follows [38], [39], [40], [41].A sequence D k , which contains user-specified Fourier amplitudes, is given as the discrete Fourier transform (DFT) of a signal d n , where k denotes the harmonic index and n denotes the time-domain sample index (0 ≤ k < N and 1 ≤ n ≤ N where N denotes the length of D k ).The objective is now to find a sequence B k so that the following cost function is minimized.
In ( 1), B k represents the DFT of the optimized binary sequence b n .In the beginning, the sequence b n can be randomly assigned to any N -length binary sequence of unity amplitude.The DFT of b n can then be calculated as The phase angle sequence φ k of B k is extracted accordingly, as defined by The sequence is further optimized by adjusting the phase angles φ k in a series of loop iterations, where each iteration contains the following steps.1) Create a complex-value sequence, defined as 3) Obtain a new binary sequence for b n , by collecting the signs of c n as Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.Finally, the optimization cost can be calculated using (1) and the latest values of B k .Although the described iterative algorithm always guarantees convergence to a local minimum, that is, the loop always terminates at some point, the algorithm does not guarantee a globally optimal result.Therefore, several executions can be repeated with different random seed sequences for b n so that multiple cost values are yielded to increase the likelihood of obtaining a globally minimum cost.It is also worth noting that typically only up to 85% of the signal total energy can be pushed into the specified harmonics [27].
Fig. 4 compares the DIBS and the conventional PRBS in the time and frequency domain.Both sequences (255 bits long) have been generated at 3 kHz and have the same time-domain amplitude.For the DIBS, five harmonic frequencies were logarithmically selected and the signal energy was maximized at these frequencies.The DIBS harmonics have approximately five times higher energy level than the PRBS in this example.As most of the energy is maximized at the specified harmonic frequencies, and the total DIBS energy stays the same after the optimization stage, the other (unspecified) harmonic frequencies typically have near-zero energy, and therefore, they are neglected in the visualization of the DIBS spectral energy.

A. Measurement Setup
An experimental measurement setup was created as depicted in Fig. 5 to implement the battery impedance-measurement process.The setup consists of a commercial Li-ion battery cell (TerraE INR-21700-50E), a bi-directional power supply (Kepco  BOP 50-20MG) for excitation injection, a data-acquisition device (NIDAQ USB-6363) for collecting analog signals as well as providing the excitation reference to the bi-directional power supply and a computer for data analysis.The battery cell under test is a cylindrical cell type with lithium nickel manganese cobalt oxides (NMC) as the positive electrode material and graphite as the negative electrode material.The cell has a nominal capacity of 5000 mAh, a nominal voltage of 3.6 V and a standard charge/discharge current of 1 A (0.2 C).A shunt resistor of 0.5 Ω was used for sensing the battery cell input current.The measured signals were acquired as differential input voltages to the measurement card with an analog-to-digital-conversion resolution of 16 bits.The cell voltage-sensing wires were tapped directly at the metallic terminals of the cell for accurate voltage measurement.Fig. 6 shows the experimental platform.

B. Parameter Design
Several experiments were conducted to demonstrate the performance of the discrete-interval binary sequence (DIBS) and the conventional pseudo-random binary sequence (PRBS) in measuring the Li-ion battery internal impedance.Each experiment performs two measurements, one applying the DIBS and the other applying the PRBS.An additional measurement applying the conventional EIS was also carried out to provide a reference for each experiment.As the test cell had a standard discharge current of 1 A, the excitation amplitude of 20 mA (2% of the standard discharge current) was chosen in the experiments.The PRBS and the DIBS were applied separately to measure the cell impedance in the frequency band of 100 mHz to 1 kHz in order to capture the battery diffusion processes, charge-transfer processes and the higher-frequency reactions.Both excitations had the same sequence length (32767 bits) and time-domain amplitude (20 mA), but for the DIBS 20 harmonic frequencies were logarithmically selected and their spectral energy maximized.The PRBS and the DIBS were separately applied to measure the cell impedance in the frequency band of 100 mHz to 1 kHz in order to capture the battery diffusion processes, charge-transfer processes and the higher-frequency reactions.
The amplitude spectrum of the battery current measurement noise shown in Fig. 7 (at no-load condition) was investigated to aid the DIBS-injection design.It was observed that the measurement noise was more significant in the upper range (100 Hz to 1 kHz) of the measurement bandwith.Another consideration in the excitation design is that the control bandwidth of the currentcontrolled output of the injection device (KEPCO BOP-1 kW) is limited to less than 1 kHz, which results in weaker output at frequencies near 1 kHz.Therefore, the specified DIBS spectral energy was designed such that approximately 80% of the total energy was pushed into the five harmonic frequencies above 100 Hz.Fig. 8 shows the amplitude spectrum of the designed DIBS and the PRBS [42].
Both the DIBS and PRBS excitations were generated at 3 kHz, and injected/averaged with 30 periods.The sampling rate of the measurement card was selected as 500 kHz.Table I shows the parameters used in the experiments.

C. Error Analysis
The quality of the battery impedance measurement is evaluated using the normalized root-mean-squared-error (NRMSE) function given as where Z ref is the reference impedance model in the frequency domain (a sequence of complex values), Z is the estimated model based on the measurement result, k is the harmonic number of the impedance and N is the number of harmonics in each model.

D. Verification At Room Temperature
The first set of experiments were performed at room temperature (22 °C).The measurements were performed according to the setup shown in Fig. 5 by applying the designed DIBS and PRBS perturbations.Fig. 9 shows samples of the battery Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.current and voltage measurements.The figure shows that the PRBS and DIBS produce similar time-domain waveforms but as shown in Fig. 10 the spectral energy at the specified harmonic frequencies in the DIBS is much higher than the energy at the harmonic frequencies in the PRBS.As the sequences in the two experiments had the same parameters, the measurement time for both experiments was the same (approximately one tenth of the measurement time used by the EIS).In practice, the measurement time can be further reduced by lowering the number of injection periods.
Fig. 11 shows the resulting impedance for the PRBS injection, DIBS injection, and EIS reference in a Bode plot and a Nyquist plot.As the figure shows, the impedance obtained by the DIBS injection follows the reference very accurately whereas the impedance obtained by the PRBS injection is strongly distorted over the whole spectrum.
The NRMSE function given in (2) was applied to evaluate the accuracy of the PRBS and the DIBS injections.The measurement obtained by the EIS was used as the reference in the error calculation.An NRMSE value of 1.29% was obtained for the DIBS injection and a value of 8.73% for the PRBS injection.The results indicate that the PRBS injection produces almost seven times less accuracy than the DIBS injection in the experiment.

E. Verification at Different State-of-Charges
Further verification of the proposed method was performed by measuring the battery impedance at different values of state-of-charge (SOC).The excitations were applied using the parameters shown in Table I.The battery cell was discharged from 100% SOC to 0% SOC at a discharge current of 5 A (1 C).The impedance was measured at every 20% drop in the SOC.
The measurement results for the DIBS injection and EIS (reference) are shown in Fig. 12.The results obtained by the PRBS showed similar (distorted) behavior as in the previous  experiment but these results have been left out from the figure.
The results of the NRMSE analysis are shown in Table II.As the results show, the curves obtained by the DIBS accurately follow the references in a wide frequency band.

F. Verification Using Multiple Battery Cells
Three different battery cells were applied to further verify the effectiveness of the proposed method.All the test cells had a NMC as the positive electrode material.The experiments applied the same excitation parameters as provided in Table I.The measurement results are shown in Fig. 13 and Table III shows the    impedance values lead to a higher voltage response during the excitation, which increases the measurement accuracy.

G. Verification at Different Temperatures
The performance of the proposed method was also verified by measuring the battery (same as in the first experiment) impedance at different temperatures.The PRBS and DIBS excitations (and EIS) were applied with the parameter values shown in Table I.The battery cell was placed inside a climate chamber that can accurately control the ambient temperature.The temperature values for the experiments were selected at each 10 degrees step ranging from −10 °C to 30 °C.For each temperature value, the ambient temperature was kept constant by the climate chamber.For each experiment, the perturbation was applied for the cell at zero load current and 100% state of charge.
Fig. 14 shows the experimental results at several temperatures (−10 °C to 30 °C), where only the DIBS (colored markers) and EIS measurements (solid lines) are shown to visualize the DIBS measurement accuracy.The experiments show that the DIBS was able to accurately measure the impedance at a wide range of temperatures.The figure shows some measurement error at low frequencies particularly at low temperatures.Such an error is likely to be caused by nonlinearities which seems to be stronger at low temperatures and low frequencies.
Table IV shows the result of the NRMSE analysis.For temperatures higher than zero degrees, the DIBS produced much more accurate results compared to the PRBS.At subzero temperatures, however, both injections produced approximately similar accuracy.This can be explained by the fact that the impedance values at low frequencies are much higher in magnitude at lower temperatures compared to higher temperatures.As a result, the SNR of the voltage response at low frequencies and temperatures has significantly improved.
The impedance at low frequencies is linked to the battery diffusion region where the slow process of Li-ion diffusion in the electrodes happens [6], [20].Lower temperature implies lower overall kinetic energy for the molecules.This leads to a higher electrical resistance in the process of Li-ion diffusion, as reflected by an expanding impedance curve into the right half of the complex plane in Fig. 14, while the higher-frequency region displayed less significant changes in the electrical resistance.

H. Discussion: Practical Implementation of the Methods
The conventional PRBS is generated using a linear-feedback shift register circuitry [25] or using a digital microcontroller without requiring much computing and memory resources.However, the case is more complicated with the DIBS.Although the initial sequence of the DIBS can be generated the same way as the conventional PRBS, the optimization stage would require a digital processor with sufficient capability and memory buffer.The digital processor must be capable of performing floatingpoint arithmetic operations and Fast Fourier-Transform (FFT).The digital memory must be large enough to store the intermediate sequences at different steps of the optimization process.Such tasks can be handled by modern general-purpose personal computers, but can be challenging or resource-consuming to execute on less-powerful microcontrollers.Another approach is to pre-compute the DIBS using possible combinations of excitation parameters and store the final optimized sequences in a memory device.Depending on the use case, the required memory size equals the sequence length multiplied by the number of different sequence parameter combinations.Storing pre-computed sequences could be a preferable solution because it avoids the task of optimization, which requires more computing power and memory size.In any case, a memory buffer is required to store the final DIBS, rather than generating the output in realtime as can be done with the conventional PRBS.
V. CONCLUSION Battery internal impedance is an important parameter to evaluate the battery SOC and SOH.Recent studies have presented the pseudo-random-binary-sequence (PRBS) injection to be used in obtaining the battery internal impedance.The method has certain advantages, but requires low noise floor.Under tight restrictions of the injection amplitude during the identification, the method may not work.
This article has presented the use of the discrete-intervalbinary sequence (DIBS) to perform online measurement of Li-ion battery impedance.The DIBS is a computer-optimized pseudo-random sequence in which the power spectrum can be specified by the user.The energy at the specified harmonic frequencies can be increased 3-10 times compared to the conventional PRBS.Otherwise the DIBS retains all the benefits given by the PRBS in an online impedance measurement.The DIBS is particularly useful for measuring sensitive battery systems that may easily drift out of linear operating range due to an external perturbation.Experimental measurement results showed that the DIBS provides superior measurement accuracy compared to the conventional PRBS.
The presented method can be applied in various applications of Li-ion batteries.One example is in realtime state monitoring of battery packs in electric vehicles, implemented by an onboard battery management system.Another example could be to perform mass testing of used battery cells for health and stateof-life estimation using low-cost measurement equipment.The future work following this article will consider implementing the technique in a practical application.

4 )
Re-compute B k and φ k from the obtained b n .Terminate the loop if the new φ k remains unchanged compared to the phase values at the start of the current loop iteration.Otherwise, go back to the first step for the next iteration.

Fig. 4 .
Fig. 4. PRBS and DIBS (5 harmonics) of length 255 and 3 kHz generation frequency in the time domain and frequency domain.

Fig. 7 .
Fig. 7. Amplitude spectrum of battery current at no load.
It is assumed that Z and Z ref have the same size and frequency resolution.Range{Z ref } is the normalization factor calculated as Max{|Z ref |} − Min{|Z ref |}.The NRMSE value in (2) is usually expressed in percentage and indicates the accuracy of the impedance measurement based on Euclidean error distance in the Nyquist plot.A smaller error value indicates a more accurate measurement.

Fig. 10 .
Fig. 10.Measured amplitude spectra of the battery current and voltage.

Fig. 11 .
Fig. 11.Battery impedance measurement results at room temperature (22°C) in a Bode plot and a Nyquist plot.

Fig. 14 .
Fig. 14.Impedance measurement results using DIBS (markers) and EIS reference (solid lines) at different temperatures (−10°C to 30°C) in a Bode plot and a Nyquist plot.

TABLE III IMPEDANCE
MEASUREMENT ERRORS USING THE PRBS AND DIBS INJECTIONSFOR DIFFERENT NMC CELLS result of the NRMSE analysis.The results are consistent with the previous experiments.It is also observed that when measuring Samsung INR-18650-29E cell, the DIBS and PRBS had almost the same performance, as the impedance magnitude of the cell was significantly higher than in the other cells.Higher internal

TABLE IV IMPEDANCE
MEASUREMENT ERRORS USING THE PRBS AND DIBS INJECTIONS AT VARIOUS TEMPERATURES (−10°C TO 30°C)