Phase shift modulation with 56F8xxx

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Phase shift modulation with 56F8xxx

3,691 Views
steel_tig
Contributor I

Hi to all,

 

Is-it possible to do phase shift modulation with the PWM of the 56f8xxx serie?

 

Basically, phase shift modulation is two identical square waves with duty cycle of 50% and a variable phase shift. This feature is available on some TI DSP with there ePWM. I know I can do it using the output of timers and some special IGBT drivers to do dead time insertion. But, I would prefer to use two complementary pair PWM channels.

 

Thanks

 

Bruno

Labels (1)
Tags (1)
0 Kudos
Reply
4 Replies

1,307 Views
admin
Specialist II
If you still interested i tried to realize phase shift between modulated signals. I used ProcessorExpert. Add "PWMMC" bean. Settings - center-aligned mode, Pair 0 & 1 complementary, Correction - method2 -Use PWMVALx registers for Pairs 0 & 1.
To insert phase shift between signals use following code:
Code:
char shif_percent=0;dword val1, val2;...if(shift_percent>50) shift_percent= 50;else if(shift_percent<-50) shift_percent= -50;val1 = (dword)getReg(PWMA_PWMCM) * (50-shift_percent)/100;val2 = (dword)getReg(PWMA_PWMCM) - val1;PWMA_PWMVAL0 = val1;PWMA_PWMVAL1 = val2;PWMA_PWMVAL2 = val2;PWMA_PWMVAL3 = val1;PWMC1_Load();

 
where shift_percent is value of phase shift which can be changed from -50% to +50%.

1,307 Views
alvarobs
Contributor I

OHH, very good. Thank you very much. It helps a lot.

I didn't need the "negative" angles (0-100%), so I did that:

    int shift_percent=50;
    dword val1, val2;

    if(shift_percent>100)
     shift_percent= 100;
    else if(shift_percent<0)
     shift_percent= 0;
    val1 = (dword)getReg(PWM_PWMCM) * (100-shift_percent)/200;
    val2 = (dword)getReg(PWM_PWMCM) - val1;
    PWM_PWMVAL1 = val1;
    PWM_PWMVAL2= val2;
    PWM_PWMVAL3 = val2;
    PWM_PWMVAL4 = val1;
    PWM__Load();

1,307 Views
ruimausinho
Contributor II

Hello,

First of all thank you for share your code, i'm having the same task to do, and i used your code , and the specifications in PWMMC bean.

But now, when i run the program, i don´t see any changes in my pwm phases. Did you put your code inside of main function?

Regards,

Rui

0 Kudos
Reply

1,307 Views
admin
Specialist II
As far as i understood these DSP's doesn't have special registers to control phase shift. But you can use "Asymmetric PWM output" - see ch. 10.4.5 "Asymmetric PWM Output" (in 56F8000_Peripheral_Manual).
In this case you should count values need to be loaded in to the PWMVal registers depending pulse frequency and phase shift.

Sorry my English.
0 Kudos
Reply