**Small Wind Turbine Emulator Based on Lambda-Cp Curves Obtained under Real Operating Conditions**

#### **Camilo I. Martínez-Márquez, Jackson D. Twizere-Bakunda, David Lundback-Mompó, Salvador Orts-Grau \*, Francisco J. Gimeno-Sales and Salvador Seguí-Chilet**

Instituto Interuniversitario de Investigación de Reconocimiento Molecular y Desarrollo Tecnológico, Universitat Politècnica de València, Camino de Vera 14, 46022 Valencia, Spain; camarma3@posgrado.upv.es (C.I.M.-M.); jtwizbakd@gmail.com (J.D.T.-B.); dalunmom@gmail.com (D.L.-M.); fjgimeno@eln.upv.es (F.J.G.-S.); ssegui@eln.upv.es (S.S.-C.)

**\*** Correspondence: sorts@eln.upv.es; Tel.: +34-963-877-000

Received: 17 May 2019; Accepted: 23 June 2019; Published: 26 June 2019

**Abstract:** This paper proposes a new on-site technique for the experimental characterization of small wind systems by emulating the behavior of a wind tunnel facility. Due to the high cost and complexity of these facilities, many manufacturers of small wind systems do not have a well knowledge of the characteristic λ-*Cp* curve of their turbines. Therefore, power electronics converters connected to the wind generator are usually programmed with speed/power control curves that do not optimize the power generation. The characteristic λ-*Cp* curves obtained through the proposed method will help manufacturers to obtain optimized speed/power control curves. In addition, a low cost small wind emulator has been designed. Programmed with the experimental λ-*Cp* curve, it can validate, improve, and develop new control algorithms to maximize the energy generation. The emulator is completed with a new graphic user interface that monitors in real time both the value of the λ-*Cp* coordinate and the operating point on the 3D working surface generated with the characteristic λ-*Cp* curve obtained from the real small wind system. The proposed method has been applied to a small wind turbine commercial model. The experimental results demonstrate that the point of operation obtained with the emulator is always located on the 3D surface, at the same coordinates (rotor speed/wind speed/power) as the ones obtained experimentally, validating the designed emulator.

**Keywords:** wind turbine emulator; wind turbine energy systems; renewable energies

#### **1. Introduction**

Although wind is difficult to predict accurately because of the many factors on which it depends, its renewable nature and abundance make it a good candidate for providing energy on a large scale. In recent decades, the technology necessary to use wind energy for generating electricity has been developed. Aerodynamic study for the capture of wind power [1], design of the electric generators and power converters [2–6], control of the system, or the optimization of energy generation [6–10] are just a few examples of the challenges that still face engineers.

Testing wind energy conversion systems under real operating conditions requires a wind generator installed on a site with good wind conditions or a wind tunnel facility. Both options are unaffordable for manufacturers of small wind generators or academic researchers due to the magnitude of these installations and their cost. However, when no aerodynamic studies are being performed, e.g., design and testing of power electronic converters and electric generators, a more economically viable solution is to implement a wind turbine emulation system. In an emulator, the wind turbine is replaced by an electromechanical actuator that incorporates in the control board the model of the wind turbine to be emulated. The electromechanical actuator is mechanically coupled, on a bench, to the electrical generator under study. A wind turbine emulation system has several advantages: easy implementation; reduced cost; less space needed; simple operation; and the possibility of setting any desired wind profile at the right time without dependence on weather forecasts.

Several implementations of wind emulators are detailed in References [11–21]. Wind emulators are classified mainly according to the type of electromechanical actuator used, or by the parameters considered for the implementation of the aerodynamic model. DC motors can be used as electromechanical actuators [11–15] because of their easy torque control through the armature current. However, DC motors present some important drawbacks such as: considerable size-power ratio, high cost, the need for maintenance, etc. [15]. Other electromechanical actuators use induction motors [16–19], permanent magnet synchronous motors (PMSM) [20], or servomotors [21]. The effect of the variation of wind speed with height, known as wind shear, is included into the aerodynamic model of the turbine in Reference [20]. Other phenomena, such as the tower shadow effect (which occurs every time one of the blades passes in front of the tower) are also integrated into the turbine model in References [19,20]. A servomotor controlled by an inverter is used in Reference [21]. The inverter control signal is calculated using the generated wind torque feedback signal and the desired wind speed in the aerodynamic model. A wind system connected to the grid is simulated in Reference [19], using an induction motor as actuator. The torque to be developed by the actuator is calculated based on the wind speed and considering the tower shadow effect. Wind profiles are obtained offline by means of an anemometer located on the roof of the laboratory.

One important drawback of wind turbine emulators is the instability that appears during the compensation of the moment of inertia of the mechanical parts [17]. To generate the mechanical torque as accurately as possible, both in steady state and during transients, the adjustment of the moment of inertia was obtained by compensation in Reference [13], where different transient responses of the emulator are tested, simulating variations in the wind speed and considering different values of the moment of inertia. However, the variation of the power coefficient *Cp* during transients was not considered in the wind emulator. Another common disadvantage of these turbine emulation systems is that they constrain the performed emulation to theoretical mechanical models, making the overall system less realistic. Many manufacturers of small wind systems do not have good knowledge of the λ-*Cp* characteristic curve of their turbines, due to the high cost and complexity of a wind tunnel. Therefore, power electronics converters connected to these small wind generators are usually programmed with speed/power control curves that do not optimize the power generation.

This work proposes a new on-site technique for the experimental characterization of small wind systems by emulating the behavior of a wind tunnel facility. The λ-*Cp* characteristic curves obtained through the proposed method will help manufacturers to obtain optimized speed/power control curves. In addition, a low cost small wind emulator has been designed. Programmed with the experimental λ-*Cp* characteristic curve, it can validate, improve, and develop new control algorithms to maximize the energy generation of the small wind system.

The emulator is completed with a novel graphic user interface (GUI). This GUI allows the real-time visualization of the operating point of the turbine, both in the lambda—power coefficient (λ-*Cp*) curve and in the working surface of the turbine. The working surface of the turbine represents the possible operating points of the turbine and is obtained from the projection of the λ-*Cp* characteristic curve in a 3D space given by the following variables: available electric power (in W); wind turbine angular speed (in rpm); and wind speed (in m/s).

This article is organized as follows. Section 2 presents the modeling of the small wind turbine and the mechanical system. Section 3 describes the approach for the estimation of the λ-*Cp* curve based on the analysis of experimental data acquired in several small wind turbines operating under real outdoor conditions. Section 4 presents the proposed wind emulator that is combined with a novel graphic user interface which enables obtaining, among other things, the working surface of the turbine. This section also includes the results of the developed experiments that show the capabilities of the proposed small wind emulator. Finally, Section 5 summarizes the most important points of the proposals developed in this paper.

#### **2. Wind Turbine and Mechanical System Modeling**

Figure 1 depicts a generic wind generator system. The wind turbine should have two or three blades and can be directly coupled to a permanent magnet synchronous generator (PMSG) or by means of a gearbox. The incoming aerodynamic turbine torque (*TT*), produced by the action of the wind on the blades, is finally applied to the electrical generator, which in turn will generate a counter-electromagnetic torque (*TG*). The moment of inertia (*J*) is the sum of the moments of inertia of both, the turbine (*JT*), and the electrical generator (*JG*):

$$J = J\_T + J\_G \tag{1}$$

**Figure 1.** Mechanical model of a generic wind generation system.

Certain effects, like viscous friction coefficient and shaft torsional spring constant, are usually neglected to simplify the model. By means of this approximation, the mechanical model of the turbine can be expressed as follows:

$$\frac{T\_T}{N} - T\_G = J \frac{d\omega\_G}{dt} \tag{2}$$

where ω*<sup>G</sup>* is the angular speed of the electric PMSG generator and *N* is the gear ratio of the gearbox. The power captured by a wind turbine depends on the interaction between the wind and the turbine blades. The power available in the wind (*Pwind*) is expressed as follows [5]:

$$P\_{\rm wind} = \frac{1}{2} \rho A V\_{\rm wind}^3 \tag{3}$$

where ρ is the density of the air (1225 kg/m3), *A* is the area swept by the turbine blades given in m2, and *Vwind* is the wind speed given in m/s. The power coefficient *Cp* is the ratio of the power captured by the wind turbine (*PT*) on the low-speed shaft (*PLSS*) to the power available in the wind, being expressed as follows:

$$C\_p = \frac{P\_{ISS}}{P\_{wind}} = \frac{P\_T}{P\_{wind}}\tag{4}$$

Thus, the expression of *PT* can be obtained by combining (3) and (4) as follows:

$$P\_T = \frac{1}{2} \mathcal{C}\_p \rho A V\_{wind}^{-3} \tag{5}$$

The maximum *Cp* achievable by a turbine under ideal conditions is 0.59 (Betz limit). The power coefficient *Cp* is a function of two parameters: the tip–speed ratio (λ) and the pitch angle (β) of the blades. The tip–speed ratio relates the blade tip speed with the wind speed, and is expressed as follows:

$$
\lambda = \frac{V\_T}{V\_{wind}} = \frac{\omega\_T \cdot r\_T}{V\_{wind}} \tag{6}
$$

where *VT* is the linear speed at the tip of the turbine blades, ω*<sup>T</sup>* is the angular speed of the rotor of the turbine in rad/s, and *rT* is the length of the blade in *m*. The aerodynamic characteristic of a wind turbine can be modified by varying the pitch angle (β) of the blades. Such a technique, denoted as pitch control, is usually applied in large wind turbines, but is uncommon in small wind turbines.

Figure 2 shows a set of λ-*Cp* curves for different values of β, obtained using a non-lineal function [22]. Each curve has a different maximum power coefficient value, *Cpmax* , at a different λ value (denoted as optimal lambda or λ*opt*).

**Figure 2.** Variation of the λ**-***Cp* curve depending on the pitch angle of the blades (β).

For small wind turbines, without pitch control, β = 0. From Equation (5), the aerodynamic torque developed by a small wind turbine can be expressed as follows:

$$T\_T = \frac{1}{2a\nu\_T} \mathcal{C}\_p \rho \mathcal{A} V\_{vind}{}^3 \tag{7}$$

The operating point of the wind turbine depends on the electrical power consumed by the electrical loads, as detailed in Equation (2).

#### **3. Experimental Method for the Estimation of the** λ**-***Cp* **Characteristic Curve of a Small Wind Turbine**

Due to the high cost of the necessary tests, manufacturers do not offer the λ-*Cp* characteristic curve of their small wind turbines. A knowledge of λ-*Cp* characteristics is crucial for developing an efficient control of the energy conversion process, and securing the safe operation of the wind turbine. This section presents an experimental method developed for the estimation of the λ-*Cp* characteristic curve of a small wind turbine without pitch control (β = 0). This method is intended to give manufacturers of small wind turbines a practical and cheap tool to obtain the λ-*Cp* characteristic curve of their turbines.

Given the difficulties of measuring *PT* in a commercial system and the low losses in the conversion from mechanical to electrical power when compared with the output electrical power, the value of *Cp* is usually calculated using the electrical generated power (*Pe*) [23]:

$$\mathcal{C}\_{p} = \frac{P\_T}{P\_{wind}} \cong \frac{P\_{\mathcal{E}}}{P\_{wind}} \tag{8}$$

The λ-*Cp* characteristic curve will be obtained after processing the data logged from several small wind turbines operating under real outdoor conditions. All of them are equipped with a specific firmware control that performs the test conditions required to acquire the following magnitudes: wind speed (*Vwind*); turbine angular speed (ω*T*); and electrical generated power (*Pe*).

The small wind turbine used in the experimental parts of the paper is a Bornay Wind Plus 25.3+. This turbine is equipped with a set of three blades of *rT* = 2 m and has a moment of inertia *<sup>J</sup>* = 5.75 Kg·m2. The value of *<sup>J</sup>* has been provided by the manufacturer and is the moment of inertia to be emulated. The turbine starts its operation for *Vwind* > 3 m/s, develops the rated power for *Vwind* = 12 m/s, and includes an automatic brake system if *Vwind* > 14 m/s. The wind turbine is directly coupled to the shaft of the electrical generator, so N = 1. The electrical generator used in the Bornay Wind Plus 25.3+ is a permanent magnet synchronous generator (PMSG) and has the rated values shown in Table 1.

**Table 1.** Technical characteristics of the electrical generator used in the small wind turbine.


Data is collected from three different small wind turbines, as part of three different off-grid systems. The presented results correspond to a two-month period of data recording. For data collection purposes, the control system of the turbine is modified to perform a speed reference (ω∗ *<sup>T</sup>*) sweep in a loop, varying from ω∗ *Tmin* <sup>=</sup> 90 rpm to <sup>ω</sup><sup>∗</sup> *Tmax* = 562.5 rpm (1.5ω*T*\_*rated*) with a 10 rpm increment every 30 min. Meanwhile, the system is sampling, every second, the three magnitudes needed to obtain the λ-*Cp* points (*Vwind*, *Pe*, and ω*T*). To maintain ω*<sup>T</sup>* constant, the electronic converter connected in the AC output of the PMSG must be able to extract all the generated electrical power. A controlled resistive load is used to extract the excess of power that the loads are not demanding. The data collection algorithm considers safety issues, resetting the speed reference to ω∗ *Tmin* if the incoming torque exceeds a generator torque threshold that is set to 90% of the rated torque during the data recording. This limitation ensures that the maximum electrical torque of the generator is not exceeded, and the system can still be controlled. For every ω∗ *<sup>T</sup>* value, the system collects a huge amount of data that has to be filtered to discard non-significant values. Figure 3 depicts the block diagram of the acquisition system and the flowchart of the proposed algorithm for the estimation of the λ-*Cp* characteristic curve.

A filtering process is started after the data recording. Since the wind turbines have a cut-in speed, all data collected corresponding to *Vwind* < 3 m/s is discarded. The following filtering process is to delete the data corresponding to the transients, e.g., during wind speed changes. A set of values of *Vwind*, *Pe*, and ω*<sup>T</sup>* is considered valid if the turbine angular speed is equal to its reference (ω*<sup>T</sup>* = ω<sup>∗</sup> *T*) and if *Vwind* and ω*<sup>T</sup>* are stable. The stability of *Vwind* and ω*<sup>T</sup>* is important because the turbine can store kinetic energy during transients. *Vwind* and ω*<sup>T</sup>* stability are verified by comparing the acquired sample (*k*) with the *k* − 4 and *k* + 4 samples (previous and subsequent recorded values, respectively). Maximum variation in *Vwind* during the comparison is limited to ±1 m/s, while ω*<sup>T</sup>* variation must be smaller than ±5 rpm.

**Figure 3.** Block diagram of the data acquisition (**left**) and flowchart of the proposed method (**right**).

After the filtering process, the remaining sets of values of *Vwind*, *Pe*, and ω*<sup>T</sup>* are processed to obtain the corresponding λ-*Cp* coordinates. It is important to notice that the altitude has been considered to correct for air density when *Cp* values are calculated. Figure 4 shows the λ-*Cp* coordinates obtained after the filtering process. The points corresponding to each turbine are shown with different colors and symbols.

**Figure 4.** Raw experimental data obtained from the wind turbines.

The obtained λ-*Cp* points are classified firstly in *Vwind* ranges, being denoted by subscript *m* in Figure 5. These ranges are selected in this study with Δ*Vwind* = 0.5 m/s, with acceptable values between 3 m/s (the cut-in speed of the turbine) to 16 m/s (*m* = 1 ... 26). The points corresponding to each *Vwind* range are classified again, this time in ranges of λ, being denoted by subscript *n* in Figure 5. These λ ranges are selected to give enough resolution to the curve, Δλ = 0.1 being used in the experimental analysis, with a λ*max* = 16 for the turbines and locations used in the study. The three-dimensional space defined by λ-*Cp*-*Vwind* is divided in *m* by *n* cuboids, as appears in Figure 5. A cuboid that contains less than five points is discarded because they are non-representative points of the λ-*Cp* curve.

**Figure 5.** Description of the data classification in Vwind and λ ranges before the averaging and weighting process.

The total number of λ-*Cp*-*Vwind* points in each cuboid is an element *Nij* of matrix **N**, where *i* = 1..*m* and *j* = 1..*n*, expressed as follows:

$$\mathbf{N} = \begin{pmatrix} N\_{11} & \cdots & N\_{1n} \\ \vdots & \ddots & \vdots \\ N\_{m1} & \cdots & N\_{mn} \end{pmatrix} \tag{9}$$

The points inside each cuboid are averaged to obtain one unique point per cuboid, obtaining the following matrix of λ-*Cp* coordinates:

$$
\lambda \mathbf{-C\_P} = \begin{pmatrix}
\left(\lambda - \mathbf{C\_p}\right)\_{11} & \cdots & \left(\lambda - \mathbf{C\_p}\right)\_{1n} \\
\vdots & \ddots & \vdots \\
\left(\lambda - \mathbf{C\_p}\right)\_{m1} & \cdots & \left(\lambda - \mathbf{C\_p}\right)\_{mn}
\end{pmatrix} \tag{10}
$$

To obtain only one λ-*Cp* point for each λ*<sup>j</sup>* range, a weighted average process is applied considering the *m* different points contained inside each range. The weighting factor relates the number of samples averaged inside each cuboid to the total number of samples inside each λ*<sup>j</sup>* range, thus the more points inside a cuboid the greater the contribution of that cuboid to the resulting λ-*Cp* coordinate. The weighting factor *wij* applied to each (λ-*Cp*)*ij* point is calculated as in Equation (11).

$$w\_{ij} = \frac{N\_{ij}}{N\_j} \tag{11}$$

where *Nj* is the total number of points in each λ*<sup>j</sup>* range. **W** is the weights matrix, defined as follows:

$$\mathbf{W} = \begin{pmatrix} w\_{11} & \cdots & w\_{1n} \\ \vdots & \ddots & \vdots \\ w\_{m1} & \cdots & w\_{mn} \end{pmatrix} \tag{12}$$

*Energies* **2019**, *12*, 2456

The **B** row vector that contains the λ-*Cp* points that describe the characteristic curve of the turbines is calculated as follows:

$$\mathbf{B} \, = \, \mathcal{W}^T \times \left(\boldsymbol{\lambda} - \mathbf{C}\_{\mathbf{P}}\right) \tag{13}$$

Figure 6 shows the averaged and weighted points obtained for three aggregation cases: using the data from turbine 1 (blue), merging the data from turbines 1 and 2 (red), and using the combined data from the three turbines (green).

**Figure 6.** λ-*Cp* coordinates obtained after the filtering and weighting process.

The resulting λ-*Cp* points should be then interpolated (step 6 in Figure 3) to obtain the characteristic λ-*Cp* curve of the turbine. For this purpose, an interpolation method must be selected. To assess the fitting of the estimated curve, the parametric continuity condition is used. In general, a higher order of parametric continuity means a smoother curve with softer gradients. A curve can be said to have *Cn* parametric continuity when its *<sup>n</sup>*th derivative *d<sup>n</sup> y dx<sup>n</sup>* is continuous throughout the curve. Linear interpolation will yield a curve with relatively poor smoothness, usually presenting abrupt gradient changes. The resulting curve of a linear interpolation will have zero-order parametric continuity (denoted as *C***0**). Polynomial interpolation methods may result in curves with second-order (or higher) parametric continuity, but this method may also suffer from Runge's phenomenon, which appears when applying high-order polynomials to evenly spaced data sets. The cubic spline interpolation method constructs a curve in a piecewise-polynomial fashion. The resulting curve is generated piece-by-piece by applying a low-degree polynomial function for every piece, presenting *C***0**, *C***<sup>1</sup>** and *C***<sup>2</sup>** parametric continuity. Cubic spline interpolation has a smaller error than linear interpolation and the resulting interpolant function (the λ-*Cp* curve of the turbine) is easier to evaluate than when polynomial interpolation is used. Due to these characteristics, cubic spline interpolation has been selected as the interpolation method.

The resulting λ-*Cp* points obtained for this set of turbines are shown as blue dots in Figure 7. It can be seen that the maximum *Cp* never exceeds 0.5, which is always below the Betz limit. Distribution of points until reaching λ*opt* is quite uniform, with a greater dispersion for λ>λ*opt*.

The red curve in Figure 7 is the result obtained after applying the cubic spline interpolation. Figure 7 shows the interpolated points that define the fitting curve along with the averaged points. This figure shows how the spline function, while not being able to pass through every data point, bends the curve to fit the overall trend of the data set. Figure 8 shows the residuals between the interpolated curve and the points used for interpolation. To validate the goodness of fit, some statistical factors have been calculated. The adjusted R-square parameter measures how successful the fit is in explaining the

variation of the data. In this case, adjusted R-square of 98.77% implies a very good fit. The root mean square of error is equal to 0.023.

**Figure 7.** Resulting interpolation from the obtained control points with cubic spline interpolation method.

**Figure 8.** Residuals between the interpolated curve and the points used for interpolation.

The λ-*Cp* curve estimation improves as more data is fed to the proposed algorithm. Figure 9 shows how the interpolated curve varies as new data is aggregated, showing the curves obtained for the three cases.

**Figure 9.** Comparison of the resulting curves as new data is fed into the algorithm.

Analyzing the averaged series, it can be seen that there is no data for λ values below 2.3, so the actual estimated curve starts around λ = 2. The low-side of the λ-*Cp* curve (values below λ = 2) is interpolated from zero to the first available point, keeping the first and second derivatives of the joined curves equal. Although the default value of the first point is (0, 0), it is important to notice that it should be defined by the starting torque of the wind turbine. In Figure 10, the final λ-*Cp* curve of the turbines is shown.

**Figure 10.** Final λ-*Cp* curve obtained from three Bornay Wind Plus 25.3+ small wind generators.

The curve reaches a maximum *Cp* value of 0.4785 at λ = 7.68. This point represents the maximum efficiency achievable for the system. The resulting curve also considers the starting torque of the real model.

#### **4. Proposed Small Wind Turbine Emulator**

The mechanical model of the proposed emulator is shown in Figure 11, where *TT* is the torque delivered by the induction motor that is emulating the turbine operation, *N* is the gear ratio of the gearbox, and *J* is the moment of inertia of the mechanical system including the induction motor (IM block), the gearbox, and the PMSG generator. The emulator is implemented with the same PMSG generator used in the wind turbines used to obtain the λ-*Cp* curve.

**Figure 11.** Mechanical model of the proposed wind turbine emulator.

From Figure 11, the rotational dynamics of the proposed wind turbine emulator are expressed as follows:

$$\frac{T\_T \prime}{N} - T\_G = \int \frac{d\omega\_G}{dt} \tag{14}$$

It should be noted that *J* must be smaller than *J* in order to achieve the same dynamic response as the real turbine, compensating the moment of inertia in a similar way to that described in References [17,18]. Basically, emulation of a moment of inertia greater than *J* can be achieved by controlling the speed reference variation of the induction motor controller during accelerations or decelerations.

A detailed block diagram of the proposed emulator is shown in Figure 12. A control algorithm that implements Equation (7) determines the control signal applied to the variable-frequency drive (VFD) that, along with the induction motor, simulates the wind turbine. The gearbox enables the induction motor to apply a higher torque to the electric generator side. Therefore, the rated torque of the induction motor might be smaller than the rated torque of the electric generator (*TT* < *TG*) and still be able to emulate the operating point of the turbine on either side of the power curve for testing purposes.

**Figure 12.** Block diagram of the proposed wind turbine emulator.

The emulated wind torque is provided by an induction motor produced by Electrotechnics (230/400 V/50 Hz, 10 HP, 1460 rpm, cos φ = 0.85), controlled by an Omron 3G3MX2-A4110-E variable-frequency drive, with the rated characteristics shown in Table 2.

**Table 2.** Technical characteristics of the variable-frequency drive used in the emulator.


The VFD drive implements a sensorless speed control. The speed reference of the VFD drive is proportional to the frequency of a pulse train applied to an input equipped with a capture module. The induction motor and the PMSG are linked by a gearbox with a gear ratio *N* = 3.48 : 1. The PMSG is part of the Bornay Wind Plus 25.3+ small wind turbine and its main characteristics have been described in a previous section. The energy generated by the PMSG must be dissipated by an intelligent load that can be controlled to set different loading situations.

In the proposed emulator, a battery charger and some power resistors implement this intelligent load. The battery charger used in the emulator is part of the solution provided by the manufacturer when the Bornay Wind Plus 25.3+ small wind turbine is used in off-grid systems. Figure 13 details the power vs speed curve used to establish the battery charging current. In this way, for a given rotational speed the battery charger will generate the necessary load torque. The battery charger is equipped with resistors that dissipate the surplus energy and maintain the battery voltage in the floating range, and so avoiding overcharging the battery.

**Figure 13.** Power-turbine angular speed curve used in the control of the battery charger.

Figure 14 shows the parts of the small wind turbine emulator system: the motor-generator bench in front, followed by the display that shows the GUI (right) and the battery charger (left), and behind is the electric box that contains the VFD drive that controls the induction motors that simulate the turbine (left, front). A gear box connects both shafts.

**Figure 14.** Experimental set up of the small wind turbine emulator system.

The main control of the turbine emulator system is made by a Texas Instruments TMS320F28377 digital signal controller (DSC). Based on the mechanical model, the inertia to be simulated, and the λ-*Cp* curve obtained in the previous section, the DSC determines the speed reference of the induction motor. The block diagram of the algorithm implemented in the DSC is depicted in Figure 15. The block diagram implemented corresponds to a directly coupled small wind turbine, so Equation (2) is used and the gear ratio *N* is added after ω*<sup>G</sup>* is calculated.

**Figure 15.** Block diagram of the proposed wind turbine emulator algorithm.

The emulated wind speed is applied to Equation (3) to determine the available wind power (*Pwind*). Wind and turbine speeds are replaced in Equation (6) to obtain the corresponding λ value. At this point, a lookup table with the λ-*Cp* curve has to be accessed to obtain the actual *Cp* value. The λ-*Cp* curve is stored in the memory of the DSC as a table. From these results and by applying Equation (5), the power captured by the turbine (*PT*) is computed. The incoming aerodynamic torque (*TT*) is obtained by dividing the captured power by the directly coupled turbine speed (ω*<sup>T</sup>* = ω*G*). By calculating the torque difference and using the value of the moment of inertia *J* to be emulated, the system acceleration ("a" in Figure 15) can then be found from Equation (2). Finally, considering the gearbox ratio, the turbine speed reference signal to feed the speed control input of the VFD drive is obtained by integrating the resulting acceleration.

To validate the proposed small wind turbine emulator system, the experimental λ-*Cp* curve of Figure 10 has been programmed into the emulator and two experiments have been carried: first, to validate the implementation of the mechanical model, a series of *J* variations are made; in the second experiment, the emulator is tested along with the GUI.

For the first test, the wind speed is set to a fixed value, battery charger is configured to control the angular speed of the turbine at a set point of 130 rpm, and the speed controller in the battery charger is tuned to control the real turbine. By maintaining the turbine angular speed reference constant, it is verified that the dynamic response of the system varies with the emulated moment of inertia (*J*), as can be seen for the different cases shown in Figure 16. As *J* increases, the system response becomes slower, as if the system was getting heavier. This demonstrates that the proposed emulator could emulate the dynamic response of any wind turbine that meets the condition that the moment of inertia of the system to be emulated is greater than the moment of inertia of the emulator.

> *J* > *J*

**Figure 16.** Experimental results of the dynamic of the emulator system for different values of *J* .

Figure 16 also shows how the response of the speed regulator oscillates accordingly to the value of the moment of inertia. This is because the control of the intelligent load is tuned to work with the Wind Plus 25.3<sup>+</sup> turbine (*<sup>J</sup>* <sup>=</sup> 5.75 Kg·m2), as was explained previously. This means that the same controller has a different response when the value of *J* is changed; that is, the load sees a different turbine.

The graphic user interface developed to manage the small wind turbine emulator is shown in Figure 17. Through the GUI, it is possible to configure the VFD drive and communicate with the DSC to start/stop the emulation. In addition, the following emulation parameters can be set inside the GUI environment: rotor radius; height above sea level; speed limit; moment of inertia of the system; wind speed; λ-*Cp* characteristic curve of the turbine to emulate (left side of the GUI in Figure 17). The GUI also displays a real-time visualization of the operating point of the emulated turbine, both in the λ-*Cp* curve and in the working surface of the turbine (right section in Figure 17); as well as the emulated wind speed (bottom section in Figure 17).

**Figure 17.** Graphic user interface (GUI) of the wind turbine emulator system. Visualization of the real-time operating point during emulation.

Figure 17 shows the surface of the turbine and the operating point. From the trajectory described by the operating point, the convergence of the models is validated, and the emulator operates at all times on the surface obtained from the experimental data collected. The λ-*Cp* curve is also shown (upper graph in the center of the GUI screen) along with the real-time *CP* value (red dot over the λ-*Cp* curve), confirming that the emulator presents the same behavior as the real turbine modeled.

The results shown above demonstrate the convergence between the implemented emulator and the model generated from the proposed analysis methodology that is based on the data obtained from three real wind turbines. The experimental λ-*Cp* curve is uploaded in the GUI and then sent to the DSC that controls the motor/generator bench. The GUI builds and shows the working surface of the corresponding turbine. When the emulator is working, the GUI shows the trajectory of the operating point over the working surface of the turbine. The operation in a stable point located at λ*opt* demonstrates that the model implemented in the DSC is working correctly and corresponds to that obtained from the real data.

#### **5. Conclusions**

The implementation of a realistic small wind turbine emulator system has been addressed in this paper. It is based on the use of the electrical generator and the λ-*Cp* characteristic curve of the real small wind turbine to be emulated. To validate the proposed emulator, a Bornay Wind Plus 25.3+ wind turbine has been used in this work.

An experimental method for the estimation of the λ-*Cp* characteristic curve of small wind turbines is proposed. This method avoids the need for expensive wind tunnels; however, a working wind turbine is needed and, depending on the wind conditions, it could take some time to collect enough data to obtain the λ-*Cp* characteristic curve. A cubic spline interpolation has been used to obtain a smooth λ-*Cp* curve, which presents a C<sup>2</sup> parametric continuity.

Different aggregations of the data obtained with the three small wind turbines used in the experimental tests are compared. The obtained results demonstrate how the interpolated λ-*Cp* curve improves when more data sets are used in the process.

A graphic user interface has been developed to configure and monitor the operation of the emulated small wind turbine. It also represents the working surface of the turbine and the real time turbine operating point during the simulation.

The experimental results demonstrate that the dynamic response of the system varies with the emulated moment of inertia, and that the proposed emulator could emulate the dynamic response of any wind turbine with a moment of inertia greater than the moment of inertia of the emulator. The emulator always operates on the working surface obtained from the experimental data collected, demonstrating the convergence between real and emulated systems, showing that the model agrees with that obtained experimentally, and that the emulator works properly.

The proposed emulator will improve the design process and validation of power electronic converters, control strategies, and characterization of the PMSG of small wind turbine systems, by using the real λ-*Cp* characteristic curve of the wind turbine.

**Author Contributions:** Conceptualization and methodology, C.I.M.-M., J.D.T.-B. and D.L.-M.; hardware implementation, C.I.M.-M., J.D.T.-B. and F.J.G.-S.; software, C.I.M.-M., D.L.-M. and F.J.G.-S.; results and formal analysis, C.I.M.-M., D.L.-M., F.J.G.-S., S.S.-C. and S.O.-G.; resources and supervision, F.J.G.-S., S.S.-C. and S.O.-G.; writing-review & editing, C.I.M.-M., S.S.-C. and S.O.-G. All authors read and approved the final manuscript.

**Funding:** This research received no external funding.

**Acknowledgments:** This work has been carried out as part of a contract with Bornay Aerogeneradores S.L.U., who provided the small wind turbines for the experimental data collection, the mechanical platform of the emulator system, and the technical information of the turbine. Data used to obtain the speed/power curve included in the commercial technical information of the Bornay wind plus 25.3 turbine characterized in this work was obtained from the manufacturer.

**Conflicts of Interest:** The authors declare no conflicts of interest.

#### **References**


© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## *Article* **Consensus-Based SOC Balancing of Battery Energy Storage Systems in Wind Farm**

#### **Cao-Khang Nguyen 1, Thai-Thanh Nguyen 1, Hyeong-Jun Yoo <sup>1</sup> and Hak-Man Kim 1,2,\***


Received: 17 November 2018; Accepted: 13 December 2018; Published: 16 December 2018

**Abstract:** Multiple battery energy storage systems (BESSs) are used to compensate for the fluctuation in wind generations effectively. The stage of charge (SOC) of BESSs might be unbalanced due to the difference of wind speed, initial SOCs, line impedances and capabilities of BESSs, which have a negative impact on the operation of the wind farm. This paper proposes a distributed control of the wind energy conversion system (WECS) based on dynamic average consensus algorithm to balance the SOC of the BESSs in a wind farm. There are three controllers in the WECS with integrated BESS, including a machine-side controller (MSC), the grid-side controller (GSC) and battery-side controller (BSC). The MSC regulates the generator speed to capture maximum wind power. Since the BSC maintains the DC link voltage of the back-to-back (BTB) converter that is used in the WECS, an improved virtual synchronous generator (VSG) based on consensus algorithm is used for the GSC to control the output power of the WECS. The functionalities of the improved VSG are designed to compensate for the wind power fluctuation and imbalance of SOC among BESSs. The average value of SOCs obtained by the dynamic consensus algorithm is used to adjust the wind power output for balancing the SOC of batteries. With the proposed controller, the fluctuation in the output power of wind generation is reduced, and the SOCs of BESSs are maintained equally. The effectiveness of the proposed control strategy is validated through the simulation by using a MATLAB/Simulink environment.

**Keywords:** wind energy conversion system; distributed control; battery energy storage system; consensus algorithm

#### **1. Introduction**

Renewable energy sources (RESs) such as wind power and solar energy have been widely integrated into the power system [1–3]. One of the fastest growing RESs is wind power, which has received more and more attention from researchers in recent years [4]. However, the uncertainty of wind power results in the fluctuation in system frequency. Therefore, an increase in the penetration of wind power might cause several adverse effects to the power quality, stability and reliability of the power system [5,6]. In order to mitigate the impacts of wind power fluctuation, battery energy storage system (BESS) has been integrated into the wind energy conversion system (WECS) [7,8]. By controlling the charging/discharging power of the battery, the output power of the WECS can be smoother. For the large-scale wind farm, multiple BESSs could be used for addressing the problem of wind power fluctuation [9].

The imbalance of state of charge (SOC) is a common issue in the multi-cell battery systems due to the manufacturing variance, internal impedance, self-discharge rates, etc. [10,11]. The SOC imbalance might result in the reduction of charge capacity, early termination of charging or discharging, and accelerated battery degradation [10]. This problem is also observed in the microgrid or wind farm systems with multiple BESSs that are operated independently. Several studies have addressed the issue of SOC imbalance in the independent BESSs [12–22]. The SOC of the BESSs is unbalanced due to the difference of wind power output, initial SOC, capacities of BESSs, and line impedances [12]. The batteries with the lowest SOC might stop the operation of the WECS because it does not have enough power to support the system. The remaining batteries should be in charge of compensating power for the load change, which results in the accelerated charge or discharge rate of BESSs and the reduction of service life of BESSs [13]. The system could be collapsed if the energy storage of the remaining BESSs is not enough to compensate for the disturbance [14]. When multiple BESSs are used in the wind farm, the system reliability can be improved by maintaining the state of charges (SOC) balancing of BESSs [12].

In order to deal with the unbalanced SOC problem, several control strategies for SOC balancing have been introduced [15–22]. The SOC-based droop control strategies of the converter have been used widely to achieve proper power sharing and SOC balancing. The authors in reference [15] proposed a double-quadrant SOC-based droop control to achieve an appropriate power sharing in the autonomous DC microgrid. The SOC-based adaptive droop control was introduced for balancing the SOCs among the energy storage systems (ESU) in DC microgrid [16]. The paper in [17] proposed a multifunctional and wireless droop control to eliminate the SOC imbalance of the ESUs based on the *P* − *f* droop controller. However, the SOC-based droop control strategies cause the frequency deviation from the nominal values, which affects to the performance of the system.

Instead of using the SOC-based droop control, several SOC balancing control schemes based on the centralized control were proposed to balance the discharge rate of the energy storage system [18,19]. A coordinated secondary control based on current sharing control was introduced to achieve the discharge rate balancing and avoid the overcurrent among distributed generations in the islanded AC microgrid. However, the use of the centralized controller for SOC balancing might reduce the system reliability since all converters rely on the centralized controller [20]. The SOC balancing controllers based on decentralized control or distributed control have been proposed recently to improve the problem of SOC imbalance and enhance the system reliability [21,22]. In reference [21], a multi-agent based SOC balancing control was discussed, while in reference [22], the SOC balancing control was achieved by using coordinated secondary control to adjust virtual impedance loops.

However, most of the papers in the literature mainly focused on the stand-alone system. In addition, the impact of wind generation on the SOC of batteries was neglected. In this paper, an improved virtual synchronous generator (VSG) control based on consensus algorithm is proposed to regulate the output power of wind energy conversion system, which considers the impacts in wind speed variation on the WECS. The proposed controller consists of two main parts, including a consensus based SOC balancing controller and smoothing power controller. With the use of consensus-based control algorithm, the SOC of batteries is controlled to converge at the same value. The batteries which have higher SOC will inject more power to support the batteries with lower SOC. In addition, the low-pass filter is added to the VSG control of grid-side converter for smoothing active output power of the WECS. Hence, the performance of the WECS can be improved, and the system stability can be enhanced.

The paper is arranged as follows: Section 2 presents the overall structure of the WECS and the detailed control diagram of power converters in the WECS. The proposed control strategy based on consensus algorithm is introduced in Section 3. The performance of the proposed control strategy is validated through the simulation results in Section 4. Finally, the conclusion appears in Section 5.

#### **2. Structure of Wind Energy Conversion System with Integrated Battery Energy Storage System**

#### *2.1. Overall Structure*

The overall structure of the WECS with integrated BESS is illustrated in Figure 1. The wind turbine is directly connected to the permanent magnet synchronous generator (PMSG). The PMSG is interfaced with the utility grid through the back-to-back (BTB) converter, which includes three main parts, namely, machine-side converter (MSC), grid-side converter (GSC) and battery-side converter (BSC). The MSC controls the generator in order to capture maximum active power from wind turbine by using maximum power point tracking (MPPT) algorithm. In the BSC, a bidirectional DC-DC converter is utilized to maintain the constant DC capacitor voltage of the BTB converter by charging or discharging power. With the use of BESS, instead of controlling the DC capacitor voltage, the GSC is flexible to adjust the output power and support the system frequency. The power converter used in the GSC can be classified into two types, grid-feeding converter and grid-forming converter [23]. In this structure, the grid-forming converter is adopted to regulate the active power and support the system frequency by using the VSG control. The advantages of VSG control for supporting system frequency by imitating both steady-state and transient-state characteristics of the synchronous generator are explicitly discussed in previous works [24,25]. Therefore, it will not be further considered in this paper. The detailed control diagram of each converter in the WECS is analyzed in the next part.

**Figure 1.** Overall structure of the wind energy conversion system (WECS) integrated with battery energy storage system (BESS).

#### *2.2. Control of a Machine-Side Converter*

The machine-side converter is utilized to control the generator of the WECS. Depending on the variation of wind speed, the rotor speed is varied, and thus, the output power generated by the PMSG fluctuates. By applying the MPPT algorithm, electromagnetic torque is regulated to be proportional to the square of rotor speed so that the optimal value is maintained. Therefore, with particular wind speed, the wind turbine can produce maximum possible power. The control scheme of MSC is shown in Figure 2a, which includes two cascaded controllers, namely torque controller, and current controller. With regard to the torque controller, the reference of electromagnetic torque is achieved by the MPPT algorithm, as shown below:

$$T\_\varepsilon^\* = -k\_{opt}\omega\_r^2 \tag{1}$$

where *T*∗ *<sup>e</sup>* is the optimal torque generated from wind turbine, *ω<sup>r</sup>* is the speed of rotor, *kopt* is the optimal coefficient wind turbine, which is described as:

$$k\_{opt} = \frac{0.5\rho A r^3 C\_{p\text{max}}}{\lambda\_{opt}^3} \omega\_r^3 \tag{2}$$

where *A* is the turbine swept area, *r* is the turbine radius, *ρ* is the air mass density, *λopt* is the optimal tip-speed ratio when the blade pitch angle *β* = 0, *Cpmax* is the maximum performance coefficient.

The optimal torque determined by the torque controller is used to calculate the current reference of the current controller, as given by:

$$i\_{sq}^\* = \frac{2T\_\varepsilon^\*}{3p\lambda\_m} \tag{3}$$

where *λ<sup>m</sup>* is the flux generated from the permanent magnet, *i* ∗ *sq* is the reference of stator current in *q*-axis, *p* is the number of pole pairs in the PMSG.

While the MPPT algorithm is applied to the torque control loop, the current controller adjusts the stator current of the generator in *dq* reference frame. The current in d-axis is controlled at zero to maintain the linearization between electrical torque and the q-axis current, as shown in Equation (3). The output voltage reference of the generator can be determined through the inner current loop, which is given by:

$$
\omega\_d^\* = k\_{pm}(i\_{sd}^\* - i\_{sd}) + k\_{im} \int (i\_{sd}^\* - i\_{sd}) dt - \omega\_7 L\_q i\_{sq} \tag{4}
$$

$$
\omega\_q^\* = k\_{pm} \left( i\_{sq}^\* - i\_{sq} \right) + k\_{im} \int \left( i\_{sq}^\* - i\_{sq} \right) dt + \omega\_r L\_d i\_{sd} + \omega\_r \lambda\_m \tag{5}
$$

where *isd* and *isq* are the stator current in *dq* reference frame, *v*<sup>∗</sup> *<sup>d</sup>* and *v*<sup>∗</sup> *<sup>q</sup>* are the reference of stator voltage of the PMSG and *kpm* and *kim* are the PI parameters of the current controller in the MSC.

**Figure 2.** Control diagram of power converter in the WECS: (**a**) Machine-side converter, (**b**) Battery-side converter, (**c**) Grid-side converter.

#### *2.3. Control of a Battery-Side Converter*

The BSC adopts the bi-directional DC-DC converter to regulate the DC capacitor voltage of the BTB converter. In addition, it plays an important role in balancing the power between the GSC and the MSC. When the wind power is lower than the power required from the grid, the power from the BSC is released. By contrast, when the power generated from a wind turbine is larger than the power requirement from the grid, the power is reserved by the BSC. The detailed control scheme of the BSC is shown in Figure 2b. Whereas the outer control is designed to maintain the constant DC capacitor voltage of the BTB converter, the inner controller adjusts the current flowing to the inductor of the bi-directional DC-DC converter. The output voltage and current controller of the converter can be calculated by these equations:

$$I\_{\rm DC}^{\*} = k\_{pd}(V\_{\rm DC}^{\*} - V\_{\rm DC}) + k\_{id} \int (V\_{\rm DC}^{\*} - V\_{\rm DC}) dt\tag{6}$$

$$V\_{out}^{\*} = k\_p(I\_{DC}^{\*} - I\_{DC}) + k\_i \int (I\_{DC}^{\*} - I\_{DC})dt\tag{7}$$

where *kpd* and *kid* are the PI parameters of the DC capacitor voltage controller, *kp* and *ki* are the PI parameters of the current controller in the bidirectional DC-DC converter and *V*∗ *out* is the output voltage reference.

The design of the PI parameters of voltage and current controller should consider the different bandwidth in each control loop. The current controller is designed for a bandwidth of 1.6 kHz with good rejection of high-frequency disturbance, whereas the voltage controller is designed for 400 Hz bandwidth to ensure the stability of the converter system [26]. The classical pole-zero and bode techniques are used to select these parameters.

#### *2.4. Control of a Grid-Side Converter*

With regard to the grid-side converter, its detailed control diagram is shown in Figure 2c, which consists of three cascaded control loops: Power controller, voltage controller and current controller. In the power controller, virtual synchronous generator control is applied to active power control to regulate the power angle *θ* while reactive power control adjusts the AC voltage reference by using droop controller. With the use of VSG control, the GSC can imitate both steady-state and transient-state characteristics of a synchronous generator to virtually provide inertia to the WECS. The VSG control is described by the swing equation, which is given by:

$$P\_{\rm in} - P = I\omega \frac{d\omega}{dt} + D\left(\omega - \omega\_{\mathcal{S}}\right) \tag{8}$$

where *P* is the measured active power of the GSC, *J* is the virtual inertia coefficient, *ω* is the rotor angular frequency generated by VSG control, *ω<sup>g</sup>* is the grid frequency and *Pin* is the input power which is determined by the governor:

$$P\_{\rm in} = P^\* + k\_p(\omega^\* - \omega) \tag{9}$$

where *P*∗ the set active power, *kp* is the droop coefficient for active power controller and *ω*∗ is the nominal angular frequency.

Regarding the reactive power controller, the amplitude of the output voltage reference in *abc* reference frame can be calculated by the droop controller, which is given as:

$$\mathcal{U}\mathcal{U}\_0 = \mathcal{U}^\* + k\_q(\mathcal{Q}^\* - \mathcal{Q}) \tag{10}$$

where *U*<sup>0</sup> is the amplitude of output AC voltage, *kq* is the droop coefficient for reactive power controller and *Q*∗ is the set reactive power.

*Energies* **2018**, *11*, 3507

The reference of output voltage for the GSC is determined by combining Equations (9) and (10), which is shown as follows:

$$\begin{cases} \begin{aligned} \boldsymbol{u}\_{\boldsymbol{a}}^{\*} &= \boldsymbol{l} \boldsymbol{l}\_{0} \text{sin}\boldsymbol{\theta} \\ \boldsymbol{u}\_{\boldsymbol{b}}^{\*} &= \boldsymbol{l} \boldsymbol{l}\_{0} \text{sin}(\boldsymbol{\theta} - 2\pi/3) \\ \boldsymbol{u}\_{\boldsymbol{c}}^{\*} &= \boldsymbol{l} \boldsymbol{l}\_{0} \text{sin}(\boldsymbol{\theta} + 2\pi/3) \end{aligned} \tag{11}$$

The reference of the output AC voltage is transferred from *abc* reference frame to *dq* reference frame, and then input to the inner control loop. The inner control loop consists of two controllers, namely voltage controller and current controller. The voltage controller is used to maintain the output voltage of the GSC, which is described as follows:

$$\dot{m}\_{ld}^\* = k\_{\mathcal{V}^\upsilon}(v\_{od}^\* - v\_{od}) + k\_{iv} \int (v\_{od}^\* - v\_{od}) dt \tag{12}$$

$$i\_{Iq}^{\*} = k\_{pv} \left( v\_{aq}^{\*} - v\_{aq} \right) + k\_{iv} \int \left( v\_{aq}^{\*} - v\_{aq} \right) dt \tag{13}$$

where *kpv* and *kiv* are the proportional and integral gain of voltage controller, respectively.

Regarding the current controller, it is employed to control the inductor current of the GSC. The current reference is also the output of the voltage controller. Similar to the voltage controller, the reference value of the current controller is also compared with the measured current and then input to the PI controller. The output of the current controller can be treated by:

$$m\_d = \upsilon\_{od} - \omega i\_{\dot{q}} L\_f + k\_{\text{pc}} (i\_{ld}^\* - i\_{ld}) + k\_{ic} \int (i\_{ld}^\* - i\_{ld}) dt \tag{14}$$

$$m\_q = \upsilon\_{\alpha q} + \omega i\_d L\_f + k\_{pc} \left( i\_{lq}^\* - i\_{lq} \right) + k\_{ic} \int \left( i\_{lq}^\* - i\_{lq} \right) dt \tag{15}$$

where *kiv* and *kiv* are the proportional and integral component of the current controller, respectively, and *md* and *mq* are the modulating signals in the *dq* reference frame.

#### **3. Proposed Control Strategy**

In the proposed control method, a consensus algorithm is applied for achieving SOC balance in the WECS while the low pass filter is added to compensate the power fluctuation of the WECS. The average dynamic consensus algorithm was introduced in reference [27], which is presented by:

$$\dot{\zeta}\_i = \sum\_{j=1}^{N} a\_{ij} (\zeta\_i - \zeta\_j) \qquad \qquad i = 1, 2, \dots, N \tag{16}$$

where *ζ<sup>i</sup>* and *ζ<sup>j</sup>* are the state variables for node *i* and *j*, respectively, *aij* is the weight for exchanging information from node *j* to *i*.

The communication network is described by a graph with nodes *N* and edges . Each node of the graph represents an agent and each edge of edges represents a communication link between two particular agents. The agents communicate with their neighbors to exchange information among them, and then update the state information. The Laplacian matrix *LN* = *lij Rn*×*<sup>n</sup>* associated with the graph can be written as:

$$\begin{cases} \quad l\_{ii} = \sum\_{\substack{j=1,\ j \neq i}}^N a\_{ij} \\\quad l\_{ij} = -a\_{ij} \ j \neq i \end{cases} \tag{17}$$

Therefore, the dynamics of the consensus algorithm can be described by:

$$
\dot{X} = -\mathcal{L}\_N \mathcal{X} \tag{18}
$$

where *X* = [*x*1, *x*2,..., *xn*] *<sup>T</sup>* is the state variable vector.

The SOC of batteries among WECSs are considered as the state variables of the consensus algorithm. Through the consensus algorithm, the reference of SOC is updated after each time interval. The current SOC of battery *i* can be calculated as:

$$SOC\_i = SOC\_i^\* - \frac{1}{C\_{bati}} \int\_0^t I\_i dt \tag{19}$$

where *SOC*∗ *<sup>i</sup>* and *SOCi* are the initial SOC and the current state of charge of battery *i*, *Ii* and *Cbati* are the output current and the capacity of battery *i*.

The power generated from the SOC controller can be calculated by:

$$P\_{\rm SOC} = k\_{\rm SOC}(SOC^\* - SOC\_i) = k\_{\rm SOC} \Delta SOC\_i \tag{20}$$

where *kSOC* is the SOC coefficient, *SOC*∗ is the SOC reference updated from the consensus algorithm and Δ*SOCi* is the difference between the updated SOC reference and the current SOC of battery *i*.

A low-pass filter is used to smoothen the fluctuation of the output wind power, and then the subtraction of filtered wind power from the measured wind power is used as the compensated power for the fluctuation. Since each WECS has the ability to smoothen wind power, the total power of all WECSs transferred to the grid could be smoothed. The reference of output power is added to regulate the output power of the WECS, as shown in Figure 3.

**Figure 3.** Control diagram of the proposed control strategy.

#### **4. Simulation Results**

In order to evaluate the efficiency of the proposed control strategy, a simulation system is carried out by using a SimPowerSystems toolbox in a MATLAB/Simulink environment. The detailed simulation system which consists of three WECSs with integrated BESS is presented in Figure 4. These WECSs are connected in parallel through the impedance lines and then interfaced with the utility grid. Each WECS injects 1.5 (MW) active power to the utility grid. The proposed controller is verified through two case studies. Whereas the performance of the system is analyzed with different initial SOCs in case study 1, the same initial SOC is focused on case study 2. The simulation parameters of PMSG are listed in Table 1.

**Figure 4.** Simulation system.



#### *4.1. Case Study 1: Performance of the Proposed Control Strategy with Different Initial SOCs*

In the first case, the average SOC of batteries is chosen to equal 45%, 35%, and 25% at the beginning, respectively. The wind speed flowing to three wind turbines is chosen differently for each one, as shown in Figure 5. Whereas the average wind speed of WECS1 is the highest, WECS3 receives the lowest average wind speed. The variation of wind speed results in the fluctuation of active power generated from the wind turbine, which is measured through the MSC, as shown in Figure 6. Although the output power transferred to the utility grid is regulated at 1.5 (MW) for each WECS, the power captured from the wind turbine is not enough for satisfying the power requirement of the utility grid. Therefore, the batteries discharge power in order to achieve power balance between the MSC and the GSC and compensate the power fluctuation.

**Figure 5.** Wind speed.

**Figure 6.** Active power of machine-side converter.

It can be seen from Figure 7 that, without the proposed control strategy, the SOC of each battery moves down slightly at the first interval of 50 s. After that, whereas the SOC of battery 1 and battery 2 are higher than 20%, the SOC of battery 3 moves down to under 20%. However, when the consensus algorithm is applied, the SOC of battery 1 moves down quickly while that of battery 3 moves up in the first 30 s, as shown in Figure 8. In other words, battery 1, which has the highest SOC, releases more power to support the other batteries. Consequently, battery 2 discharges less power and battery 3 reserves power because it has the lowest SOC. After 50 s, all three batteries discharge power to the GSC with the same SOC. In addition, none of the batteries have SOC below 20%. Hence, the proposed controller can reduce the adverse effects of the low SOC on the DC capacitor voltage and the WECS, which has the lowest SOC, can survive.

Furthermore, Figure 9 presents the active power of the GSC without the proposed controller. Because the SOC of batteries is not regulated, the active output power of the GSC is maintained equally at 1.5 MW. However, as illustrated in Figure 10, when the proposed controller is applied, WECS1, which has the highest SOC, injects more power than WECS2 and WECS3 until the SOCs among the WECSs reach the same value at roughly 50 s. After the SOCs are balanced, the output power exchanged with the utility grid is maintained at the reference value. In addition, with the use of smoothing power controller, the fluctuation of wind power is compensated by the battery of each WECS, as shown in Figures 11 and 12. Therefore, the output power of WECSs can be smooth, which enhances the power quality of the system.

**Figure 7.** State of charge (SOC) of batteries in the WECS without proposed controller (Case 1).

**Figure 8.** State of charge of batteries in the WECS with proposed controller (Case 1).

**Figure 9.** Active power of grid-side converter (GSC) without the proposed controller (Case 1).

**Figure 10.** Active power of GSC with the proposed controller (Case 1).

**Figure 11.** Power of battery without the proposed controller (Case 1).

**Figure 12.** Power of battery with the proposed controller (Case 1).

#### *4.2. Case Study 2: Performance of the Proposed Control Strategy with Same Initial SOCs*

In the second case study, the effectiveness of the proposed controller is verified when the initial SOC of batteries is designed to have the same values. As can be seen from Figure 13, the SOC of batteries remains 50% at the beginning. Without the proposed controller, due to the different wind speeds of the WECSs, the SOCs slightly move far away from each other at the first interval of 20 s.

**Figure 13.** State of charge of batteries in the WECS without proposed controller (Case 2).

After that, it can be clearly seen that the SOCs are significantly different over the 100-s period. The SOC of battery 3 moves down quickly, and its slope is higher in comparison with other SOCs because battery 3 releases power the most. It reaches 34% at the end of the period, corresponding to 16% of power discharge.

On the other hand, Figure 14 shows the SOC of the batteries in case of applying consensus algorithm. From 50% at the initial time, the SOC of batteries moves down with a moderate slope, and they remain at a similar value until the end of the period. Moreover, the lowest amount of the SOC is 37%, corresponding to 13% of the power discharge. This value is smaller than the SOC of battery 3 without the consensus algorithm. Therefore, battery 3 releases less power to the GSC in this case.

In addition, Figures 15 and 16 illustrate the active output power flowing to the utility grid without the consensus algorithm and with the consensus algorithm, respectively. It is clear that in both cases the active power of GSCs is controlled to maintain at 1.5 MW. The power fluctuation is reduced by using a low-pass filter to damp out the high-frequency oscillation. For that reason, the active power of GSCs has small variation. In addition, without the proposed controller, the active power of GSCs are injected equally to the grid, while they have a small difference when the consensus algorithm is applied. It is because the SOCs of the batteries are equal that the batteries release the same power to the grid-side converter. Hence, with different wind speeds, the GSC of WECS1, which receives larger average power from the wind turbine, will transfer a little more power to the utility grid. By contrast, the output power of WECS3 is lower compared to the others because the average wind speed flowing

to WECS3 is the smallest. The battery power of both cases is similar because the average wind speed of WECSs is not much different, as depicted in Figures 17 and 18.

**Figure 14.** State of charge of batteries in the WECS with proposed controller (Case 2).

**Figure 15.** Active power of grid-side converter without proposed controller (Case 2).

**Figure 16.** Active power of GSC with proposed controller (Case 2).

Furthermore, Figure 19 illustrates the total power of GSCs flowing into the utility grid in the case of a different initial SOC. The power fluctuation is smoothed because the fluctuation in wind power caused by the wind speed is avoided by means of the low pass filter in the GSC controller. There is a slight difference in the total power of the wind farm in the cases of with and without the proposed controller since two controllers consist of the strategy of smoothing wind power fluctuation.

**Figure 17.** Power of battery without proposed controller (Case 2).

**Figure 18.** Power of battery with proposed controller (Case 2).

**Figure 19.** Total active power of GSCs in case of different initial SOCs.

#### **5. Conclusions**

In this paper, an improved VSG control based on consensus algorithm has been applied to the GSC for balancing the SOCs of batteries in the WECSs. The effectiveness of the proposed controller has been verified through different initial SOCs and same initial SOC conditions under different wind speeds. With the consensus-based SOC balancing controller, the batteries which have higher SOC could support the batteries which have lower SOC. Thus, this prevented the negative effects of the SOC imbalance on the operation of the WECS. In addition, the smoothing power control based on low pass filter has been applied to the GSC for compensating the active power fluctuation to the utility grid. Hence, beside the advantage of VSG to enhance the inertia to the WECS, the output power of the WECS has been smoother, while the SOC of batteries has been balanced.

**Author Contributions:** C.-K.N. conceived and designed the experiments; T.-T.N. and H.-J.Y. performed the experiments and analyzed the results; H.-M.K. revised and analyzed the results; C.-K.N. wrote the paper.

**Funding:** This research was supported by Korea Electric Power Corporation. (Grant number: R18XA03.) **Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

MDPI St. Alban-Anlage 66 4052 Basel Switzerland Tel. +41 61 683 77 34 Fax +41 61 302 89 18 www.mdpi.com

*Energies* Editorial Office E-mail: energies@mdpi.com www.mdpi.com/journal/energies

MDPI St. Alban-Anlage 66 4052 Basel Switzerland

Tel: +41 61 683 77 34 Fax: +41 61 302 89 18