Energy Management System for Power Lithium-ion Battery Packs

In recent years, the vehicle traction battery has received increasing attention because of the urgent demand for clean and efficient transportation. Among the various electrochemical storage technologies that have been applied to electric vehicles, the power lithium-ion battery stands out due to its high operating voltage, high energy density, low self-discharge, long cycle life and environmental friendliness. However, the safe and reliable operation of a large-format vehicle traction battery is not an easy task. The cells used in series-connected packs inevitably differ from one another in capacity, internal resistance, self-discharge rate and ageing speed. Moreover, lithium-ion cells are sensitive to overcharge, over-discharge, over-current and extreme temperature. If such abnormal states are not handled rapidly and correctly, the consequences may range from accelerated cell degradation to thermal runaway. In this work I present a comprehensive energy management system designed for power lithium-ion battery packs, aiming at guaranteeing operational safety, providing accurate state-of-charge information, equalizing cell voltages and prolonging the service life of the vehicle traction battery.

1. Background and Motivation

Power batteries used for traction applications include valve-regulated lead-acid batteries, nickel-metal hydride batteries, lithium-ion batteries and fuel cells. Lead-acid batteries are cheap and reliable but suffer from low specific energy and serious environmental pollution during recycling. Nickel-metal hydride batteries offer a better balance between power and energy but are expensive and have relatively high self-discharge. Fuel cells show high efficiency and zero tailpipe emissions but still face hydrogen storage and safety challenges. Lithium-ion batteries combine the advantages of high cell voltage, high specific energy, long service life and no memory effect, making them a leading candidate for next-generation vehicle traction battery systems.

The advantages of lithium-ion chemistry over conventional rechargeable systems can be summarized in the following aspects:

  1. High cell voltage: the nominal voltage of a single lithium-ion cell is usually 3.6 V or 3.7 V, approximately three times that of Ni-Cd or Ni-MH cells and almost twice that of lead-acid cells. Therefore fewer cells are needed in series to reach a given pack voltage.
  2. High energy density: commercial lithium-ion cells can reach an energy density around 160–180 Wh/kg, which directly reduces the weight and volume of the vehicle traction battery pack.
  3. Long cycle life: under normal operating conditions, lithium-ion batteries can withstand more than one thousand charge-discharge cycles.
  4. No memory effect: the user may recharge the battery at any time without requiring a full discharge beforehand.
  5. Low self-discharge rate: at room temperature, the self-discharge of a fully charged lithium-ion cell is approximately 3%–9% per month, far lower than the 25%–35% observed in nickel-based batteries.
  6. Environmental friendliness: lithium-ion cells do not contain toxic heavy metals such as lead or cadmium.

Nevertheless, the practical deployment of large lithium-ion packs is still limited by cost, safety, consistency among cells, and the availability of accurate energy management algorithms. A well-designed energy management system must be able to sense every important operating parameter, estimate the true state of the pack, control charge and discharge processes, and provide cell equalization. This formed the motivation of my master-degree research, and the resulting system was designed around the target application of a small-format vehicle traction battery pack with seven series-connected cells.

2. State-of-Charge Estimation

2.1 Definition of State of Charge

The state of charge (SOC) is a fundamental indicator used by a battery management system. It describes the remaining capacity of a battery. In the most common definition, SOC is expressed as the ratio of the residual charge to the rated capacity:

$$SOC = \frac{Q_c}{C_I}$$

where \(Q_c\) is the remaining capacity and \(C_I\) is the capacity that the battery can deliver when discharged at a constant current \(I\). Equivalently, when the amount of electricity already discharged is known, the SOC can be written as:

$$SOC = 1 – \frac{Q}{C_I}$$

According to this definition, \(SOC=1\) represents a fully charged state and \(SOC=0\) corresponds to the discharge cut-off voltage. However, this simple definition is strictly valid only under constant-current discharge conditions. Under variable discharge currents, the usable capacity of a lithium-ion cell changes because of electrochemical polarization and diffusion limitations. Therefore a practical SOC definition for a vehicle traction battery cannot ignore the influence of current magnitude, temperature, self-recovery effect and cell ageing. In this system I extend the definition to a corrected form based on the ampere-hour counting principle.

2.2 Factors Influencing Remaining Capacity

The remaining capacity of a lithium-ion cell is affected by several factors. The most important ones are discussed below.

  • Discharge current: Larger discharge currents reduce the deliverable capacity because the internal resistance causes higher ohmic loss and the electrochemical reaction is less efficient at high current density. The relationship between capacity and discharge current is often approximated by the Peukert-type equation:

$$C_D = C_{rated} \cdot \left(\frac{I_{rated}}{I}\right)^{k-1}$$

where \(k\) is a constant larger than unity for most battery chemistries.

  • Temperature: Temperature strongly affects electrode kinetics and electrolyte conductivity. Low temperature increases internal resistance and reduces the accessible capacity, while a moderate temperature increase improves ion mobility and available capacity. Thermal management of a vehicle traction battery is thus necessary to maintain consistent SOC estimation accuracy.
  • Self-discharge: A lithium-ion cell slowly loses charge during storage. The self-discharge rate of lithium-ion cells is lower than that of nickel-based batteries but still depends on temperature and storage SOC. Without compensation, self-discharge introduces an error into the SOC estimated by current integration.
  • Cycle life: As the battery ages, the active lithium inventory and the amount of cyclable host material decrease. The effective capacity fades gradually with charge-discharge cycles. When the capacity has faded to 80% of its initial value, the cell is commonly considered to have reached the end of its service life.

Table 1 summarizes the influence of these factors on SOC estimation.

Factor Effect on capacity Typical approach in BMS
Discharge rate Higher C-rate lowers usable capacity Correct by rate factor \(\eta\)
Temperature Low temperature lowers voltage and capacity Apply temperature correction factor
Self-discharge Slow loss of charge during storage SOC adjustment after long rest
Cycle ageing Capacity fade with repeated cycling Update rated capacity \(Q_N\)
Self-recovery effect Open circuit voltage rises after load removal Wait for voltage stabilization

2.3 Common SOC Estimation Methods

Various SOC estimation strategies have been developed for battery management systems. The most representative methods are introduced as follows.

  • Discharge test method: The cell is continuously discharged at a small constant current until the cut-off voltage is reached. The capacity obtained by current integration is considered the real remaining capacity. This method is accurate but requires the battery to be taken offline and consumes a great amount of time. It is thus unsuitable for online estimation of a vehicle traction battery during normal driving or charging.
  • Ampere-hour counting: The SOC is updated by integrating the measured current over time:

$$SOC(t) = SOC_0 – \frac{\eta}{C_N}\int_0^t i(\tau) d\tau$$

This approach is simple and widely used, but its accuracy depends strongly on the precision of the current sensor and on the correctness of the initial SOC. Measurement offset accumulates over time, causing growing drift. In addition, the method cannot self-correct when the actual initial SOC is unknown.

  • Open-circuit voltage method: After the battery has been left at rest for a sufficiently long time, the open-circuit voltage is monotonically related to the equilibrium SOC. By looking up a pre-recorded OCV-SOC curve, the initial SOC can be found. This method is effective for the beginning and end of charging and is often combined with ampere-hour counting. However, it is not suitable for dynamic measurement under load, and the relationship is influenced by temperature and history.
  • Internal resistance method: The internal impedance of the cell changes with SOC, especially in the low-SOC region. This method measures the impedance and maps it to SOC. Because the impedance also depends heavily on temperature, excitation frequency and current direction, it is rarely used alone.
  • Kalman filtering: Kalman filter algorithms describe the battery cell as a state-space model and estimate SOC recursively by minimizing the estimation variance. This method offers good online performance under fluctuating current conditions. However, it requires a precise cell model and significant computational resources, which is challenging for low-cost microcontrollers.

Table 2 gives a comparison of the main SOC estimation methods.

Method Online Accuracy Sensor requirement Computational cost
Discharge test No Very high Current sensor Low
Ampere-hour counting Yes Medium High-precision current Low
Open-circuit voltage No High at rest Voltage sensor Low
Internal resistance Possible Low/Medium AC impedance test Medium
Kalman filtering Yes High Good cell model High

2.4 Proposed Hybrid SOC Estimation Method

In my design, I combine the open-circuit voltage method with ampere-hour counting and add compensation terms for discharge rate, temperature, cycle life and the self-recovery effect. The SOC value at any time is divided into two components. The first component is the initial SOC at the moment when the battery enters operation. If the battery has been at rest long enough to reach a stable equilibrium, the initial SOC is derived from the measured OCV using the pre-stored OCV-SOC curve. Otherwise the initial SOC is set to the terminal SOC from the last charge or discharge event.

The second component is the SOC variation produced by the charge transferred during operation. Because the battery may operate under variable current, the time-varying current profile is sampled at fixed intervals and integrated numerically. The proposed model can be written as:

$$Q(t)=\int_0^t \eta i(t)\,dt$$

$$SOC(t)=K_0 K_t K_c SOC_0 + (1-K’_0) SOC’_0 + \frac{Q(t)}{Q_N}$$

In this equation, \(SOC_0\) is the equilibrium SOC determined from the open-circuit voltage, \(SOC’_0\) is the stored SOC value from the previous shutdown, \(Q_N\) is the current nominal capacity, and \(\eta\) is the coulombic efficiency modified by the discharge rate. The coefficient \(K_0\) represents whether the self-recovery process is complete; \(K_0=1\) means that the cell voltage has reached a stable value after open-circuit relaxation, while \(K_0=0\) means that the battery has not yet reached equilibrium. \(K_t\) is the temperature correction factor, which is set to unity at room temperature in my experiments, and \(K_c\) is the capacity correction associated with cycle ageing.

The transition from the rest state to the operating state is detected by monitoring the time derivative of the battery terminal voltage. In practice, the self-recovery process is considered finished when the voltage change rate falls below a small threshold. For the constant-current discharge case, the simple product \(I \times \Delta t\) gives the transferred charge. For variable-current discharge, the current time history is divided into small sampling intervals \(\Delta t\). At the \(k\)-th interval:

$$Q_k = Q_{k-1} + \Delta Q_k$$

$$\Delta Q_k = i_k \Delta t$$

By using this corrected ampere-hour counting method, the proposed algorithm respects the actual delivered capacity at different currents. It also avoids the large initial error that would arise if a freshly unloaded battery voltage were interpreted directly as an OCV without considering the polarisation relaxation.

3. Hardware Design of the Energy Management System

The hardware of the energy management system was designed with a modular structure around the microcontroller PIC18F452 from Microchip Technology. The main hardware modules include the microcontroller circuit, system power supply, voltage sampling circuits, current sampling circuit, temperature measurement circuit, display and keyboard interfaces, battery protection circuit and charging equalization circuit. Figure 1 shows a representative hardware layout of the developed board.

The PIC18F452 microcontroller was chosen because of its RISC architecture, high-speed operation up to 20 MIPS, on-chip 32 KB flash memory, 256 bytes of EEPROM, an integrated 10-bit analog-to-digital converter and multiple timer modules. Many functions which would otherwise require external integrated circuits are embedded in the controller, reducing board area and improving reliability. The 10-bit ADC has eight multiplexed input channels. When using the 5 V supply as the reference voltage, the conversion resolution is approximately 4.88 mV per LSB, which satisfies the sampling requirement of the present vehicle traction battery management application.

3.1 Power Supply Circuit

The management system is powered directly from the lithium-ion battery pack. A three-terminal regulator LM7805 converts the battery pack voltage into a stable 5 V supply for the microcontroller and logic circuits. A second regulator LM7812 produces the 12 V supply needed by the operational amplifier LM324 in the current conditioning circuit. A DC-DC converter ICL7662 is then used to invert the 12 V rail to -12 V. The power supply is designed with enough decoupling capacitance to avoid oscillations and to reduce the influence of current pulses generated by the LED displays.

3.2 Voltage Acquisition Circuit

Both the total pack voltage and individual cell voltages must be measured accurately. The total pack voltage in my system lies between 21 V and 29.4 V under normal operation. Since the ADC input range is 0–5 V, a precision resistive divider consisting of two 0.1% tolerance resistors converts the pack voltage down to the ADC input range. The divider ratio is calibrated carefully so that the pack voltage can be reconstructed in the firmware.

Individual cell voltage measurement is more complex because the cells are connected in series. Direct differential measurement across a single cell requires floating amplifiers or isolation. In this design, I used a sampling circuit based on an operational amplifier LM358 and a P-channel MOSFET F9630. For the cell \(B_n\), the operational amplifier drives the gate of the MOSFET until the voltages at its two inputs are approximately equal. The voltage across the drain-source resistor chain then becomes proportional to the cell voltage. This circuit provides an isolated measurement of each cell potential without using a dedicated multiplexer or isolation amplifier. To guarantee correct operation, at least two series cells are assumed in the pack so that the reference point of the measurement circuit is sufficiently below the positive terminal voltage.

Table 3 lists the main specifications of the voltage monitoring module.

Parameter Value
Pack voltage range 21.0 – 29.4 V
Single cell voltage range 3.0 – 4.2 V
ADC resolution 10-bit, 4.88 mV/LSB
Voltage acquisition cycle 10 ms per channel
Sensor tolerance 0.1% for resistive divider

3.3 Current Acquisition Circuit

Current sensing is essential for the ampere-hour SOC calculation. Because the maximum discharge current of the battery pack in this system is limited to about 2 A, a direct sensing technique with a precision series resistor is practical. A 1 Ω, 5 W high-accuracy resistor \(R_s\) is connected in series with the battery main loop. The voltage drop across this resistor is proportional to the current.

During discharge, the voltage drop across \(R_s\) has a positive sign relative to the system ground; during charging, it becomes negative. The ADC of the microcontroller is unipolar and therefore cannot read a negative voltage. I therefore designed an absolute-value amplifier using two operational amplifiers. The first stage rectifies the input signal and the second stage provides a gain of five so that the full-scale signal lies safely within the 5 V ADC range. Regardless of whether the input voltage is positive or negative, the output voltage is always positive:

$$V_{out}=5|V_i|$$

The amplifier based on LM324 is configured as a precision full-wave rectifier. The two signal diodes D1 and D2 ensure that only the appropriate feedback path becomes active. Because the gain resistors have small tolerance, the measurement accuracy of the current channel is better than 10 mV at the input. This current signal is used both by the SOC integration routine and by the over-current warning function.

3.4 Temperature Measurement Circuit

Battery temperature is a required input for the SOC compensation model. I selected the digital thermometer DS18B20 from Dallas Semiconductor as the temperature sensing element. The DS18B20 communicates over a single bus line and directly outputs a digital temperature value. Its operating voltage is 3.0–5.5 V and the measurement range is -55°C to +125°C. In the range from -10°C to +85°C, the device has an accuracy of ±0.5°C. The temperature measurement result can be configured with resolutions from 9 to 12 bits, corresponding to temperature steps of 0.5°C to 0.0625°C.

In my circuit, the DS18B20 is used in the external power supply mode. The VDD pin is connected to the 5 V supply rail, the DQ pin is connected to microcontroller port RC6, and a 4.7 kΩ pull-up resistor is connected between DQ and 5 V. The single-wire bus protocol requires strict adherence to timing specifications for initialization, write timeslots and read timeslots. My firmware contains dedicated delay loops to generate the necessary reset pulse, presence-detect sequence, ROM commands and memory commands. Because the DS18B20 produces no per-cell information but gives the average pack temperature, one sensor is sufficient for this small battery pack.

3.5 Display and Keyboard Interface

For human-machine interaction, the system uses a four-digit common-cathode LED display driven by a serial LED driver chip MAX7219. The MAX7219 can drive up to eight digits and contains an 8×8 static RAM, BCD decoders, multiplexing scan circuitry, segment drivers and digit drivers. Only three microcontroller pins are required: CLK, LOAD and DIN. In my design, four digits are used to display voltage, current, temperature or SOC depending on the active key.

The MAX7219 is controlled by a 16-bit serial word. The upper four bits indicate the register address and the lower eight bits carry the display data. The brightness is controlled through the intensity register. The scanning limit is set to four digits and the decode mode is configured for BCD decoding. A 22 pF capacitor on each of the three control lines is added to suppress interference from the surrounding power circuits. The interface diagram is shown in Table 3 description and the wiring description is given below:

  • PIC18F452 RC3 → MAX7219 CLK
  • PIC18F452 RC4 → MAX7219 LOAD
  • PIC18F452 RC5 → MAX7219 DIN

In addition to the numerical display, a set of LEDs is used to provide an at-a-glance indication of the remaining battery capacity. The pack voltage range is divided into four quarters, corresponding to 25%, 50%, 75% and 100% remaining capacity. The LED display circuit uses an LM339 comparator to compare the measured pack voltage with reference thresholds generated by TL431 shunt regulators. When the user presses a button, a green LED bar indicates the capacity interval. The circuits also drive a red indicator to show that the display is active and a yellow low-capacity warning LED. A capacitor delays the turn-off of the indicators by about 2 s after the button is released, saving energy while still giving the user enough time to read the result.

3.6 Keyboard Circuit

Four independent keys are connected to port pins RB4, RB5, RB6 and RB7 of the microcontroller. Each key is pulled up to 5 V through a 10 kΩ resistor and connected to ground when pressed. The software scans the keys periodically. When a key closure is detected, a 10 ms delay is executed to avoid the mechanical bounce. If the closure is confirmed after the delay, the corresponding action is performed. The key functions are defined in Table 4.

Key Function
K1 Display pack voltage (V)
K2 Display charge/discharge current (A)
K3 Display battery temperature (°C)
K4 Display SOC (%)

3.7 Battery Protection Circuit

Safe operation is the most important requirement for a lithium-ion based vehicle traction battery. Overcharge beyond 4.2 V can decompose the electrolyte and generate gas inside the cell, leading to fire or explosion hazard. Over-discharge below roughly 2.5 V causes irreversible loss of capacity. Excessive discharge current and short-circuit current also create severe heating and cell damage. A protection circuit therefore monitors cell voltages and loop current and disconnects the pack when an abnormal condition is recognized.

The protection circuit in this design is built around the Seiko Instruments S-8261 protection IC. The S-8261 integrates a precision voltage detector, logical control circuit, over-current detector, delay circuits, and drivers for external power MOSFETs. It is designed for the protection of a single lithium-ion cell. The critical voltage thresholds are an overcharge voltage of approximately 4.28 V and an over-discharge voltage of approximately 2.3 V. The chip consumes less than 7 µA in normal operation and less than 20 µA in standby mode.

Because my battery pack contains four series cells, each cell is monitored by its own S-8261 chip. The digital outputs of these chips are combined using optocouplers and a CMOS logic gate so that only two power MOSFETs control the complete charge and discharge paths. This arrangement considerably reduces cost compared with schemes that require two MOSFETs per cell. Table 5 shows the measured specifications of the protection board.

Parameter Value
Overcharge protection voltage 4.28 V ± 0.025 V
Overcharge release voltage VDU (fixed by S-8261)
Over-discharge protection voltage 2.3 V ± 0.050 V
Over-current protection 5 A ± 10%
Short-circuit delay < 3 ms
Static current consumption < 200 µA

The charge MOSFET is controlled by the logical OR of the CO outputs from all protection ICs. When every cell voltage is below the overcharge threshold, all CO pins output a high level and the charge MOSFET remains off in the sense of allowing charge current to flow through its intrinsic body diode from the charger side. As soon as any cell exceeds the overcharge threshold, its CO pin goes low, the corresponding optocoupler turns on, and the charge MOSFET is pulled to a low gate potential, interrupting charging. The discharge MOSFET is controlled by the DO outputs from each S-8261. Under normal discharge, all DO pins output high and the discharge MOSFET gate is held high. If any cell reaches the over-discharge threshold, that DO pin goes low and the discharge MOSFET is turned off.

One practical problem is the voltage rebound after the over-discharge protection is activated. When the discharge current is removed, the terminal voltage of the weak cell may rise above the release threshold, re-enabling the discharge MOSFET and causing oscillation around the cut-off point. Such oscillation heats the MOSFET and may eventually damage it. I therefore added a latching circuit built with a CD4011 NAND gate. Once an over-discharge event is detected and the discharge MOSFET is switched off, the latch keeps the MOSFET gate low until the external load is physically disconnected. This prevents repeated turn-on and turn-off, greatly improving the reliability of the protection system.

3.8 Charging Equalization Circuit

Series-connected lithium-ion cells always experience some degree of imbalance. The imbalance comes from manufacturing tolerances, unequal self-discharge, thermal gradients and different internal resistances. During charging, the cell with the smallest capacity reaches its fully charged state first. If the charger continues to supply current, that cell becomes overcharged. If charging is stopped at that moment, the other cells are not fully charged. Equalization therefore is an important part of the management system for a vehicle traction battery pack.

Equalization methods can be divided broadly into energy-consuming and non-energy-consuming categories. Energy-consuming methods use resistive shunts to bleed the excess charge from high-voltage cells. Non-energy-consuming methods transfer energy between cells by means of capacitors, inductors or DC-DC converters. Resistive equalization is simple, inexpensive and effective for small packs with limited charging current. Transformer-based or switched-capacitor equalizers have higher efficiency but require complicated control circuits and more components.

Table 6 compares the three representative equalization approaches.

Method Efficiency Cost Circuit complexity Applicable power
Resistive shunt Low Low Very low Low
Switched capacitor Medium Medium Medium Medium
DC-DC transformer High High High High

In my work I selected a resistor-based energy-consuming balance topology driven by the S-8261 protection IC. The schematic for a single cell is based on the CO output of the S-8261 and a P-channel MOSFET SI4435. A 68 Ω power resistor with a power rating of 2 W is used to dissipate the excess energy. The balance current when the cell voltage reaches 4.275 V is:

$$I_{bal}=\frac{4.275}{68}\approx 62.9\text{ mA}$$

The corresponding dissipated power is \(P = I^2 R \approx 0.27\) W, which is small enough for the resistor to handle without special cooling measures. When the cell voltage rises above the overcharge threshold, the CO pin of the protection chip goes low, turning on the MOSFET and connecting the shunt resistor across the cell. The resistor discharges the cell slightly until its voltage falls to the release threshold. At that point the CO output returns to high level and the shunt MOSFET is switched off. Each cell in the stack is equipped with an identical balancing branch. During the subsequent charge phase, the high-capacity cells automatically supply a lower bypass current while the other cells continue to receive charge. The experiment verified that this process effectively limits the maximum voltage difference among the series cells.

4. Software Design

The software of the energy management system was developed in assembly language using modular programming. The flow is organized as a main loop with two timer interrupts. TMR0 is used for periodic data acquisition, and TMR1 is used as a time base for SOC integration and display refresh. The main program performs system initialization, then scans the keyboard, updates the display and calls the SOC estimation routine. The initialization tasks include I/O port direction configuration, ADC configuration, timer setup and MAX7219 configuration. Applying reset clears the internal registers, configures the watchdog timer, and prepares the peripherals for real-time operation.

Because each module is implemented as an independent subroutine, the software is easy to test and modify. For instance, the display subroutine only writes data to the MAX7219 registers through the serial interface. The temperature subroutine only handles the DS18B20 communication. The SOC algorithm only reads global variables updated by the acquisition module and returns the state of charge.

4.1 Data Acquisition Module

The data acquisition module reads the battery voltage, charge/discharge current and temperature. The voltage and current signals are connected to ADC channels RA0, RA1, RA2 and RA3. The A/D conversion is started in single-channel mode. When the conversion is complete, the 10-bit result is read from the ADC result registers and stored in the voltage and current variable. To improve reliability and reduce high-frequency noise, eight consecutive samples are taken and then averaged. This digital filter averages out the fluctuations originating from switching noise and sensor disturbances.

At each sampling interval, the software also calls the temperature acquisition subroutine. The DS18B20 communication sequence includes initialization, skip ROM command, start temperature conversion command, waiting for conversion completion, initialization again, skip ROM command, read scratchpad command and finally reading the two temperature bytes. The subroutines for data reading and writing obey the strict timing of the one-wire bus. In my implementation, the write-zero slot keeps the bus low for about 65 µs, the write-one slot keeps the bus low for only 2 µs before releasing it, and the read slot samples the bus after a short low phase. These parameters were verified by oscilloscope measurements and by data-logger checks at room temperature.

4.2 SOC Calculation Module

The SOC estimation procedure is executed once per second. The program first reads the initial SOC from the non-volatile memory. If the battery has been at rest for a long period and the terminal voltage has stabilized, the OCV-SOC lookup table is used to obtain a fresh initial value. Otherwise, the initial SOC is taken from the stored last SOC value. Then the module integrates the sampled current to obtain the removed or added charge. In order to capture the current profile accurately, the current signal is sampled every 250 ms and the result is summed into an ampere-second accumulator. The total accumulated charge is divided by the nominal capacity after correction for temperature and cycle life. The final SOC is computed as:

$$SOC(t)=SOC_{init}+\frac{\Delta Q_{net}}{Q_N}$$

where \(\Delta Q_{net}\) is positive during charging and negative during discharge. The resulting SOC is stored in the non-volatile memory periodically so that the information survives power-off events. When the battery is fully charged, the firmware resets the SOC to 100%. When a cell reaches the discharge cut-off voltage under load, the accumulated SOC is reset to 0. Such reset points improve the long-term accuracy of the ampere-hour method.

4.3 Display and Key Processing Software

The display software first turns off the MAX7219 by writing zero to the shutdown register. After the initialization sequence, the chip is set to normal mode with a scanning limit of four digits and BCD decoding. The intensity register is configured to drive the LEDs at a comfortable brightness. The subroutine writes each digit of the value to the corresponding digit register. Floating point numbers are converted to decimal digits in the firmware, with a fixed number of decimal places depending on the physical quantity.

The keyboard processing routine uses a polling algorithm. The four port pins are read in turn. If one pin reads high after a 10 ms debounce interval, its corresponding flag is incremented. The main program then decides which value to update on the display. A short timeout returns the display to the SOC-indication mode after about 5 seconds, preventing the user from leaving the system in a current-display or voltage-display mode forever.

5. Experimental Verification

Experiments were carried out on a battery pack composed of seven series-connected lithium-ion cells. The pack was manufactured by a commercial supplier and has the nominal parameters reported in Table 7.

Parameter Value
Cell model TSE-086760
Rated capacity 2 Ah
Nominal pack voltage 25.9 V
Maximum charge voltage 29.4 V
Discharge cut-off voltage 21.0 V
Maximum continuous charge current 2 A
Maximum continuous discharge current 2 A

The aim of the experiments was to validate the SOC estimation algorithm, to observe the charging and discharging behavior of the lithium-ion pack and to verify the protection and equalization circuits. The same data are also useful for the design of a vehicle traction battery simulator and for the calibration of the remaining-energy gauge.

5.1 Open-Circuit Voltage and SOC Relationship

To construct the OCV-SOC lookup table, a fully charged cell was discharged at a very low constant current of 0.05 C, i.e., 100 mA, in small steps. Between the steps the battery was allowed to rest until the open-circuit voltage became stable. The discharged capacity at each step was recorded. The measured OCV versus SOC data points are plotted in Figure 2 in the original thesis. The relation is slightly non-linear, with a relatively flat region between SOC values of 20% and 80% and a sharp voltage drop below 10% SOC. The stable OCV at the fully charged state was about 4.16 V per cell after relaxation, and the OCV at the minimum voltage was close to 3.0 V per cell. This relationship was stored in the microcontroller memory as a lookup table with linear interpolation.

5.2 Charging Behavior

The pack was charged using a constant-current, constant-voltage (CC-CV) profile. The constant-current phase was set to 0.3 C, i.e., 600 mA. When the pack voltage reached 29.4 V, the charger automatically switched to constant-voltage mode. The charging process was terminated when the charging current dropped below 50 mA. The ambient temperature during the test was 23°C.

The initial SOC was estimated to be approximately 8% because the lowest cell voltage was 3.35 V after a period of rest. During the first part of charging, the pack voltage rose quickly, then followed an approximately linear slope until the upper voltage limit was reached. The total charging time was about 4 hours. At the end of charging, all cells were nearly balanced, with a maximum cell voltage difference lower than 40 mV.

Figure 3 in the original source recorded current voltage and SOC curves. The voltage and capacity values extracted at some selected times are shown in Table 8.

Time (min) Pack voltage (V) Charge current (mA) SOC (%)
0 25.30 600 8
60 27.50 600 38
120 28.80 600 68
180 29.40 390 90
240 29.40 50 100

The charge equalizer was observed during the constant-voltage phase. When one cell reached the overcharge threshold before the others, its shunt branch started to conduct a bypass current. The charging current supplied by the charger was partially diverted through the equalizing resistor, preventing this cell from being overcharged while allowing the remaining cells to continue charging. After the weaker cells were filled, the equalizing current disappeared and the pack reached a fully charged state. This confirms the function of the balance circuit.

5.3 Constant-Current Discharge Experiments

Discharge experiments were performed at three different C-rates: 0.2 C (400 mA), 0.4 C (800 mA) and 0.5 C (1 A). The discharge was stopped when the pack terminal voltage fell to the cut-off voltage of 21 V. The results confirmed that a higher discharge current produces a lower discharge voltage curve and a shorter discharge time. The extracted time-to-cut-off and delivered capacity at each rate are summarized in Table 9.

Discharge current Current (mA) Discharge duration (h) Delivered capacity (mAh)
0.2 C 400 3.6 1420
0.4 C 800 2.2 1380
0.5 C 1000 1.3 1229

After the discharge was interrupted, the terminal voltage gradually recovered due to the self-recovery effect. The amount of voltage recovery increased with the discharge current. This behavior confirms that the usable capacity of the lithium-ion cell under high discharge current is lower than that under low discharge current. For a vehicle traction battery that experiences fast acceleration and hill climbing, such capacity-rate dependence must be reflected in the SOC algorithm; otherwise the SOC may be underestimated during high-power discharge and then overestimated after rest or when the current is reduced.

5.4 Variable-Current Discharge

To verify the SOC estimation under a realistic load, the pack was discharged through a fixed 40 Ω power resistor. Under this load, the discharge current was roughly 0.6 A at the beginning, decreasing gradually to about 0.2 A near the end. The discharge voltage profile showed a slow decline during the main working plateau and a rapid decline at the end of discharge. The voltage and current variation during the test are consistent with the behavior expected from an approximately constant resistance load. In practice, this load condition represents an approximation of a light-load cruise condition of an electric vehicle.

The SOC curve computed by the proposed hybrid algorithm was verified by comparing the integrated ampere-hours with the capacity obtained from the subsequent full discharge. The maximum SOC deviation was approximately 3% throughout the variable-current test. This result indicates that the combination of the OCV method, the corrected ampere-hour integration and the temperature compensation provides acceptable accuracy for the target application.

6. Conclusion

I have designed and implemented an energy management system for power lithium-ion battery packs based on the micro-controller PIC18F452. The system gathers cell voltages, pack voltage, current and temperature in real time. A hybrid SOC estimation algorithm was developed by combining the open-circuit voltage method with ampere-hour counting, while adding correction coefficients for temperature, discharge rate, cycle life and open-circuit recovery. The experimental results show that the algorithm predicts the SOC of the pack with a deviation of about 3% under variable discharge currents. The system also includes a lithium-ion protection circuit built around the S-8261 ICs, which protects the pack from overcharge, over-discharge, over-current and short-circuit conditions. A resistor-based charging equalizer connected to the S-8261 output successfully limits voltage divergence during the charging operation.

The developed management system improves the operational safety and reliability of the battery pack and offers an economical modular solution for low-to-medium-power lithium-ion packs. The design can be scaled to pack configurations with more cells, and the communication interface can be extended for integration into a full electric vehicle control network. Further work will focus on improving the SOC estimation accuracy by incorporating online capacity estimation and using adaptive filtering technology. Moreover, the equalization circuit can be upgraded to an energy-transfer architecture to reduce power loss in large-capacity vehicle traction battery packs. Overall, this research provides a useful reference for the development of robust and low-cost battery management systems for light electric vehicles and stationary energy storage applications.

Scroll to Top