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.
各位专家好!
关于TIDA-010062(基于F28003x)参考设计LLC的EPWM配置,有些问题要请教下:
1、函数void LLC_HAL_setupPWM(void)中调用了LLC_HAL_setupPWM_upDownCount函数,该函数配置了EPWM1和EPWM2,对于其中的周期值配置有些不理解,如下:
EPWM_setTimeBasePeriod(base, LLC_PERIOD_INIT_TICKS / 2);
#define LLC_PERIOD_INIT_TICKS (uint32_t)286
按照EPWM的时钟配置为120MHz,这个EPWM的开关频率是不是太高了?
// // LLC_HAL_setupPWM() - configures the primary and secondary switching // for the LLC converter. // void LLC_HAL_setupPWM(void) { // // Configure primary switching for LLC stage - PH1, PRI // Configure synchronous rectification - PH1, SEC // Set the PWMs in a disabled state // LLC_HAL_setupPWM_upDownCount(LLC_PRI_PWM_BASE, EPWM_SYNC_IN_PULSE_SRC_DISABLE, 1, LLC_PERIOD_INIT_TICKS / 2 - 1,//CMPB = (286/2) -1 LLC_DBRED_PRI_INIT, LLC_DBFED_PRI_INIT); LLC_HAL_setupPWM_upDownCount(LLC_SEC_PWM_BASE, EPWM_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM1, LLC_PERIOD_INIT_TICKS / 2 - 11,//(286/2) -1 10,//CMPB = 10 LLC_DBRED_SEC_INIT, LLC_DBFED_SEC_INIT); LLC_HAL_disablePhase(LLC_PRI_PWM_BASE, LLC_SEC_PWM_BASE); // // Configure the action qualifier submodules for primary switching and // synchronous rectification to give 180 degree phase shift between the // two interleaved phases. // // // === Action Qualifier SubModule - PH1, PRI === // // // EPWMA low on CTR = 0 // EPWMA high on CTR = CMPA, in up-count mode // EPWMA low on CTR = PRD // // EPWMB AQ output is inverted by DB for RED on EPWMB output // EPWMB high on CTR = 0 // EPWMB high on CTR = PRD // EPWMB low on CTR = CMPB, in down-count mode // EPWM_setActionQualifierAction(LLC_PRI_PWM_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO); EPWM_setActionQualifierAction(LLC_PRI_PWM_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA); EPWM_setActionQualifierAction(LLC_PRI_PWM_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_PERIOD); EPWM_setActionQualifierAction(LLC_PRI_PWM_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO); EPWM_setActionQualifierAction(LLC_PRI_PWM_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_PERIOD); EPWM_setActionQualifierAction(LLC_PRI_PWM_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_DOWN_CMPB); // // === Action Qualifier SubModule - PH1, SEC === // // // EPWMA high on CTR = 0 // EPWMA low on CTR = CMPA, in up count // EPWMA low on CTR = PRD // // EPWMB high on CTR = 0 // EPWMB low on CTR = PRD // EPWMB high on CTR = CMPB, in down count // EPWM_setActionQualifierAction(LLC_SEC_PWM_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO); EPWM_setActionQualifierAction(LLC_SEC_PWM_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA); EPWM_setActionQualifierAction(LLC_SEC_PWM_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_PERIOD); EPWM_setActionQualifierAction(LLC_SEC_PWM_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO); EPWM_setActionQualifierAction(LLC_SEC_PWM_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_PERIOD); EPWM_setActionQualifierAction(LLC_SEC_PWM_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_DOWN_CMPB); }
2、关于EPWM1和EPWM2的驱动波形不是很理解,比如初级侧的驱动设置代码,能给个大概的驱动波形吗?特别是CTR值的变化和波形的关系。
// // === Action Qualifier SubModule - PH1, PRI === // // // EPWMA low on CTR = 0 // EPWMA high on CTR = CMPA, in up-count mode // EPWMA low on CTR = PRD // // EPWMB AQ output is inverted by DB for RED on EPWMB output // EPWMB high on CTR = 0 // EPWMB high on CTR = PRD // EPWMB low on CTR = CMPB, in down-count mode // EPWM_setActionQualifierAction(LLC_PRI_PWM_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO); EPWM_setActionQualifierAction(LLC_PRI_PWM_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA); EPWM_setActionQualifierAction(LLC_PRI_PWM_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_PERIOD); EPWM_setActionQualifierAction(LLC_PRI_PWM_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO); EPWM_setActionQualifierAction(LLC_PRI_PWM_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_PERIOD); EPWM_setActionQualifierAction(LLC_PRI_PWM_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_DOWN_CMPB);
另外关于板级保护函数中的关于比较器的正极输入源配置也有些困惑,根据函数void LLC_HAL_setupBoardProtection()的配置源,如以下几行代码所示:
ASysCtl_selectCMPHPMux(ASYSCTL_CMPHPMUX_SELECT_1, 0x2);//A6
ASysCtl_selectCMPLPMux(ASYSCTL_CMPLPMUX_SELECT_1, 0x0);//B6
ASysCtl_selectCMPHPMux(ASYSCTL_CMPHPMUX_SELECT_4, 0x3);//B8
按理说对应的ADC通道应该是ADC_CH_ADCIN6,ADC_CH_ADCIN6,ADC_CH_ADCIN8,但是在函数void LLC_HAL_setupADC()中的如下代码中:
//
// SOC configuration, sample all values on EPWM SOCA
//
ADC_setupSOC(LLC_ADCCTLBASE_ISEC, LLC_ADCSOC_ISEC, ADC_TRIGGER_EPWM2_SOCA,
LLC_ADCIN_ISEC, 8);
ADC_setupSOC(LLC_ADCCTLBASE_IPRIRESO,
LLC_ADCSOC_IPRIRESO, ADC_TRIGGER_EPWM2_SOCA,
LLC_ADCIN_IPRIRESO, 8);
ADC_setupSOC(LLC_ADCCTLBASE_VSEC, LLC_ADCSOC_VSEC, ADC_TRIGGER_EPWM2_SOCA,
LLC_ADCIN_VSEC, 8);
用到的ADC通道定义如下:
#define LLC_ADCIN_ISEC ADC_CH_ADCIN5
#define LLC_ADCIN_IPRIRESO ADC_CH_ADCIN9
#define LLC_ADCIN_VSEC ADC_CH_ADCIN10
这几个宏定义的通道是5,9,10,和需要的6, 6,8对应不上,这个地方是我理解错误吗?
我看了基于004x系列的LLC程序,ADC通道配置是正确的。
我在数据手册上找到了程序中要用到的比较器正端输入,如下图所示:
您好
1.设置频率背后的简单原因是在开始时太高、因为在实验1:开环中、在启动期间、我们要通过设置转换器增益非常低的方式、将周期设置为最小值、以最低输出启动转换器。 为了获得更低的增益、我们始终希望在高于谐振频率的条件下运行 LLC、即在谐振回路的电感区域中。 然后将频率缓慢移向谐振频率以增加增益来斜升输出电压。 您可以在"llc.c"文件中的 LLC_systemStartUp()函数中看到此标幺值是如何统一的。
2.有关波形、请参阅以下说明和 C2000 Academy 以及 ePWM 视频、了解相对于计数器值的 PWM 波形。
https://dev.ti.com/tirex/explore/node?node=A__AaKBh5Iw4k3VWS3akgXWzA__C28X-ACADEMY__1sbHxUB__LATEST
https://www.ti.com/video/series/C2000-enhanced-pulse-width-modulator.html
// // === Action Qualifier SubModule - PH1, PRI === // // // EPWMA low on CTR = 0 // EPWMA high on CTR = CMPA, in up-count mode // EPWMA low on CTR = PRD // // EPWMB AQ output is inverted by DB for RED on EPWMB output // EPWMB high on CTR = 0 // EPWMB high on CTR = PRD // EPWMB low on CTR = CMPB, in down-count mode
3.请忽略注释正确的配置代码
4.对于补偿器问题,使用2p2z 补偿器。 请参阅"llc.h"中的实现。 我们使用 SFRA 库和 GUI (www.ti.com/.../SFRA)来获取波特图、这些波特图生成用于补偿器调试器 GUI (www.ti.com/.../COMPENSATION_DESIGNER)的 Excel 文件、以查看受控体、补偿器和开环响应、从而调整获取可放置在 setting.h 中的系数的补偿器。请参阅此培训视频和相关资源:www.ti.com/.../4059874181001
这些生态系统是 C2000_LaunchPad_ Ware_Digital SDK 的一部分、可在以下安装目录中找到:
...\ti\c2000\C2000Ware_DigitalPower_SDK_5_04_00_00\libraries\sfra\gui
1.设置频率背后的简单原因是在开始时太高、因为在实验1:开环中、在启动期间、我们要通过设置转换器增益非常低的方式、将周期设置为最小值、以最低输出启动转换器。 为了获得更低的增益、我们始终希望在高于谐振频率的条件下运行 LLC、即在谐振回路的电感区域中。 然后将频率缓慢移向谐振频率以增加增益来斜升输出电压。 您可以在"llc.c"文件中的 LLC_systemStartUp()函数中看到此标幺值是如何统一的。
3.请忽略注释正确的配置代码
...\ti\c2000\C2000Ware_DigitalPower_SDK_5_04_00_00\libraries\sfra\gui