What can FPGAs do for a renewable energy system?

August 17th, 2016, Published in Articles: EE Publishers, Articles: EngineerIT


In typical renewable energy systems (RES) functionalities such as power conversion control and monitoring are implemented on custom-built embedded boards. This is done using microcontrollers/digital signal processors (DSPs) that have fixed architectures, often limiting the kind of functionalities that a power converter designer wants to implement in their system.

On the other hand, field programmable gate arrays (FPGAs) are reconfigurable at hardware/logic gate level, giving some specific advantages to power converter control designer. This article introduces FPGA technology and discusses the benefits of a heterogeneous computing platform (FPGA with a microprocessor) applied to power converters. Some of the aspects discussed are increased flexibility and reduced development effort for embedded designers.

Power converters are essential parts of most RE systems. They form the link between the energy harnessing elements (like solar cells and wind turbines), storage elements (like batteries) and the grid. For example, in a solar power plant the power converter ensures that the DC voltage developed by the solar cells is converted to AC at a regulated frequency and voltage and fed into the grid. Many solar power plants are also equipped with storage systems that ensure a reliable and steady output from the plant in spite of weather fluctuations. It is the job of the power converter to take the DC output from the battery and convert it into AC before feeding it into the grid.

However, as many power electronics engineers know, the role of the power converter is much more than mere DC to AC conversion. For example, in the case of the solar power plant, the power converter needs to ensure that the following requirements are taken care of (amongst many more custom requirements):

  • The solar cell operates at the voltage and current corresponding to the maximum power point.
  • The output is of steady voltage and frequency in spite of fluctuations in incident solar power.
  • The battery is appropriately charged/discharged with recommended voltages and currents.

Fig. 1 shows the architecture of a typical power converter system. To meet all the above requirements, it is essential that the controller is an intelligent and programmable unit capable of running advanced control algorithms. The focus for the remaining part of this article will be on the embedded technologies for implementing the controller.

Fig. 1: Architecture of a typical power converter system.

Fig. 1: Architecture of a typical power converter system.

Embedded technologies for power electronic controllers

Various embedded technologies exist in the market for use as power electronic controllers. These technologies include microprocessors and microcontrollers, DSPs, FPGAs and so on. The sections below focus on each of these technologies and the specific benefits that can be achieved by using a combination of FPGA and microprocessor.

Microprocessor-based controllers

In a typical RES, the controllers are implemented on embedded boards using microcontrollers, microprocessors or DSPs. For the sake of convenience all of these will be referred to as “processors”. Processors have fixed architectures, i.e. they typically have a fixed instruction set, fixed number of PWM pins, fixed number of communication ports etc. These are sequential execution architectures meaning that the algorithm to be executed is broken down into several low level instructions and the instructions are executed one after the other on the processor core. Many processors, especially DSPs, also have specialised functionalities for power converter control. Some DSPs and microprocessors run real-time operating systems for determinism and reliability. The software toolchain for programming the processors involves a compiler that can compile the algorithm into an executable code that can run on the processor. However, as processors are sequential computing architectures, adding more computation often affects the speed at which other control loops execute. It is a constant challenge for programmers to consider adding new features as they have to constantly worry about the timing of each routine.

FPGA-based controllers

At the highest level, FPGAs are reprogrammable silicon chips. Loosely speaking, in an FPGA, the program logic is translated into a layout of logic blocks and interconnects, thus implementing the algorithm as a “custom designed hardware”. Fig. 2 shows a schematic representation of how program logic is implemented on the FPGA.

Fig. 2: A schematic representation of how program logic gets executed on a processor vs. FPGA.

Fig. 2: A schematic representation of how program logic gets executed on a processor vs. FPGA.

The process of translating the program logic into a network of gates and interconnects is implemented by an FPGA compiler. As discussed, program logic is implemented on a dedicated area on the silicon chip and hence has some specific characteristics.

Characteristics of an FPGA-based controller

True parallelism

An FPGA can have any number of tasks running parallel at a hardware level. As separate logic resources are dedicated to each of the task, the execution speed of each of the tasks is independent of the other. On the other hand, a processor core can only perform one task at a time and then hops from one task to another. This means that as more new features are added to an existing code, the execution of each sub-routine has to be carefully managed, so that the timing requirements of both overall control loop as well as individual sub-routines are always met. This often puts a lot of stress on the embedded designers and reduces the ease with which the new features can be added. Figs. 3 and 4 show the above discussion in the context of an example.

 Fig. 3: Adding features on a processor requires embedded programmers to carefully manage timing of sub-routines.

Fig. 3: Adding features on a processor requires embedded programmers to carefully manage timing of sub-routines.

True parallelism also has another implication to power converter systems as a whole. In the case of power converter systems, especially the ones used for RE systems, there are many allied functionalities that the controllers have to do. For example, in the case of solar power plant, in addition to the power converter system there are solar tracking systems, condition monitoring systems, datalogging systems, etc. that need to be installed. Typically separate controllers are used for each of the above systems, as it would be difficult to integrate all of them into one controller. However, with the use of FPGA’s truly parallel nature of execution (and with appropriate I/O), all of these functionalities can potentially be integrated into one controller, reducing overall cost.

Fig. 4: Multiple sub-routines can map onto separate hardware resources on FPGA for independent timing.

Fig. 4: Multiple sub-routines can map onto separate hardware resources on FPGA for independent timing.

Deterministic logic execution to the scale of 100 ns

An FPGA allows gate level implementation of logic. The result of this is that the programmer can define “what happens when” – at a scale of 10 to 100 ns. To understand the implication of this better, let us consider PWM generation as an example. PWM generation in the case of processors is typically implemented by invoking one of the inbuilt counter blocks and configuring them through registers. On the other hand, in an FPGA, PWM is implemented in a form of programmed logic, where the state of the output pin is decided every 10 ns based on the PWM scheme. This allows the user to implement completely custom PWM schemes, which is especially useful in the case of multi-level inverters. It is also useful in implementing features like custom dead-time implementation, overcurrent/overvoltage protection, active current injection, islanding detection, cycle synchronisation, etc.

High throughput

From the way in which a program logic gets translated onto the FPGA (Fig. 2), it can also be seen that an FPGA can perform the “basic” computations much faster than a typical processor. For this reason FPGAs are well suited for implementing relatively less complex algorithms at a much faster speed than a processor. Benchmarks suggest an order of magnitude improvement between FPGAs and DSPs, in terms of speed, performance per watt and performance per dollar [3]. For a power electronics engineer, this implies better control loop rates and better quality output.

Fig. 5: Embedded platform architecture that leverages the best of both processor and FPGA.

Fig. 5: Embedded platform architecture that leverages the best of both processor and FPGA.

Heterogeneous (hybrid) controllers

Table 1 summarises the differences between processors and FPGAs. As one can see, while FPGAs have great benefits for controller development, they have their own set of disadvantages. Especially in terms of implementing complex algorithms, difficulty in integrating communication protocols, large compilation times etc.

Table 1: Comparison of processor and FPGA characteristics.

Table 1: Comparison of processor and FPGA characteristics.

An architecturally powerful solution would be to integrate processors and FPGAs into a single heterogeneous computing platform. Any such architecture should also, of course, be equipped with I/O (input and output) in order to interact with the physical signals. Fig. 5 shows architecture for embedded controllers. This heterogeneous computing architecture equipped with I/O can act as a flexible platform for designing power electronic controllers.


This article focusses on various embedded technologies that can be used as power electronic controllers. A simplified and power converter focused explanation of these embedded technologies was provided. The benefits of FPGA technology in the context of power converters has been highlighted. The relative strengths and weaknesses of FPGAs and processors has been discussed, suggesting that a heterogeneous computing architecture (FPGA and processor) equipped with I/O would be an ideal platform to design power electronic controllers.


[1] National Instruments: “Power Electronics Development Center Blog”, https://goo.gl/JcYS9v

[2] National Instruments: “What is RIO Architecture”,  www.ni.com/white-paper/10894/en/

[3] National Instruments: “Reconfigurable Grid? FPGAs Versus DSPs for Power Electronics”, http://goo.gl/J7V3hC

Contact National Instruments, Tel 011 805-8197, ni.southafrica@ni.com

Related Articles

  • South African Government COVID-19 Corona Virus Resource Portal
  • Ministerial determinations propose 13813 MW of new-build by IPPs, none by Eskom
  • Crunch time for South Africa’s national nuclear company, Necsa
  • Dealing with the elephant in the room that is Eskom…
  • Interview with Minerals & Energy Minister Gwede Mantashe