Is the F280049C fast enough for closed loop inverter control?

4 visualizaciones (últimos 30 días)
TLDR:
  • I want to build a 3-phase inverter with a voltage and current control loop and a switching frequency of 30 kHz
  • I’m using MATLAB Simulink with the C2000 block set to build the control loop, but it takes over 60 μs to complete on the board, limiting me to ~15 kHz.
  • Should the F280049C be fast enough for closed loop inverter control?
  • Do I really need to run the inverter control loop for every switching cycle?
  • Is building the control loop in Simulink slower than using CCS or PSIM?
  • Should I look for a different chip, if so, any suggestions?
Hello everyone, I am building a 3-phase inverter with voltage and current control loops with a switching frequency of 30 kHz.
Thanks to the ePWM features of the F280049C I have no trouble realizing the switching speed, but from what I have seen in other inverter models I should also take voltage and current measurements and feed them through a control loop for every switching cycle.
I have configured one of the ePWMs to trigger the start of conversion of my current and voltage measurements (3 Voltage, 3 Current, 1 DC voltage) once per switching cycle, and the end of conversion of the last ADC then triggers an interrupt which executes the control loop and generates direct and quadrature values of the output voltage, which is then converter to abc values and used to feed the ePWM generators.
The control loop contains:
  • an offset added to all measurements
  • 2 abc to dq0 transformations (of current and voltage)
  • 4 pi controllers (2 inside the current loop and 2 inside the voltage loop)
  • Some other summing and product blocks
The system works fine in simulation, but when I use the C2000 block set package to generate code and program the board for real-time operation, the control loop takes over 60 μs to execute (the clock frequency is 100 MHz). So, if I want to complete the control loop once per switching cycle I am limited to around 15 kHz.
So, my questions are:
  • Should I expect the control loop to take this long to execute, or are there some terrible inefficiencies in my design?
  • Is building the control loop in Simulink slower than using CCS or PSIM?
  • Should the F280049C be fast enough to realize a system like this, or should I look for a different chip?
  • Do I really need to run the control loop for every switching cycle?
This is my first major design project, and I am new to the forum, so I appreciate any and all feedback on both the questions and/or how to improve my posts.
Thanks for your time!

Respuesta aceptada

Shivam Gothi
Shivam Gothi el 31 de Ag. de 2024
Hello @Lars
I have had the opportunity to work on a similar project, which involved an inner current control loop and an outer speed control loop. The project included:
  • An offset added to all measurements
  • Two abc to dq0 transformations (for current and voltage)
  • Four PI controllers (two within the current loop and two within the voltage loop)
  • Various summing and product blocks
  • Two trigonometric functions
Therefore, I think that I will be able to provide some usefull discussions regarding this. Let's address your questions one by one:
1) Is building the control loop in Simulink slower than using CCS or PSIM?
I have utilized Code Composer Studio for coding and configured one of the PWM channels to trigger the start of conversion for ADC channels. By measuring the number of clock cycles required to complete one control loop using the "clock" feature in Code Composer Studio, I found it took approximately 25,000 clock cycles. The clock frequency of microcontroller (TMS28335) was 150 MHz , which corresponds to roughly 0.1666 ms or a 6kHz frequency. Therefore, there is no significant difference between using Code Composer Studio or the C2000 blockset of Simulink for generating microcontroller code. In fact, Simulink optimizes the code for reduced execution time, making it a computationally efficient choice. Thus, the MATLAB C2000 blockset is indeed a preferable option!
2) Do I really need to run the inverter control loop for every switching cycle?
It is feasible to operate the switches at switching frequencies of 30 kHz while running the control loop at 15 kHz or lower frequencies. However, this may reduce the permissible maximum bandwidth of your control loop. In brief, the dynamic response of your inverter will be slower if you run the control loop at 15 kHz compared to 30 kHz. While designing the controller, consider the sampling time period of the plant =
3) Should I look for a different chip, if so, any suggestions?
The key parameters to consider when selecting a microcontroller for your project include:
  • Cost
  • Number of peripherals needed (ADCs, PWMs, SPIs, CANs, I2C, etc.)
  • Clock frequency (it should be high enough to compute the control loop within the desired time frame)
  • Debugging interface requirements (e.g., JTAG port)
Please note that additional features in a microcontroller will typically increase its cost.
4) Should the F280049C be fast enough for closed-loop inverter control?
If you can complete one control loop at 15 kHz, the F280049C should be sufficient. In my project, the control loop frequency was 5 kHz, and it performed satisfactorily.
5) Should I expect the control loop to take this long to execute, or are there some inefficiencies in my design?
From my perspective, completing one control loop at 15 kHz is commendable. There appears to be no inefficiency in your design, as control loops generally take this amount of time to execute.
Additional Suggestions:
  • The design of the LCL filter is significantly influenced by the switching frequency of your converter. Choose the frequency wisely, as a higher switching frequency allows for smaller filter components.
I hope you find this information helpful

Más respuestas (0)

Productos


Versión

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by