Introduction #
This application example demonstrates the implementation of a three-phase grid-tie inverter with boost converter on PEController using STM32CubeIDE as a development environment.
Required Tools #
Make sure to prepare the STM32CubeIDE environment by following the procedure provided in the Getting Started Guide. The following tools are required for understanding and implementing this application example:
Hardware Overview #
This example uses a 2-level inverter, a boost converter (3 converters in parallel), and an EMC filter with disconnection relays. A simplified schematic of the converter circuit is shown below:
Control Implementation #
Requirements #
The following equipment/facilities are required for practical verification of this example:
- PELab-6PH with PEController
- OP4510 HIL Real-Time Simulator
- Programmable DC Power Supply
- Three-Phase Grid Supply
Operating Conditions #
The following table provides relevant implementation specifications:
PARAMETER | VALUE |
PWM Switching Frequency | 40 kHz |
Dead-Time | 200 nSec |
DC-Link Voltage Set Point | 720 VDC |
Grid Voltage | 380 VAC L-L |
Grid Frequency | 50 Hz |
DC Input Voltage | 180 V – 200 V |
Control Algorithm #
Inverter Control #
The three-phase grid-tie inverter is controlled using a vector current control. The following figure depicts the basic control diagram of the implemented algorithm:
The measured grid phase voltages and currents are converted to the rotating reference (DQ) frame. Phase-Locked Loop (PLL) is used to estimate the grid phase angle which is used in the conversion. A PI controller is then used to compensate for the error in phase currents. After that, an inductive decoupling compensation and normalization are added to the calculated duty cycles. An SVPWM technique is then used to generate the gating signals for the inverter switches.
Boost Converter Control #
A simple PI controller is implemented for the boost converter control to achieve the desired DC-link voltage. Kindly note that this control is very simple and will require additional hardware-based current protections to avoid inductor saturation and leg current overload (available in the PELab-6PH system). It is also essential to apply a maximum duty cycle limit for the boost converter PWM depending on the input voltage to avoid short-circuiting due to inductor saturation. If a higher input voltage than the set point is supplied to the inverter, the boost converter will not be required for inverter operation. In summary, the DC-Link voltage must be at least 50V higher than the peak grid voltage to ensure proper current flow from the inverter to the grid.
Control System Configuration #
The configurations for the grid-tie application can be changed from the grid_tie_config.h file in the UserFiles section of the CM7 project. Following are the available configurations:
Parameter | DESCRIPTION |
PWM_PERIOD_Us | Sets the PWM time period in microseconds (Integer between 1-250) |
GRID_FREQ | Estimated grid frequency |
L_OUT | Output inductance in Henries |
BOOST_COUNT | The number of boost converters in parallel. The boost I/Os can be adjusted from the main_controller.c file. If not sure leave this value to 3. To send signals to all three legs |
BOOST_VSET | Required DC-Link voltage |
KP_BOOST | Proportional gain for the DC-Link voltage PI controller |
KI_BOOST | Integral gain for the DC-Link voltage PI controller |
KP_PLL | Proportional gain for the PLL’s PI controller |
KI_PLL | Integral gain for the PLL’s PI controller |
KP_I | Proportional gain for the phase current PI controller |
KI_I | Integral gain for the phase current PI controller |
BOOST_DUTYCYCLE_MAX | Maximum duty cycle limit for the boost converter’s PWM |
RELAY_TURN_ON_VBST | Relays turn ON threshold voltage |
RELAY_TURN_OFF_VBST | Relay turning off threshold voltage |
INVERTER_DEADTIME_ns | Dead-time of the inverter in nano-seconds |
*The measurement sampling rate can be set from the user_config.h file in the Common section of the CM7/CM4 project
Workflow #
The following workflow is implemented as described briefly below:
1. Analog Measurements #
The CM4 core is used for the measurement of grid voltages, leg currents, and DC-Link voltage. The measurement timer is started in synchronization with PWM timers. This ensures that in case the measurement and PWM frequency is the same, the measurement will always occur at the start of each PWM cycle.
2. Control System #
The Control System has a Duty-Cycle Estimator block used for computing the required duty cycle values for the inverter as well as the boost converter. The control system contains the following sections:
A. Phase-Locked Loop (PLL) #
The PLL block is used to synchronize the control to the grid phase angle. The acquired phase angle is used for the Park/Clarke transformations as well as the synchronization of the grid phase voltages and injected phase currents.
B. Transformations #
Implements transformations to convert between stationary frames (ABC and αβ) and rotating frames (DQ).
C. Current Control #
A PI-based current control is implemented on DQ-currents obtained after transformation. Inductive decoupling compensation is implemented for robust current control.
D. Boost Converter Control #
Implements a PI controller to generate the duty cycle for the boost converter
E. SVPWM Generation #
Implements the Space Vector Pulse Width Modulation (SVPWM) which provides higher voltage, high reduction in the dominant harmonics, and lower total harmonic distortion for a three-phase inverter.
F. Enable/Disable Control #
The enable/disable control is implemented on the following:
Relays: The relays are only turned on after ensuring the DC-Link is charged to avoid inrush current from the grid which can damage the power modules. Note that this is absolutely essential since when the DC-Link is not charged, the inverter switches body diodes act as an uncontrolled rectifier, and therefore unpreventable short circuit current may flow to the inverter and damage the switches permanently.
Three-Phase Inverter: It is enabled only if the following conditions are fulfilled:
- The DC-Link is precharged and has a higher voltage than the grid voltage.
- The measured grid voltage magnitude lies in the specified range.
- Grid phase estimation should be in a valid error range.
3. Output Generation #
The PWM drivers in the PEControllerBSP are used to generate the PWM signals for the boost converters and the three-phase inverter. The inverter activation function is used to enable/disable the inverter when switching between valid and invalid states.
Implementation & Results #
This application example is tested with HIL real-time simulator (OP4510 from OPAL-RT Technologies) as well as actual power electronics hardware using the PELab-6PH power electronics rapid development system.
HIL Real-Time Simulation (OP4510) #
The power supply, power electronics, and the grid are simulated using the OP4510 HIL real-time simulator provided by OPAL-RT Technologies.
The HIL simulation is run by RT-LAB using the eHS FPGA-based solver. The following power circuit is implemented using the OPAL-RT Schematic Editor:
Results #
The implementation results are acquired using the PEController itself in the PELab-6PH system. The PEController provides integration to the intelliSENS real-time monitoring and recording software. Below are the results for the 5 A peak (~3.5 A RMS) reference point. The PELab is operating in UC to HIL Mode.
Power Electronics Hardware Implementation (PELab-6PH) #
The hardware implementation of the power stage is done using the PELab system. The PELab-6PH configuration provides two three-phase inverters. The first inverter is used as a 2-level 3-phase inverter while the second inverter is used as a parallel boost converter. Inductors, EMC filters, and relays are also available in PELab-6PH. The following figure shows the connections diagram of the PELab-6PH:
Turn-on procedure #
- Make sure that all protections on the PELab system are enabled and the DC-Link is discharged.
- Program the PEController with the example code.
- Turn on the input DC power supply.
- Make sure that the DC-Link is being regulated at the desired voltage.
- Turn on the cutoff switch to connect to the grid.
- The inverter will be automatically enabled after the grid is synchronized.
Turn off procedure #
- Turn off the cutoff switch to disconnect the grid.
- Turn off the input DC power supply and wait for the DC-Link to discharge.
Results #
The implementation results are acquired using the PEController itself in the PELab-6PH system. The PEController provides integration to the intelliSENS real-time monitoring and recording software. Below are the results for the 5 A peak (~3.5 A RMS) reference point. The PELab is operating in UC to Power Mode.
Results Summary #
Parameter | HIL Implementation | Power Implementation | Unit |
Iu | 3.512 | 3.588 | A (RMS) |
Iv | 3.528 | 3.534 | A (RMS) |
Iw | 3.505 | 3.581 | A (RMS) |
Iboost1 | 9.589 | 4.973 | A (AVG) |
Iboost2 | 9.740 | 4.913 | A (AVG) |
Iboost3 | 9.718 | 5.368 | A (AVG) |
Vu | 238.648 | 215.246 | V (RMS) |
Vv | 238.731 | 217.155 | V (RMS) |
Vw | 238.566 | 214.313 | V (RMS) |
Iu Current THD | 3.452 | 2.545 | % |
Iu Current THD+N | 5.772 | 7.737 | % |
Output Power | 2.505 | 2.30 | kW |
Power Factor | 0.998 | 0.996 | – |