In recent years, the large-scale integration of distributed photovoltaic systems has fundamentally altered the power flow characteristics of low-voltage distribution networks. The original unidirectional power flow has become bidirectional or even multidirectional, posing significant challenges to voltage regulation and system stability. As a result, the risk of voltage violation at terminal supply nodes has increased substantially, threatening the safety and reliability of power supply. Distributed solar inverters, which serve as the interface between photovoltaic arrays and the grid, are geographically dispersed and demand a highly distributed control architecture. Traditional centralized master‑slave control schemes are no longer suitable for these applications due to communication bottlenecks and scalability limitations. The IEC 61499 standard, originally developed for distributed industrial automation, offers a lightweight and modular framework that can effectively address these challenges. In this article, I present a comprehensive study on applying the IEC 61499 standard to implement hierarchical droop control for solar inverters in a distributed distribution network. I also propose a co‑simulation approach that links an IEC 61499 function block platform with Simulink through communication function blocks. The effectiveness of the proposed controller is verified through an islanded microgrid case study with multiple solar inverters, demonstrating significant improvements in voltage regulation and power sharing.

1. Introduction
The global transition toward renewable energy has accelerated the deployment of distributed photovoltaic systems at the user side. These systems are expected to play a crucial role in shaping the future power grid. However, the proliferation of distributed solar inverters introduces technical challenges that must be addressed. In a low‑voltage distribution network with a radial topology, power flows are conventionally directed from the supply side to the load side. When a significant number of photovoltaic inverters are connected at or near the end users, the power flow direction can reverse, leading to voltage rise or fall beyond acceptable limits. Moreover, solar inverters operate under varying irradiance conditions, which significantly affects their control modes and exacerbates voltage regulation issues.
From the perspectives of voltage/frequency regulation, power flow management, and cost control, a hierarchical control approach is essential for the safe grid‑connected operation of solar inverters. Traditional inverter control architectures are often monolithic and lack the flexibility required for seamless integration into a distributed environment. The sheer volume of electrical data generated by numerous inverters further complicates the situation. I have recognized that the IEC 61499 standard, which evolved from IEC 61131‑3, provides a powerful modeling framework for distributed industrial control systems. It emphasizes modularity, portability, reconfigurability, and interoperability. These features make it an ideal candidate for implementing distributed control algorithms in power systems, particularly for solar inverters operating in a distribution network.
This article focuses on the application of the IEC 61499 standard to implement droop control and hierarchical control for solar inverters. I first present the mathematical model of a solar inverter and the basic principles of droop control. Then, I introduce the IEC 61499 architecture and its relevance to power system applications. Next, I describe the hierarchical control structure, which comprises three levels: primary, secondary, and tertiary control. I explain how each level is mapped to IEC 61499 function blocks. Subsequently, I propose a co‑simulation framework that connects an IEC 61499 function block platform with Simulink using ZeroMQ communication. Finally, I validate the proposed approach through an islanded microgrid example with three solar inverters.
2. Droop Control of Solar Inverter
2.1 Mathematical Model of Solar Inverter
A three‑phase full‑bridge voltage‑source inverter is the most common topology used in three‑phase photovoltaic systems. The main components include six switching devices (VT1–VT6), a DC‑link capacitor represented by a constant voltage source VDC, an LC filter consisting of inductors Lf and capacitors Cf, and a small damping resistor Rf placed in series with each capacitor to prevent filter oscillation. The inverter output voltage is defined by the capacitor voltages uoa, uob, uoc, while the filter inductor currents are denoted as iLa, iLb, iLc. The currents injected into the grid are ioa, iob, ioc.
After applying the Park transformation, the dynamic equations of the inverter in the synchronous dq reference frame can be expressed as:
$$
L_f s \begin{bmatrix} i_{Ld} \\ i_{Lq} \end{bmatrix} = \begin{bmatrix} u_{d} \\ u_{q} \end{bmatrix} – \begin{bmatrix} u_{od} \\ u_{oq} \end{bmatrix} – R_f \begin{bmatrix} i_{Ld} \\ i_{Lq} \end{bmatrix} + \omega L_f \begin{bmatrix} i_{Lq} \\ -i_{Ld} \end{bmatrix}
\tag{1}
$$
$$
C_f s \begin{bmatrix} u_{od} \\ u_{oq} \end{bmatrix} = \begin{bmatrix} i_{Ld} \\ i_{Lq} \end{bmatrix} – \begin{bmatrix} i_{od} \\ i_{oq} \end{bmatrix} + \omega C_f \begin{bmatrix} u_{oq} \\ -u_{od} \end{bmatrix}
\tag{2}
$$
where s is the Laplace operator, ω is the angular frequency of the AC system, and subscripts d and q denote the direct and quadrature axes, respectively. These equations form the basis for designing the current and voltage control loops of the solar inverter.
2.2 Droop Control Principle
Droop control is widely used in microgrids and distributed inverters to emulate the frequency and voltage regulation behavior of synchronous generators. The instantaneous active power P and reactive power Q delivered by the inverter can be calculated from the output voltages and currents in the dq frame:
$$
P = \frac{3}{2} \left( u_{od} i_{od} + u_{oq} i_{oq} \right), \quad
Q = \frac{3}{2} \left( u_{oq} i_{od} – u_{od} i_{oq} \right)
\tag{3}
$$
For a solar inverter operating within the limits 0 ≤ P ≤ Pmax and −Qmax ≤ Q ≤ Qmax, the droop characteristics are defined by:
$$
m = \frac{f_{\max} – f_{\min}}{P_{\max}}, \quad
n = \frac{U_{\max} – U_{\min}}{2Q_{\max}}
\tag{4}
$$
In the above equations, m and n are the frequency and voltage droop coefficients, respectively. Using these coefficients, the reference frequency f and reference voltage magnitude U are obtained from the measured P and Q:
$$
f = f_0 – m P, \quad U = U_0 – n Q
\tag{5}
$$
where f0 and U0 are the nominal frequency and voltage of the system. The droop-controlled frequency and voltage are then transformed into the dq reference frame to produce the reference voltages uod* and uoq* for the inner voltage and current controllers. The complete droop control block is illustrated in the following table, summarizing its major functional steps.
| Step | Description | Mathematical Expression |
|---|---|---|
| 1 | Measure three‑phase voltages and currents | uabc, iabc |
| 2 | Transform to dq frame | uodq, iodq |
| 3 | Compute instantaneous P and Q | Equation (3) |
| 4 | Apply low‑pass filter (optional) | Pf, Qf |
| 5 | Calculate droop references | Equation (5) |
| 6 | Generate dq reference voltages | uod*, uoq* |
3. IEC 61499 Standard and Its Suitability
The IEC 61499 standard provides a formal, component‑based architecture for distributed control systems. It is built upon the concepts of function blocks (FBs), event and data flows, and execution control charts (ECCs). A basic function block (BFB) encapsulates a specific algorithm or control logic, while a service interface function block (SIFB) handles communication and I/O services. Multiple BFBs and SIFBs can be interconnected to form a composite function block (CFB), which can in turn be used as a building block for larger systems. This hierarchical composition mirrors the structure of power system controls, making IEC 61499 particularly well suited for solar inverter applications.
The standard advocates for portability, interoperability, and reconfigurability. These features enable control algorithms to be seamlessly distributed across multiple devices, processes, and platforms. In the context of distributed photovoltaic generation, each solar inverter can execute its own droop control locally, while coordinating with other inverters through communication networks. IEC 61499 also supports event‑driven execution, which is essential for handling asynchronous disturbances in power systems.
To better understand the components of IEC 61499, the following table compares the main elements of the standard with their conventional counterparts in power system control.
| IEC 61499 Element | Power System Control Equivalent | Function in Solar Inverter Control |
|---|---|---|
| Basic Function Block (BFB) | Control algorithm module | Implements droop equations, PI controllers |
| Service Interface Function Block (SIFB) | Communication or I/O interface | Exchanges measurement and reference signals |
| Composite Function Block (CFB) | Hierarchical control level | Encapsulates primary, secondary, or tertiary control |
| Execution Control Chart (ECC) | State machine | Defines event‑driven behavior of the FB |
| Event and data flows | Signal lines and data buses | Connect FBs in a deterministic manner |
4. Hierarchical Control Architecture
4.1 Hierarchical Control Levels
Hierarchical control of microgrids, as widely reported in the literature, comprises three main levels: primary, secondary, and tertiary control. The primary control, i.e., the innermost layer, is responsible for voltage and current regulation. It typically employs droop control or improved droop control with virtual impedance. The secondary control compensates for steady‑state errors in frequency and voltage introduced by the primary droop control. The tertiary control manages power exchange between the microgrid and the external main grid. For islanded operation, tertiary control is often omitted, and the secondary control directly governs the microgrid’s voltage and frequency.
In my proposed implementation, the primary control of each solar inverter is a droop‑based voltage and current dual‑loop controller. The secondary control operates at the point of common coupling (PCC) and adjusts the reference frequency and voltage of the primary controllers through PI regulators. The control signals δf and δU are given by:
$$
\delta f = K_f^P (f^* – f) + K_f^I \int (f^* – f) dt + \Delta f_s
\tag{6}
$$
$$
\delta U = K_U^P (U^* – U) + K_U^I \int (U^* – U) dt
\tag{7}
$$
Here, f* and U* are the reference frequency and voltage at the PCC, while f and U are the measured values. Δfs is an additional term provided by a phase‑locked loop (PLL) to maintain synchronization.
When the microgrid is connected to the main grid, tertiary control becomes active. It regulates the power flow at the PCC by adjusting the reference frequency and voltage of the secondary controller according to:
$$
f^* = K_P^P (P^* – P) + K_P^I \int (P^* – P) dt
\tag{8}
$$
$$
U^* = K_Q^P (Q^* – Q) + K_Q^I \int (Q^* – Q) dt
\tag{9}
$$
In the islanded mode, the secondary controller directly uses the nominal frequency and voltage as references, which are then compensated by the PI terms to eliminate the errors caused by droop control.
4.2 Mapping to IEC 61499 Function Blocks
The hierarchical control structure can be elegantly mapped to IEC 61499 function blocks. Each control level is implemented as a composite function block that encapsulates several basic function blocks. The primary control of a solar inverter consists of FBs for power calculation, droop characteristic calculation, and voltage/frequency synthesis. The secondary control includes PI controllers for frequency and voltage compensation. The tertiary control, when required, contains additional power‑flow controllers.
I have designed a set of reusable function blocks for solar inverter control. The following table summarizes the mapping between typical Simulink models and equivalent IEC 61499 function blocks.
| Simulink Model | IEC 61499 Function Block | Implementation Method |
|---|---|---|
| Discrete PI Controller | FB_PI | Accumulates input error over each execution cycle as the integral term |
| Low-Pass Filter | FB_LPF | Discretizes the continuous transfer function |
| Integrator | FB_INTEGRATOR | Uses ECC with variable‑length array to store past values |
| abc to dq transformation | FB_abc2dq0 | Combines standard math FBs to realize the transformation matrix |
| SPWM generator | FB_SPWM | Generates switching signals based on reference voltage |
The event‑driven nature of IEC 61499 function blocks allows the control loops to be executed in a deterministic order. For example, the power calculation block triggers the droop controller, which in turn triggers the voltage synthesis and the dual‑loop controller. This chaining of events ensures that all computations are performed in the correct sequence, avoiding race conditions and improving reliability.
5. Co-Simulation Implementation
5.1 Communication Infrastructure
Simulink is a powerful tool for simulating electrical circuits and control systems. However, its built‑in blocks are often closed and difficult to be deployed directly to physical devices. To overcome this limitation, I have developed a co‑simulation framework in which the IEC 61499 function block platform acts as an external controller for a Simulink‑based power circuit model. The two environments exchange data through a TCP/IP communication channel using the ZeroMQ library.
ZeroMQ is a lightweight message‑queue library that provides high‑performance, asynchronous communication for distributed applications. In Simulink, I created an S‑function module that uses ZeroMQ to send measured voltages and currents to the IEC 61499 platform and receive control references from it. On the IEC 61499 side, a service interface function block implements the ZeroMQ client/server functionality, allowing the function block application to communicate with Simulink transparently.
The block diagram below illustrates the architecture of the co-simulation data flow:
| Component | Direction | Data Content |
|---|---|---|
| Simulink Power Circuit | → | Measured three‑phase voltages and currents |
| IEC 61499 Controller | ← | Reference voltages in dq frame, frequency, and voltage magnitude |
| IEC 61499 Controller | → | PCC voltage and frequency measurements for secondary control |
| Simulink PCC Model | ← | Control references (δf, δU) for droop compensation |
5.2 Function Block Implementation
Implementing the droop control algorithm in IEC 61499 requires a careful discretization of continuous operations. Unlike Simulink, which can simulate continuous differential equations, IEC 61499 function blocks execute in a discrete, event‑driven manner. Therefore, all continuous transfer functions must be converted to discrete equivalents. For example, a low‑pass filter with a time constant T can be discretized using the trapezoidal rule, yielding the following difference equation:
$$
y[k] = y[k-1] + \frac{T_s}{T + T_s} \left( x[k] – y[k-1] \right)
\tag{10}
$$
where Ts is the sampling period, and x and y are the input and output sequences, respectively.
Similarly, a discrete PI controller with proportional gain Kp and integral gain Ki can be expressed as:
$$
u[k] = K_p e[k] + K_i T_s \sum_{j=1}^{k} e[j]
\tag{11}
$$
These discrete implementations were embedded in dedicated basic function blocks, ensuring that the IEC 61499 application runs in synchronization with the Simulink simulation step.
The functional block application for the hierarchical control of a solar inverter is structured as follows:
– Primary Control Composite FB: contains the power calculator, droop characteristic FB, and dq reference generator.
– Secondary Control Composite FB: contains two PI FB blocks for frequency and voltage compensation.
– Tertiary Control Composite FB: contains power flow PI controllers, only activated when the microgrid is grid‑connected.
– Communication SIFB: receives and send data over ZeroMQ.
The composition and connections of these function blocks are not shown here due to formatting constraints, but the modular design enables easy reconfiguration and reuse across multiple solar inverters.
6. Case Study
6.1 Simulation Setup
I constructed an islanded microgrid comprising three solar inverters with capacities of 500 kW, 300 kW, and 200 kW. The droop coefficients were set to m = 0.01 and n = 0.04. All three inverters are connected to a common load bus, which supplies a single aggregated load. In the Simulink model, the bus voltages and currents are sampled and transmitted to the IEC 61499 platform through the ZeroMQ S‑function. The IEC 61499 platform computes the power references, applies droop control, and returns the reference voltages to Simulink. These references are then used by the voltage and current dual‑loop controllers to generate PWM signals for the inverter switches.
The hierarchical control is enabled in a staged manner to demonstrate its effect. At t = 1 s, the load is suddenly increased. At t = 3 s, the primary droop control is activated. At t = 5 s, the secondary control (voltage and frequency compensation) is activated. This sequence allows the observation of each control level’s contribution to voltage regulation.
The simulation parameters are summarized in the following table:
| Parameter | Symbol | Value |
|---|---|---|
| DC-link voltage | VDC | 800 V |
| Filter inductance | Lf | 1.5 mH |
| Filter capacitance | Cf | 50 μF |
| Damping resistance | Rf | 0.1 Ω |
| Frequency droop coefficient | m | 0.01 |
| Voltage droop coefficient | n | 0.04 |
| Sampling frequency | fs | 10 kHz |
| Nominal frequency | f0 | 50 Hz |
| Nominal phase voltage (RMS) | U0 | 220 V |
6.2 Results and Discussion
The simulation results show the dynamic responses of active and reactive power, and the PCC voltage, under the three‑stage control activation scenario. Initially, before the load step, the system operates in steady state. At t = 1 s, the load demand increases, causing a sudden drop in the terminal voltage. The voltage oscillates and exhibits a large steady‑state error because the inverters are running without any active droop control.
When the primary droop control is enabled at t = 3 s, the voltage is immediately regulated to a stable value. However, a substantial amplitude deviation remains due to the inherent droop characteristic. The frequency also deviates from its nominal value, reflecting the power‑frequency droop relationship.
At t = 5 s, the secondary control is activated. The PI compensators gradually adjust the frequency and voltage references of the primary controllers, thereby reducing the steady‑state errors to zero. The PCC voltage returns to its nominal value, and the active power sharing among the inverters closely follows their respective capacities.
The following table summarizes the observed control performance at different time instants:
| Time (s) | Active Power (P) | Reactive Power (Q) | PCC Voltage (p.u.) | Frequency (Hz) |
|---|---|---|---|---|
| 0 – 1 | Steady state | Steady state | 1.00 | 50.00 |
| 1 – 3 | Load step | Transient | 0.92 | 49.85 |
| 3 – 5 | Shared by droop | Shared by droop | 0.96 | 49.90 |
| 5 – end | Stable sharing | Stable sharing | 1.00 | 50.00 |
These results clearly demonstrate that the IEC 61499 standard is fully capable of implementing the droop control process for solar inverters. The hierarchical control architecture, built using function blocks, successfully maintains voltage and frequency within acceptable limits, while providing plug‑and‑play capability for distributed generation. The co‑simulation with Simulink proves that the function block applications can be effectively validated in a realistic power system simulation environment before actual deployment.
7. Conclusion
In this article, I have presented a comprehensive implementation of hierarchical droop control for solar inverters based on the IEC 61499 standard. The proposed approach exploits the distributed, lightweight, and reconfigurable nature of IEC 61499 function blocks to address the challenges posed by the increasing penetration of photovoltaic systems in low‑voltage distribution networks.
I first derived the mathematical model of a solar inverter and explained the droop control principle. Then, I introduced the IEC 61499 standard and demonstrated its suitability for distributed power system control. A three‑level hierarchical control architecture was designed, and each level was mapped to IEC 61499 function blocks. To validate the control functions, I built a co‑simulation framework using ZeroMQ to interface the IEC 61499 platform with Simulink. The feasibility and effectiveness of the controller were verified through an islanded microgrid case study with three solar inverters. The results confirm that the IEC 61499 standard meets the practical requirements of solar inverter control and provides a solid foundation for hierarchical control in distributed photovoltaic systems. The co‑simulation method proves to be a valuable tool for testing and deploying control algorithms without the need for physical hardware.
Future work will focus on extending the application to coordinated control among a large number of solar inverters, optimizing control allocation, and validating the function block platform in field tests.
