In modern power electronics, the demand for efficient and compact three phase inverter systems has grown significantly, especially in portable and field applications such as driving AC motors. As electronic devices evolve, inverters must meet higher standards for voltage stability, frequency accuracy, low distortion, and conversion efficiency. This article presents the design and implementation of a three phase inverter using an STM32 microcontroller as the core controller. The system integrates hardware components like the auxiliary power supply, drive circuit, and three phase inverter circuit, along with software algorithms for sinusoidal pulse width modulation (SPWM) and dual-loop control. Through rigorous testing, the designed three phase inverter demonstrates a conversion efficiency exceeding 90% and a waveform distortion rate below 2%, validating its feasibility and stability for practical use.
The overall system architecture of the three phase inverter revolves around the STM32 microcontroller, which orchestrates the generation of SPWM signals to control MOSFET switches in the three phase inverter circuit. A DC power source supplies energy to both the auxiliary power supply and the three phase inverter circuit. The auxiliary power module, in turn, provides regulated voltages to the signal sampling circuit, drive circuit, and control system. By employing SPWM techniques, the microcontroller ensures complementary switching of MOSFETs, producing a modulated output that is filtered through an LC network to yield stable three-phase sinusoidal AC power. This design emphasizes compactness and efficiency, making it suitable for野外 environments where reliable power conversion is critical.

The hardware design of the three phase inverter is meticulously crafted to ensure robust performance. The auxiliary power supply utilizes the LM2596 switching regulator IC to generate multiple voltage rails: 3.3 V for the STM32 microcontroller, 5 V for operational amplifiers in the signal sampling circuit, and 12 V for the drive circuit. This multi-output configuration is essential for isolating different subsystems and protecting sensitive components from voltage surges. The LM2596 offers built-in protection features like current limiting and thermal shutdown, enhancing the reliability of the three phase inverter. For instance, the output voltage for the 5 V rail can be expressed by the following equation based on the feedback resistor network: $$ V_{out} = V_{ref} \times \left(1 + \frac{R_1}{R_2}\right) $$ where \( V_{ref} \) is typically 1.23 V for the LM2596. This ensures stable operation across varying load conditions in the three phase inverter system.
The drive circuit plays a pivotal role in the three phase inverter by providing isolation and amplification for the SPWM signals from the STM32 microcontroller. We selected the IR2110 high-side and low-side driver ICs due to their compatibility with MOSFET parameters such as threshold voltage and switching frequency. The IR2110 integrates bootstrap circuitry to generate the necessary gate drive voltages for the high-side MOSFETs, ensuring efficient switching in the three phase inverter bridge. The drive voltage \( V_{gs} \) for each MOSFET must exceed its threshold voltage \( V_{th} \) to minimize conduction losses, which can be modeled as: $$ P_{cond} = I_{ds}^2 \times R_{ds(on)} $$ where \( I_{ds} \) is the drain-source current and \( R_{ds(on)} \) is the on-state resistance. The drive circuit’s design includes decoupling capacitors to suppress noise and diodes for fast recovery, critical for maintaining signal integrity in the three phase inverter.
The three phase inverter circuit is based on a three-phase full-bridge topology, consisting of six MOSFETs arranged in three legs. Each leg corresponds to one phase of the output, controlled by complementary SPWM signals to prevent shoot-through currents. The MOSFETs are selected with a voltage rating of 36 V to accommodate the 24 V DC input with a safety margin, and a current rating of 4.17 A to handle the maximum load power of 100 W. The output of the bridge is fed into an LC filter to attenuate high-frequency harmonics, producing a smooth sinusoidal waveform. The filter’s cutoff frequency \( f_c \) is chosen based on the SPWM carrier frequency \( f_{carrier} \) and the fundamental output frequency \( f_{out} \): $$ f_c = \frac{1}{2\pi\sqrt{LC}} $$ where L and C are the inductance and capacitance values, respectively. This design ensures that the three phase inverter output meets the desired quality standards with minimal distortion.
In terms of software design, the STM32 microcontroller executes a main program that initializes peripherals, configures timers for SPWM generation, and handles analog-to-digital conversion (ADC) for feedback signals. The program flowchart involves continuous sampling of output voltage and current, followed by processing through dual-loop control algorithms. The use of incremental PI controllers in the voltage outer loop and current inner loop allows for precise regulation of the three phase inverter output. The incremental PI algorithm can be represented as: $$ \Delta u(k) = K_p \left[e(k) – e(k-1)\right] + K_i e(k) $$ where \( \Delta u(k) \) is the control output increment, \( e(k) \) is the error at sample k, and \( K_p \) and \( K_i \) are the proportional and integral gains, respectively. This approach enhances the dynamic response of the three phase inverter under varying loads.
The generation of SPWM signals is achieved through a lookup table method, where pulse widths are pre-calculated based on a sine wave pattern. The carrier ratio N, defined as the ratio of carrier frequency to fundamental frequency, determines the number of pulses per cycle. For memory efficiency, only half-cycle data is stored, and the complementary half is generated in real-time. The modulation index m controls the amplitude of the output voltage: $$ m = \frac{A_m}{A_c} $$ where \( A_m \) is the amplitude of the modulating sine wave and \( A_c \) is the amplitude of the carrier triangle wave. By adjusting m, the STM32 microcontroller can vary the output voltage of the three phase inverter, providing flexibility for different applications.
To validate the performance of the three phase inverter, comprehensive tests were conducted using a variable three-phase resistor load. The conversion efficiency was measured at various load levels, and the results are summarized in the table below. Efficiency \( \eta \) is calculated as: $$ \eta = \frac{P_{out}}{P_{in}} \times 100\% $$ where \( P_{out} \) is the output power and \( P_{in} \) is the input power. The data shows that the three phase inverter maintains high efficiency across the tested range, meeting the design goal of over 90%.
| Load Power (W) | Input Power (W) | Output Power (W) | Conversion Efficiency (%) |
|---|---|---|---|
| 50.00 | 52.35 | 50.00 | 95.51 |
| 60.00 | 63.25 | 60.00 | 94.86 |
| 70.00 | 75.68 | 70.00 | 92.49 |
| 80.00 | 87.33 | 80.00 | 91.61 |
| 90.00 | 99.86 | 90.00 | 90.13 |
The inversion quality of the three phase inverter was assessed by measuring output waveform distortion and voltage stability under different loads. A distortion analyzer and oscilloscope were used to capture key parameters, as shown in the table below. The total harmonic distortion (THD) is used to quantify waveform purity, with lower values indicating better performance. The three phase inverter consistently maintains THD below 2%, with only minor deviations at higher loads due to filter limitations.
| Load Power (W) | Peak Output Voltage (V) | Waveform Distortion (%) | Waveform Observations |
|---|---|---|---|
| 50.00 | 16.37 | 0.85 | No significant changes |
| 60.00 | 16.53 | 1.23 | No significant changes |
| 70.00 | 15.64 | 1.48 | No significant changes |
| 80.00 | 15.18 | 1.57 | No significant changes |
| 90.00 | 14.78 | 1.73 | Minor glitches observed |
Further analysis of the three phase inverter output using Fast Fourier Transform (FFT) reveals a clean spectrum dominated by the fundamental frequency, with minimal harmonic content. For instance, at a 50 W load, the FFT spectrum shows a sharp peak at the output frequency, confirming effective filtering. However, as the load increases to 90 W, slight distortions appear, attributed to the non-ideal characteristics of the LC filter components. The relationship between output voltage ripple \( V_{ripple} \) and filter parameters can be approximated as: $$ V_{ripple} \approx \frac{I_{load}}{2 \pi f_{carrier} C} $$ where \( I_{load} \) is the load current and C is the filter capacitance. This underscores the importance of component selection in optimizing the three phase inverter design.
In conclusion, the three phase inverter based on the STM32 microcontroller successfully achieves its design objectives, delivering adjustable three-phase AC output with high efficiency and low distortion. The integration of dual-loop control and SPWM techniques ensures robust performance under varying loads, while the hardware design prioritizes isolation and protection. Future work could focus on enhancing the three phase inverter’s power density and implementing advanced modulation strategies to further reduce losses. This design serves as a reliable solution for applications requiring portable and efficient power conversion, demonstrating the versatility of the three phase inverter in modern electronic systems.
