Abstract
Battery charging is a greater challenge in the emerging electric vehicle domain. A newer multistage constant-current (MSCC) charging technique encompassing state-flow control tool-based design is implemented for charging the battery of an electric two-wheeler. MSCC method allows for faster charging and reduced battery degradation per charge. The designed controller incorporates line current power factor correction, thereby limiting the total harmonic distortion (THD) in line current and reactive power. The control strategy for battery charging has been developed using the state flow chart approach for implementing MSCC. The model has been formulated and implemented in MATLAB/Simulink. The proposed control monitors the state-of-charge (SOC) of the battery, age, and thermal behavior due to the charging strategy. The results show that the proposed charging technique with a state flow control approach gives effective and efficient output with reduced THD. Simulation results disclose that the desired parameters are controllable, stable, and effective within the operational limits.
1. Introduction
With growing pollution in urban India and climate change threatening the world, all countries and vehicle manufacturers are clear that the future of transportation is electric vehicles [1]. More than any other country, Indians ride 2-wheelers and India has around 7.35 million electric scooters and bikes, with the projected numbers for 2030 being around 26.52 million. And, the reason for the popularity of 2-wheelers in India is the price-sensitive market. The market for electric two-wheelers in India is growing rapidly, and the government is pushing for their adoption by giving incentives [2]. The market in India is very price-sensitive, and affordable scooters and affordable charging solutions will be paramount [3]. The conventional constant current-constant voltage (CC-CV) mode of charging and its drawbacks are increased time in CV mode [4]. The work aims to design an affordable charger with good charging speeds, exploring a newer method: the multistage constant current charging method. A fast-charging method considering the battery’s safety/lifecycle and charging time is proposed in [5] by adopting the computation of internal dc resistance as a function of SOC and charging currents for a Li-ion battery. Considering the temperature rise of the Li-ion battery and charging time using an equivalent battery model, the particle swarm optimization technique is adopted to find the optimal charging technique [6]. The temperature rise can be improved by nearly 40% with an 18% reduction in charging time.
A Cuk-based resonant LLC converter was proposed for charging e-bikes considering the power quality of the input current in [7]. The pulse width modulation (PWM) based converter works in discontinuous mode. It has a single voltage loop simplifying its control with a maximum charging current of 10 A to charge a 20 AH battery following the IEC-61000-3-2 standard. An improved two-switch buck PFC incorporated SWISS rectifier-based charger for three-wheeler was proposed by [8], accommodating both fast and slow charging capabilities.
The problems associated with charging Li-ion batteries are mentioned as (i) increased temperature rise if the charging current is high with reduced charging time and (ii) increased charging time if the charging current is maintained within limits with good temperature rise. Various charging techniques for Li-ion batteries are adopted by considering the above-given limitations. Apart from the techniques, the charging pattern/algorithms are optimized and adopted for real-time implementation. Every method has its pros and cons; hence, there is always some compromise that must be made in charge. To reduce the charging time, current should be increased until the battery’s temperature is within limits. Once the battery’s voltage has reached the minimum level, the charging current is reduced to a lower value. At every stage, the SOC of the battery is monitored to fix the charging current reference for each stage.
In this manuscript, a novel state-flow approach-based controller design for multistage constant-current battery charging techniques was proposed and implemented for an electric two-wheeler. The strategy was formulated based on the survey conducted by the authors. This article briefs the literature on the selected problem statement in the introduction. The theoretical aspects of MSCC compared to the CC-CV algorithm were discussed in Section 2. The design approach adopted for developing the charger and the control algorithm was elaborated in Section 3. The design of the power converter and the development of the state-flow control algorithm were discussed, respectively, in Sections 4 and 5. The proposed concept was integrated and implemented in MATLAB/Simulink environment and obtained results. Electrical and thermal aspects of the battery and battery charger were inspected, and the results are presented in Section 6. Section 7 includes the conclusion that abstracts the simulation results with the possible future enhancement in the selected domain.
2. MSCC over CC-CV Charging Algorithm
Li-ion batteries and few types of batteries currently being utilized for electric vehicle applications [9] are charged using the traditional CC-CV technique and are preferred over other methods. Fast battery charging with better efficiency has continually emphasized charging techniques [10]. In CC-mode, a constant and higher magnitude current is used to charge the battery until it charges to its predefined threshold/cut-off voltage [11]. In CV-mode, a constant voltage of magnitude equal to the cut-off value of CC-mode is applied, resulting in a reduced charging current. Eventually, the current ceases when the battery potential is equal to the applied voltage [12]. Charging the battery at a large magnitude constant current followed by CV-mode prolongs the charging instance [13]. This eventually leads to adverse effects on the charging efficiency and capacity [14]. Hence, adopting the fast CC-CV charge method does not result in a feasible charging method that can be adopted for Li-ion batteries.
The multistage constant current technique is a new charging technique which charges the battery in the constant current mode in different stages with various stages of constant current to charge the battery fully. This method splits the battery charging time into multiple time instants. The battery is charged under constant current mode with different reference currents. The initial charging of the battery is considered at higher values. As the battery charges, the reference currents are reduced in the subsequent steps until the battery is full, as illustrated in Figure 1. The value of the reference current at each stage will be decided based on the battery capacity and SOC of the battery. Several optimization techniques can be employed to fix the reference current suitably. The charging methodology improves the battery life for many cycles with quick charging time and reduced losses. This method resolves the problem of lower current in CV mode in traditional chargers with a simultaneous reduction in charging time and cost of the charger.

The investigation of 13 charging patterns of Li-ion batteries is considered in [15] on the electrochemical effects of charging. EIS measurements were carried out after 300th, 500th, and 510th cycles under 50% SOC. It is observed that the charging and discharging is affected by electrode reaction kinetics caused by diffusion of Li ions in the active material. Under MSCC, the cells attain smaller electrochemical polarization, and the maximum charging current is determined by the lithium plating boundary that determines the rapid charging ability of Li ion batteries. MSCC strategy results in high energy density pouch cells, with optimal charging combination under wide range of charging temperatures improving the cycle performance and shorter charging time.
3. Design Approach
3.1. Battery Capacity
Present 2-wheeler EV batteries do not exceed the power rating of 2.5 kW; hence, in the power converter design, all the components are selected to suit their operating power levels.
3.2. Use Case
The aim is to develop a charger that can be plugged in at home with single-phase supply for domestic use and is compact, low cost as possible without compromising the charging time and efficiency. Hence, a single DC-DC boost converter for PFC and charging algorithm applications is considered the best power converter choice.
3.3. Alternatives and Tradeoffs
Multistage constant current charging is not the current industry standard and is aimed at formulating an alternative to the conventional method of charging. The medium-long term impact of this method is under research.
3.4. Fundamental Battery Charging Circuit
The block diagram of the proposed multistage constant-current charger system is shown in Figure 2. From the domestic supply socket, a single-phase ac supply is connected to the step-down transformer to reduce the voltage compatible to charge the battery. Uncontrolled rectification of ac to dc is performed by a diode bridge rectifier. The output of the rectifier is fed to the PFC boost converter for appropriate conditioning of charging voltage and shaping the input AC. The PFC converters serve the dual purpose of regulating dc voltage and improving the AC input’s power factor of the ac input. A suitable control strategy is vital in any charge controller, considering input ac voltage and battery side parameters for regulating the PFC boost converter [14]. The MSCC controller sets the battery’s reference voltage and charging current, and the controller incorporates PFC. The controller receives information like source voltage, frequency, and phase from ac side and battery voltage, reference voltage, and SOC from the dc side using appropriate sensors. Here, it is proposed a charging algorithm that charges the battery at a constant current at different voltages as a function of SOC of the battery.

4. Design Specifications
The design parameters of the proposed battery charger for an electric 2-wheeler are provided in Table 1. The design involves designing of PFC boost converter, LC filter, and transformer with adjustable tap settings. The design of the PFC boost converter is discussed as follows.
4.1. Boost Converter with Additional LC-Filter
The circuit of the PFC-boost converter with an additional output LC filter is shown in Figure 3. The additional LC stage is provided to eliminate the switching frequency ripples at the boost converter’s output. The design of the boost inductor and output capacitor is discussed.

Based on the duty ratio (D), the boost converter has its predefined limits of operation [16]. Within the limits of the duty ratio, the output voltage (Vb) of the boost-converter is given by: Vb = Vin/(1 − D). For an ideal boost-converter, a PWM duty cycle of D = 0 leads to the output voltage equaling the input dc voltage (Vin), and for D = 1 the output voltage tends to be infinite [17].
The value of boost inductance is calculated as
The minimum output capacitance required is calculated based on input power () and peak inductor current (Ipk) aswhere is the inductor current ripple, is the peak current of the inductor, is the switching frequency of the boost converter, and is the ripple in output voltage.
4.2. Controller
The controller is the major component of the control system that dynamically regulates charging current, charge voltage, and input power factor. The controller needs 3 measurements, namely,(1)Measure the output voltage to keep it at the reference level (Vref)(2)Measurement of the ac input voltage at the secondary side of the transformer to provide a reference for the inductor current, in such a way- the input AC in phase with input ac voltage(3)Measurement of the average inductor current to ensure that it tracks the rectified AC voltage
The controller consists of two control loops as shown in Figure 4, a primary current-control loop and a secondary voltage-control loop. The voltage-control loop regulates battery voltage and the inner current loop shapes the dc-link current so that the input current tracks the input voltage both in shape and phase, ensuring a near unity power factor [18]. The working of the MSCC algorithm is described in Section 5.

4.2.1. Voltage-Control Loop
Voltage control loop regulates battery voltage by providing a current command to the inner current controller loop of the PFC controller [19]. This current is proportional to the magnitude of the charging current required to charge the battery. The battery voltage error is regulated by PI controller providing DC reference to the inner current loop [20].
4.2.2. Inner-Current Loop
In the inner-current loop, the reference current set by the voltage control loop is multiplied by the final shape of the supply voltage at unit magnitude. It is compared with the inductor current IL of the boost converter [21]. The current error is fed to the PI controller, whose output is the desired duty ratio (δ). The signal is then fed to the pulse generator to trigger the power switch of the PFC boost converter [22].
5. State Flow Control Algorithm
Li-ion batteries are very sensitive to overcharge and variations in charge/discharge currents; therefore, a suitable charging algorithm is needed to maximize charging capacity, reduce charging time, and improve battery lifespan [23].
In the traditional CC-CV mode, a high magnitude constant current is supplied to the battery until its voltage reaches the peak value, after which that peak voltage is maintained and kept constant till the current decreases to its cut-off value and charging is stopped [24]. This consistent application of peak voltage can adversely affect the battery and increase charging time.
The multistage charging method is faster and more efficient than the conventional CC-CV method. It is implemented with 3-stage charging, where various stages have different current values. As charging starts, the highest current value is applied until the battery voltage reaches its peak value, upon which the current is reduced to its second stage value, which leads to a sudden drop in the voltage. This voltage then climbs to its peak value when the current is dropped again. This is the mechanism of multistage charging [25]. For the three stages, three charging current values are chosen. The first stage will have a constant value, the maximum allowed current (I1) for the battery in CC mode. So, the charged AH capacity now only depends on the last stage current (I3). The smaller the value of I3, the higher the value of charged capacity. Now, as both I1 and I3 are selected, charging time depends only on I2 and for different values of I2, charging times will be different, but the AH capacity charged will approximately be the same as I3 [26]. The optimum value of I2 is selected by using the following formula:
This control logic gives voltage reference to the controller, which then controls the current in the battery through boost PFC. The optimal value of I2 is chosen based on Figure 5, which plotted the charging time as a function of charging current I2. The total charging time T is minimum when the I3 has a value calculated by (3), and the optimal value is independent of the values of Req and Ceq instead depends on the values of I1 and I3. While computing I2, the values of I1 and I3 are maintained constant. The lowest charging time corresponds to the value of I2, which satisfies that formula. The complete formulation of MSCC is shown in Figure 6 and is detailed in this section.


5.1. State Flow Chart Demonstration
In the first stage, the charger starts charging the battery at maximum current I1, and achieving the current I1 gives a voltage reference of 35 V. To avoid overlapping of all the stages simultaneously, an initial delay of 0.4 seconds is added due to a sudden increase in the voltage. To incorporate this, two blocks of the same stage are used with the delay between them.
In the second stage, where the current reference is I2, the battery voltage rises to its peak value of 29.33 V, and the condition [Vpeak ≤ Vb] is met. The logic moves to the second stage with a reference voltage of 28.25 V. Again, to incorporate the slight delay in the reduction of voltage which might lead the control to cross all stages. Hence, a delay of 1 second is introduced and to do that, two blocks of the same stage are used.
After the battery voltage has climbed up to Vpeak, the condition is met and moved to the third stage, where the process repeats. And finally, in the third stage, when the battery reaches its peak voltage, the charging is completed, and the reference voltage is now reduced to 0, inhibiting the current supply to the battery.
6. Simulation Results
The proposed charging circuit is simulated with MATLAB Simulink. The block diagram is represented in Figure 7.

The output from the transformer is stepped down single-phase voltage. After stepping down the input voltage is passed through a full bridge rectifier which rectifies the AC into DC as shown in Figure 8. From the perspective of PFC, the load is connected to the battery’s rectifier and a boost converter with capacitors and inductors. The load becomes more reactive because of these reactive components, which causes line current, i.e., current drawn from the AC supply to go out of phase with the line voltage, reducing the power factor. The shape of the line current becomes nonsinusoidal while line voltage stays sinusoidal. The nonsinusoidal line current increases reactive power and decreases active power. All these ill-effects caused by diode bridge rectifiers can be avoided by using the Boost PFC converter, and the results are shown in Figure 9, line voltage (Vin) is shown in blue while line current (Iin) is shown in red. Inductor current (IL) is shown in red, while reference (IL_ref) is shown in blue in Figure 10.



6.1. Power Factor Improvement
In the absence of a boost converter, the source current waveforms are observed at ac input spikes near the ac supply voltage peak. The waveform distortion evaluated using FFT analysis has a rich spectrum of harmonic frequencies that are odd integer multiples of the fundamental frequency. The THD of source current is 280%, with the corresponding power factor of 0.33 lagging, which is very poor. The provision of a boost converter in the dc-link with a suitable control technique that shapes the source current to be in line with source voltage improves the source current waveform with reduced THD and improved power factor as discussed in this section.
FFT analysis of line current is performed in all three stages of charging to analyze the power factor improvement. The line current is directly proportional to the magnitude of the current supplied to the battery. The source spectrum is inversely related to the power factor, stating poor distortion in source current results in poor power factor. For all the FFT analyses a fundamental frequency of 50 Hz is set.
Figure 11 shows the FFT spectrum of ac line current in CCCV mode. A charging current of higher amplitude is chosen to limit the charging time of the battery on trivial basis. The line current THD is 15.82% which is far beyond the recommended limits specified by IEEE519: 2014 recommendations, and the power factor is computed to as Power factor = lagging.

Figure 12 shows the FFT analysis of line current in the 1st stage (stage of I1 current). In this stage, the line current peak is 22.7 A, the corresponding THD is 9.26%, and the power factor is computed to as Power factor = lagging. The THD is significantly lesser than the CCCV adopted earlier.

Figure 13 shows the FFT analysis of line current in the 2nd stage (stage of I2 current). In this stage, the line current with a peak of 10.74 A with THD of 8.36%, and the power factor is computed to as Power factor = lagging, and the THD is significantly less.

Figure 14 shows the FFT analysis of line current in the 3rd stage (stage of I3 current). In this stage, the line current with a peak of 7.92 A with THD of 4.5%, and the power factor is computed to as Power factor = lagging, and the THD is within IEEE519:2014 recommendation.

Vpeak input in the state flow chart was reduced at various stages to demonstrate the charging stages as it consumes a longer run time. In stage 1, a current I1 of 20 A is supplied to the battery, which leads to increase in voltage and SOC of the battery and Vpeak is reduced to 27.83 V. The battery parameters and the charging profile are shown in Figure 15.

In stage 2, a current I2 of 10.7 A is supplied to the battery, which leads increase in voltage and SOC% of the battery. When the battery voltage reaches 27.83 V the I1 is reduced to I2, which leads to a decrease in voltage and decrease in the rate of charging of the battery because the charging rate depends on the magnitude of the supply current; this can be seen in the %SOC. When the battery voltage reaches 27.588 V, I2 is reduced to I3, which again leads to a decrease in voltage and a decrease in the rate of charging of the battery.
Now in the 3rd stage, the charging current magnitude (I3) of 5.7 A is set as reference and is charging the battery. The charging rate is even slower, following the protocol adopted by most battery chargers in today’s world. In other words, at the lower SOC level, the battery needs to charge quickly with an elevated current level. The charging current should be relatively lower at a higher SOC level. The converter’s efficiency with ideal components is calculated as the ratio of output power to the input power measured at the fundamental frequency, accounting for 93.78%. The nonideal behavior of the converter, effect of parasitic elements, and effect of noise signals are not considered for calculating efficiency. The ambient temperature of the battery is set initially at 25°C and later increased to 35°C, considering the ambient temperature of India. The performance of the charger is invariant. In practice, there will be a detrimental effect due to temperature variations due to environmental conditions. Hence, measures must be taken to isolate the battery packs exposed to direct sunlight and effective heatproofing. This will improve the battery life and enhance the safety of e-bikes by avoiding the attainment of higher temperatures of battery packs.
7. Conclusion
The multistage constant current technique for charging Li-ion batteries for two-wheeler electric vehicles was formulated and developed using a state-flow approach using MATLAB/Simulink. The performance of the MSCC-based charger was designed considering battery life, temperature rise, and line input current shaping with power factor correction. The concept of fast charging was implemented by considering SOC and battery voltage. The charging currents for the various stages were fixed considering the charging time of the battery, and the results are demonstrated. The input current spectrum of the charger indicates THD of the input currents is within limits at near unity power factor. The control strategy addresses the primitive design of battery chargers for e-bike applications which can be modified for three-wheelers. The research can further be extended by evaluating the battery capacity after charging and thermal analysis and considering the effect of small signal noise on the performance of the battery charger.
Data Availability
The data used to support the findings of this study are included in the article. Should further data or information be required, these are available from the corresponding author upon request.
Conflicts of Interest
The authors declare that there are no conflicts of interest regarding the publication of this paper.
Acknowledgments
The authors thanked Vellore institute of technology-Chennai for the technical assistance. The authors appreciate the supports from Saveetha School of Engineering, SIMATS, Chennai and Wollo University, Kombolcha, Amhara, Ethiopia. It was performed as a part of the Employment of Kombolcha Institute of Technology, Wollo University, Kombolcha, Amhara, Ethiopia.