Multi-Cell and Wide-Frequency In-Situ Battery Impedance Spectroscopy

The use of dc–dc converters for in-situ electrochemical impedance spectroscopy has been investigated by several works in recent years, with different implementation strategies and promising results. There are, however, two important limitations that still hinder a commercial application of this technique: first, the need to deal with the battery discharge during the measurement, particularly critical at very low frequencies; second, the difficulty of accurately measuring the small ac voltage response of several cells in a pack, with common-mode dc voltages that can be five (or more) orders of magnitude higher. This article addresses both challenges, from an instrumentation and measurement perspective, presenting a solution for impedance measurements down to 10 mHz, on a system composed of 16 lithium-iron-phosphate cells or modules connected in series. A dc–dc boost converter is used to inject a multisine current perturbation on all batteries, with closed-loop control, and all cell voltages are conditioned to optimize the measurement resolution and accuracy of their ac components. Suitable signal processing compensates for the voltage drift caused by the battery discharge, and evaluates the residual distortion in the signal, to assess the validity of the impedance estimate. Experimental tests confirm that the obtained results are sufficiently precise (or repeatable) to allow detecting impedance variations occurring during the battery discharge or after repeated charge/discharge cycles.


I. INTRODUCTION
T HE rapid growth in the number and size of battery applications entering the market is pushing for advancements in in-situ condition monitoring methods, to estimate the battery's State of Charge (SoC), State of Health (SoH) and residual life more accurately and more reliably [1], [2], [3].To achieve this, research on instrumentation and measurement is currently focusing on two main directions: 1) using improved state estimation algorithms and/or machine learning to infer diagnostic and prognostic information from traditional measurements (i.e., voltage, current, and temperature) [4], [5], [6], [7] and 2) developing simpler and more affordable ways to implement impedance spectroscopy, especially with approaches suitable for in-situ application [8], [9], [10], [11].The latter has the potential to provide more accurate and robust information about the internal state of the battery because it complements traditional dc measurements with the measurement of the internal impedance.
Electrochemical impedance spectroscopy (EIS) is a wellestablished measurement technique, largely used in laboratories for the characterization of electrochemical devices, including batteries and fuel cells.The principle of this technique is that, by measuring the voltage (or current) response to an ac perturbation in the current (or voltage) at different frequencies, it is possible to gain detailed insight into the different physical and chemical processes that characterize the state and performance of the device under test [12].
In a laboratory environment, EIS is typically performed using dedicated and sophisticated instrumentation, in steadystate conditions.However, in recent years, there has been a growing interest to apply EIS in situ, to enable accurate condition monitoring of batteries or fuel cells while they are used in the field.Most approaches proposed in the literature are based on the use of power converters (usually, dc-dc converters) to create the required ac perturbations, as those converters are already connected to the batteries and fuel cells in most industrial applications [11], [13], [14], [15], [16], [17], [18], [19], [20], [21].Hereafter, this article will focus on the application to batteries, though many aspects of this research are relevant to fuel cell applications as well.
Different types of power converters may be used in battery-powered systems for different purposes, but most commonly, batteries are connected to dc-dc converters that regulate the output voltage to match the requirement of either a dc load or a dc-ac inverter.To achieve the highest efficiency, modern power converters operate in switch mode, i.e., they are based on semiconductor devices (e.g., MOSFETs or IGBTs) that are controlled to rapidly switch between fully on and fully off states.The most common control strategy is pulse width modulation (PWM), which keeps the switching frequency constant and controls the duty cycle (i.e., the relative duration of the on state), in order to regulate the converter output.
In a dc-dc converter, the duty cycle is normally controlled in a closed loop, to maintain the output voltage at a specified constant value.However, it is also possible to control the duty cycle to introduce ac perturbations in the input (battery) current, in addition to controlling the dc output voltage.The ac current control can be implemented either in open loop [13], [14] or in closed loop [11], [15], [16], [17], [18], but the closed-loop solution will guarantee a lower distortion and a more accurate amplitude of the current signal.The ac perturbation is usually sinusoidal [13], [14], [17] or multisine [11], [15], [16], though other waveforms have been proposed too, e.g., square wave [18] or pseudorandom binary sequence [22].
Despite the promising results of recent works, there are still important challenges that need to be fully addressed before in-situ EIS can be used in commercial applications.First, the operation of the battery, which discharges during EIS measurements, violates the requirement of steady-state condition for a correct impedance definition and poses some limitations to the lowest frequencies at which the impedance can be measured; laboratory EIS goes down to the microhertz range [23], while results of in-situ EIS reported in the literature are limited to hundreds of millihertz or higher (0.1 Hz in [11], [15], and [17], 1 Hz in [14] and [16], 10 Hz in [18] and 100 Hz in [13]).Second, the need to acquire and process higher frequency signals (compared to the typical bandwidth of battery currents and voltages) has limited most in-situ EIS studies to one cell/module [13], [14], [15], [16], [17] or two [11], [18], whereas industrial applications may use tens or hundreds of cells.
This article aims to contribute to addressing the two challenges above and presents a solution to achieve power-converter-based EIS simultaneously on 16 battery cells/modules connected in series, covering a frequency range from 10 mHz to 100 Hz.Extending the EIS range down to 10 mHz is an important improvement to the state of the art, because it provides insight into the diffusion phenomena, typically not visible above 100 mHz, while monitoring several cells/modules simultaneously is important for efficient battery management, to quickly and accurately detect differences in individual cell/module performance.This article proposes a signal conditioning approach to accurately measure the small ac voltage signals with common mode dc voltages up to 50 V, and a method to deal with the battery discharge through suitable signal processing and signal distortion assessment.The work is presented from an instrumentation and measurement perspective, focusing on achieving highly repeatable measurements, which is a prerequisite for any future application of in-situ EIS.
The remainder of this article is organized as follows: Sections II and III describe the experimental setup used in this study and the proposed signal conditioning solution, respectively.The measurement setup is then initially verified using a passive circuit, in Section IV, before being applied to real batteries.Section V presents the proposed signal processing and quality verification for in-situ applications, while experimental results on batteries are finally reported in Section VI, focusing on the evaluation of measurement repeatability (precision).Section VII concludes this article, summarizing the advantages and limitations of the proposed method.It should be noted that some of the content of this article is reused from the author's thesis [24].

II. EXPERIMENTAL SETUP
In this work, lithium-iron-phosphate (LFP) batteries have been chosen, as they are becoming very promising for many applications, because of their inherent safety advantage over other types of lithium-ion batteries.The elementary cell is a 26650 cylindrical cell (model K226650E02) manufactured by K2 Energy, with 3.2-V average voltage and 3.2-Ah capacity.The experimental setup has been designed to work either with 16 elementary cells connected in series or with 16 larger modules connected in series, where each module (K2B3V90E) is composed of 28 of those cells connected in parallel.The overall energy capacity in the two cases is 164 Wh and 4.6 kWh, respectively, with the same nominal voltage of 51.2 V.The specifications of a single cell and a module are summarized in Table 1.
The batteries are connected to an electronic load (programmed in constant-resistance mode) through a dual-phase interleaved dc-dc boost converter, designed for 100-V maximum input voltage, 350-V maximum output voltage, and 2-kW maximum output power, and operated in PWM mode, with a switching frequency of 100 kHz.Its equivalent circuit is reported in Fig. 1.The input and output filters have been designed to almost completely remove the switching frequency components from the input and output waveforms, without significantly attenuating the measurement perturbations at frequencies up to at least 100 Hz.In more detail, assuming an equivalent impedance of the battery pack of 1 (for a pack of 16 single cells) or 36 m (for a pack of 16 modules), the magnitude variation of the ac perturbation remains within a ±3-dB range up to 230 Hz or 2.5 kHz, respectively, while the switching frequency component is attenuated by 95 and 67 dB, respectively.
For the purpose of this work, the input (battery) current is controlled in a closed loop, using a reference signal that contains both the dc and ac components.In more realistic applications, requiring the regulation of the dc output voltage, a dual-loop control could be envisaged, in which the ac input current is controlled by a faster inner loop and the dc output voltage is controlled by a slower outer loop.However, this more complex solution would not change the performance of the ac current control, therefore the simpler solution of a single-loop control has been adopted.The ac reference signal is a multisine waveform, composed of one component per decade, from 10 mHz to 100 Hz, i.e., five components in total.This frequency density is lower than what is typically used for an accurate interpretation of impedance spectra, but it is chosen in this work to demonstrate the feasibility of simultaneously measuring impedance values in a wide frequency range.Such a low frequency density may still be enough, in some applications, to monitor changes in a few parameters of simple equivalent circuit models previously identified; however, if a higher density is required, the same number of components can be selected in a narrower frequency range, with no additional implementation challenge, although this may require repeating the measurement procedure more than once to sequentially cover adjacent narrow frequency ranges.The chosen amplitude of each component is 5 mA for the single cells, or 140 mA for the modules; these values have been empirically determined as an optimal balance, low enough to evoke a quasilinear response from the battery and high enough to give a good signal-to-noise ratio in the measured signals.
A conceptual block diagram of the entire system is illustrated in Fig. 2, while Fig. 3 shows a photograph of   the experimental setup.Both the power converter controller and the data acquisition are implemented in the National Instruments CompactRIO 9035, an embedded controller featuring a dual-core Intel Atom processor running a real-time operating system, as well as a Xilinx Kintex-7 FPGA.The CompactRIO serves a number of functions in this system: it generates the reference perturbation signal for the current controller from a 10 000-point 16-bit look-up table of a sine function; it runs the real-time control algorithm that produces the PWM signal for the dc-dc converter; it handles the acquisition of the battery current and voltage signals; and finally, it stores the digitized signals to disk for offline post-processing.The CompactRIO modules used for those various functions are listed in Table 2, with a summary of their main specifications.
Both the current signal acquisition (for the control) and the execution of the control algorithm are synchronous with the PWM signal (100 kHz) and share the same clock source from the CompactRIO (40 MHz).This has the advantage of avoiding any spectral leakage caused by nonsynchronous sampling, but also of avoiding any aliasing in the ac signals caused by the sub-Nyquist rate sampling of any residual signal components at the switching frequency and its multiples, as they will overlap with the dc component only.
A purely integral control (i.e., a PI control with zero proportional gain) is used for the current control, as it was empirically found to be fast enough to cover the entire required bandwidth, with the advantage of simpler tuning compared to a complete PI control algorithm.More details on the signal acquisition are provided in the next section.

III. SIGNAL CONDITIONING AND ACQUISITION A. VOLTAGE MEASUREMENTS
From an instrumentation and measurement perspective, one of the biggest challenges of EIS is the accurate measurement of the small ac component of the battery voltage, added to a dc component that is three to four orders of magnitude larger.This becomes even more challenging in the case of several cells/modules connected in series, as the commonmode voltage at the high-potential side of the battery pack is (at least) a further order of magnitude larger; in the pack used in this work, the common-mode voltage will reach approximately 50 V for the 16th cell/module.Acquiring all terminal voltages referenced to the battery pack ground would be unfeasible, not only because they would exceed the input range of most ADCs but also because the resulting resolution would be unacceptable for the measurement of the small ac voltage component of each cell.Therefore, suitable signal conditioning is required.
The solution proposed in this article has two goals: 1) to isolate the differential voltages of all cells/modules, so their common-mode voltages are removed from the measurement signals and 2) to maximize the use of the ADC input range, in order to achieve the best resolution for the ac perturbation.Ideally, the dc voltage of each cell/module could be removed from the measurement signal, in order to amplify only the ac component, but the dc voltage decreases as the battery discharges, so it cannot be known a priori and its accurate measurement is difficult due to the presence of the very low-frequency ac perturbations, which would require a filter with a very low cut-off frequency and therefore a very long response time (several minutes) at the beginning of each test, or after any sudden change in the operating conditions.Therefore, instead of subtracting a time-varying dc voltage from the signal, a fixed voltage of 3.075 V is subtracted, corresponding to the middle of the battery voltage range (see Table 1), and the residual voltage is then amplified to match the range of the ADC.
The hardware implementation of the signal conditioning strategy described above is based on the AD204 transformercoupled isolation amplifier.This device provides an isolated  ±7.5-V voltage source, which is used to derive the -3.075V through a resistive divider, and it includes an uncommitted operational amplifier at its input, which is used in a summing amplifier configuration to add -3.075 V to the cell/module voltage.A simplified circuit schematic for one channel is reported in Fig. 4, while Fig. 5 shows a photograph of the complete board for the entire battery pack.The AD204's output range is ±5 V, which matches one of the options for the programmable ADC input range of the NI 9205 module; setting the amplifier's gain to 8.4 allows using the entire range, so the effective resolution of the ac voltage measurement becomes approximately 18 µV, which is more than 20 times smaller than the expected perturbation amplitude (in the region of 0.5 mV for each frequency component), and is therefore satisfactory for the intended application.The amplifier's feedback includes also a capacitor, to realize a first-order low-pass filter, with a cut-off frequency of around 10 kHz, which will further attenuate any residual switching frequency component and decrease high-frequency noise, without affecting the bandwidth of interest for the impedance measurement (two decades below).The residual noise on the voltage measurement has been experimentally estimated to be around 0.3 mV (RMS) on each channel.Although this is comparable to the expected perturbation amplitude, when the signal is acquired over 100 s, the noise affecting the measurement of each perturbation frequency component is at least two decades below at all frequencies (see Fig. 10

later on).
The resistor tolerances and the accuracy of the AD204's isolated supply are possible causes of errors in the signal conditioning circuit, which, if not corrected, will propagate into the cell voltage measurement and thus the impedance estimate.Since these errors are systematic, they can be significantly decreased by a suitable calibration procedure.For each channel, the calibration was carried out by connecting a variable voltage source (NI 9263 analog output module) to the input of the signal conditioning circuit, in place of the cell voltage; its voltage was swept through the cell voltage range, from 2.5 to 3.65 V, and the output of the signal conditioning circuit was acquired by the NI 9205 module.From the result, the gain and nonlinearity errors were estimated and used later for the offline correction of the voltage measurements.The offset error is less important because it does not affect the ac measurements, so it can be ignored.The residual gain error after calibration is approximately equal to the gain error of the voltage source used for the calibration, whose typical value is 0.3%, and it is expected to be the same for all channels.The nonlinearity error is, however, more critical for the small ac voltage measurements and will be discussed in more detail in Section IV.

B. CURRENT MEASUREMENT
The current measurement is less challenging than the voltage, first because the current is the same for all cells/modules connected in series, so only one measurement is required, but also because the ratio between ac and dc amplitudes is higher for the current than for the voltage.Therefore, the current signal conditioning is less critical, and it does not require subtracting a dc current to amplify the ac component.This is important also because the current measurement is used for the closed-loop control of the dc-dc converter, so the dc current must be measured too.
In this work, a LEM LA 25-P closed-loop Hall effect transducer is used for the current measurement.It has excellent accuracy (<1%) and linearity (<0.15% linearity error), and a frequency bandwidth from dc to 200 kHz, which ensures a negligible phase error in the frequency band of interest; this is important, to avoid phase errors being reflected into the impedance measurement.A 426-resistor is used to convert the secondary current into a voltage, which is then filtered by a first-order RC low-pass filter, with a cut-off frequency of around 10 kHz, similarly to what was done with the voltage signal conditioning described above.
The current measurement circuit is designed for two current ranges, for the cells (7.83 A) and modules (23.5 A), by allowing two alternative current paths, with one or three turns of the primary winding around the transducer's magnetic core, respectively.These result in a measurement resolution of approximately 239 µA for the single cells and 717 µA for the modules, which, again, is more than 20 times smaller than the ac amplitude of each frequency component.The noise on the current measurement (for single cells) has been experimentally estimated to be around 26 mA (RMS), mostly in the kilohertz range (it is only 1 mA in the EIS band).Like the voltage measurement, when the signal is acquired over 100 s, the noise affecting the measurement of each perturbation frequency component is at least two decades below at all frequencies.
Similarly to the voltage measurement, a calibration is recommended also for the current measurement circuit.In this case, the dominant error is the offset error, which, although not affecting the ac measurements, is still important for the dc-dc converter control and should be corrected in the control algorithm, if an accurate control is desired.The offset error can be easily measured in open circuit configuration (zero current), and it has been found to be around 45 mA.On the other hand, the gain error is mainly caused by the current transducer, and it is expected to be less than 1%.The nonlinearity error is less significant, due to the simpler circuit, composed only of highly linear elements.

C. SAMPLING RATE
As described in Section II, the current and voltage measurement signals are acquired by the NI 9215 and 9205 modules, respectively, which share the same clock with the 9401 module generating the 100-kHz PWM signal for the dc-dc converter.The maximum possible sampling rate is limited by the NI 9205 module, and it is 15.625 kSa/s; however, the slightly lower rate of 12.5 kSa/s is chosen, because it is an integer divisor of 100 kHz and, thus, it guarantees that any ripple at the switching frequency in the signals will be aliased as dc and will not affect the ac measurements.Moreover, the sampling rate of 12.5 kSa/s is also an integer multiple of all ac perturbation frequencies, which allows meeting the synchronous sampling conditions for the avoidance of spectral leakage.
Since the frequency range of the multisine signal is limited to 100 Hz, a lower sampling rate could be adopted, still meeting the requirements of the Nyquist-Shannon sampling theorem.Potentially, even a carefully chosen sampling rate below the Nyquist rate could still work, because the signal frequency components are perfectly known (with no errors in the local time frame of the CompactRIO), so their aliased frequencies are known as well and can be chosen to avoid different components overlapping each other [25].However, a higher sampling rate will decrease the noise and will therefore lead to more accurate impedance estimates.Narrower band low-pass filters could also be used to decrease the noise, but having the cut-off frequency too close to the multisine band limit would risk distorting the signal and should be avoided.
A final important point to note and discuss is that the 16 voltage signals are acquired by a multiplexed ADC, meaning that the 16 channels will not be sampled exactly at the same time.This time delay will affect the phase of the calculated impedance (since the current will not experience the same delay), and must therefore be considered.The maximum delay between channels (and, therefore, also between voltage and current measurements) is less than an entire sampling period, i.e., 80 µs, which would correspond to a maximum phase angle error of less than 2.9°(conservative estimate) at the highest measurement frequency of 100 Hz, and proportionally smaller at lower frequencies.This error is small enough to be acceptable in most applications, especially where the focus is on monitoring impedance variations over time, as this error is systematic and will therefore remain constant.However, if necessary or desired, it is possible to compensate for this error by experimentally characterizing the delay between the ADC channels.

IV. VERIFICATION OF MEASUREMENT SETUP
In order to verify the performance of the whole measurement system, an initial test has been carried out using a passive circuit of known impedance, in place of a single battery cell.The circuit, shown in Fig. 6, has been designed to emulate, in a simplified way, the impedance spectrum of a single cell of the type used in this article: it is composed of a parallel RC circuit (R p = 69 m , C = 235 mF), with a 10-Hz cut-off frequency, connected in series to another resistor (R s = 51 m ) and to a programmable power source, configured to generate a dc voltage in the range of the battery's discharge voltage.This entire circuit was connected to a battery cell holder in the main power circuit (in place of the battery), so the entire measurement chain could be characterized, including the power-converter-based generation of the ac perturbation and the signal conditioning and acquisition.
This test allowed evaluating, in particular, the effect of the nonlinearity introduced by the voltage conditioning.While the impact of the nonlinearity on a dc measurement is very small, it becomes much more significant when measuring small ac signals, covering only a very small portion of the entire measurement range.The equivalent gain experienced by the ac perturbation, i.e., the local slope of the input/output characteristic of the conditioning circuit, can differ from the average gain by more than 10%.Such an error, although of a systematic nature, would vary as the battery discharges, and would therefore affect the evaluation of impedance variations versus the SoC, if not compensated.To avoid that large error, the voltage signal processing should use the local gain, instead of the average gain, calculated from the calibration test (see Section III) by a linear fit of 5-mV segments of the input-output curve; the 5-mV step has been chosen because it approximately corresponds to the expected peak-to-peak amplitude of the ac voltage response to the perturbation used in this work.
The results of the verification test obtained according to the procedure described above are reported in Fig. 7, for three different dc voltages: 1) 3.08 V (near the upper end of the discharge curve, and also the middle point of the entire voltage measurement range, where the nonlinearity is the highest); 2) 2.85 V (middle point of the discharge curve); and 3) 2.60 V (near the lower end of the discharge curve); the local gains estimated at each point are reported in the figure caption.In each condition, five consecutive impedance measurements were taken (each calculated on a 100-s window), whose mean value and standard deviation are plotted.It can be seen that the standard deviation is very small and practically negligible in almost all measurements, indicating excellent measurement repeatability.On the other hand, the difference between measurements obtained at different dc values is slightly larger, indicating a non perfect correction of the nonlinearity error, but still within a 2% maximum error on most magnitude measurements (4% at 100 Hz), much lower than the error that would result without nonlinearity compensation.The results are also well in agreement with the expected impedance spectrum, calculated from the nominal resistance and capacitance values, considering the 20% tolerance of the capacitance and an estimate of the track and contact resistances (5-10 m ), with the only exception of the phase measurement at 100 Hz, which is well outside the expected range; this may be due to a combination of factors, including some parasitic inductance in the circuit, the nonsynchronous sampling of voltage and current and, most likely, the dynamic response of the power supply used to emulate the battery's electromotive force.
These results confirm that the proposed method can produce highly repeatable measurements, i.e., with very good precision, expected to be enough to detect battery impedance variations caused by changes in the SoC, SoH, or any other variation in the internal conditions.The measurement accuracy, on the other hand, is likely to be less good, because of the influence of parasitic parameters (e.g., contact resistance, inductance, etc.) and other systematic errors (e.g., nonsynchronous sampling), but most applications of impedance monitoring require only high precision (to be sensitive to impedance changes), not necessarily high accuracy.Therefore, this is not believed to be a critical limitation of the proposed method.

V. IN-SITU BATTERY IMPEDANCE MEASUREMENT A. VOLTAGE DRIFT COMPENSATION
The shortest time window for the application of the Fourier Transform for the impedance calculation is 100 s, i.e., the period of the fundamental frequency component (10 mHz).During this time, the battery will experience a variation of its SoC, caused by the dc current, which represents one of the main challenges limiting in-situ EIS at very low frequencies, compared to the laboratory EIS performed without dc current.Strictly speaking, the condition for the definition of impedance is violated, as the battery is no longer in a steady state; however, if the dc current is small enough, the SoC variation will be negligible and the impedance definition will maintain a practical validity, e.g., for a single cell, a dc current of 1 A will cause a SoC variation of less than 28 mAh in 100 s, i.e., less than 1%.
Nevertheless, such a small variation will still cause a noticeable drift in the dc voltage of the battery, which is likely to be even larger than the ac signal amplitude.The discharge curve of a single cell at 1 A is shown in Fig. 8, and a typical voltage waveform (dc+ac) in a 100-s window is reported in Fig. 9 (gray line).If the FFT was applied to this signal, the drift would cause a very large spectral leakage, leading to unacceptably large errors in the magnitude and phase estimation of the lowest frequency components of the multisine signal, as shown in Fig. 10.Therefore, a drift compensation method is required.
The drift can be well approximated with a straight line (ramp) in most of the SoC range, as shown in Fig. 8: at a discharge rate of 1 A, fitting the discharge curve with a straight line in a 100-s window produces a root mean square error (RMSE) around 0.03 mV between 95% and 20% SoC, i.e., more than ten times smaller than the expected amplitude of each ac component.
The simplest method, in terms of implementation, to compensate for such a linear drift in the SoC range above consists of calculating the slope of the ramp from the first and last samples in the window.This was proposed in [17] for a sinusoidal signal, sampled fast enough to allow assuming the first and last samples to be very close to each other, but it would not work well for the multisine signal used in this work; in this case, a simple variation of the method could be implemented by taking the first sample of a window and the first sample of the next window, assuming that it is available.However, this method would still be highly sensitive to noise; therefore, a linear least-squares (LLSs) fitting of the entire signal in the window is recommended for enhanced robustness, in the presence of noise.
The performance of LLS fitting mainly depends on the characteristics of the lowest frequency component in the multisine signal; therefore, a sinusoidal signal can be considered here without loss of generality.In fact, the multisine signal can be converted into a sinusoidal signal by averaging it (with a moving average filter) over the period of its second component (10 s, for the waveform used in this work).Hence, the signal to be fitted can be mathematically described as the sum of a ramp and a sine wave, with the addition of noise n Different models can be used for the fit.The simplest option is to include only the ramp in the model [15]; however, this method will correctly identify the ramp slope only when θ = ±90°, and will produce errors in the other cases, up to ±2A/T for θ = 180°or 0, respectively.The best solution to avoid this error would be to include also the sine wave in the model, with the two unknown parameters A and θ .The LLS can still be applied, by rewriting the generic sine function as the sum of a sine and a cosine, both with zero phase, so the unknown parameters become their respective amplitudes It is interesting to note that very good results can be obtained also by ignoring the cosine term in (2) and including only the ramp and sine in the model.This occurs because a ramp model is enough to correctly fit a ramp plus cosine (i.e., a sine with 90°phase), as described above, so only the sine function must be added to the model to avoid significant errors.The maximum error in the ramp slope estimate introduced by this approximation is (±15A/T)/N, where N is the number of samples in the sine wave cycle, so it falls below 1% of A/T when N > 1500.While the computational benefits are marginal, this simplification can still be helpful in some applications, especially those running in real time.results of the drift compensation obtained this method are shown in Figs. 9 and 10, with a black line.
The method above relies on the assumption that the second lowest frequency component in the signal is sufficiently higher than the first one (ten times higher in this work).If a more frequency-dense perturbation is used, the method can no longer work well; a possible alternative would be to acquire two of the perturbation and calculate the slope of the ramp from the average voltage values in the two cycles.

B. SIGNAL QUALITY VERIFICATION
A successful compensation of the voltage drift is not enough to guarantee an accurate and meaningful impedance result.It is also necessary to verify that the conditions for the impedance definition are met, with acceptable approximation.First, the battery response should be quasi linear; second, the SoC variation during the measurement time should be small enough to have a negligible effect on the impedance; third, any load variation should either be filtered by the converter's output capacitors, or be small enough to cause a negligible change in the battery's dc current.If any of those conditions are not satisfied, the system cannot be considered to be in a steady state, even after the voltage drift compensation, and the impedance measurement should be discarded.
The validity of all the assumptions above can be simultaneously verified by analyzing the distortion of the voltage waveform after the voltage drift has been compensated.This will reveal also if the drift has been compensated correctly, i.e., if the assumption of linear drift was valid.Since no spectral leakage due to a nonsynchronous sampling window is expected, any significant frequency component in the spectrum, different from the injected frequencies, would be caused by one of the issues above, or noise (although the noise is expected to be very small at low frequencies).For the multisine waveform used in this work, a simple but effective quality indicator is the total harmonic distortion (THD) index, calculated up to the ninth harmonic, thus excluding all other perturbation frequencies, as well as highfrequency noise.For the compensated voltage reported in Figs. 9 and 10, the THD is around 1.4%, thus confirming that the quality of the signal is sufficient for a meaningful impedance calculation.A value of 3% for the THD has been empirically identified as an appropriate threshold to determine whether an impedance measurement is acceptable or not; tests performed on all 16 cells during a complete discharge revealed that more than 98.4% of the voltage signals measured with SoC between 97% and 18% have a THD below 3% (more than 85% have a THD below 2%), confirming that only a small portion of measurement results would have to be discarded.

VI. MEASUREMENT UNCERTAINTY AND REPEATABILITY
The results reported in Section IV showed that the designed system is expected to produce highly repeatable measurements, with enough precision to detect larger impedance variations caused by battery discharge or other internal changes.To confirm this, and to verify the performance of the system when applied to real batteries, some battery impedance measurements are reported in this section.
Impedance spectra for the 16 cells/modules are calculated every 100 s, at the five frequencies of the multisine perturbation (i.e., from 10 mHz to 100 Hz), according to the procedure described above.In all tests, the batteries were always discharged from the full-charge condition, and the SoC at each time was estimated by the Coulomb-counting method (i.e., by integrating the current), assuming the initial SoC to be 100% for all batteries; in this way, the estimated SoC is always identical for all cells/modules, because their current is the same.
The impedance measurements are affected by several sources of uncertainty, both random and systematic, already discussed in Sections III and IV.Here, the focus is on the random measurement variations that represent the main limiting factor in the application of this technique to the detection of changes in the internal state of the battery.According to international standards [26], random errors can be evaluated by means of a type-A uncertainty quantification, based on a set of repeated measurements in the same condition.However, the battery will discharge during the impedance measurement, so its SoC will change slightly, and bringing it back to the same condition through a charge-discharge cycle is to be challenging, as the internal conditions are likely to change slightly in the process [23].Therefore, in this work, the type-A uncertainty was quantified by repeating five impedance measurements in five consecutive 100-s windows, similar to what was done in Section IV.With a 1-A dc discharge current, the SoC variation over 500 s is around 4%, which is considered to be a good balance between the need to keep the battery condition almost unchanged and the need to have enough repeated measurements for a meaningful calculation of their standard deviation.Fig. 11 shows the impedance spectra of one cell (the other 15 produced very similar curves), at different SoC values, from 90% to 20%; the extreme SoC values were not included because of the nonlinear voltage drift in those ranges (see Fig. 8).The uncertainty bars in the figure represent the standard deviations of the five repeated measurements, centered on the first measurement.It can be seen that the uncertainty tends to be larger at lower frequencies (especially at 10 mHz) and at lower SoC.In most cases, however, the uncertainty is comparable to that estimated from the RC circuit test (see Fig. 7), and smaller than the impedance difference caused by a 10% SoC variation or higher.This means that the measurement appears to be precise (i.e., repeatable) enough to allow, in principle, detecting SoC-related impedance variations of a single cell, although care must be taken in the interpretation of these results, because other factors are likely to contribute to the observed impedance differences.A full interpretation of the impedance spectra remains outside the scope of this work, which focuses only on the measurement system, and in particular its measurement precision.The repeatability of the measurement, evaluated above, is different from the repeatability of the test condition, which does not depend on the measurement method, but on the accuracy in controlling the battery's internal condition.To illustrate this, repeated measurements were performed at 80% SoC: as before, five consecutive measurements were taken, then the cells were recharged to 100% and immediately discharged again to 80% for another set of five consecutive measurements, and the process was repeated four times.The first set of measurements was discarded from the analysis, due to the different initial conditions (the cells had not been used for several days before this test).The results of the other three sets (averages and standard deviations of each set of measurements) are reported in Fig. 12, for one cell, and reveal that, in most cases, the impedance variation caused by the charge/discharge cycle is larger than the type-A uncertainty of each measurement.This confirms that the proposed approach for the evaluation of the type-A measurement uncertainty is more appropriate than attempting to bring back the cell to the same condition through a partial charge/discharge cycle.It also shows that the proposed measurement system is precise enough to detect those small variations in the battery's internal condition appearing after each partial charge/discharge cycle.

VII. CONCLUSION
This article presented a solution to scale up in-situ battery EIS and expand its frequency range at the low-frequency end.Similarly to most works in the recent literature, the implementation is based on a dc-dc converter to generate the ac perturbation in the battery current, but for the first time, this technique has been employed to simultaneously monitor 16 cells/modules, at frequencies as low as 10 mHz, while comparable works in the literature use only one or two cells/modules and go down to 100 mHz at best.Covering an extra frequency decade at the low end allows gathering information about diffusion phenomena, typically not visible above 100 mHz, while simultaneously monitoring several cells/modules allows more accurate and faster diagnosis of conditions affecting individual elements in a pack, with benefits in terms of battery management.
The scaling up to 16 cells was achieved by designing a dedicated signal conditioning circuit, to remove the large common mode voltages and amplify the ac components, thus allowing the measuring of the ac voltages with good resolution and accuracy.On the other hand, the frequency range expansion down to 10 mHz was achieved by removing the drift in the voltage signal caused by the battery discharge during the measurement time.
While the overall accuracy of the impedance measurements may be degraded by systematic errors arising from the cell contact impedance or other sources, experimental results confirmed that the proposed method is sufficiently precise (i.e., the random errors are sufficiently small) to detect impedance variations appearing during the battery discharge, as well as impedance variations caused by the poor repeatability of test conditions after partial charge/discharge cycles.Therefore, this approach appears to be very promising for monitoring the condition of individual cells/modules in a battery pack over time.
The proposed method suffers from the intrinsic limitation (common to all impedance measurements) of requiring an almost steady-state condition, therefore it fails in the presence of large load variations occurring during the measurement.However, monitoring the distortion of the voltage signal, through the proposed THD index, allows detecting excessive load variations, as well as other violations of the steady-state and linear response requirements, so the affected measurements can be discarded.A suitable power management strategy will have to be in place, in specific applications, to allow the battery to remain in steady-state conditions (at least temporarily) for the time required to perform the impedance measurement.

FIGURE 1 .
FIGURE 1. Equivalent circuit of the dc-dc converter.

FIGURE 2 .
FIGURE 2. Conceptual block diagram of the experimental method for in-situ EIS.

FIGURE 3 .
FIGURE 3. Photograph of the entire experimental setup, with the single-cell battery pack shown in the bottom right corner.

FIGURE 4 .
FIGURE 4. Simplified schematic of signal conditioning circuit used for the cell/module voltages; Vsub is −3.075V, derived from the isolated -7.5 V source −VISO and added to the cell voltage.

FIGURE 5 .
FIGURE 5. Photograph of the voltage signal conditioning board, with 16 AD204 isolation amplifiers and their power source/clock driver AD246.

FIGURE 6 .
FIGURE 6. Equivalent circuit (left) and photograph (right) of the RC circuit used for the verification tests.

FIGURE 7 .
FIGURE 7. Result of verification test with an RC circuit of known impedance.The black lines indicate the expected range of the impedance, while the colored markers and vertical bars represent the mean and standard deviation, respectively, of five consecutive measurements taken at the following dc voltages: 3.08 V (blue circles, gain = 8.87), 2.85 V (green squares, gain = 7.54), and 2.60 V (magenta diamonds, gain = 8.01).

FIGURE 8 .
FIGURE 8. Discharge curve of a single cell at 1 A (blue line) and RMSE of a linear fit of the 100-s windows (orange line).

FIGURE 9 .FIGURE 10 .
FIGURE 9. Extract from a single-cell voltage measurement in a 100-s window (fundamental period of the multisine perturbation), while discharging at 1-A dc, before (gray) and after (black) drift compensation.

FIGURE 11 .
FIGURE 11.Impedance spectra of one cell, at different SoC values; the uncertainty bars represent the standard deviation of five measurements, taken in five consecutive 100-s windows.

FIGURE 12 .
FIGURE 12. Impedance spectra of one cell, at 80% SoC, measured three times after partial charge/discharge cycles; for each test, the figure shows the average and standard deviation of five measurements, taken in five consecutive 100-s windows.