This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMDSCNCD28335: EPWM for multilevel inverter

Part Number: TMDSCNCD28335
Other Parts Discussed in Thread: C2000WARE

Hello E2E,

Our customer is using the TMDSCNCD28335 and working on npc inverter 3phase 3 level and want to generate 6 epwm from (Matlab Simulink and dsp microcontroller) and the other 6 will generate by the gate driver circuits. The problem is the customer can't shift the epwm 2,4,6 as the attached pic. Can you please assist with the proper method for generating epwm for the NPC inverter?

Regards,
Carlo

  • Carlo,

    If this is a new development I would first point the customer to F2837xD/S. These devices are also fully supported by Matlab, but they have some newer PWM features which may come in handy.

    What application is this, motor control or some kind of power inverter?

    I believe this is a good matlab example https://www.mathworks.com/matlabcentral/fileexchange/68645-space-vector-pulse-width-modulation-svpwm-3-level-inverter 

    You should be able to sync the PWM modules to allow a phase shift, please note that PWM 2 cannot sync PWM 4 or PWM6. However PWMs 2, 4, and 6 can be synchronized to PWM 1. This means its important to think about PWM module allocation when designing your hardware. The sync chain description in the TRM describes further how the ePWMs can be synchronized, we call this our sync chain. Please note that F2838x no longer has this restriction, and allows any ePWM to sync directly to any other PWM. 

    Its unclear exactly what issue you are having, but if it is with the model based code generation or options available with that it is best to ask on the mathworks forums.

    Regards,
    Cody 

  • Hi 

    I am working on pv grid system with sine pwm SPWM not SVPWM so how can i generate 6 properly epwm from DSP controller

  • Ahmed,

    For SPWM you typically just implement a look up table loaded with sine values to scale your PWM signal. 

    you might want to look at the following for MPPT, but I don't think this will how how to do the Multi-level inverter stuff: https://www.ti.com/tool/TIDM-SOLAR-DCDC 

    Are you trying to do model based code generation using embedded coder, or are you simply trying to write C code which synchronized the ePWM module?

    PWM synchronization shouldn't be to hard, check C2000Ware for examples. If the sync chain is used and phase loading is enabled then you should be able to easily shift the PWMs using TBPHS. If your goal is to simply align the PWMs and leave them aligned this is most easily done by writing to TBCLKSYNC .

    Regards,
    Cody 

  • Dear MR Cody

    I want to apply a PV grid system through a single-stage multilevel inverter by using (Matlab Simulink) the current reference will set by the mppt the project done and working fine, now I want to do a hardware experiment(using Matlab Simulink and code composer and DSP microcontroller) my PWM technique is sinusoidal PWM, not SVPWM, firstly I want to work with the open-loop system as a picture above like to test my inverter with 10 kHz switching frequency you know this cant done with GPIO block because the low frequency but need to set the 12 signal for NPC inverter by using SPWM and block EPWM, so my question how to set the 12 PWM signals for NPC inverter by using the ePWM blocks

  • Ahmed,

    You'll get the best help on how to implement this using Mathwork's SW on their forums. https://www.mathworks.com/matlabcentral/answers/index 

    The structure of the PWM module does come into play here because it is part of the C2000's design, and I can help with that. 

    Below you can see a picture of the sync chain for this device. You can see that all PWMs can sync to PWM module 1, but PWM4 cannot sync to PWM2. You will need to take this into account when selecting your PWM modules for your design. If you would like to remove this requirement please look at the F2838x family, for example F28388D.

    Regards,
    Cody