Versatile AC Current Control Technique for a Battery Using Power Converters

: Although a battery is a DC device, AC current is often necessary for testing, preheating, impedance spectroscopy, and advanced charging. This paper presents a versatile control technique to inject AC current to a battery. Synchronous buck and H-bridge topologies are operated in bidirectional mode and controlled by uni-polar and bi-polar pulse width modulation techniques for the AC current injection. The input and output passive circuits are specially designed considering AC current and the properties of the battery. A controller is proposed considering a small internal impedance, small AC ripple voltage, and variable DC offset voltage of a battery. The controller is capable of maintaining stable operation of AC current injection in two power quadrant within a small DC voltage boundary of a battery. The controller is comprised of a feedback compensator, a feedforward term, and an estimator. The feedback gain is designed considering the internal impedance. The feedforward gain is designed based on estimated open circuit battery voltage and input voltage. The open circuit voltage estimator is designed based on ﬁlters and battery model. For validation, AC current is injected to a Valence U-12XP battery. The battery is rated for 40 Ah nominal capacity and 13.8 V nominal voltage The controller successfully injected AC current to a battery with +10 A, 0 A, and − 10 A DC currents. The magnitude and frequency of the AC current was up to 5 A and 2 kHz respectively. S.M.R.I.; supervision, S.-Y.P.; project administration, S.-Y.P.; acquisition, S.-Y.P. All authors have read and agreed to the published version of the manuscript.


Introduction
Batteries are DC electrochemical energy storage devices which are mainly utilized as DC source or load in applications. However, AC current injection in a battery is necessary to preheat in cold weather, to measure the internal impedance, to balance the capacity based on impedance, and to charge by sinusoidal ripple current method [1][2][3][4]. Conventionally, AC current is injected to rechargeable batteries using linear circuits which work offline (the batteries are disconnected from the applications) [5,6]. Recently, power converters are being used to inject AC current to rechargeable batteries which can be operated either offline or online (the battery is connected to the applications) [1][2][3][4][7][8][9][10][11][12][13]. A buck converter topology was used to inject AC current on top of DC charging current in [9]. AC current was imposed on top of discharging current in [10]. The methods available in the existing literature for AC current injection using power converters can be operated either offline or online (either while charging or discharging). A versatile AC current control technique is proposed in this manuscript which can be operated in both offline and online conditions for a broad frequency spectrum.
The AC current injection using power converters for AC system (grid tied inverter) is an well established technology where the power flows unidirectionally and has a significant voltage variation corresponding to current [14,15]. The unidirectional power flow of a single phase inverter is depicted in Figure 1a. V out and I out are the output voltage and current. The arrow line depicts the steady state operating condition. The tilted arrow indicates the AC signal. Power converters can operate beyond the steady state for transient conditions which is depicted as control range by shaded area. Compared to AC systems, AC current injection to a DC system (rechargeable battery) using a power converter is a recent idea [16,17]. Power can flow bidirectionally in a rechargeable battery. The power flow of a conventional bidirectional converter is shown in Figure 1b, which can control DC current for a constant voltage. A controller for conventional bidirectional converter is not enough to inject AC current into a battery. This is because a battery has a small internal impedance and a variable DC voltage offset. A significant amount of AC current causes a small voltage ripple in a battery. The AC injector for rechargeable batteries should be able to control large current within a small voltage window as shown in Figure 1c. Therefore, AC current control for rechargeable batteries is more challenging than conventional bidirectional converters. A versatile control technique to inject AC current into a rechargeable battery is presented in this manuscript which can inject AC current up to a magnitude of 5 A and a frequency of 2 kHz for a 40 Ah 13.8 V battery. The controller is capable of injecting AC current using two topologies: synchronous buck and H-bridge. In addition, the key contributions in this manuscript are listed as follows: • A versatile controller is proposed which can inject AC current to a battery for zero, positive, and negative DC current i.e., it works for both offline and online (while charging and discharging). • A controller gain selection method and controller architecture is developed for AC current injection considering small internal impedance and variable DC offset voltage of a battery. • A procedure is developed to select topology, modulation, and passive components for AC current injection.
The modes of AC current injection to a battery is discussed in Section 2. Power converter topologies, small signal analysis, and controller architecture are in Sections 3-5. Finally, results are presented in Section 6.

Operational Modes for AC Current Injection
AC current can be injected to a rechargeable battery on top of DC charging and discharging current. AC current can also be injected solely without DC current. The modes of AC current injection in a battery are expressed by (1).
where, t is the time, I bat is the battery current, I dc is the DC offset current, I m is the magnitude of AC signal, and ω is the angular frequency for AC signal. I dc is positive for mode 1 where AC current is injected to the battery while charging. I dc is negative for discharging condition. I dc is zero for offline AC injection. The waveforms of each mode of AC current injection are shown in Figure 2a. The existing methods available in the literature for AC current injection using power converters can operate in only one mode at a time. All three modes can be operated using proposed controller which is unique in this manuscript.
The voltage vs. current of a battery during different modes of operation shown in Figure 2b. The power converters output is bounded by the rated operating range of the battery (shaded in area in Figure 2b). The rated maximum and minimum operating voltage of a battery is V max and V min . The rated currents are I max and I min . The control range for different modes are also shaded and has dashed boundary line. The steady state operating conditions are within the control range and shown as tilted arrow lines. The tilted arrow indicates AC voltage and current for different modes. The magnitude of AC current in Figure 2b is corresponding to the magnitude of of current in Figure 2a. To perform all modes of operation, the power converter should be capable of operating within the right half plane of the power quadrant (two quadrant as in Figure 2b).

Topologies and Modulation
An AC current injector for batteries was implemented using buck, synchronous buck, boost, and resonant power converters [1][2][3][4][7][8][9][10]. A synchronous buck converter for AC current injection to battery was used in this paper as shown in Figure 3. In addition, a technique is proposed to use H-bridge topology to inject AC current as shown in Figure 4. Q 1 , Q 2 , Q 3 , and Q 4 are SiC MOSFETs with anti-parallel diodes. An input network was used to deploy three modes of operation for the versatile control which consists of a DC voltage source V in , a resistor R in , and a capacitor C in . I in is input current which could have three parts i vin , i rin , and i cin . S 1 and S 2 are used to control the network as source and/or load which determines online charging/discharging mode or offline mode of operation for AC current injection. The AC injection modes and corresponding possible switch states are in Table 1.

Design
V in depends on the available input power source. For the buck mode of operation, V in must be greater than open circuit battery voltage, V bat . For maximum control flexibility, the duty cycle is 50% and V in can be selected based on (2).
where, V bat_n is the nominal battery voltage from datasheet. R in depends on the value of DC load current in mode 3. For maximum control flexibility, R in can be selected by (3).
The input capacitor should be capable to store the charge and energy for half cycle of the injected AC current and discharge in rest of the half cycle. The value of C in is determined based on the allowable input ripple voltage ∆v cin and the magnitude, I m , and frequency, ω, of AC current. The charge storage, sinusoidal ripple current, and ripple voltage across input capacitor is depicted in Figure 5. C in is used to bypass most of the AC current. Therefore, AC current through R in and V in should be negligible. Input capacitor current, i cin , can be represented by (4). The voltage and the charge of the input capacitor is determined based on the initial conditions and AC current. The charge of the input capacitor, q cin , can be presented by (5).
where, q in is the steady state stored charge in capacitor. The designed nominal input voltage, V in can be considered is initial condition for capacitor voltage, v cin . Therefore, v cin can be represented by (6).
By the definition of capacitance, the relationship between voltage and charge can be presented by (7).
Equation (7) can be rewritten as (8) by linearization. The linearization is shown in Figure 5.
For 1/4th of the period, ∆q cin is determined by (9).
where, f is the frequency of the AC current and ω = 2π f . The output inductor, L, is selected based on the standard design as in (12) [18].
where, ∆I L is the allowable inductor switching ripple current, and f SW is the pulse width modulation switching frequency. Switching ripple current, ∆I L , is different than controlled AC injection current. The frequency of ∆I L , is much higher than AC injection current and the magnitude should be almost negligible. A larger inductor gives better attenuation to switching ripple current. However, it reduces the control bandwidth. Considering (2) and control bandwidth, the design guideline for L can be presented in (13).
The output capacitor, C, reduces the switching ripple voltage. C can be selected by the standard design as in (14) [18].
A higher value of C provides lower switching ripple. However, the battery itself has very high capacitance. Therefore, a smaller value of C can be used.
The passive components for the topologies are calculated using (2), (3), (11), (13), and (14) considering V bat_n = 13.8 V, I m = 5 A, and f = 20 Hz, f SW = 100 kHz, ∆V out = 7.5 mV, and ∆I L is 5% i of I m . Available standard components are selected for experiments. The calculated and selected value of components are in Table 2.

Modulation
The midpoint voltage, V mid , is the voltage across L and C shown in Figures 3 and 4. V mid determines the direction and magnitude of output current I out . V mid is controlled by pulse width modultion (PWM) of the gate driver signal. The output voltage, V out , depends on internal impedance, Z, output current, I out and open circuit battery voltage, V bat as in (15).
The PWM signals to drive the MOSFETs are shown in Figure 6. The gating signal and midpoint voltage for synchronous buck converter is in Figure 6a. Q 1 and Q 2 are complementary. Deadtime is considered between on states of Q 1 and Q 2 . The estimated average midpoint voltage is expressed by (16).
where, d is the duty cycle. The effect of synchronous operation and deadtime are excluded from calculation in (16). The unipolar PWM signal for H-bridge topology is shown in Figure 6b. V out is always positive. Therefore, Q 3 is always off and Q 4 is always on for unipolar switching. Q 1 and Q 2 are complementary with deadtime. The estimated average voltage for unipolar switching is approximately the same as the synchronous buck converter in (16).
where, d uni is the duty cycle of Q 1 for unipolar PWM. The relationship between d uni and d is represented by (18).
The bipolar PWM signal for the H-bridge is in Figure 6c. The estimated average midpoint voltage for bipolar PWM is expressed by (19).
where, d bi is the duty cycle of Q 1 for bipolar switching. 1 − d bi is applied to Q 3 . Q 1 and Q 2 are complementary with deadtime. Q 3 and Q 4 are also complementary. d bi V in represents positive parts of V mid and (1 − d bi )V in represents the negative part. V out is always positive, therefore d bi V in is always significantly higher than (1 − d bi )V in . The relationship between d bi and d is represented by (20)-(22).
PWM techniques are selected based on the topologies used to inject AC current injection. Regardless of the topology chosen, V mid is controlled by the duty cycle, d. d is converted to d uni and d bi for the H-bridge using unipolar and bi-polar switching. For both topologies anti-parallel diode ensures the reverse current flow i.e., discharging condition of the battery.

Small Signal Analysis
The output current of synchronous buck and H-bridge converters can be analyzed by a simplified average mode small signal model and transfer functions.

Simplified Model and Feedforward
Both synchronous buck and H-bridge converters can be represented by a simplified form as shown in Figure 7a. Modulation techniques are used to get the desired value of the midpoint voltage, V mid . The direction of average output current, I out , depends on value of V mid and V bat . I out (t) determines the mode of operation for the controller. In the steady state equilibrium condition, I out =0 and V mid =V out =V bat . A feedforward duty can maintain the power converters in equilibrium. The feedforward duty, d f f , in averaged control mode can be expressed by (23) and (24).

Transfer Function of Switching Power Pole
The average midpoint voltage for a PWM cycle at any instant can be expressed by (25).
where, d is average duty for that cycle and the value of d is updated for every cycle based on control requirement. A small perturbation to steady state duty causes perturbation to average midpoint voltage. The small perturbations can be expressed by (26) and (27).
Considering the average mode control perturbation and steady input voltage, frequency domain interpretation of the midpoint voltage can be expressed by (28).

Battery Model
A Li-Ion battery has a small AC voltage ripple for large AC current ripple due to small internal impedance. The adaptive Randle equivalent circuit model (AR-ECM) of a Li-Ion battery can explain the internal impedance. AR-ECM is shown in Figure 7b. It consists of an open circuit voltage source, V bat , battery inductance, L bat , Ohmic resistance, R Ω , charge transfer resistance, R CT , double layer capacitance, C DL , Warburg impedance, Z W , solid electrolytic interface resistance, R SEI , and capacitance, C SEI . The overall internal battery impedance in frequency domain, Z(s) is expressed by (29) [19].
where, σ is Warburg coefficient, and Warburg impedance Z W =σ √ 2/s. Z(s) is taken into account for versatile current controller design.
For a Valence U-12XP 40 Ah 13.8 V Li-Ion battery, the model components are L = 0.34 µH, R Ω = 5.65 mΩ, C DL = 4.29 F, R CT = 1.23 mΩ and σ = 2.05 × 10 −3 at 25% state of charge [9]. The bode plot of the battery impedance is shown in Figure 8. The magnitude is calculated by 20log10(|Z|/R base ), where R base is 1 Ω. The magnitude of impedance is ≈ −40 dBΩ i.e., a small voltage perturbation will cause large current perturbation. The phase plot indicates that at low frequency perturbation the battery behaves in capacitive manner. However, at high frequency the inductive part becomes dominant.

Open Loop Transfer Function
The output current is controlled by duty perturbation. Therefore, output current to duty transfer function is defined by G id as in (30).
G id can be determined by circuit analysis from Figure 7a. The overall impedance at the midpoint can be expressed by (31).
The impedance at the output node can be expressed by (32).
The inductance current, I L (s), can be expressed by capacitor current, I C (s), and output current, I out (s), based on Kirchhoff's current law as in (33).
The equation for output voltage to midpoint voltage can be derived by (34) and (35).
The battery ripple voltage transfer function, G vd , can be expressed by (36) The V out (s) can be expressed by (37).
For average mode control, (38) can be expressed by (39) Using (35) and (38), G id can be determined by (40) The bode plot of G id is shown in Figure 9 for the proposed system. The bode plot is based on selected parameters of Table 2 and Z(s) from Figure 8. The LC resonance peak is not visible in bode plot due to small internal impedance. The internal parameters of a battery changes with state of charge and aging. Therefore, the nominal value of internal resistance can be used as an alternative to Z(s). At lower frequency, G id has a very high gain (≈70 dB). This means a very small duty perturbation causes a very high current perturbation which leads to instability i.e., 1% duty perturbation at 5 Hz would cause 31 A current perturbation whereas recommended current is only 20 A. This instability happens because of very low magnitude of internal impedance (≈−40 dBΩ). The instability is removed by designing a proper feedback and feedforward controller.

Feedback Compensator Design
Stability, steady state error, and response time are three important criteria for feedback compensator design. The feedback compensator is designed based on the following steps:

Crossover Frequency Selection
The first step of controller design is to select crossover frequency, f c . To make a stable controller f c must be slightly higher than the resonance frequency of LC filter, f LC . The resonance frequency for the LC filter is defined by (41).
The rule of thumb to design an efficient and stable controller is to choose crossover frequency less than 1/10th of switching frequency f SW . The crossover frequency selection criterion can be expressed by (42).
Considering the value of f LC and f SW the value of f c = 2.5 kHz is selected.

Gain Adjustment
The compensated loop gain at cross over frequency, |G id G c | f c , should be 0 dB which can be expressed by (43).
where, G c is controllers transfer function. (43) can be re-written as (44) where, k is the factor for gain adjustment. The value of |G id | f c is 18.96 dB i.e., 8.87, therefore the value of k is 0.11. This system is reducing gain instead of boosting. Gain reduction is necessary to improve stability.

Phase Adjustment
Phase adjustment is done through controller selection. A proportional integral (PI) controller is selected for that purpose. The transfer function of the PI controller is expressed by (45).
The value of k p and k i are selected in such a way so that |G c | is 0 dB at f c and frequency can be swept for all the frequency less than f c .The value of k p could be ≈k and the value of k i can be determined by (46).
where, ω z is the angular form of zero frequency f z . The value of f z should be less than the desired control frequency, f , of injected AC current. The relationship can be expressed by (47).
The parameters used for phase and gain adjustment are in Table 3. The loop controller transfer functions are shown in Figure 9.

Controller Architecture
The proposed controller is designed to inject AC current for all three modes as described in Section 2. The proposed versatile controllers architecture is shown in Figure 10. The overall proposed closed loop control system consists of references, feedback controller, sensing gain (H), feedforward term, estimator, PWM modulation transfer function, G PW M , output current transfer function, G id , and voltage transfer function, G vi . The current reference, I * out , is selected based on desired mode of operation and frequency as in (48).
where, I * dc is the DC level of the current based on the desired mode, I * m is the desired amplitude of the AC signal, and ω * is the desired angular frequency of the AC signals.  The value of reference current, I * out , is compared with the output current I out and the current error, I err , is calculated by (49). The error is compensated by a PI feedback controller. The feedback controller gives feedback duty, d f b , by (50).
The saturation blocks of the proposed controller keep the value of d f b within the range of −1 to +1. The feedforward duty, d f f , is calculated in (51) using the estimated open circuit voltage, V bat , and input voltage, V in .
The feedback and feedforward terms are combined by (52).
The value of V bat is estimated using an estimator as shown in Figure 11. The estimator takes V out and I out as input. It uses low pass filters to estimate V dc and I dc . A high pass filter is used to estimate v ac and i ac . From the value of v ac and i ac , the magnitude of battery impedance |Z| is calculated. The saturation block is used to limit the unexpected values. Using I dc , |Z| and V dc , the value of V bat is calculated by (53).

Experimental Results
Experiments were conducted for all three modes using Synchronous buck and Hbridge topologies for a Valence U-12XP 40 Ah 13.8 V Li-Ion battery [20].

Experimental Setup
A re-configurable test bed was set up for both synchronous buck and H-bridge topologies as shown in Figure 12. The topologies are shown in Figures 3 and 4. The switch, S H was used to configure the options between synchronous buck and H-bridge topologies. S H connected or disconnected the Q 3 Q 4 leg of H-bridge. The switches S 1 and S 2 were to connect and disconnect the input source, V in and input resistor, R in . The value of V in , C in , R in , L, and C were selected based on the discussion of III.A and Table 2. These MOSFETs were controlled by 100 kHz PWM signal generated by the Simulink based Opal-RT controller. The Opal-RT controller gets voltage and current as feedback through Op-Amp based offset clipping and scaling interface circuits. The proposed controller was implemented with a sample time of 20 µS using Opal-RT (OP4510).

Opal-RT Controller
Input Source

Controller
Interface Circuits C in L C Figure 12. The re-configurable testbed of AC current injector for synchronous buck and H-bridge topologies.

Waveforms and Analysis
The steady state battery voltage and current for different modes of operation using the synchronous buck converter are shown in Figure 13. The DC current of the battery for different modes were +10 A, 0 A, and −10 A. The same operation was verified using the H-bridge converter also. The amplitude of the AC injection current was 5 A and the frequency was 100 Hz. The battery voltage was 13.5 V as DC average. The battery had a very small internal impedance (maximum 15 mΩ). Therefore, small battery voltage ripple due to AC injection was not visible by DC coupling in an oscilloscope. The battery voltage ripple is shown in Figure 14 using AC coupling. In this case the battery was operated in mode 1 for 100 Hz. The AC current peak was changed from 2 A to 5 A to observe the transient response and the effect of AC current to battery voltage. The controller was successfully able to regulate the current.  The AC part of the battery current was changed from 0 to 2 kHz for all three modes of operation using both synchronous buck and H-bridge converters. The battery voltage and current for 10 Hz, 100 Hz and 1 kHz for mode 1 using the synchronous buck converter is shown in Figure 15. The dynamic response for mode change using the proposed controller is shown in Figure 16. In these cases, both S 1 and S 2 were turned on. The proposed versatile controller was validated by successfully testing the additional conditions listed in Table 4.

Discussion
A passive component selection guideline and controller design method for AC current injection to battery is presented in this manuscript. The novelty in this manuscript is to operate power converters for batteries in two quadrant applying the proposed guideline and method. The novelty is justified by comparing the AC current injection method for batteries in the recent journals as in Table 5.

Conclusions
A complete controller design method for AC current injection to a battery is developed in this manuscript. This method includes the passive component selection, controller gain selection, and controller architecture. The controller was able to operate for both synchronous buck and H-bridge converters. The proposed versatile controller successfully controlled the AC battery current for offline and online modes (while charging/discharging) over a range of frequencies and magnitudes as expected from the bode plot of the simulation. The proposed controller and design method will be useful for internal impedance measurement, advanced charging, and preheating applications. The advantage of the proposed technique is that it does not require any changes in the control architecture for different mode of operation for various topologies over a range of frequencies. The disadvantage of the proposed controller is that it requires voltage feedback for optimized operation. The performance of this controller with AC/DC/DC grid tied application is not verified yet and will be investigated in the future.