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.

关于太阳能微型逆变器F28035程序中COMP比较器的问题



我用的开发板是Digitally Controlled Solar Micro Inverter Design using C2000 Piccolo Microcontroller 。

在进行DCDC部分MPPT闭环实验时,变压器会发出响声而且持续一会后电路断开,EPWM3故障标志显示过流保护,但我设置的光伏开路电压38V,短路电流1.5A,实际电流最高也就限制在1.5A 。 为什么会发生过流保护呢?我看程序中电流限制是10A 。还有SolarMicroInv-Main.c中的保护程序里COMP3的输入电压a在哪里配置呢?我在SolarMicroInv-DevInit_F2803x.c、SolarMicroInv-Settings.h、SolarMicroInv-Includes.h中都没有找到。

谢谢大家!

保护代码如下:

/*********  Protection Mechanisms *****************/
 //TODO Protection Code
 EALLOW;
 // Cycle by cycle interrupt for CPU halt trip
 EPwm1Regs.TZSEL.bit.CBC6 = 0x1;
 EPwm2Regs.TZSEL.bit.CBC6 = 0x1;
 EPwm3Regs.TZSEL.bit.CBC6 = 0x1;
 
// Adding one shot trip for over-current protection on the inverter TZ2
 EPwm1Regs.TZSEL.bit.OSHT2 = 0x1;
 EPwm2Regs.TZSEL.bit.OSHT2 = 0x1;
 
// Adding one shot trip for over current of the flyback stage but avoid the <1% duty condition using blanking
 // First enable the COMP3
 Comp3Regs.COMPCTL.bit.COMPDACEN  =0x1;
 Comp3Regs.COMPCTL.bit.SYNCSEL    =0x0; // asynchronous version of the COMP signal is passed to the EPWM/GPIO module
 Comp3Regs.COMPCTL.bit.CMPINV     =0x0; // Output of the comparator is passed directly
 Comp3Regs.COMPCTL.bit.COMPSOURCE =0x0; // inverting input of the comparator is connected to the internal DAC
 Comp3Regs.DACVAL.bit.DACVAL   =700; // set DAC input to peak trip point ~10 Amps, full scale is 15Amps
 AdcRegs.COMPHYSTCTL.bit.COMP1_HYST_DISABLE = 0x1;
 //Select COMP3 as one shot trip
 EPwm3Regs.DCTRIPSEL.bit.DCAHCOMPSEL=DC_COMP3OUT ;
 EPwm3Regs.TZDCSEL.bit.DCAEVT1=TZ_DCAH_HI;
 EPwm3Regs.DCACTL.bit.EVT1SRCSEL = DC_EVT_FLT ;
 EPwm3Regs.DCACTL.bit.EVT1FRCSYNCSEL=DC_EVT_ASYNC;
 EPwm3Regs.TZSEL.bit.DCAEVT1=0x1;
 
//Add blanking to avoid conditions where the over current trip generates <1% duty cycle
 EPwm3Regs.DCFCTL.bit.BLANKE=DC_BLANK_ENABLE; // Blanking window is enabled
 EPwm3Regs.DCFCTL.bit.BLANKINV=DC_BLANK_NOTINV; // Blanking window is not inverted
 EPwm3Regs.DCFCTL.bit.SRCSEL=DC_SRC_DCAEVT1; //DCAEVT1
 EPwm3Regs.DCFCTL.bit.PULSESEL=DC_PULSESEL_PRD; // apply offset from TBCTR=TBPRD
 EPwm3Regs.DCFOFFSET=59;
 EPwm3Regs.DCFWINDOW=255;
 
// What do we want the OST/CBC events to do?
 // TZA events can force EPWMxA
 // TZB events can force EPWMxB
 EPwm1Regs.TZCTL.bit.TZA = TZ_FORCE_LO; // EPWMxA will go low
 EPwm1Regs.TZCTL.bit.TZB = TZ_FORCE_LO; // EPWMxB will go low
 EPwm2Regs.TZCTL.bit.TZA = TZ_FORCE_LO; // EPWMxA will go low
 EPwm2Regs.TZCTL.bit.TZB = TZ_FORCE_LO; // EPWMxB will go low
 EPwm3Regs.TZCTL.bit.TZA = TZ_FORCE_LO; // EPWMxA will go low
 EPwm3Regs.TZCTL.bit.TZB = TZ_FORCE_LO; // EPWMxB will go low
 //clear any spurious trips
 EPwm1Regs.TZCLR.bit.OST = 1;
 EPwm2Regs.TZCLR.bit.OST = 1;
 EPwm3Regs.TZCLR.bit.OST = 1;
 // Force a trip event on all the PWM modules for safety
 EPwm1Regs.TZFRC.bit.OST = 0x1;
 EPwm2Regs.TZFRC.bit.OST = 0x1;
 EPwm3Regs.TZFRC.bit.OST = 0x1;
 EDIS;
 /*********  Protection Mechanism END *****************/
下图是DCDC部分原理图
下图为故障发生后参数界面 可以看到倒数第四行EPWM3Regs.TZFLG.all=12,而且故障时倒数第八行占空比达到了0.8,duty_flyback_pu=0.8
  • 针对你提出的问题,我整理了一下,若有不全请补充,

    问题1:在进行DCDC部分MPPT闭环实验时,变压器会发出响声而且持续一会后电路断开,EPWM3故障标志显示过流保护,但我设置的光伏开路电压38V,短路电流1.5A,实际电流最高也就限制在1.5A 。 为什么会发生过流保护呢?

    回答1:发生过流保护的原因可能为:

                 1.电流保护电路工作不正常,最高电流限制不是1.5A,你可以先进行电流保护电路测试,

                            测试方法:计算1.5A电流对应的电压值并作为硬件比较器输入端的参考电压Vref,观察当另一端输入电压开始大于Vref时,比                                                                              较器的输出电压是否变化,另外观察比较器输出电压变化后,EPWM3波形是否变低。

                 2.电路中的电流确实大于1.5A,你可以用电流探头测量,如果电路过流可能是环路没调好,可以检查如PI参数配置、标幺化、IQ函数调用等方面是否正确

    问题2:保护程序里COMP3的输入电压a在哪里配置呢?

    回答2:不需要进行配置,COMP3与ADCIN共用管脚,需要查看硬件电路原理图,即可知道COMP3的输入电压a是什么信号。

    建议:在实验之前,先对所有的电压电流保护电路进行测试,以保证其正常工作。

  • 感谢您的耐心回复!按照您提供的第二个思路已经找到问题发生的原因。非常感谢!