桂花蒸

2021 Question B-Three-Phase Rectifier-PowerOnP03 Team

 
Overview
1. Foreword: Title B of this competition is three-phase rectifier circuit. This solution uses a three-phase rectifier circuit cascaded with Buck converter, and uses STM32F407VET6 microcontroller as the controller of the rectifier and Buck converter to realize three-phase AC-DC conversion. The rectifier controller uses a digital phase-locked loop for phase locking, and uses dq transformation and PI control algorithm to control the voltage amplitude and phase stability of the rectifier. This circuit can work stably under rated working conditions, with stable output voltage, load regulation rate and voltage regulation rate both less than 0.1%. The overall efficiency of the machine at the national test site can reach 95.9%, the input side power factor can reach 0.998, and it can Adjustable within the range of ±0.70~1.00. At the same time, the system has overvoltage and overcurrent protection and friendly human-computer interaction functions.
2. Team introduction: Our team has two level 18 and one level 20 team members. The team leader responsible for the main circuit is a superb welder and is good at designing inductors, selecting capacitors, and the layout and line connections of the entire circuit board. He is responsible for programming and joint debugging. The programmers are proficient in C language, have a complete program framework, are familiar with STM32 configuration, and can quickly code efficient codes. The hardware engineers in charge of the modules are good at the production of various measurement modules, auxiliary power modules, and drive circuit modules, and can provide the team with reliable module circuits. .
3. Project analysis: Design and produce the three-phase AC-DC conversion circuit shown in Figure 1. The DC output voltage U o of this circuit should be stable at 36V , and the DC output current I o rating is 2A .
pjoKptMMmF4CgVUseP4sLTUs0HvOgERt9f9YwOey.png
 
1. Basic requirements
(1) When the AC input line voltage Ui=28V and Io=2A, Uo=36V±0.1V.
(2) When Ui=28V and Io changes within the range of 0.1A ~ 2.0A, the load regulation rate SI ≤ 0.3%.
(3) When Io=2A and Ui changes within the range of 23V~33V, the voltage adjustment rate SU ≤ 0.3%.
(4) Under the conditions of Ui=28V, Io=2A, Uo=36V, the efficiency η of the AC-DC conversion circuit is not less than 85%.
2. Performance part (1) 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.
(2) Under the conditions of Ui=28V, Io=2A, Uo=36V, the efficiency η of the AC-DC conversion circuit is not less than 95%.
(3) 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.
(4) Others.
After getting the question, I compared question B and question C and chose question B (optional), and then selected the three-phase PWM rectifier cascade Buck circuit scheme. Considering the efficiency requirements, I adopted a non-isolated scheme and used dq The conversion performs phase locking and voltage control of the rectifier circuit.
4. Schematic circuit analysis:
The system includes a three-phase rectifier, Buck conversion circuit, auxiliary power circuit, drive circuit, measurement circuit, and single-chip microcomputer control circuit and display circuit. This system adopts a double-loop control method of voltage outer loop and current inner loop for closed-loop control. It can well realize three-phase rectification and power factor adjustment functions, output stable DC power, and the auxiliary power circuit supplies power to the drive circuit, measurement circuit, control circuit, etc. This system uses PID controller to perform voltage and current double closed loop. The display circuit can provide a good human-computer interaction interface and has an over-current protection
warning function. The overall block diagram of the system is shown in the figure.
9TXnWUDpva67rmdH7l0vMRsyLFU4knxwhTZBKreP.png
The main circuit uses a three-phase rectifier circuit, and a Buck step-down circuit is connected to the rear stage. The main circuit schematic diagram of the system is shown in the figure.
cvvcc0M8HEUlLP2AE77wQTlbal4akfaWVRmT5ECV.png
Switch tube selection:
The switch tube's withstand voltage and conduction current are the rectifier output voltage and current, which are 50V and 2A respectively. There should be a margin when selecting the switch tube. At the same time, in order to reduce the loss of the system, the switching loss and conduction loss of the switch tube need to be comprehensively considered. Infineon's IRF540NPbF was finally selected. Its maximum withstand voltage is 100V, it can conduct 7.5A current, and its on-resistance is 44mΩ. The input capacitance is 1960pF and the output capacitance is 250pF.
Filter parameter design
(1) Input AC side inductance parameter calculation
The value of the system's AC inductance not only affects the dynamic and static performance of the system, but also affects other factors such as the input current waveform. Increasing the inductance value can suppress the harmonics of the AC side current, but it will affect the rapidity of current tracking. So a suitable inductor value should satisfy two conditions. First, the rapidity of current tracking should be ensured. Second, the harmonic size of the inductor current should be ensured within the allowable range. Based on the above two conditions, the value range expression of the AC side inductance can be calculated as:
ShWHT8BUx3dM9RNV2vorawKHGw3CwwblLuo2ihYu.png
The DC side output voltage Uo is 50V, and the switching frequency fs of the switching tube is 48kHz. Calculate the current ripple according to the input current harmonic distortion rate of 2%, Uipp is the peak-to-peak value of the AC side voltage, and Im is the peak value of the input current reference current. Putting the above parameters into the above formula, we can get the inductance value 214uH≤L1≤568uH. Select the AC side inductor L1=290uH, and use an iron-silicon-aluminum magnetic powder core and 2 strands of parallel-wound 0.7mm enameled wire to wind the inductor.
(2) Calculation of DC capacitance parameters measured at rectifier output
The process of charging and discharging is always repeated on the DC capacitor. In order to control the pulsation size of the bus voltage within a certain range, the value of the DC side capacitor cannot be too small. Considering the response speed of the bus voltage, the value of the DC capacitor cannot be too large. The reference range of DC side capacitance is as follows:
xcnvqTjguD2At1wI7uk59L7k5LoaGSdGNBFKlF7Y.png
Among them, △Um*=0.01 is the bus voltage ripple rate, RL=18Ω, which is the equivalent resistance obtained from the rectifier output power. The rise time tr of the output DC voltage from the initial value to the rated voltage is 40ms. Putting the above parameters into the above formula, we can get the capacitance value 1670μF<C<4324μF, and the actual DC capacitance is 2200uF.
(3) Calculation of output DC side inductance parameters.
The DC input voltage of Buck is 50V, the output voltage is set to 36V, and the calculated duty cycle D=0.72. The Buck inductance calculation formula is as follows:
2IL4jzrMYUWLwp9Ea9NQaakCEDIORpRe1xVYK5L3.png
Among them, the duty cycle D=0.72, the output DC voltage Uo=36V, the inductor current Id=2A, the inductor current ripple rate rd=0.3, the modulation wave frequency fc=20kHz, put the above parameters into the above formula, the inductor value L2 can be obtained =605uH. In practice, a margin is left and the inductor value is 980uH. The inductor is wound using an iron-silicon-aluminum magnetic powder core and 2 parallel-wound 0.7mm enameled wires.
5. PCB design analysis: The power lines should be as wide as possible, and the GND should be laid with copper. There are no high-frequency signals in the direction of power electronics. Just pay attention to the signal lines.
6. Physical display:
The upper end of the circuit board in the picture is the input terminal, and the lower end is the output terminal. The upper left corner of the picture is the button keyboard, which is used to set the power factor. The microcontroller serves as the main controller to complete the control of the system and takes power from the front-stage output bus as an auxiliary power supply. Provides power to the measurement module, microcontroller and drive module.
The actual picture shows that the overall size is small and the layout is neat. Gray cables and pins are used to connect the main circuit and controller to ensure the reliability of the contact.
7. Assembly of the work: The length and width of the main circuit are about 30 (cm) * 30 (cm), the controller is about 10 (cm) * 10 (cm), and the keyboard is about 7 (cm) * 12 (cm).
8.程序设计:本系统采用软件锁相环对电压信号进行锁相,采用电压外环控制、电流内环控制的控制思路,对系统进行闭环控制,从而使系统具备良好的功能,下图为本系统控制框图。
7WR8I6lE8EkxOQKmS2TlhXMLJMY8bv2hjnV7OTRT.png
功率因数调整方法
三相电压Ua、Ub、Uc 经过坐标变换后得到直流分量Ud、Uq,当锁相成功时,Uq 值为0,若Uq 值存在误差,则将Uq 与参考值0 比较,再将产生的误差信号经过PI 调节器得到ωerr ,再通过与电网理论角频率相加,并经过积分器得到相位θ,该相位即为坐标变换所需要的三角函数相位值。最终可以实现整个锁相环的闭环控制。实现过程如图所示。
PrlfVNJxSQEf75Hpoj6e0Lgo5P3tuReZCSMnI68o.png
稳压控制方法
本系统采用电压外环、电流内环的控制方案。采样母线端电压Udc 与母线参考电压U*dc_ref 求偏差进行PI 闭环,得到Ia 参考电流I*d_ref,Ua,b,c 为ABC 三相的相电压,采样Ua,b,c,经过锁相环获得A 相基波角度。利用abc/dq 坐标变换模块,将三相电压与三相电流分别进行坐标变换得到Ud、Uq 电压分量和id、iq 电流分量。将id 电流分量与参考电流i *d_ref 进行PI 的所得值与Ud 分量计算获得指令调制电压U*d 将电流分量iq 与参考电流值i*q_erf 进行PI 的所得值与uq 分量计算获得调制电压U*q 将所得调制电压经过dq/αβ变换模块获得U*α,U*β,输入SVPWM 模块判断扇区位置,调制输出PWM 驱动信号,驱动开关管构建目标矢量。其中,双闭环控制策略框图如下。
jNbwqj48BR9UMMEOSvDlsHTiJC7HSM2pX5ngKynk.png
9.部分程序解读

      以下代码为控制中断中的代码,中断频率为20kHz, 首先进行有效值计算用来计算输入电压有效值,做过压保护,然后利用ADC-DMA进行采样,得到输出电压、输入电压及输入电流,并进行dq变换,之后利用PID做控制器,并加入前馈从而实现稳压控制。红色字体为额外说明

        time_count++;
        sum_u_a+=adc_6ch.nowI1*adc_6ch.nowI1;        
        if(time_count==400)计算有效值
            {        
                time_count=0;                
                I_a=sqrt(sum_u_a*0.0025f);//
                sum_u_a=0;//
            }
        if(I_a>1.1f)对参考电压做修正
        {
            U_out.U_ref = 36.26f;
        }
        else
        {
        U_out.U_ref = 36.13f;
        }
            
        ADC_Process_6CH(); 获取采样值

        U_out.U_now = adc_6ch.nowUo;    
        
        U_in.theta = theta;获取锁相环输出值
        I_in.theta = theta;
        
        U_in.sin_value = arm_sin_f32(U_in.theta);
        U_in.cos_value = arm_cos_f32(U_in.theta);
        I_in.sin_value = U_in.sin_value;
        I_in.cos_value = U_in.cos_value;
        
        U_in.ab = adc_6ch.nowU1;
        U_in.bc = adc_6ch.nowU2;
        U_in.ca = - adc_6ch.nowU2 - adc_6ch.nowU1;
        
        //线电压转相电压
        U_in.a =  0.3333333f * U_in.ab - 0.333333f * U_in.ca;
        U_in.b =  0.3333333f * U_in.bc - 0.333333f * U_in.ab;
        U_in.c =  0.3333333f * U_in.ca - 0.333333f * U_in.bc;
        
        abc_to_dqz(U_in.a,U_in.b,U_in.c,U_in.theta,&U_in.d_now,&U_in.q_now,&U_in.z_now);得到电压dq值
        
        I_in.a = - adc_6ch.nowI1;
        I_in.b = - adc_6ch.nowI2;
        I_in.c = adc_6ch.nowI1 +adc_6ch.nowI2;
        
        abc_to_dqz(I_in.a,I_in.b,I_in.c,I_in.theta,&I_in.d_now,&I_in.q_now,&I_in.z_now);

        U_in.d_now = 0.999f*U_in.d_last + 0.001f*U_in.d_now;
        U_in.q_now = 0.999f*U_in.q_last + 0.001f*U_in.q_now;
        
        U_in.d_last = U_in.d_now;
        U_in.q_last = U_in. q_now;    
        
        //Set reference value         
        setPIDTarget(&PID_U, U_out.U_ref); Perform pid closed loop
        I_in.d_ref = LocPIDCalc(&PID_U,U_out.U_now);
        setPIDTarget(&PID_Id, I_in.d_ref);
        
        
        setPIDTarget(&PID_Iq, I_in.q_ref);
        //Perform PID calculation on D and Q, and output the duty cycle under rotating coordinates 
        I_in.d_duty = - LocPIDCalc(&PID_Id,I_in.d_now);
        I_in.q_duty = - LocPIDCalc(&PID_Iq, I_in.q_now);

        //Use feedforward to decouple dq and calculate the midpoint voltage of the board bridge 
        U_in.d_duty = I_in.d_duty + U_in.d_now + 314.15926f*inductance*0.000001f*I_in.q_now;//Calculate the expected midpoint voltage of the half-bridge
        U_in.q_duty = I_in.q_duty + U_in.q_now - 314.15926f*inductance*0.000001f*I_in.d_now; Add feedforward

        arm_sqrt_f32((U_in.d_duty*U_in.d_duty)+(U_in.q_duty*U_in.q_duty),&U_R);

        if(sw.lastPWM_on != sw.PWM_on) clear pid
        {
            sw.lastPWM_on = sw.PWM_on;
            PIDClear(&PID_Id);
            PIDClear(&PID_Iq);
            PIDClear(&PID_U);
        }
        
        if(PLL_Locked == 1&& sw.PWM_on == 1) 
            TIM_CtrlPWMOutputs(TIM1,ENABLE);
        else 
            TIM_CtrlPWMOutputs(TIM1,DISABLE);
    
        if(lastpll != PLL_Locked || sw.PWM_on == 0) clear pid
            {
                lastpll = PLL_Locked;
                PIDClear(&PID_Id);
                PIDClear (&PID_Iq);
                PIDClear(&PID_U);
            }
        if(U_out.U_now>40.f||I_a>3.f)//
            protect_sta=0;
        
        if(duty<2000)
        SVPWMmodulation(U_R,U_out.U_now/0.85f, theta+atanf(U_in.q_duty/U_in.d_duty)); Use SVPWM modulation
        else if(duty>2000)
        SVPWMmodulation(U_R,U_out.U_now/0.72f,theta+atanf(U_in.q_duty/U_in.d_duty));
        
        if (U_in.d_now<24.3f && U_in.d_now>22.5f)
            duty = 1260;
        else duty = 2352;
        
        if(lock == 1 )
            duty = 2352;
        
        TIM_SetCompare2(TIM8,duty);
      TIM_ClearITPendingBit(TIM1,TIM_IT_Update);

10. Summary
The PI parameters of the current loop are difficult to adjust. Keep in mind the parameter adjustment principles and avoid floating too much at one time.
Once the plan is confirmed, the hardware can be started.
Attached is a code document demonstration video
 
 
 
 
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-23 13:03:05

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号