Generate a SPWM signal with Digital output of C2000 microcontroller blockset or with ePWM of C2000 microcontroller blockset

22 visualizzazioni (ultimi 30 giorni)
I have a C2000 F28027F and I am controlling it with simulink. I have the need to create a SPWM signal, so I thought I would make the comparison between triangular and sinusoidal signal with simulink blocks and thus obtain the output pulses, and I connect them to digital output blocks of C2000 Microcontroller Blockset as shown in the image. My question is, is it valid to do it like this? Or could it cause problems? My intention in principle was to use the exclusive ePWM block for these applications, however, it does not allow comparison between two signals to be able to perform the SPWM technique.

Risposta accettata

Umar
Umar il 18 Giu 2024
Hi Miguel, Based on your description, it seems like you are trying to implement Space Vector Pulse Width Modulation (SPWM) using a C2000 F28027F microcontroller controlled by Simulink. You are considering comparing triangular and sinusoidal signals to generate output pulses for SPWM and connecting them to digital output blocks of the C2000 Microcontroller Blockset. In your scenario, using Simulink to compare the triangular and sinusoidal signals to create SPWM pulses is a valid approach. This method allows you to generate the necessary PWM signals for controlling power converters efficiently. By comparing these signals, you can determine the duty cycle of the PWM waveform, which is essential for regulating the output voltage or current of the power converter. While your initial intention was to use the exclusive ePWM block for SPWM applications, it seems that this block does not support the comparison between two signals required for SPWM. In this case, utilizing Simulink blocks to compare the signals and generate SPWM pulses is a suitable alternative. However, it is essential to consider potential challenges or issues that may arise when implementing this method. Ensure that the sampling rate of your signals is appropriate to capture all necessary information accurately. Additionally, verify that the resolution and accuracy of your microcontroller's digital output blocks are sufficient for generating the desired SPWM waveform. In conclusion, your approach of using Simulink blocks to compare triangular and sinusoidal signals for generating SPWM pulses with a C2000 F28027F microcontroller appears valid. By carefully setting up your simulation and considering relevant factors such as signal accuracy and resolution, you can effectively implement SPWM for your application.

Più risposte (1)

Miguel Estiven Hernandez Fuentes
Yes, I was already able to observe the signals on an oscilloscope but the problem was actually the frequency of the resulting signal, since it was well below what I had configured in the Simulink blocks. Thanks for your answer.

Prodotti


Release

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by