International Journal of Electrical and Computer Engineering (IJECE) Vol. No. October 2025, pp. ISSN: 2088-8708. DOI: 10. 11591/ijece. Field-programmable gate array-based voltage-feedback-driven battery charging with DC-DC buck converter Afarulrazi Abu Bakar1. Suhaimi Saiman1. Tharnisha Sithananthan1. Muhammad Nafis Ismail1. Saidina Hamzah Che Harun2 Department of Electrical Engineering. Faculty of Electrical and Electronic Engineering. Universiti Tun Hussein Onn Malaysia. Johor. Malaysia Magnitude Power Sdn Bhd. Selangor. Malaysia Article Info ABSTRACT Article history: This paper presents the design and development of a reference-driven fieldprogrammable gate array (FPGA)-based controllable battery charging system featuring a buck converter. The controller tracks and adjusts the system's duty cycle based on output voltage feedback. The primary goal was to introduce a digital pulse-width modulation generator program using a hardware description language within a feedback loop. To enhance the buck converter's accuracy, the system's switching frequency was set to 20 kHz with an 8-bit counter, achieving a resolution of 0. 390625% per clock cycle. An 8-bit parallel analog-to-digital converter provided feedback by measuring the output voltage and comparing it with the reference setpoint. The simulation model was developed using MATLAB/Simulink, while the Quartus II software was employed for controller programming. The resultant data was meticulously analyzed to assess the circuit's performance across various voltage and control parameters. To validate the proposed controller's effectiveness, a 400 W system prototype comprising a step-down transformer, rectifier, and buck converter was constructed and tested for voltage ranging from 24 to 72 V. Through FPGA-based digital control, this system demonstrated a voltage regulation accuracy of A0. 39 per clock cycle and the capability to continuously track and regulate the duty cycle with each clock trigger, ensuring precise control over the charging process. Received Sep 8, 2024 Revised May 28, 2025 Accepted Jun 30, 2025 Keywords: Buck converter DC charger Field-programmable gate array Pulse-width modulation Voltage feedback This is an open access article under the CC BY-SA license. Corresponding Author: Suhaimi Saiman Faculty of Electrical and Electronic Engineering. Universiti Tun Hussein Onn Malaysia Johor. Malaysia Email: suhaimis@uthm. INTRODUCTION The diverse topologies of DC-DC converters have been intensively studied and widely used in several applications, such as battery chargers . , renewable energy . , electric vehicles . , portable devices . , and lighting systems . It is also driven by the development of renewable energy and government initiatives that raise awareness about maintaining environmental sustainability . The fascinating demand for higher direct current (DC) power has introduced new power electronic devices, such as gallium nitride (GaN), which are capable of providing more advantages over silicon-based devices . , . The fundamental goal of DC-DC converters is to provide an adequate amount of voltage to a load within the specified operational range . , . Trends, standards, and compliance are shaping the future of power electronics converters, driving innovations that result in lower cost, higher efficiency, higher power density, more compact size, and more versatile power conversion solutions for various industries and applications . Journal homepage: http://ijece. ISSN: 2088-8708 The development of controllers is indeed aligned with advancements in new power electronics switching devices, ensuring that the full potential of the technologies is realized in practical applications. Pulse-width modulation (PWM) switching is one of the important control techniques for controlling PWM converters to increase efficiency . PWM switching is commonly implemented using microcontrollers . , digital signal processors (DSP. , field-programmable gate arrays (FPGA. , applicationspecific integrated circuits . , and analog controllers. Controller selection varies based on complexity, required precision, and application. DSPs are commonly used for systems that require solving complex mathematical operations and high-speed numerical processing . On the other hand. FPGAs are commonly used for operations with high switching frequency and have the ability to handle multiple operations simultaneously. Therefore, the switching controller should be correctly chosen to match the power electronic devices used in order to achieve the desired response. Nowadays, most controllers are implemented based on a DSP and an FPGA to leverage both technologies' strengths. FPGAs have been proven to provide a high-speed control system and flexibility in custom applications, which can be easily reconfigured . Recent efforts in FPGA-based converters have shown promising advancements in battery management for electric mobility and solar energy . , . Studies, such as study . emphasized adaptive digital PWM strategies, highlighting the increasing relevance of real-time configurability in low-voltage, high-efficiency systems. FPGAs have also been widely used for switching in various kinds of converters, such as rectifiers (AC-DC) . DC choppers (DC-DC) . , . , cyclo-converters (AC-AC) . , and inverters (DC-AC) . , . Battery charging systems using DC-DC converters are used to regulate the output voltage and control the charging current . To increase effectiveness, it must be intelligent, sensitive to the battery's health, and satisfy a variety of demands, especially when it comes to current ripples in the battery mode of float charging, for efficient charging and power distribution . Engineers are researching new methods and techniques to boost charging rates without harming the condition of batteries . This research proposes a digital PWM based on voltage feedback, which is implemented in a DC-DC buck converter fed from a rectifier circuit. The proposed digital PWM technique can be applied in other PWM DC-DC converters by adapting the specifications of the input, output, frequency, accuracy, and response time. The key contributions of this research include the implementation of a reference-driven PWM controller using an 8-bit ADC for real-time feedback, integration of a digital control loop into an FPGA platform for fine voltage adjustment, and comprehensive validation through analysis of both simulation and experimental findings to emphasize the controllerAos suitability for precision battery charging systems. The DC output voltage can be adjusted based on the given reference or set point, and automatically match the programmed PWM, which is facilitated by the voltage and current feedback assigned. The controllerAos control algorithm is programmed using a hardware description language, which can ultimately allow for the implementation of hardware designs at various levels of abstraction. The rest of the manuscript is organized as follows: section 2 consists of the research methodology of the proposed system. In section 3, the results and detailed analysis of the experimental assessments of the research are documented. In section 4, the overall manuscript is concluded. RESEARCH METHOD The parameters of the critical components required for this proposed system were calculated in order to ensure proper functionality and the desired performance. The MATLAB/Simulink software was used for circuit modelling and verification. The charging performance was verified, potential errors were identified, and necessary adjustments were made to achieve the desired output. In addition, hardware implementation was carried out based on the specified parameters. The values of the critical components in the buck converter were chosen to be much greater than the calculated values to ensure the converter operated in a continuous conduction mode, even though the duty cycle changed. Based on the hardware implementation, testing was conducted to ensure the circuit met the requirements and performed effectively. Proposed circuit block diagram In the proposed setup, the AC power source was first connected to a 3 kVA step-down transformer, which reduced the voltage before it was fed into the bridge rectifier circuit, as illustrated in Figure 1. The rectifier consisted of four diodes arranged in a bridge configuration, enabling the conversion of alternating current (AC) to pulsed direct current (DC). These diodes ensured that current flowed in only one direction, resulting in a consistent positive voltage output. The diode also played a key role in maintaining the flow of current through the inductor and preventing potential damage caused by reverse current. A buck converter was integrated into the system to further control the voltage and reduce it to the appropriate level required for battery charging. This converter played a key role in ensuring that the power Int J Elec & Comp Eng. Vol. No. October 2025: 4993-5002 Int J Elec & Comp Eng ISSN: 2088-8708 supplied to the battery was efficient and within safe operating limits. An FPGA was used as the control unit, precisely adjusting the duty cycle of the buck converter to maintain optimal charging conditions. To monitor the system performance, an 8-bit parallel analog-to-digital converter (ADC) and a current sensor were used to track the voltage and current in real-time. This coordinated approach aimed to improve power conversion efficiency, support longer battery life, and improve overall system reliability. Figure 1. Proposed systemAos block diagram Circuit simulation using MATLAB/Simulink software The charging circuit shown in Figure 2 initiates with a supply voltage of 240 VAC at a frequency of 50 Hz. The supplied voltage was then reduced to 100 V AC through the aid of a step-down transformer. The voltage of 100 VAC was then passed through a bridge rectifier to convert the AC voltage into a pulsating DC voltage. A capacitor was then connected to filter out AC ripples and obtain an unregulated filtered DC The buck converter was connected after the rectifier to produce an output voltage lower than the input voltage by controlling the switching of its components. Figure 2. Diagram of circuit simulated using MATLAB/Simulink software Field-programmable gate array-based voltage-feedback-driven battery A (Afarulrazi Abu Baka. A ISSN: 2088-8708 Control algorithms The flowchart presented in Figure 3 illustrates the process of a PWM generator that operates based on reference-driven feedback. During the initialization stage, the comparator reads the setpoint value AuAAy. generates an initial PWM signal AuXAy using a control algorithm. The feedback from the ADC labelled AuBAy is continuously updated with each clock trigger. The comparator compares the feedback signal to the setpoint value AuAAy. If the feedback signal is greater than the setpoint value, the PWM signal is adjusted by -1, and if the feedback signal is less than the setpoint value, the PWM signal is adjusted by 1. A new PWM signal. AuXAy, is generated after the adjustment. This iterative process ensures that the PWM signal is continuously adjusted to match the desired setpoint value by comparing the feedback signal and making the necessary Figure 4 shows the digital representation of the PWM signal generator based on the flowchart. Figure 5 illustrates the block diagram file (*. for reference-driven PWM control signal The input clock, sourced from the FPGA board's 50 MHz internal clock, was divided into 25 MHz and 5. 12 MHz frequencies using a phase-locked loop. The 25 MHz output was connected to the clk_div function, providing multiple clocks for ADC and triggering circuits, while the 5. 12 MHz output was connected to the lpm_counter function to generate a 20 kHz frequency for the PWM signal. The lpm_counter would count up to 256, with each clock cycle representing a 0. 390625% duty cycle. The comparator compared the reference signal with the ADC input to produce the signals. A parallel flash 8-bit ADC (ADC0804LCN) was used to read the current output voltage and convert it into a digital signal, with each bit corresponding to 0. 01953125 V . The input references and ADC values were decoded to their actual values, ensuring that there was no offset. The comparator's output was compared with the digital sawtooth signal from the lpm_counter to generate the PWM signal. This signal continuously was adjusted based on the reference and output voltage (ADC) during each clock cycle assigned to the comparator. The response time of the ADC . and comparator can be adjusted within the clock assigned. Figure 3. Flowchart of control algorithm Int J Elec & Comp Eng. Vol. No. October 2025: 4993-5002 Int J Elec & Comp Eng ISSN: 2088-8708 Figure 4. Digital representation of digital-PWM-based reference-driven system Figure 5. Block diagram file (*. for PWM generator Experimental setup Figure 6 depicts the complete connection of components in the proposed charging system. The FPGA enabled precise modulation of the buck converter's output voltage. A 3 kVA 230/110 V aluminumwinding dry-type step-down transformer complete with an IP21 enclosure, was used to step down the input Smoothing capacitors were used to filter DC voltage, hence removing ripples and providing a more consistent power supply. Inductors were used to control current fluctuations and optimize the charging The MOSFETs acted as high-speed switches in the buck converter, efficiently converting voltage and regulating output. Gate drivers controlled the MOSFETs' switching behavior, allowing for precise control of the on and off states. These components and their functions aimed to contribute to an efficient and reliable battery charging system. The circuit was tested to verify if the expected results were achieved. Field-programmable gate array-based voltage-feedback-driven battery A (Afarulrazi Abu Baka. A ISSN: 2088-8708 Figure 6. Experimental prototype RESULTS AND DISCUSSION A comparison and analysis of the simulation and experimental findings were conducted to validate the outcome of the proposed system. Software simulation The circuit's waveforms and characteristics were analyzed under various conditions through software simulation using the MATLAB/Simulink software. The simulation results, depicted in Figure 7 and Figure 8 show the waveform variations. Figure 7. illustrates the sinusoidal waveform of the input voltage, peaking at 340 Vpk-pk, which subsequently underwent a step-down transformation to 100 V via the transformer, as shown in Figure 7. The filtered output waveform, displayed in Figure 7. , exhibits minor ripples attributed to residual AC components post-rectification. This simulation output vividly illustrates the conversion of AC voltage to pulsating DC voltage through the step-down and rectification processes. On the other hand. Figure 8 presents waveforms measured during the buck converterAos operation. A capacitor was employed to mitigate voltage pulsations and smooth the output. Figure 8. depicts the duty cycle waveform, controlled by PWM to achieve the desired output voltage level. Figure 8. illustrates the measured inductor current charging and discharging, which indicates a continuous conduction mode of Figures 8. showcase the DC output . harging voltag. and input . rom the rectifie. These findings validate the efficient performance of the buck converter in filtering the DC voltage, controlling the duty cycle, maintaining a continuous inductor current, and regulating the output voltage. Figure 7. Simulation results measured from rectifier side: . AC supply, . AC secondary transformer voltage, and . output voltage from rectifier Figure 8. Simulation results measured from DC-DC side: . duty cycle, . inductor current, . DC output voltage, and . DC input voltage from rectifier Int J Elec & Comp Eng. Vol. No. October 2025: 4993-5002 Int J Elec & Comp Eng ISSN: 2088-8708 Experimental analysis The experimental analysis of the buck converter demonstrated that, by adjusting the duty cycle of the PWM signal, the output voltage can be effectively regulated. Increasing the duty cycle raised the output while decreasing it lowered the voltage. Simulation results indicated that higher duty cycles enhanced efficiency and improved power delivery to the load. Figures 9 and 10 present the measured outputs of the proposed system using a TDS 3024B oscilloscope. Figure 9 shows the waveform of the supplied voltage, which was 240 V AC at a frequency of 50 Hz, along with the stepped-down and smoothed DC voltage measured at the rectifierAos output. Figure 10 shows the measured voltage and current waveforms at the buck converter with a 40% duty cycle. The inductor current exhibited a typical sawtooth pattern corresponding to the PWM switching duty cycle, which was critical in transferring and regulating energy from the input to the output. The resulting output voltage was a regulated DC voltage suitable for battery charging. The PWM switching technique was employed to adjust the average value of the digital signal by modulating it based on the reference input. A comparative analysis of simulation and experimental results reveals a minor discrepancy in measurement values. This discrepancy can be attributed to losses in hardware implementation, particularly conduction and switching losses associated with the switching devices, as well as the core materials of the inductor, which are termed core losses/iron losses. Despite these differences, the output voltage values remained relatively consistent across various duty cycles. The selected parameters proved to be appropriate for the circuit's intended purpose, as evidenced by the simulation results. Figure 9. Input voltage, output voltage, and rectifier Figure 10. Switching signal, inductor current, output voltage, and input voltage CONCLUSION In conclusion, this research successfully demonstrated a voltage-driven buck converter through a digital PWM generator on an FPGA. The strength of the control algorithm lies in its ability to regulate the output voltage to within a A0. 39% error margin, and the control algorithm proved its capability through a consistent performance in both simulation and real hardware tests. The error margin can be further reduced by increasing the number of counters in line with the size of the ADC and closely related to the clock generator assigned by maintaining the same proposed digital techniques. The achievements suggest strong potential for deployment in applications that require fast, accurate, low-ripple, and reconfigurable voltage control, especially in battery management systems and renewable energy converters. FUNDING INFORMATION This research was supported by Universiti Tun Hussein Onn Malaysia (UTHM) through TIER 1 (Vot Q. and GPPS (Vot Q. AUTHOR CONTRIBUTIONS STATEMENT This journal uses the Contributor Roles Taxonomy (CRediT) to recognize individual author contributions, reduce authorship disputes, and facilitate collaboration. Field-programmable gate array-based voltage-feedback-driven battery A (Afarulrazi Abu Baka. A Name of Author Afarulrazi Abu Bakar Suhaimi Saiman Tharnisha Sithananthan Muhammad Nafis Ismail Saidina Hamzah Che Harun C : Conceptualization M : Methodology So : Software Va : Validation Fo : Formal analysis ISSN: 2088-8708 ue ue ue ue ue ue ue ue ue ue ue ue ue ue ue ue ue ue ue ue ue ue ue ue ue ue ue ue ue I : Investigation R : Resources D : Data Curation O : Writing - Original Draft E : Writing - Review & Editing ue ue Vi : Visualization Su : Supervision P : Project administration Fu : Funding acquisition CONFLICT OF INTEREST STATEMENT Authors state no conflict of interest. DATA AVAILABILITY The authors confirm that the data supporting the findings of this study are available within the article and its figures. Additional details can be obtained from the corresponding author upon request . REFERENCES