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.

TMS320F28377S: Need help in variable frequency synchronous SVPWM program

Part Number: TMS320F28377S

Tool/software:

I am developing an SVPWM code for variable frequency control using the V/f method with synchronous PWM. In this approach, the fundamental frequency changes with the modulation index, while the switching frequency is set as the product of the fundamental frequency and a constant number of samples per cycle. The issue is that the number of samples per cycle is not consistent across different modulation indices. For each modulation index, a specific step size (timer sampling time) can produce the correct number of samples, but this step size must be adjusted whenever the modulation index changes. Consequently, the sample count per cycle becomes inconsistent, even though the switching frequency remains correct. This problem occurs in both three-phase and six-phase SVPWM drives. Therefore, I am seeking a method to synchronize the sampling time with the modulation index or the fundamental frequency, without relying on references from the technical manual.

  • Hello,

    There are several examples in https://www.ti.com/tool/C2000WARE-MOTORCONTROL-SDK
    on SVPWM and updating 3 phases.
    Please refer to the examples and revert back to us if you still have any issues in understanding or configuration.

  • Sir,

    I checked the example here which is not helpful.

    Last time you provided some solution which is not visible now. But I tried that earlier which was also not working, the fundamental frequency is not matching with that approach and the step time became even larger.

    It is not a problem for a classical 3-phase SVPWM, it can be implemented in several ways. But when it comes to a 6-phase and if I have to do some more modifications in avoiding and selecting some particular vectors, so many variables get involved. I managed those things except this frequency and no. of samples.

    Please suggest me some other way to fix this issue.

  • Hi,
    Could you tell which example code you use for your SVPWM code? You mentioned "This problem occurs in both three-phase and six-phase SVPWM drives" in your question, but also said "It is not a problem for a classical 3-phase SVPWM". Could you clarify? It would also be good if you can share corresponding SVPWM signals for us to better understand the issue.

    Thanks,
    Jiaxin

  • Dear Sir,

    I took the example code from my lab mate, but I took a part of that. Rest, I have designed myself for 6-phase conventional and some proposed SVPWMs, there are so many variables are involved, which I am facing issues to implement using program. 

    But, classical 3-phase SVPWM has several ways of implementation and not necessary to put so many variables (like, switching frequency). So, in other ways, I am able to implement but in this way, it is not possible.

    If you have any solution, please provide me. 

  • Hi,

    Any reason, why you have to set the Switching frequency as constant step number w.r.t fundamental frequency? In V/F control we can Independently generate a modulation wave with the target fundamental frequency independent of switching frequency. At each and every switching frequency interrupt, we can compare this generated Modulation waveform against the compare values to generate the switching actions. If we are keen to maintain a integer number of switching actions in a given cycle we may have to adjust the timer period value near the target switching frequency while allowing to have a smooth modulation/ Frequency value. 

  • Hi,

    If the step number is constant, that means if the ratio of the fundamental and switching frequency is kept the same, then it is called synchronous PWM. This is done to avoid the sub-harmonics. The timer period is just to calculate the variables for each iteration. This just increases or decreases the computation speed. So, I think this should not bother the no. of samples or the fundamental frequency if it is different. If you have any solution to this problem, please suggest me.

  • Hi Aritra, Thanks for highlighting your concern on sub-harmonics, again if your goal is to maintain a fixed number of PWM pulses per Fundamental Frequency, you can update PWM pulse frequency dynamically at the start of each fundamental Modulation wave and use the new sample time.

    Ex: M1 -> Fundamental_Freq = 100Hz , PWM Frequnecy is 10Khz and keep N( = 100 , For a 100Mhz controller  this indicates Timer Period = 100M/2*10Khz =5000 counts in Updown mode.

    M2-> Fundamental Freq = from 101Hz update PWM frequency to10.1Khz , so Time Period will be 100M/2*10.1K = ~4950.

    Once your frequency becomes 101.01 -> you can switch back to 10Khz with N = 99. You would need to dynamically update the Timer Period this way to see that you maintain a Fixed number of Integer samples in a fundamental cycle. 

    Once Timer Period value is updated, the Compare value to be computed based on the new Timer Period value and Modulation Index. Also any software variable used for Ts to be updated based on the new Switching frequency (assuming you are having interrupt at the same rate as Switching). 

  • Hi,

    I have got your point. I have provide a variable N for no.of samples which will update the switching frequency. But, I am not getting how the timer period needs to be changed with respect to the change in modulation index.

    If you want, I can provide a code for classical 3-phase SVPWM in open loop following V/f control so that you can understand where the problem lies.