Design of software for three-phase solar inverter grid connected system

This article mainly introduces the mathematical model, control algorithm, and hardware circuit design of the control system. We will explain in detail the software design of the three-phase solar inverter grid connected system. By programming and burning it in the DSP control chip, we can achieve the functions of each function.

CCS is a three-phase solar inverter grid connected software environment required for DSP development. It integrates functions such as editing, compiling, linking, simulation, hardware debugging, and real-time tracking. The main functions are as follows:

(1) With a visual code editing interface, it can directly write C and. cmd files.

(2) With code generation function, it can integrate editing, compilation, linking, and modulation into one environment.

(3) Basic debugging tools have functions such as loading and executing code, viewing memory, variable windows, etc., and support C source code debugging.

(4) The breakpoint tool can set hardware breakpoints, three-phase solar inverter grid connection software breakpoints, and conditional breakpoints during the debugging process.

(5) Analysis tools include simulators and simulators.

(6) A data graphic display tool that can display the calculation results in graphics. Each function has a corresponding graphic attribute dialog box, and various parameters for displaying graphics can be set.

(7) Provide GEL tools that allow you to write your own control panel using the GEL extension language, making it more convenient and intuitive to modify variables, configure parameters, and more.

We need to use CCS to complete the software design and system hardware debugging of the three-phase solar inverter grid connection, including sampling program, phase-locked program, SVPWM generation program, and so on.

1. Main program and interrupt service program design

The main program is responsible for initializing the registers, I/O ports, variables, AD, and EVA of the entire system, as well as setting system interrupts and loops.

After powering on the DSP, it first initializes functions such as registers, variables, interfaces, and transaction managers. Then, it starts the interrupt service and waits for the program.

2. Programming of phase-locked loop

When the rising edge of the synchronization signal is captured, the capture interrupt service starts and the counter value is assigned to cnt 2. The difference between cnt 2 and the previous cycle’s cnt 1 value can obtain the corresponding frequency. If the frequency is between 49 Hz and 51 Hz, we update the frequency value and point the sine pointer to 0. The value of cnt 2 is assigned to cnt 1 for the next calculation. If the frequency is not within the range, no change is needed.

3. Control algorithm program design

This article adopts a dual closed-loop control strategy, with PI regulation and repetitive control used in the inner and outer loops. The voltage loop adjusts the DC side voltage and, after PI calculation, serves as the reference value for the d-axis inner loop current. The current loop compares the d-axis current with the reference value and obtains the voltage phase difference through PI adjustment. AD samples the two voltages as AB phase and C phase, which can be calculated. Space vector angle sin θ Follow COS θ It can be transformed into αβ The axis component is calculated.

Mainly designed the hardware and software of three-phase grid connected solar inverters, as well as calculated the parameters of filtering capacitors and inductors. An introduction was given to the main control chip TMS320F2812, as well as the introduction to the CCS software development environment for three-phase solar inverters connected to the grid. The design of relevant hardware circuits and the implementation of control methods in the three-phase solar inverter grid connection software, as well as the programming, have laid the foundation for hardware debugging.

Scroll to Top