Elinvo (Electronics, Informatics, and Vocational Education)


BLDCM, microcontroller STM32, PSIM, simplified C-Block, six-step commutation

Document Type



This paper presents a digital implementation of a brushless direct current motor (BLDCM) drive with a six-step pulse width modulation (PWM) using a programmable simplified C-block based on the STM32 microcontroller. The implementation is conducted through the PSIM simulation platform, which is commonly used for power electronics and motor control. This approach combines the benefits of using a programmable simplified C-block for precise and flexible programming with the PWM concepts of the STM32 microcontroller. The PWM method used on the BLDCM drive is the unipolar upper PWM technique (H~PWM_L~ON). The performance of the PWM implementation is analyzed in detail, including the accuracy of the PWM generation using a Fast Fourier Transform (FFT), the gating of the IGBTs in the three-phase inverter, and the effect of the duty cycle on the BLDCM's speed, phase voltage, and phase current.

First Page


Last Page


Page Range






Digital Object Identifier (DOI)





A. Mohammad, M. A. Abedin, and M. Z. R. Khan, "Implementation of a three phase inverter for BLDC motor drive," in 2016 9th International Conference on Electrical and Computer Engineering (ICECE), 2016, vol. 9, no. 5, pp. 337-340, doi: 10.1109/ICECE.2016.7853925.

M. Dobra, I. V. Sita, and P. Dobra, "Efficient implementation of sliding mode control for BLDC PM motor using TMS320F28335 microcontroller," in EDERC 2014 - Proceedings of the 6th European Embedded Design in Education and Research Conference, 2014, pp. 70-74, doi: 10.1109/EDERC.2014.6924361.

T. Y. Ho, C. K. Huynh, T. H. Lin, and S. W. Yang, "The design and implementation of a sensorless power tool based on a microcontroller," Electron., vol. 9, no. 6, pp. 1-22, 2020, doi: 10.3390/electronics9060921.

A. Mohammad, M. A. Abedin, and M. Z. R. Khan, "Microcontroller based control system for electric vehicle," in 2016 5th International Conference on Informatics, Electronics and Vision, ICIEV 2016, 2016, pp. 693-696, doi: 10.1109/ICIEV.2016.7760090.

Y. Lee and J. Kim, "Analysis of the Three-Phase Inverter Power Efficiency of a BLDC Motor Drive Using Conventional Six-Step and Inverted Pulsewidth Modulation Driving Schemes," Can. J. Electr. Comput. Eng., vol. 42, no. 1, pp. 34-40, 2019, doi: 10.1109/CJECE.2018.2885351.

M. R. Hazari, E. Jahan, M. E. Siraj, M. T. I. Khan, and A. M. Saleque, "Design of a Brushless DC (BLDC) Motor Controller," in International conference on Electrical Engineering and Information & Communucation Technology(ICEEICT), 2014, pp. 1-6, doi: 10.1109/ICEEICT.2014.6919048.

E. Firmansyah, P. Rendy, A. M. Imaduddin, and N. Yuliyanto, "Low cost platform for BLDC controller," in Proceedings of the 2013 Joint International Conference on Rural Information and Communication Technology and Electric-Vehicle Technology, rICT and ICEV-T 2013, 2013, pp. 5-7, doi: 10.1109/rICT-ICeVT.2013.6741543.

S. Y. Kadirova and T. R. Nenov, "Microcontroller system for control of the harvester's header propulsion with BLDC motor," in 2017 IEEE 23rd International Symposium for Design and Technology in Electronic Packaging (SIITME), 2017, pp. 149-154.

J. Ctibor, P. Vorel, J. Knobloch, and I. Pazdera, "BLDC motor control with cascade structure utilizing ARM MCU," in International Conference on Electical Drives and Power Electronics, 2019, vol. 2019-Septe, pp. 61-65, doi: 10.1109/EDPE.2019.8883877.

M. Rizani Rusli, H. Rahmatullah, M. Badriatul Fauziah, A. Jaya, M. Machmud Rifadil, and E. Purwanto, "Pulse Width Modulation (PWM) and Pulse Amplitude Modulation (PAM) Technique for Medium-Speed BLDCM in Electric Vehicle Application," 2018, doi: 10.1109/ISEMANTIC.2018.8549816.

J. Yiu, "ARM White Paper - ARM Cortex-M for Beginners," 2016.

W. A. Salah, D. Ishak, and K. J. Hammadi, "PWM switching strategy for torque ripple minimization in BLDC motor," J. Electr. Eng., vol. 62, no. 3, pp. 141-146, 2011, doi: 10.2478/v10187-011-0023-1.

V. Trifa, G. Brezeanu, and E. Ceuca, "Unipolar PWM vs Bipolar PWM in Three Phase Block Commutation," in Proceedings of the International Semiconductor Conference, CAS, 2020, vol. 2020-Octob, pp. 169-172, doi: 10.1109/CAS50358.2020.9267979.

S.-H. Kim, "Brushless direct current motors," in Electric Motor Control, 2017, pp. 389-416.

Q. Li, H. Huang, and B. Yin, "The study of pwm methods in permanent magnet brushless dc motor speed control system," in Proceedings of the 11th International Conference on Electrical Machines and Systems, ICEMS 2008, 2008, pp. 3897-3900.

D. Dwivedi, S. Singh, and J. Kalaiselvi, "Impact of PWM and Duty Ratio Control on Voltage for Sic Fed Three Phase BLDC Motor Drive," in PESGRE 2022 - IEEE International Conference on "Power Electronics, Smart Grid, and Renewable Energy," 2022, pp. 0-4, doi: 10.1109/PESGRE52268.2022.9715861.

S. A. K. Mozaffari Niapour, G. Shokri Garjan, M. Shafiei, M. R. Feyzi, S. Danyali, and M. Bahrami Kouhshahi, "Review of Permanent-Magnet brushless DC motor basic drives based on analysis and simulation study," Int. Rev. Electr. Eng., vol. 9, no. 5, pp. 930-957, 2014, doi: 10.15866/iree.v9i5.827.

M. R. Rusli et al., "Digital Implementation of Space Vector PWM for Three Phase Inverter with Simplified C-Block PSIM Utilization," in International Electronics Symposium 2021: Wireless Technologies and Intelligent Systems for Better Human Lives, IES 2021 - Proceedings, 2021, pp. 24-29, doi: 10.1109/IES53407.2021.9593292.

A. Satria, V. Farisi, A. Rizqiawan, N. Heryana, A. Purwadi, and Y. Haroen, "Synthesis modeling of 10 kW BLDC controller for city electric car based on PSIM," in Proceedings - ICPERE 2014: 2nd IEEE Conference on Power Engineering and Renewable Energy 2014, 2014, pp. 251-256, doi: 10.1109/ICPERE.2014.7067215.

G. Ranjith Kumar, M. Arun Noyal Doss, K. N. V. Prasad, and K. C. Jayasankar, "Modeling and speed control of permanent magnet synchronous motor at constant load torque using PSIM," in International Conference on Sustainable Energy and Intelligent Systems (SEISCON 2011), 2011, vol. 2011, no. 583 CP, pp. 485-489, doi: 10.1049/cp.2011.0411.

S. Onoda and A. Emadi, "PSIM-based modeling of automotive power systems: Conventional, electric, and hybrid electric vehicles," IEEE Trans. Veh. Technol., vol. 53, no. 2, pp. 390-400, 2004, doi: 10.1109/TVT.2004.823500.

S.-H. Kim, "Pulse width modulation inverters," in Electric Motor Control, S.-H. Kim, Ed. Elsevier Inc., 2017, pp. 265-340.

Powersim, PSIM 9.1 - User Manuals. 2011.

STMicroelectronics, "STM32G0 - GPTIM Advanced-control, general-purpose and basic timers," 2017.

M. A. Mazidi, S. Chen, and E. Ghaemi, STM32 ARM Programming for Embedded Systems. 2018.

STMicroelectronics, "STM32L4 - Timers Advanced-control, general-purpose and basic timers," 2018.