Solar Inverter Controller Design Using DSP28335 and Dual ARM

In this article, I present a comprehensive design of a solar inverter control system based on a digital signal processor TMS320F28335 (DSP28335) and two ARM microcontrollers. The proposed architecture adopts a “DSP28335 plus dual ARM” configuration to meet the growing demands of modern solar inverter applications, including real-time control, communication, fault handling, and human-machine interaction. I first analyze the functional division among the three processors, then describe the hardware architecture and the key circuits such as current conditioning, gate driving, overcurrent protection, and zero-crossing detection. I also detail the software design for the DSP and the two ARM processors, including maximum power point tracking (MPPT), voltage and current dual-loop control, and phase-locked loop (PLL) synchronization. Finally, I verify the feasibility of the designed controller on a 10 kW solar inverter prototype. Experimental results demonstrate that the solar inverter produces stable three-phase sinusoidal voltages, synchronizes the grid current with the grid voltage in both frequency and phase, and maintains a stable average output current. The proposed solar inverter controller proves to be reliable, scalable, and suitable for practical photovoltaic grid-connected systems.

1. Introduction

Photovoltaic (PV) power generation has become increasingly widespread, and the grid-connected solar inverter is one of the most critical components in a PV system. The performance and stability of a solar inverter largely depend on its controller hardware, software architecture, and system control strategy. Traditional controller designs for solar inverters have employed various combinations of DSP, ARM, FPGA, and microcontrollers. However, each approach has inherent limitations. For example, an ARM-only control system may simplify display and communication but often fails to meet the real-time requirements of sophisticated control algorithms. A single DSP controller, on the other hand, may struggle to simultaneously handle complex control strategies and real-time tasks due to limited computational resources. DSP combined with FPGA offers flexible logic design but increases the complexity of debugging and development. The “DSP plus single ARM” architecture is capable of separating control and display tasks, but it may lack sufficient resources when dealing with increasingly complex information processing and communication requirements.

To overcome these issues, I propose a solar inverter controller based on a high-performance DSP28335 chip and two ARM Cortex-M3 based LPC1768 microcontrollers. One ARM acts as a safety and auxiliary monitoring unit, while the other is dedicated to human-machine interaction and communication. This architecture ensures high-speed data processing, precise PWM generation, comprehensive fault protection, and flexible user interface management. The proposed design is highly modular, reusable, and cost-effective, making it an attractive solution for solar inverter products with different power ratings.

2. Overall Hardware Architecture of the Solar Inverter Controller

The overall structure of the solar inverter controller is illustrated in the following block diagram. The DSP28335 serves as the master controller, responsible for core control functions such as data acquisition, PWM signal generation, MPPT, voltage/current loop control, PLL synchronization, fault detection, and relay switching. The first ARM (denoted as ARM_SLAVE) is an auxiliary controller that monitors system temperatures, performs over-temperature judgment, and can block the gate drive signals and relay control signals in case of abnormal conditions. The second ARM (denoted as ARM_LCD) is dedicated to the human-machine interface, receiving user parameters, displaying real-time data, and forwarding settings to the DSP.

The DSP28335 is a floating-point digital signal processor from the C2000 family. It features a 150 MHz CPU, 18 PWM outputs, 16 analog-to-digital converters (ADCs), multiple serial communication interfaces (SCI, SPI, I2C), and enhanced capture (eCAP) modules. These resources are sufficient for implementing the control algorithm of a three-level neutral-point-clamped (NPC) solar inverter. Unlike a dual-DSP solution, which can lead to resource waste and circuit complexity, the DSP+dual ARM architecture optimally balances real-time control and peripheral management.

The ARM_SLAVE has the following responsibilities:

  • Receiving safety thresholds and reference values from the DSP via the SCIC communication interface.
  • Sampling environmental temperature and IGBT module temperature.
  • Performing over-temperature comparisons and sending the results to the DSP.
  • When an abnormal condition is detected, directly latching the relay control signal and blocking the PWM drive signals to ensure safe shutdown of the solar inverter.

The ARM_LCD performs the following tasks:

  • Initializing the display screen and user interface.
  • Allowing the user to set operating parameters and safety standards.
  • Receiving real-time data, operational status, and fault information from the DSP via the SCIA interface.
  • Displaying voltages, currents, powers, temperatures, frequencies, and status messages on the screen.

Table 1 summarizes the functional allocation of the three processors in the solar inverter controller.

Processor Primary Role Key Functions
DSP28335 Master control Data sampling and conversion; PWM gate signal generation; MPPT; voltage/current loop control; PLL; fault detection and protection; relay control; communication with ARM_LCD and ARM_SLAVE
ARM_SLAVE Auxiliary safety Temperature sensing; over-temperature judgment; latching of drive and relay signals; reporting fault information to DSP
ARM_LCD Human-machine interface User parameter setting; real-time data display; fault and status display; forwarding settings to DSP

3. Main Circuit Topology of the Solar Inverter

The solar inverter adopts a two-stage topology. The first stage is a three-level Boost converter that raises the photovoltaic panel voltage to a level suitable for grid connection when the input voltage is low. The second stage is a diode-clamped three-level NPC inverter that converts the DC bus voltage into three-phase AC voltages. An LCL filter is placed between the inverter output and the grid to attenuate high-frequency switching harmonics. The main circuit parameters are listed in Table 2.

Component Symbol Value
Boost inductor L1 0.74 mH
LCL filter capacitor C 6.6 μF
LCL filter inverter-side inductor L2 55 μH
LCL filter grid-side inductor L3 0.86 mH
DC bus capacitors C1, C2 —

The inverter output phase voltages are denoted as \(V_{a0}\), \(V_{b0}\), \(V_{c0}\), the grid currents as \(i_a\), \(i_b\), \(i_c\), and the grid voltages as \(V_a\), \(V_b\), \(V_c\). The control system regulates the grid currents to be sinusoidal and in phase with the grid voltages, achieving unity power factor operation of the solar inverter.

4. Design of Key Hardware Circuits

4.1 Current Conditioning Circuit

For grid current measurement, I used a current sensor with a turns ratio of 1:1000. The secondary current flows through a 100 Ω resistor, producing a small sinusoidal voltage proportional to the measured current. To stabilize the voltage, the signal is fed to an operational amplifier. Since the three-phase grid currents share identical conditioning circuits, I compared the output values of the three-phase current conditioning stages to obtain the maximum and minimum values of the grid currents, denoted as \(I_{\text{gridMAX}}\) and \(I_{\text{gridMIN}}\). The output \(I_{\text{out}}\) is combined with a 1.5 V DC bias voltage as the non-inverting input of a summing amplifier. In the designed 10 kW solar inverter, the RMS output current is 15.15 A, and the peak current ranges from -21.43 A to +21.43 A. After conditioning, the signal falls within 0.071 V to 2.928 V, which is within the input range of the DSP’s ADC.

The transfer function of the conditioning circuit can be expressed as:

$$V_{\text{ADC}} = 1.5 + k \cdot i_{\text{grid}}$$

where \(V_{\text{ADC}}\) is the voltage at the DSP ADC pin, \(i_{\text{grid}}\) is the instantaneous grid current, and \(k\) is the overall scaling factor determined by the sensor ratio and resistor network.

4.2 Gate Drive Circuit

The PWM signals generated by the DSP have low voltage and cannot directly drive power switches. Therefore, a gate drive circuit is necessary to amplify the control signals and provide electrical isolation. I selected the TLP350 optical coupler driver, which supports switching frequencies up to 50 kHz. The drive circuit receives inputs \(Drive\_A\) and \(Drive\_K\) from the DSP and produces outputs \(Drive\_G\) and \(Drive\_S\). When \(Drive\_A\) is low, the internal LEDs are off, and the output applies a reverse voltage to the power switch, turning it off. When \(Drive\_A\) is high and \(Drive\_K\) is low, the LEDs conduct, and the output provides a positive gate-to-source voltage, turning the switch on. The gate drive circuit is critical for the reliable operation of the solar inverter’s power stage.

4.3 Overcurrent Protection Circuit

Overcurrent protection is essential to protect the solar inverter from damage. The overcurrent detection circuit takes the maximum grid current signal \(I_{\text{gridMAX}}\) and converts it to a voltage through a resistor. This voltage is then compared with a 2.5 V DC reference. During normal operation, the comparator output \(SOCP\) is high. When the current exceeds the limit, the voltage becomes greater than 2.5 V, causing \(SOCP\) to go low. This low signal turns on a transistor, raising \(OUTOCP\) to a high level. The \(SOCP\) signal is sent to the DSP, which sets a fault flag and changes the operating state of the solar inverter. Additionally, the \(OUTOCP\) signal is divided into two control signals \(OUTOCP1\_OFF\) and \(OUTOCP2\_OFF\), which are connected to the output-enable pins of buffer chips. These buffers gate the PWM signals for the power switches. When an overcurrent or over-temperature condition occurs, the buffer chips quickly block all gate drive signals, preventing catastrophic failure of the solar inverter.

4.4 Zero-Crossing Detection Circuit

To synchronize the solar inverter with the grid, the phase and frequency of the grid voltage must be detected accurately. I designed a zero-crossing detection circuit that converts the sinusoidal grid voltage into a square-wave signal. This signal is fed to an input pin of the DSP, which samples it at a 20 kHz interrupt rate. The circuit compares the attenuated grid voltage with a 1.5 V reference. When the instantaneous grid voltage is in the positive half-cycle, the DSP sees a low level; otherwise, it sees a high level. The zero-crossing points correspond to the rising or falling edges of this square wave, which are used by the PLL algorithm.

5. Software Design and System Control Strategy

5.1 DSP Program Framework

The DSP software follows a structured sequence. After system initialization, which includes configuring the watchdog, PLL, peripheral clocks, interrupt vectors, GPIO, SCI modules, ADC, ePWM, eCAP, and CPU timers, the DSP reads the user parameters and safety standards from the ARM_LCD through the SCIA interface. It then sends the relevant parameters to the ARM_SLAVE via SCIC. The DSP enters a waiting state and periodically samples the input/output voltages and currents at 20 kHz. The sampled data are used to detect overvoltage and overcurrent conditions. If all parameters are within safe ranges, the system checks the leakage current and the insulation resistance of the photovoltaic panels. When these are acceptable, the Boost converter raises the DC bus voltage to the reference value. The DSP then verifies that the grid-connected relay operates correctly. If no faults are found, the relay is closed, and the solar inverter enters normal operation. During normal operation, the DSP executes MPPT, PLL, and voltage/current loop control, generating PWM signals for the power switches. The DSP also collects real-time data and transmits them to the ARM_LCD for display. If a fault occurs, the DSP disables the PWM outputs. For permanent faults, the system shuts down; otherwise, it returns to the waiting state.

5.2 Maximum Power Point Tracking (MPPT)

The MPPT algorithm combines the constant voltage method and the variable step-size perturb-and-observe method. Initially, the flag \(MPPT\_Const\) is set to 1, and the reference voltage \(V_{\text{ref}}\) is set to \(0.995 V_{\text{open}}\), where \(V_{\text{open}}\) is the open-circuit voltage of the PV array. When \(MPPT\_Const = 1\), the algorithm compares the instantaneous PV voltage \(V_{pv}\) with \(0.8 V_{\text{open}}\). If \(V_{pv}\) is greater, \(V_{\text{ref}}\) is decreased by a step \(V_{\text{step1}}\); otherwise, \(V_{\text{ref}}\) is increased by the same step. Once the reference approaches the maximum power point, the algorithm switches to the variable step-size perturb-and-observe method. In this mode, it compares the PV output power \(P(k)\) and voltage \(V_{pv}(k)\) with the previous values \(P(k-1)\) and \(V_{pv}(k-1)\). The step size is selected based on the power deviation:

$$
\Delta V =
\begin{cases}
V_{\text{step2}}, & |P(k) – P(k-1)| > P_1 \\
V_{\text{step3}}, & |P(k) – P(k-1)| \leq P_1
\end{cases}
$$

where \(V_{\text{step1}} > V_{\text{step2}} > V_{\text{step3}}\). The direction of perturbation is determined by the trend of power change. This hybrid MPPT ensures both fast tracking speed and high steady-state accuracy, which is essential for the efficient operation of the solar inverter.

5.3 Voltage and Current Dual-Loop Control

To inject high-quality sinusoidal currents into the grid, the solar inverter requires a stable DC bus voltage and precise current control. I implemented a voltage outer loop and a current inner loop, as shown in the control schematic. The voltage loop regulates the DC bus voltage \(V_{dc}\) to track the reference \(V_{dc}^{ref}\). The error is passed through a PI controller and a proportional gain \(k_{1p}\) to generate part of the active reference current \(i_{d ref1}\). Another component \(i_{d ref2}\) is derived from power balance between the input and output, the average grid voltage, and a proportional gain \(k_{2p}\). The total active reference current is:

$$
i_{d ref} = i_{d ref1} + i_{d ref2}
$$

The reactive reference current \(i_{q ref}\) is usually set to zero for unity power factor operation. The three-phase grid currents \(i_a, i_b, i_c\) are transformed to the synchronous dq frame using the Park transformation with the phase angle \(\theta_1\) from the PLL. The d-axis and q-axis current errors are processed by PI controllers to produce the dq-axis duty cycles. After inverse transformation, the PWM signals drive the NPC inverter. The LCL filter attenuates the switching ripple, and the solar inverter delivers clean power to the grid.

The voltage and current loop equations can be summarized as:

$$
i_{d ref} = k_{1p}(V_{dc}^{ref} – V_{dc}) + k_{2p} \frac{P_{in}}{V_{g,avg}}
$$

$$
v_d^* = PI(i_{d ref} – i_d)
$$

$$
v_q^* = PI(i_{q ref} – i_q)
$$

where \(P_{in}\) is the input power from the PV array, and \(V_{g,avg}\) is the average grid voltage.

5.4 Phase-Locked Loop (PLL) Control

The PLL synchronizes the solar inverter’s output current with the grid voltage. I used a single synchronous reference frame PLL. The three-phase grid voltages are transformed from the abc frame to the αβ frame and then to the dq frame using the estimated phase angle \(\theta_1\). The q-axis component of the grid voltage is driven to zero by a PI controller, which adjusts the angular frequency. The PLL structure includes a feed-forward term \(W_0\), which is the nominal grid frequency (e.g., 50 Hz), to accelerate locking. The output angular frequency is:

$$
W_1 = W_0 + PI(V_q)
$$

where \(V_q\) is the q-axis grid voltage. The phase angle is obtained by integrating \(W_1\) and applying a modulo \(2\pi\) operation:

$$
\theta_1 = \mathrm{mod}\left( \int W_1 dt , 2\pi \right)
$$

The output frequency \(f_1 = W_1 / (2\pi)\) equals the grid frequency, and the phase \(\theta_1\) equals the grid phase. The PLL ensures that the solar inverter’s output current is exactly in phase with the grid voltage, achieving a high power factor and low harmonic distortion.

6. ARM_SLAVE Software Design

The ARM_SLAVE is responsible for temperature monitoring and redundant protection. After initialization, it first checks whether the system is healthy. It receives safety thresholds from the DSP via SCIC communication. Then it samples the environmental temperature and the IGBT module temperature in real time. The measured temperatures are compared with the predefined limits. If any temperature exceeds the limit, the ARM_SLAVE sends fault information to the DSP and simultaneously latches the relay control signal and the PWM drive signals, directly cutting off the power stage. This redundant protection prevents damage to the solar inverter in cases where the DSP might be overloaded or fail to respond quickly. After a fault is cleared, the system can reinitialize.

7. ARM_LCD Software Design

The ARM_LCD manages the user interface. Upon power-up, the display is initialized, and the user can set parameters such as active power reference, reactive power reference, overvoltage/undervoltage thresholds, overcurrent thresholds, and protection time delays. These settings are sent to the DSP through the SCIA interface. The ARM_LCD continuously receives real-time data from the DSP, including voltages, currents, power, temperature, frequency, operating state, and fault codes. The data are displayed in a user-friendly format. The ARM_LCD also acknowledges user commands and can trigger system start or stop sequences. The communication protocol is designed to be robust and error-checked to ensure reliable data exchange between the DSP and the display.

8. Comparison of Processor Architectures for Solar Inverter Controllers

I have compared various controller architectures for solar inverters in Table 3, summarizing the advantages and disadvantages.

Architecture Advantages Disadvantages
ARM only Low cost, rich peripherals Real-time control is weak for complex algorithms
Single DSP Good real-time control Limited resources for complex strategies and communication
DSP + FPGA Flexible logic, parallel processing Complex design and debugging
DSP + single ARM Separates control and display May lack resources for advanced communication and safety
DSP + dual ARM (proposed) Dedicated safety and HMI, balanced load, easy expansion Slightly higher cost but worthwhile for performance

9. Experimental Verification

To validate the proposed solar inverter controller, I constructed a 10 kW experimental prototype. The experimental platform includes a PV array simulator, a DC combiner box, the 10 kW solar inverter, and an AC circuit breaker connected to the grid. I used a power analyzer to measure the grid voltages and output currents.

9.1 Output Voltage Waveforms

I first observed the inverter output phase voltages. The waveform shows a stable three-level PWM pattern with balanced voltages. The RMS value of the output voltage was approximately 233 V per phase, which meets the grid connection requirement.

9.2 Grid Voltage and Current Waveforms

With the grid frequency at 50 Hz, I recorded the three-phase grid voltages and the three-phase output currents of the solar inverter. The output currents are nearly sinusoidal and balanced. The A-phase grid voltage and the A-phase output current are shown together. The current is in phase with the voltage, confirming that the solar inverter operates at unity power factor. I also measured the phase difference \(\phi\) between the grid voltage and the inverter current at different grid frequencies. The results are listed in Table 4.

Grid frequency \(f\) (Hz) Phase difference \(\phi\) (°)
49.996 3.24
49.997 3.07
49.998 3.15
49.999 2.54
50.000 2.50
50.001 2.87
50.002 2.58
50.003 3.42
50.004 3.28

The maximum phase error is less than 3.5°, which is acceptable for grid-connected solar inverter applications. This demonstrates the excellent performance of the PLL algorithm.

9.3 Average Output Current Stability

I also recorded the average RMS value of the three-phase output currents. The average current remained stable around 2.64 A during a time interval, indicating that the solar inverter delivers consistent power to the grid. The small variations are within the acceptable range and confirm the effectiveness of the current control loop.

10. Key Formulas and Design Equations

For a three-phase solar inverter, the relationship between DC bus voltage \(V_{dc}\) and the RMS line-to-neutral voltage \(V_{an}\) is:

$$
V_{an} = \frac{V_{dc}}{2\sqrt{2}} \cdot m_a
$$

where \(m_a\) is the modulation index. For a three-level NPC inverter, the maximum modulation index can exceed 1, allowing a lower DC bus voltage for a given AC output. In the proposed design, the Boost converter maintains a stable DC bus voltage of about 400 V.

The LCL filter resonance frequency \(f_{res}\) is given by:

$$
f_{res} = \frac{1}{2\pi} \sqrt{\frac{L_2 + L_3}{L_2 L_3 C}}
$$

Using the values in Table 2:

$$
f_{res} = \frac{1}{2\pi} \sqrt{\frac{55 \times 10^{-6} + 0.86 \times 10^{-3}}{55 \times 10^{-6} \cdot 0.86 \times 10^{-3} \cdot 6.6 \times 10^{-6}}} \approx 5.5 \text{ kHz}
$$

This resonance frequency must be sufficiently above the fundamental frequency and sufficiently below the switching frequency to avoid instability. The DSP switching frequency is 20 kHz in my design, so the filter design is appropriate.

11. Conclusion

In this paper, I have presented a complete design of a solar inverter controller based on the DSP28335 and dual ARM architecture. The proposed controller effectively divides the computational and management tasks: the DSP handles real-time control and PWM generation, the ARM_SLAVE provides redundant safety protection, and the ARM_LCD facilitates human-machine interaction. I have detailed the hardware design of the current conditioning circuit, gate drive circuit, overcurrent protection circuit, and zero-crossing detection circuit. The software design covers the DSP main program, MPPT, voltage/current dual-loop control, PLL, and the two ARM programs. The experimental results on a 10 kW solar inverter prototype confirm that the controller can generate stable three-phase sinusoidal output voltages, synchronize the output current with the grid voltage, and maintain a stable average current. The phase error between the grid voltage and the inverter current remains below 3.5° across a range of grid frequencies. This work demonstrates that the “DSP plus dual ARM” architecture is a viable and efficient solution for modern solar inverter controllers, offering high performance, good expandability, and short development cycles.

In the future, I plan to extend this controller to support reactive power compensation and low-voltage ride-through capabilities, which are increasingly required in grid codes for solar inverter systems. The modular design of the proposed controller makes such extensions straightforward, as new algorithms can be integrated into the DSP software without changing the hardware platform.

Scroll to Top