To generate a delay time or dead-band for rising edges and falling edges in a pair of complementary PWM signals.


SOFTWARE: Code composer studio (Version: 8.0)

SOFTWARE: Code Composer Studio

HARDWARE REQUIRED: DSP controller board (TMS320F28335), JTAG, XDS100V2 board, CRO

THEORY:

In switched-mode power electronics, a typical configuration consists of a 3-phase current or voltage injection circuit, in which a pair of power switches per phase is controlled by a sequence of PWM - pulses. A phase current flows either from a DC bus voltage through a top switch into the winding of a motor or via a bottom switch from the motor winding back to the ground. Of course, we have to prevent both switches from conducting at the same time.     

A minor problem arises from the fact that power switches usually turn on faster than they turn off. If we would apply an identical but complementary pulse pattern to the top and bottom switch of a phase, we would end up in a short period in time with a shoot-through situation. Dead-band control provides a convenient means of combating current “shoot-through” problems in a power converter. “Shoot-through” occurs when both the upper and lower transistors in the same phase of a power converter are on simultaneously. This condition shorts the power supply and results in a large current draw. Shoot-through problems occur because transistors (especially FET’s) turn on faster than they turn off and also because high side and low-side power converter transistors are typically switched in a complementary fashion. Although the duration of the shoot-through current path is finite during PWM cycling, (i.e. the transistor will eventually turn off), even brief periods of a short circuit condition can produce excessive heating and stress the power converter and power supply.

Two basic approaches exist for controlling shoot-through: modify the transistors, or modify the PWM gate signals controlling the transistors. In the first case, the switch-on time of the transistor gate must be increased so that it (slightly) exceeds the switch-off time. The hard way to accomplish this is by adding a cluster of passive components such as resistors and diodes in series with the transistor gate to act as a low-pass filter to implement the delay. The second approach to shoot-through control separates transitions on complimentary PWM signals with a fixed period of time. This is called a dead-band.

CODE:

Rising edge:

#include "DSP2833x_Device.h"

// external function prototypes

extern void InitSysCtrl(void);

extern void InitPieCtrl(void);

extern void InitPieVectTable(void);

// Prototype statements for functions found within this file.

void Gpio_select(void);

void Setup_ePWM1(void);

void main(void)

 

{

int counter=0; // binary counter for digital output

InitSysCtrl(); // Basic Core Init from DSP2833x_SysCtrl.c

Gpio_select(); // GPIO9, GPIO11, GPIO34 and GPIO49 as output

// to 4 LEDs at Peripheral Explorer

Setup_ePWM1(); // init of ePWM1A

}

void Gpio_select(void)

{

EALLOW;

GpioCtrlRegs.GPAMUX1.all = 0; // GPIO15 ... GPIO0 = General Puropse I/O

GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1; // ePWM1A active

GpioCtrlRegs.GPAMUX1.bit.GPIO1= 1; // ePWM1Bctive

GpioCtrlRegs.GPAMUX2.all = 0; // GPIO31 ... GPIO16 = General Purpose I/O

GpioCtrlRegs.GPBMUX1.all = 0; // GPIO47 ... GPIO32 = General Purpose I/O

GpioCtrlRegs.GPBMUX2.all = 0; // GPIO63 ... GPIO48 = General Purpose I/O

GpioCtrlRegs.GPCMUX1.all = 0; // GPIO79 ... GPIO64 = General Purpose I/O

GpioCtrlRegs.GPCMUX2.all = 0; // GPIO87 ... GPIO80 = General Purpose I/O

GpioCtrlRegs.GPBDIR.all = 0; // GPIO63-32 as inputs

GpioCtrlRegs.GPCDIR.all = 0; // GPIO87-64 as inputs

EDIS;

}

void Setup_ePWM1(void)

{

EPwm1Regs.TBCTL.bit.CLKDIV =1; // CLKDIV = 2

EPwm1Regs.TBCTL.bit.HSPCLKDIV = 1; // HSPCLKDIV = 2

EPwm1Regs.TBCTL.bit.CTRMODE = 2; // up - down mode

EPwm1Regs.AQCTLA.all = 0x0092; // set ePWM1A on CMPA up

EPwm1Regs.AQCTLB.all = 0x0092; // set ePWM1A on CMPA up

// clear ePWM1A on CMPA down

 

EPwm1Regs.TBPRD =6250; // 3KHz - PWM signal

EPwm1Regs.CMPA.half.CMPA =4096.5 ; // 65% duty cycle first

EPwm1Regs.DBRED = 375;

//EPwm1Regs.DBFED = 750;

EPwm1Regs.DBCTL.bit.OUT_MODE=2;

EPwm1Regs.DBCTL.bit.POLSEL=0;

EPwm1Regs.DBCTL.bit.IN_MODE=2;

}

Active high complimentary:

#include "DSP2833x_Device.h"

// external function prototypes

extern void InitSysCtrl(void);

extern void InitPieCtrl(void);

extern void InitPieVectTable(void);

// Prototype statements for functions found within this file.

void Gpio_select(void);

void Setup_ePWM1(void);

void main(void)

 

{

int counter=0; // binary counter for digital output

InitSysCtrl(); // Basic Core Init from DSP2833x_SysCtrl.c

Gpio_select(); // GPIO9, GPIO11, GPIO34 and GPIO49 as output

// to 4 LEDs at Peripheral Explorer

Setup_ePWM1(); // init of ePWM1A

}

void Gpio_select(void)

{

EALLOW;

GpioCtrlRegs.GPAMUX1.all = 0; // GPIO15 ... GPIO0 = General Puropse I/O

GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1; // ePWM1A active

GpioCtrlRegs.GPAMUX1.bit.GPIO1= 1; // ePWM1Bctive

GpioCtrlRegs.GPAMUX2.all = 0; // GPIO31 ... GPIO16 = General Purpose I/O

GpioCtrlRegs.GPBMUX1.all = 0; // GPIO47 ... GPIO32 = General Purpose I/O

GpioCtrlRegs.GPBMUX2.all = 0; // GPIO63 ... GPIO48 = General Purpose I/O

GpioCtrlRegs.GPCMUX1.all = 0; // GPIO79 ... GPIO64 = General Purpose I/O

GpioCtrlRegs.GPCMUX2.all = 0; // GPIO87 ... GPIO80 = General Purpose I/O

GpioCtrlRegs.GPBDIR.all = 0; // GPIO63-32 as inputs

GpioCtrlRegs.GPCDIR.all = 0; // GPIO87-64 as inputs

EDIS;

}

void Setup_ePWM1(void)

{

EPwm1Regs.TBCTL.bit.CLKDIV =0; // CLKDIV = 2

EPwm1Regs.TBCTL.bit.HSPCLKDIV = 0; // HSPCLKDIV = 2

EPwm1Regs.TBCTL.bit.CTRMODE = 2; // up - down mode

EPwm1Regs.AQCTLA.all = 0x0092; // set ePWM1A on CMPA up

EPwm1Regs.AQCTLB.all = 0x0092; // set ePWM1A on CMPA up

// clear ePWM1A on CMPA down

 

EPwm1Regs.TBPRD =6250; // 3KHz - PWM signal

EPwm1Regs.CMPA.half.CMPA =4096.5 ; // 65% duty cycle first

EPwm1Regs.DBRED = 750;

EPwm1Regs.DBFED = 750;

EPwm1Regs.DBCTL.bit.OUT_MODE=3;

EPwm1Regs.DBCTL.bit.POLSEL=2;

EPwm1Regs.DBCTL.bit.IN_MODE=2;

}

 

Active low complimentary:

#include "DSP2833x_Device.h"

// external function prototypes

extern void InitSysCtrl(void);

extern void InitPieCtrl(void);

extern void InitPieVectTable(void);

// Prototype statements for functions found within this file.

void Gpio_select(void);

void Setup_ePWM1(void);

void main(void)

 

{

int counter=0; // binary counter for digital output

InitSysCtrl(); // Basic Core Init from DSP2833x_SysCtrl.c

Gpio_select(); // GPIO9, GPIO11, GPIO34 and GPIO49 as output

// to 4 LEDs at Peripheral Explorer

Setup_ePWM1(); // init of ePWM1A

}

void Gpio_select(void)

{

EALLOW;

GpioCtrlRegs.GPAMUX1.all = 0; // GPIO15 ... GPIO0 = General Puropse I/O

GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1; // ePWM1A active

GpioCtrlRegs.GPAMUX1.bit.GPIO1= 1; // ePWM1Bctive

GpioCtrlRegs.GPAMUX2.all = 0; // GPIO31 ... GPIO16 = General Purpose I/O

GpioCtrlRegs.GPBMUX1.all = 0; // GPIO47 ... GPIO32 = General Purpose I/O

GpioCtrlRegs.GPBMUX2.all = 0; // GPIO63 ... GPIO48 = General Purpose I/O

GpioCtrlRegs.GPCMUX1.all = 0; // GPIO79 ... GPIO64 = General Purpose I/O

GpioCtrlRegs.GPCMUX2.all = 0; // GPIO87 ... GPIO80 = General Purpose I/O

GpioCtrlRegs.GPBDIR.all = 0; // GPIO63-32 as inputs

GpioCtrlRegs.GPCDIR.all = 0; // GPIO87-64 as inputs

EDIS;

}

void Setup_ePWM1(void)

{

EPwm1Regs.TBCTL.bit.CLKDIV =0; // CLKDIV = 2

EPwm1Regs.TBCTL.bit.HSPCLKDIV = 0; // HSPCLKDIV = 2

EPwm1Regs.TBCTL.bit.CTRMODE = 2; // up - down mode

EPwm1Regs.AQCTLA.all = 0x0092; // set ePWM1A on CMPA up

EPwm1Regs.AQCTLB.all = 0x0092; // set ePWM1A on CMPA up

// clear ePWM1A on CMPA down

 

EPwm1Regs.TBPRD =6250; // 1KHz - PWM signal

EPwm1Regs.CMPA.half.CMPA =4096.5 ; // 100% duty cycle first

EPwm1Regs.DBRED = 750;

EPwm1Regs.DBFED = 750;

EPwm1Regs.DBCTL.bit.OUT_MODE=3;

EPwm1Regs.DBCTL.bit.POLSEL=1;

EPwm1Regs.DBCTL.bit.IN_MODE=2;

}

 

DEAD BAND WAVE FORMS:

a) Rising edge:

                                      Fig1: Rising edge delayed (RED)

 

b) Active high complimentary :

Fig2: Active high complimentary (AHC)

 

 

 

c) Active low complimentary (ALC):

Fig3: Active low complimentary (ALC)

OBSERVATIONS:

·       By changing polarity select data bits (POLSEL) we can change the dead band operating modes

·       Delay time is depending on the dead band, unit rising edge delay and dead band unit falling edge delay and is not depends upon TBPRD

·       Based on the dead band control (DBCTL) data bits the delay is changed to rising delay or falling delay.

RESULTS:

The generation of delay time or dead-band for rising edges and falling edges in a pair of complementary PWM signal is generated and waveforms are verified in the CRO.

 

 

 

Post a Comment

Please do not enter any spam links in the comments...

Previous Post Next Post