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.

Software-defined spread-spectrum for inverter

Hi all,


Does anyone have any general thoughts as to applying some spread-spectrum modulation of the base PWM frequency?

I would think that for most applications adding jitter to the system clock (and thereby the PWM subsystem) is not really an option, as this would also affect various communications interfaces (UART, CAN, and so on), which are somewhat sensitive to the amount of clock jitter that would be useful for spread-spectrum modulation (IE. variations of several percent).

I was instead thinking about altering the PWM period registers on-the-fly, during runtime. However, maintaining synchronization between them as well as the compare registers seems non-trivial, and may even unachievable (?). The heart of the issue seems to be, to me, that the difference in duty cycle between the channels is really what controls the current per motor phase, making it necessary to change all the period and compare registers simultaneously, and in some cases the count direction as well. Ensuring that this can be done and applied within one PWM base clock makes things even more difficult.

Is there anyone here that's thought through this more than I and has an idea of how to do this? (Or alternately, if someone's deduced that spread-spectrum modulation isn't really achievable short of adding master clock jitter).

Cheers!

  • we don't have an example of this, but I know some customers who have implemented.

    in one case they are just dithering around their main PWM frequency by a few KHz in either direction. In this case you still sample at timer = 0 but yes you do need to base your CMP values on a % of the overall timer counts.  I don't think you need to worry about your interrupt changing as long as your interrupt task fits inside the smallest PWM frequency you will use.

    but I know of another case where the PWM frequency is changed pretty much continuously (but this is to reduce switching losses). In this case the interrupt task is more critical and you have to insure samples are taken and handled correctly and aligned with the control process that needs that specific set of samples. 

    sorry I can't offer anything else. Maybe the community will chime in.

  • I would think that the only way to achieve this modulation  is through an external modulator, i.e an FPGA or something.

    Have the C2000 do all the control, calculate the voltage vector, then send it to the FPGA for determination of PWM (maybe PWM is no longer the correct term here ?)

  • Argh, I've been working on too many projects simultaneously. (FWIW, I've also been working on a multi-phase step-up converter with the phases set up for some suitable phase offset, I had mistakenly seemed to think instaspin also has phase-offset PWM channels, but they are of course all in-phase). In this case dithering the PWM frequency shouldn't be all too hard, especially with the ability to use the compare and period shadow registers.

    Is there any risk of causing instability in FAST with a PWM period change of a few percent? (as FAST will assume a PWM_PERIOD_us has elapsed between each update call, whereas in reality some other time PWM_PERIOD_us + PWM_DITHER_OFFSET_us has elapsed. (Assuming of course the mean PWM period is the nominal period).

    Could you elaborate a little bit more on what you mean in that changing the PWM frequency can in some cases reduce switching losses? I'm not quite sure I follow you there...


    Thanks for the pointers so far!