ghaytweyhtoo

2021 Question B three-phase AC-DC conversion circuit has one god and two pits

 
Overview
### Project Introduction This system is based on the AC-DC voltage synchronous rectification circuit of BOOST boost PFC to achieve the design requirements. The TI company's microcontroller TM4C123G is used to collect the input three-phase AC phase after step-down filtering, and the voltage regulator in the microcontroller is used to control the PWM wave to stabilize the AC-DC output line voltage at 28 V. Use voltage phase-locked loop and current phase-locked loop at the DC-DC end to stabilize the DC output, and use PID technology to stabilize the output. The load regulation rate and voltage regulation rate are both less than 0.3%, and the AC-DC input side power factor and conversion circuit efficiency All meet the design requirements, and the power factor error is not greater than 0.02. Through voltage synchronous rectification and power factor correction, the efficiency of the system is improved, and the design requirements are basically completed. - - - ### Project function introduction An introduction and introduction to the relevant functions of the project, such as: * When the AC input line voltage Ui=28V, Io=2A, Uo=36V±0.1V. * When Ui=28V and Io changes within the range of 0.1A~2.0A, the load regulation rate SI ≤ 0.3%. * When Io=2A and Ui changes within the range of 23V~33V, the voltage regulation rate SU ≤ 0.3%. * Under the conditions of Ui=28V, Io=2A, Uo=36V, the efficiency η of the AC-DC conversion circuit is not less than 85%. * Under the conditions of Ui=28V, Io=2A, Uo=36V, the power factor of the input side of the AC-DC conversion circuit is not less than 0.99. * Under the conditions of Ui=28V, Io=2A, Uo=36V, the efficiency η of the AC-DC conversion circuit is not less than 95%. * The three-phase AC-DC conversion circuit can automatically adjust the power factor according to digital settings. The power factor adjustment range is 0.90~1.00, and the absolute value of the error is not greater than 0.02. - - - ### Project Properties Here you can fill in the completion progress bar of the project, select the check box according to the completed function, or display it as the completion progress of the function* [x] Schematic design* [x] PCB Drawing design* [x] PCB proofing* [x] Welding test* [x] Functional test* [x] Program test - - - ### Circuit explanation Connect the 220 V AC mains power to the adjustable autotransformer, and then connect Insert an isolation transformer and adjust the transformer to reduce the AC voltage. Inductors of the same size are added to the circuit of the step-down AC input system to achieve circuit freewheeling and filtering. Kalman filtering is used to filter the input AC power again to avoid the input signal from interfering with the system signal sampling. After collecting and filtering through the TI company's microcontroller TM4C123G, one phase of the three-phase power is input, and the three-phase equal-amplitude PWM wave with a phase difference of 120 degrees is output to control the half-bridge driver to output a PWM wave with an amplitude of 9V to control the on or off of the MOS tube. off to achieve voltage-type synchronous rectification AC-DC conversion. It is filtered by a π-type filter circuit to remove excess AC signals. Voltage phase-locked loops and current phase-locked loops are used to stabilize the voltage and current on the load. Changing the DC-DC input voltage or current will not affect the load voltage or current. It also performs voltage sampling on the load to adjust the power factor. - - - ### 软件 ``` C #include "parallel.h" #include "key.h" #include "KalmanFilter.h" #ifdef parallel #define I_OUT_A_MAX_CONFIG 500 #define V_OUT_A_MAX_CONFIG 1000 u8 i=0; //u32 BUFF[10]; //char datas[20]; float sin_buff=0; float integral_old[5]; float SIN = 3; static u8 MOD = 0; static u8 MOD_EN = 0; static float FAC = 1; //float config[10]; u32 T = 0; u32 *buff = NULL; u8 data[2048]; void V_LOOOP(float settemp) { PID_data[0][3]=settemp; //Ñ¡³ö×î´óÖµ¡¢×îСֵ V_IN_A_MIN_old = V_IN_A_MIN; V_IN_A_MAX = 0; V_IN_A_MIN = 5000; V_OUT_A_MAX = 0; V_OUT_A_MIN = 5000; I_OUT_A_MAX = 0; I_OUT_A_MIN = 5000; for(i=0;i<120;i++) { if(V_IN_A_MAXADC_LB_data[i][0]) { V_IN_A_MIN = ADC_LB_data[i][0]; } if(V_OUT_A_MAXADC_LB_data[i][4]) { V_OUT_A_MIN = ADC_LB_data[i][4]; } if(I_OUT_A_MAXADC_LB_data[i][6]) { I_OUT_A_MIN = ADC_LB_data[i][6]; } } /////////////////////////////////////// // //  µçѹ»·PIDµ÷½Ú // /////////////////////////////////////// if((V_IN_A_MAX - V_IN_A_MIN_old)*1000 > 20) { PID_data[0][6] = V_OUT_A_MAX - V_OUT_A_MIN;  integral_old[0] = PID_data[0][4]; PID(PID_data,0); sin_buff = PID_data[0][7]; if((float)(sin_buff * (V_IN_A_MAX - V_IN_A_MIN_old)) >= (float)0.95) { PID_data[0][4] = integral_old[0]; //GPIOPinWrite(GPIO_PORTD_BASE, GPIO_PIN_6, GPIO_PIN_6); sin_buff = (float)0.95/(V_IN_A_MAX - V_IN_A_MIN_old); } if((I_OUT_A_MAX - I_OUT_A_MIN)*1000 > I_OUT_A_MAX_CONFIG) { if(sin_1 > sin_buff) { sin_1 = sin_buff; } else { PID_data[0][4] = integral_old[0]; } } else { sin_1 = sin_buff; } //sin_1 = 5; //sin_1 = sin_buff; } else { sin_1 = 0; PID_data[0][4] = 0; PID_data[0][5] = 0; } /* //ʾ²¨Ëã·¨ OLED_Clear(); for(i=0;i<120;i++) { BUFF[0] = (u32)((float)(ADC_LB_data[i][0]-A1_MIN)*1000); OLED_DrawPoint(i+1,30-BUFF[0]/18,1); } OLED_ShowNum(50,40,A1_MAX_temp*1000,4,8,1); OLED_ShowNum(50,50,A1_MIN_old*1000,4,8,1); OLED_ShowNum(5,40,V1_MAX_temp*1000,5,8,1); OLED_ShowNum(5,50,PID_data[0][2]*1000,5,8,1); OLED_ShowNum(90,50,(A1_MAX_temp - A1_MIN_old) * sin_1*100,5,8,1); //OLED_ShowNum(90,50,sin_1*100,5,8,1);*/ } void I_LOOOP(float settemp) { PID_data[0][3]=settemp; //Ñ¡³ö×î´óÖµ¡¢×îСֵ V_IN_A_MIN_old = V_IN_A_MIN; V_IN_A_MAX = 0; V_IN_A_MIN = 5000; I_IN_A_MAX = 0; I_IN_A_MIN = 5000; V_OUT_A_MAX = 0; V_OUT_A_MIN = 5000; I_OUT_A_MAX = 0; I_OUT_A_MIN = 5000; for(i=0;i<120;i++) { if(V_IN_A_MAXADC_LB_data[i][0]) { V_IN_A_MIN = ADC_LB_data[i][0]; } if(I_IN_A_MAXADC_LB_data[i][2]) { I_IN_A_MIN = ADC_LB_data[i][2]; } if(V_OUT_A_MAXADC_LB_data[i][4]) { V_OUT_A_MIN = ADC_LB_data[i][4]; } if(I_OUT_A_MAXADC_LB_data[i][6]) { I_OUT_A_MIN = ADC_LB_data[i][6]; } } /////////////////////////////////////// // //  µçÁ÷»·PIDµ÷½Ú // /////////////////////////////////////// if(settemp*1000 > 20) { GPIOPinWrite(GPIO_PORTD_BASE, GPIO_PIN_6, 0); PID_data[0][6] = I_OUT_A_MAX - I_OUT_A_MIN;  integral_old[0] = PID_data[0][4]; PID(PID_data,0); sin_buff = PID_data[0][7]; if((float)(sin_buff * (I_OUT_A_MAX - I_OUT_A_MIN)) >= (float)0.95) { PID_data[0][4] = integral_old[0];  //GPIOPinWrite(GPIO_PORTD_BASE, GPIO_PIN_6, GPIO_PIN_6); sin_buff = (float)0.95/(I_OUT_A_MAX - I_OUT_A_MIN); } if((V_IN_A_MAX - V_IN_A_MIN_old)*1000 > V_OUT_A_MAX_CONFIG) { if(sin_1 > sin_buff) { sin_1 = sin_buff; } else { PID_data[0][4] = integral_old[0];  } } else { sin_1 = sin_buff; } //sin_1 = 5; //sin_1 = sin_buff; } else { sin_1 = 0; PID_data[0][4] = 0; PID_data[0][5] = 0; GPIOPinWrite(GPIO_PORTD_BASE, GPIO_PIN_6, 1); } /* //ʾ²¨Ëã·¨ OLED_Clear(); for(i=0;i<120;i++) { BUFF[0] = (u32)((float)(ADC_LB_data[i][0]-A1_MIN)*1000); OLED_DrawPoint(i+1,30-BUFF[0]/18,1); } OLED_ShowNum(50,40,A1_MAX_temp*1000,4,8,1); OLED_ShowNum(50,50,A1_MIN_old*1000,4,8,1); OLED_ShowNum(5,40,V1_MAX_temp*1000,5,8,1); OLED_ShowNum(5,50,PID_data[0][2]*1000,5,8,1); OLED_ShowNum(90,50,(A1_MAX_temp - A1_MIN_old) * sin_1*100,5,8,1); //OLED_ShowNum(90,50,sin_1*100,5,8,1);*/ } /*  * SPIЭÒé byte0   > command *           byte1-2 > length * byte3-* > data */ void send_data(void) { u32 DACC = 0; static u8 time = 0; #define MAX_TIME 2 switch(time) { case 0: { //²¨ÐÎÊý¾Ý·¢ËÍ data[0] = 0; *((u16 *)(&data[1])) = 120*4*4+4; buff = (u32 *)(&data[3]); for(i=0;i<120;i++) { *buff = (u32)((float)(ADC_LB_data[i][0]-V_IN_A_MIN_old)*1000)/5; buff += 1; } for(i=0;i<120;i++) { *buff = (u32)((float)(ADC_LB_data[i][0]-V_IN_A_MIN_old)*1000)/5; buff += 1; } for(i=0;i<120;i++) { *buff = (u32)((float)(ADC_LB_data[i][0]-V_IN_A_MIN_old)*1000)/5; buff += 1; } for(i=0;i<120;i++) { *buff = (u32)((float)(ADC_LB_data[i][0]-V_IN_A_MIN_old)*1000)/5; buff += 1; } spi_write_buf(0, (uint8_t *)data, *((u16 *)(&data[1]))); } case 1: { //PIDÊý¾Ý·¢ËÍ data[0] = 1; *((u16 *)(&data[1])) = 60+4; buff = (u32 *)(&data[3]); for(i=0;i<8;i++)  { DACC = (u32)(PID_data[0][i]*1000); *buff = DACC;  //0-7 P I D buff += 1; } DACC = (u32)((V_IN_A_MAX - V_IN_A_MIN_old) * sin_1*1000); *buff = DACC;   //8 buff += 1; DACC = (u32)(SIN*1000); *buff = DACC;   //9 buff += 1; DACC = (u32)((I_OUT_A_MAX - I_OUT_A_MIN)*1000); *buff = DACC;   //10 buff += 1; DACC = (u32)Y_Y; *buff = DACC;   //11 buff += 1; DACC = (u32)MOD; *buff = DACC;   //12 buff += 1; DACC = (u32)MOD_EN; *buff = DACC;   //13 buff += 1; DACC = (u32)FAC; *buff = DACC;   //14 buff += 1; spi_write_buf(0, (uint8_t *)data, *((u16 *)(&data[1]))); } } time++; if(time >= MAX_TIME) { time = 0; } } /* 1. ½»»¥º¯Êý 2. ¸ù¾Ý°´¼üÇý¶¯Êý¾Ý 3. Ñ¡Ôñģʽ ¸Ä±ä²ÎÊý */ void Config_Data(void) { if(key_num[1] == 1) { if(FAC >= 10) FAC /= 10; key_num[1] = 0; }else if(key_num[2] == 1) { if(FAC < 1000) FAC *= 10; key_num[2] = 0; } ///////////////////////////// if(MOD_EN == 0) { if(key_num[0] == 1) { key_num[0] = 0; MOD_EN = 1; } if(MOD + Key_B == 255) { MOD = 9; Key_B = 0; } else if(MOD + Key_B == 10) { MOD = 0; Key_B = 0; } else { MOD += Key_B; Key_B = 0; } } else { switch(MOD) { case 0: { if(key_num[0] == 0) { if(Key_B != 0) { SIN += (float)0.001*(float)Key_B*FAC; Key_B = 0; } } else { Key_B = 0; key_num[0] = 0; MOD_EN = 0; } } break; case 1: { if(key_num[0] == 0) { if(Key_B != 0) { GPIOPinWrite(GPIO_PORTD_BASE, GPIO_PIN_6, 1); if(Y_Y + Key_B >= 0) Y_Y += Key_B*(int)FAC; Key_B = 0; TimerDisable(TIMER2_BASE, TIMER_A); sin_timer_init(); GPIOPinWrite(GPIO_PORTD_BASE, GPIO_PIN_6, 0); } } else { Key_B = 0; key_num[0] = 0; MOD_EN = 0; } } break; default: MOD_EN = 0; break; } } } void parallel_start() { double KalmanFilter_Data[2][6] = { {1,600}, {1,100}, }; delay_ms(2000); sys_init(); //OLED_Init(); spi_init(); adc0_init(); get_adc(0,1); Spwm_3_120_init(); tim0_in_init(1,1); Key_init(); while(1) //803 930 {        //798 926 T++; KalmanFilter((double)((V_IN_A_MAX - V_IN_A_MIN_old)*SIN),KalmanFilter_Data[0]); V_LOOOP(KalmanFilter_Data[0][4]); //OLED_ShowNum(90,40,T,5,8,1);  //OLED_Refresh(); if(GPIOPinRead(GPIO_PORTA_BASE, GPIO_PIN_4)) { send_data(); } Key_Scan(); Config_Data(); delay_ms(2); if(T%20 == 0) GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_6, GPIO_PIN_6); else GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_6, 0); } } #endif ``` - - - ### 图片 ![image.png]Place![image.png] ![image.png] ![IMG_1399.JPG] ### Demo video- - -

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-11 00:33:14

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号