Implementation of the hottest three-phase inverter

2022-08-12
  • Detail

Implementation of three-phase inverter based on DSP

inverter can provide users with high-quality AC power supply. At present, due to the continuous innovation of new technologies and processes, the technical performance indicators of the inverter have been significantly improved. However, at present, most of the general frequency converters in the market are of constant voltage frequency ratio, which can not meet the needs of special occasions. This topic designs a frequency converter whose frequency and voltage can be stepped separately. It adopts DSP chip TMS320F2812 and advanced MOSFET driven pulse width modulation technology to improve the reliability of the inverter and meet special needs

1. System scheme and hardware circuit

the output frequency of this system is required to be 20 ~ 200Hz, and the frequency and voltage can be stepped. When using SPWM control algorithm, the voltage utilization rate can only reach about 0.75 (the effective value of AC is higher than that of DC voltage). Depending on the specific requirements, the boost circuit can be added in advance

the main function of this design is to output stable three-phase sine wave under the condition of electric voltage fluctuation, and it is required that the frequency and voltage can be stepped, and the effective value of frequency and voltage can be displayed at the same time. The system block diagram is shown in Figure 1. The rectifier and filter circuit adopts diode full wave rectification and large capacitance filtering. The main inverter circuit adopts the classic three-phase full bridge inverter circuit, selects fast recovery diode freewheeling, and the load is three-phase symmetrical load. The main circuit is shown in Figure 2

the following focuses on the isolated drive circuit. The photoelectric isolation circuit is shown in Figure 3. The DSP output signal is 3.3V, and the driving ability is poor. Add a non gate to drive. The optocoupler adopts high-speed optocoupler 6n135, with a nominal speed of 1m. In the figure above, ini is the signal output by DSP, and the ground of DSP signal is separated from the ground of optocoupler. DSP outputs a total of 6 PWM signals to drive 6 switches

the driving circuit diagram is shown in Figure 4. The main circuit adopts the fully controlled device MOSFET irfp460, which can withstand 500V and can withstand 20A current at most. The device is internally connected in parallel with the freewheeling diode (not shown on the circuit diagram). The drive chip adopts IR2130 of International Rectifier company, which is specially used to drive IGBT and n-channel MOSFET. It is internally designed with over-current, over-voltage and under voltage protection, blocking and indication networks, so that users can easily protect the driven power tube. In addition, the ingenious application of internal bootstrap capacitor technology makes it suitable for high-voltage systems. It can also generate micro second interlocking delay time for the gate drive signals of two power devices above and below the same bridge arm. The circuit design also ensures that the internal three channel high-voltage side driver and low-voltage side driver can be used alone, and it is also more cost-effective to adopt this system to transform the building than the traditional method. Its internal three low-voltage side drivers, and the input signal is compatible with TTL and COMS levels

the output signal passes through the inverter to the optocoupler. When the DSP outputs a high level, the optocoupler outputs a low level, IR2130 outputs a high level, and irfp460 turns on. On the contrary, when the DSP outputs a low level, irfp460 turns off. The on-off of six power tubes can be controlled by outputting PWM wave from DSP to realize the inverter function

this system requires to display the frequency. This problem can be well solved by capturing the structure of the equipment and using the situation unit. The input capture unit can be used to accurately capture the occurrence of an external event and assign an event tag to it. When the potential of the capture pin changes (rising edge or falling edge), the input capture will be excited, and the value of the counter will be recorded, and an interrupt will be generated at the same time. When the next jump comes, DSP still records the value of the counter. The cycle is calculated by multiplying the difference between the two counter values by the counting clock frequency. The acquisition and calculation of frequency are realized in the acquisition interrupt

2. SPWM control algorithm and step of frequency amplitude

the principle of generating SPWM wave is: compare a group of isosceles triangular waves with a sine wave, and the intersection time (i.e. the intersection point) is taken as the "on" or "off" time of the switch tube. This group of isosceles triangular waves is called carrier wave, and the sine wave is called modulation wave (as shown in Figure 5). The frequency and amplitude of the sine wave are controllable. Changing the frequency of the sine wave can change the frequency of the output voltage of the power supply, change the L old value of the sine wave, and also change the intersection of the sine wave and the carrier wave, so that the width of the output pulse series changes. 1. Preface change the size of the output voltage of the power supply

PWM is realized by using DSP's event manager. The carrier is the value of DSP's counter. By setting it to the continuous increasing and decreasing mode, changing the value of the periodic register can change the frequency of the carrier. The realization of modulated wave is to solidify a sine function table (the number of sine points is determined by your control accuracy). In DSP, the sine table is generated by regular sampling method. The value of the comparison register (the value of the sine table multiplied by the value of the periodic register) is set through the sine table to make the PWM duty cycle change according to the sine law. If you want to change the frequency, you can change the PWM cycle. If you want to change the kurtosis of L, you can multiply it by a coefficient on the sine table. Controlling the change of PWM cycle can realize the step of frequency; The step of amplitude can be achieved by multiplying the sine table by a suitable coefficient. The final output frequency of this design is 20 ~ 100Hz, 240 points can be output below 50Hz, and 120 points (multiple of 3) can be output above 50Hz, so that the distortion can be guaranteed to be within 5% and the harmonic coefficient is small

in order to improve the output quality and reliability of PWM, PWM of some analog circuits and digital circuits are realized through special integrated circuit chips, but these chips are relatively expensive and unstable. This design adopts the comparison unit in the event manager module of Texas Instruments TMS320F2812, and outputs high-precision three-phase PWM waveform through regular sampling SPWM algorithm, so as to realize the SPWM control of the inverter. The experiment shows that this method is simple and feasible

when designing the software, reload the value of the comparison register when the counter comparison is interrupted, so as to ensure that the comparison interrupt will not be missed, and the implementation is relatively easy. The value of the comparison register is obtained by the PL algorithm. The mechanical equipment obtained by the PL algorithm is essentially the same to obtain a suitable duty cycle, and the value of the comparison register is obtained by multiplying the value of the periodic register

3. Software design

there are many places where interrupts are used in this design, which is realized by interrupts, which greatly saves the resource cost of cup. The flow chart of the main function is shown in Figure 6

multiple interrupts for reading and displaying key values. The reason why SPI is used to communicate with 7289 is that DSP is a high-speed device and 7289 is a low-speed device. If direct communication will greatly waste resources, DSP peripherals are used to communicate with it. When a key is pressed, the external interrupt is started. In the external interrupt, SPL is started to send keyboard reading instructions, and the key value is read in SPI receiving interrupt. Sending display commands and data is also realized through SPI, which greatly saves DSP resource overhead

due to the fluctuation of electricity, the output three-phase AC is required to be stable, and the frequency and voltage can be stepped, so the PI algorithm is adopted to stabilize its output. The input of PI algorithm is the difference between the set value and the actual measured value, and the output is the duty cycle of PWM

the key code is as follows:

if (ERR deadband | | - deadband) 11 set its action range

{pterm=pgain*err;//the proportional term

if (pterm 0.5 | | | - pterm -0.5)//the set range

integral=0.0;

{integral+=igain*err;//the integral term

if (integral 0.9)//integral range

integral=0.9:

else if (integral 0.0) integral=0.0;}

result=pterm+integral; }//Result output

if (result 0) result=0

if(result 1) result=1;

4. Test waveform and conclusion

the practice shows that this scheme is feasible and the system operates stably. Set the wave making frequency to 50Hz through the keyboard, and measure the pwmi/CMPI pin with a digital indicator. The experimental waveform is shown in Figure 7

Copyright © 2011 JIN SHI