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.

How to set the PWM frequency to more than 400kHz with TMDSHVBLPFCKIT (bridgeless PFC developer’s kit), TMS320F28035? (200kHz by default)

Other Parts Discussed in Thread: TMDSHVBLPFCKIT, TMS320F28035, CONTROLSUITE

How to set the PWM frequency to more than 400kHz with TMDSHVBLPFCKIT (bridgeless PFC developer’s kit), TMS320F28035? Thanks a lot for any of your help in advance.

 (1) How can I set the PWM frequency of more than 400kHz in build 3?

[File] ..\TI\controlSUITE\development_kits\BLPFC_v1.0\BLPFC\BridgelessPFC-Main.c

  • The BLPFC works at the PWM frequency of 200kHz (up-down count mode), which is defined as follows:

---------------------------------------------------

#define period 300                       //300 cycles -> 200KHz @60MHz CPU

EPwm7Regs.TBPRD = 3000;           // Set timer period 3000 TBCLKs

EPwm1Regs.CMPB = 80;                       // ISR trigger point

---------------------------------------------------

  • In order to change the PWM frequency to 400kHz. I have modified the timer period and trigger point as:

---------------------------------------------------

#define period 150                       //150 cycles -> 400KHz @60MHz CPU

EPwm7Regs.TBPRD = 1500;           // Set timer period 1500 TBCLKs

EPwm1Regs.CMPB = 40;                       // ISR trigger point (nearly midpoint during up count)

---------------------------------------------------

  •  to execute in build 1(open loop check), duty at PWM frequency of 400kHz is outputted. However, when to run the kit in build 3 (complete voltage and current loop control), duty is not outputted and the output voltage is just equal to the input voltage instead of 400V.

 (2) By the way, there are 2 switches of the BLPFC kit. When Q1 is PWM controlled, Q2 is forced high during the positive cycle (line-to-neutral voltage >0). I cannot understand how the values 80, 144 and 160 below are determined. Do they have any connection with the period 300. Does the value 80 here happen to be the same as CMPB? In order to output PWM frequency of 400kHz, do I have to change these values correspondingly.

 -------------------------------------------------------

MOV  @_EPwm1Regs.AQCTLA, #144                      ; SET ePWM1 on CompA-Down, CLEAR CompA-Up (enable switching)

MOV  @_EPwm2Regs.AQCTLA, #80                        ; CLEAR ePWM2 on CompA-Up/Down (force low)

MOV  @_EPwm2Regs.AQCTLA, #160                      ; SET ePWM2 on CompA-Up/Down (force high)

-------------------------------------------------------

 [file] ..\TI\controlSUITE\development_kits\BLPFC_v1.0\BLPFC\BridgelessPFC-DPL-ISR.asm

 

;Calculate Vrect

           MOVW                        DP, #_AdcResult                                                                  ; load Data Page to read ADC results

          MOV                            ACC, @_AdcResult.ADCRESULT3<<12                          ; ACC = Line

          SUB                             ACC, @_AdcResult.ADCRESULT4<<12                          ; ACC = Line - Neutral

          B                                   NegativeCycle, LEQ                                                              ; Branch to Negative Half Cycle

PositiveCycle:

                   ; Save Vrect

                   .ref             _Vrect

                   MOVW      DP, #_Vrect

                   MOVL       @_Vrect, ACC

                   ; ePWM1 & ADC configuration

                   MOVW     DP, #_AdcRegs.ADCSOC1CTL                         ; load Data Page to read ADC results

;                  MOV          @_AdcRegs.ADCSOC1CTL.bit.CHSEL, #2   ; Switch ADC to IpfcA current

                   EALLOW

                   MOV          @_AdcRegs.ADCSOC1CTL, #10374               ; Switch ADC to IpfcA current

                   EDIS

                   MOVW     DP, #_EPwm1Regs.AQCTLA                           ; load Data Page to read ePWM registers

;                  MOV          @_EPwm1Regs.AQCTLA.bit.CAU, #1           ; CLEAR ePWM1 on CompA-Up (enable switching)

;                  MOV          @_EPwm1Regs.AQCTLA.bit.CAD, #2           ; SET ePWM1 on CompA-Down (enable switching)

                   MOV          @_EPwm1Regs.AQCTLA, #144                      ; SET ePWM1 on CompA-Down, CLEAR CompA-Up (enable switching)

                   MOVW     DP, #_EPwm2Regs.AQCTLA                            ; load Data Page to read ePWM registers

;                  MOV          @_EPwm2Regs.AQCTLA.bit.CAU, #1           ; CLEAR ePWM2 on CompA-Up

;                  MOV          @_EPwm2Regs.AQCTLA.bit.CAD, #1           ; CLEAR ePWM2 on CompA-Down (force low)

                   MOV          @_EPwm2Regs.AQCTLA, #80                        ; CLEAR ePWM2 on CompA-Up/Down (force low)

                   ; Check if near Zero crossing before forcing ePWM2 High

                   ;SUB          ACC, #100<<12

                   SUB           ACC, #50<<12

                   B                SkipPWM2Force, LT

;                  MOV          @_EPwm2Regs.AQCTLA.bit.CAU, #2           ; SET ePWM2 on CompA-Up (force high)

;                  MOV          @_EPwm2Regs.AQCTLA.bit.CAD, #2           ; SET ePWM2 on CompA-Down

                   MOV          @_EPwm2Regs.AQCTLA, #160                      ; SET ePWM2 on CompA-Up/Down (force high)

SkipPWM2Force:

;                  MOVW     DP, #_GpioDataRegs.GPADAT               ; load Data Page to read GPIO registers

;                  MOV         @_GpioDataRegs.GPASET, #128 ; Set GPIO7, Used for debug purposes

                  B                ControlLoopEnd, UNC                                  

  • This BLPFC kit is designed for 200kHz PWM. You cannot change it to 400kHz and then run the same BLPFC power stage. That is why in open loop mode (build 1) you can see the 400kHz PWM output. But when the BLPFC runs under closed loop (build 3) you see abnormal behavior.

    Shamim

  • Dear Shamim-san, Thank you very much for your kind reply.

    I have managed to change the PWM frequency to 300kHz or any other frequency below 400kHz under closed loop (build 3). When the PWM frequency is larger than 300kHz, the trigger point CMPB which is defined as 80 is over the up count 75 (1 PWM period is 150 counts with PWM 400kHz). I have changed CMPB to 40, but still the closed loop does not work.

    By the way, May I ask  why the BLPFC cannot work with PWM 400kHz. Is there any physical reason or is there any settings in the program that restrict to output PWM more than 400kHz?

    Shamim Choudhury said:

    This BLPFC kit is designed for 200kHz PWM. You cannot change it to 400kHz and then run the same BLPFC power stage. That is why in open loop mode (build 1) you can see the 400kHz PWM output. But when the BLPFC runs under closed loop (build 3) you see abnormal behavior.

    Shamim