**Coordinated Control Scheme of Battery Storage System to Augment LVRT Capability of SCIG-Based Wind Turbines and Frequency Regulation of Hybrid Power System**

#### **Md. Rifat Hazari 1,\*, E**ff**at Jahan 1, Mohammad Abdul Mannan <sup>1</sup> and Junji Tamura <sup>2</sup>**


Received: 12 January 2020; Accepted: 29 January 2020; Published: 1 February 2020

**Abstract:** Fixed speed wind turbine-squirrel cage induction generator (FSWT-SCIG)-based wind farms (WFs) are increasing significantly. However, FSWT-SCIGs have no low voltage ride-through (LVRT) and frequency control capabilities, which creates a significant problem on power system transient and steady-state stability. This paper presents a new operational strategy to control the voltage and frequency of the entire power system, including large-scale FSWT-SCIG-based WFs, by using a battery storage system (BSS). The proposed cascaded control of the BSS is designed to provide effective quantity of reactive power during transient periods, to augment LVRT capability and real power during steady-state periods in order to damp frequency fluctuations. The cascaded control technique is built on four proportional integral (PI) controllers. The droop control technique is also adopted to ensure frequency control capability. Practical grid code is taken to demonstrate the LVRT capability. To evaluate the validity of the proposed system, simulation studies are executed on a reformed IEEE nine-bus power system with three synchronous generators (SGs) and SCIG-based WF with BSS. Triple-line-to-ground (3LG) and real wind speed data are used to analyze the hybrid power grid's transient and steady-state stability. The simulation results indicate that the proposed system can be an efficient solution to stabilize the power system both in transient and steady-state conditions.

**Keywords:** FSWT-SCIG; battery storage system; power system stability; synchronous generator

#### **1. Introduction**

Wind energy is a clean energy, the use of which can avoid 5.6 billion tons of CO2 by 2050, equivalent to the yearly emissions of the 80 most polluting cities in the world, home to around 720 million people [1]. This would help to save up to four million lives annually by 2030 by reducing pollution, because one in eight deaths in the world is linked to air pollution [1].

The total worldwide wind power capacity in 2015 was 432.9 GW, which is a summative market growth of more than 17% [2–4]. By 2030, wind power could exceed 2110 GW and supply up to 20% of worldwide power demands [4].

#### *1.1. Motivation*

This massive penetration of wind energy into the power system, replacing fossil fuel-based power plants, has introduced some burdens to the power grid.

Basically, fixed speed wind turbine-squirrel cage induction generators (FSWT-SCIGs) are mostly used to develop wind farms (WFs). SCIGs have some advantages, such as their low cost, fewer

maintenance requirements, good speed regulation, high efficiency in converting mechanical energy to electrical energy, better heat regulation, small size, and light weight. However, they cannot ensure low voltage ride-through (LVRT) capability and frequency stability of entire power systems during transient and steady-state periods [5], respectively.

#### *1.2. Literature Reviews*

Many auxiliary devices can be applied to SCIGs to augment their LVRT capability. For example, a dynamic voltage restorer (DVR) [6], thyristor controlled series capacitor (TCSC) [7], magnetic energy recovery switch (MERS) [8], series dynamic braking resistor (SDBR) [9], fault current limiter (FCL) [10], bridge-type fault current limiter (BFCL) [11], static synchronous compensator (STATCOM) [12], static VAR compensator (SVC) [13], superconductor dynamic synchronous condenser (SDSC) [14], unified compensation system (UCS) [15], and a unified power quality conditioner (UPQC) [15], were installed in SCIGs to inject reactive power in order to ensure LVRT capability.

Even though the LVRT was ensured by using the above-mentioned schemes, there are several drawbacks [6–15]. For example: TCSC creates resonance and injects objectionable harmonics, DVR has phase angle jumps and absorbs real power, SDBR and SFCL cannot control reactive power, MERS necessitates mechanical bypass switches, BFCL needs a large-scale coupling transformer, SVC offers voltage oscillations, STATCOM necessities a cut-off in a high-voltage drop, SDSC is less effective for applications of low-voltage drops, UPQC needs a large dc-link capacitor which increases the system cost, and UCS has high losses of conduction in the series bypass switch [16].

On the other hand, the battery storage system (BSS) is well known, and can respond more swiftly and quicker with better performance [17]. Additionally, it is steadily established technology and has appropriate energy density. Thus, BSS is the most prevalent solution in wind power applications [18].

#### *1.3. Contribution*

Therefore, based on the above discussion, a BSS for a SCIG-based WF is proposed in this paper to enhance the LVRT capability during transient periods and to damp frequency oscillations during steady-state periods. A suitable PI controller-based cascaded control approach is constructed to guarantee the stable operation of the power system. The proposed control strategy also incorporates droop gain and frequency signals to provide an effective amount of real power from the BSS which will ensure smaller frequency fluctuations. Detailed design procedures and control strategies are adequately presented in this paper.

The transient and steady-state responses of the entire power system including IEEE nine-bus system, WF with BSS is compared with that of SCIG without BSS. Actual wind speed values of Hokkaido Island, Japan are considered for steady-state analysis.

The simulation results clearly indicate that the proposed strategy can confirm the LVRT capability of WFs, and damp the frequency fluctuations of a hybrid power grid.

The paper is structured in six sections. Section 1 presented the introduction, motivation behind this work, literature reviews, and contribution. Sections 2 and 3 present the model of a hybrid power system and an aerodynamic model of wind turbine. Section 4 describes the proposed BSS along with its control strategy. The simulation results and analysis are presented in Section 5. Finally, Section 6 concludes the paper with a brief summary.

#### **2. Model of a Hybrid Power System**

The hybrid power system model presented in Figure 1 is used for transient and steady-state analysis. It has a WF and IEEE nine-bus main model. Basically, three different conventional synchronous generators (SGs) are used for the main system. The ratings of the SGs are 150 MVA (SG1), 250 MVA (SG2), and 200 MVA (SG3).

**Figure 1.** Model of hybrid power system.

An AC4A-type exciter model is used for all SGs as shown in Figure 2 [19]. The thermal-based power station as depicted in Figure 3 is considered for SG1 and SG2, and the hydro-based power station is considered for SG3 as illustrated in Figure 4 [19].

**Figure 2.** Exciter model of synchronous generators (SGs).

ᶭ

ᶭ

ᶭ

**Figure 3.** Governor model of thermal turbine.

**Figure 4.** Governor model of hydro turbine.

Here, the FSWT-SCIG is linked to the main system at Bus 5 through 0.69 kV/66 kV, 66 kV/230 kV transformers and a dual transmission line. It has one SCIG (rated capacity: 100 MW) as shown in Figure 1. The reactive power is delivered to the SCIG using a capacitor bank during steady-state periods. Additionally, the BSS is connected next to the capacitor bank. The capacity of the BSS is 30 MVA. The frequency is 50 Hz and the base power of the power system is 100 MVA. The governor systems of SG1 and SG3 are controlled by an integral control to ensure automatic generation control (AGC) as depicted in Figure 5 [19]. The parameters of the SGs and SCIGs are presented in the Appendix A.

**Figure 5.** Automatic generation control (AGC).

#### **3. Model of a Wind Turbine**

The expression of the wind turbine's mechanical power can be written as follows [20]:

$$P\_w = 0.5\rho\pi R^2 V\_w \,^3\mathcal{C}\_p(\lambda, \beta) \tag{1}$$

Here, *Pw* = captured wind power, *R* = rotor blade radius (m), *Cp* = power coefficient, ρ = air density (kg/m3), and *Vw* = wind speed (m/s).

The expression *Cp* can be written as follows [21]:

$$C\_p(\lambda, \beta) = c\_1 \left(\frac{c\_2}{\lambda\_i} - c\_3 \beta - c\_4\right) e^{\frac{-c\_5}{\lambda\_i}} + c\_6 \lambda \tag{2}$$

$$\frac{1}{\lambda\_i} = \frac{1}{\lambda - 0.08\beta} - \frac{0.035}{\beta^3 + 1} \tag{3}$$

$$
\lambda = \frac{\omega\_{\rm I} R}{V\_w} \tag{4}
$$

Here, β = pitch angle (deg), ω*<sup>r</sup>* = wind turbine rotor speed (rad/s), *c*<sup>1</sup> to *c*<sup>6</sup> = wind turbine characteristic coefficients [21], and λ = tip speed ratio.

Figure 6 presents the characteristics curve of *Cp* vs. λ*.* The curve is found for a different β from Equation (2). From the graph, the optimum λ (λ*opt*) = 8.1 and the optimum *Cp* (*Cpopt*) = 0.48. Figure 7 shows the model for the blade pitch control system of FSWT [22]. In FSWT, the pitch controller is used to control the real power output of the SCIG when it exceeds the rated power.

**Figure 6.** *Cp* vs. λ characteristics curve.

**Figure 7.** Pitch controller of fixed speed wind turbine-squirrel cage induction generator (FSWT-SCIG).

#### **4. Proposed Coordinated Control of Battery Storage System**

The BSS model which is used in this work is presented in Figure 8. It consists of a lead–acid battery unit, a voltage source converter (VSC) based on pulse width modulation (PWM), and a step-up transformer. For simplicity, the battery is symbolized using a constant DC voltage source. The DC voltage is transformed to grid-synchronized three-phase AC voltage using VSC.

**Figure 8.** Proposed battery storage system (BSS).

The proposed control technique of the BSS is depicted in Figure 9. The different error signals are compensated using a cascaded control technique based on four PI controllers. The upper portion of the proposed control system controls the real power injected to the power grid system by adjusting the d-axis current (*Id*), whereas the lower portion is controlling the reactive power injected to the power system by adjusting the q-axis current (*Iq*). Additionally, in the upper portion the frequency of the grid system (*fsys*) is taken as feedback. Depending upon the frequency deviation, the upper controller portion will minimize the frequency fluctuations by injecting effective amounts of real power from the BSS during steady-state conditions. The trial and error technique is applied to choose the droop gain (Kp) which ensures optimized results.

In the lower portion, the r.m.s voltage (*V*) of the grid system is taken as feedback. During transient conditions (e.g., fault conditions), the lower controller portion will inject effective amounts of reactive power until the terminal voltage reaches its pre-fault value.

Finally, the reference voltages (*Va\**, *Vb\*,* and *Vc\**) are compared with a high-frequency triangular carrier wave to get the gate drive pulses of the VSC. In this way, the LVRT's capability and minimization of frequency fluctuations can be ensured.

**Figure 9.** Proposed control strategy of BSS.

#### **5. Simulation Results**

In this work, simulation investigation has been completed on the same hybrid power system model presented in Figure 1. The well-known PSCAD/EMTDC software is used for simulation analysis. Due to detailed modeling of the whole system, the simulation time step is taken as 10 μs. The system frequency is 50 Hz. Two case studies are executed in order to authenticate the appropriateness of the proposed BSS. In Case 1, simulation scrutiny is accomplished without BSS, and in Case 2, simulation scrutiny is accomplished by including the proposed BSS.

#### *5.1. Transient Stability Analysis*

As shown in Figure 1, the triple-line-to-ground (3LG) fault is considered as a network disturbance near Bus 11 at one of the double circuit transmission lines. The fault conditions are presented in Figure 10. The wind speed data applied to the FSWT-SCIG are sustained constantly at 12 m/s based on the supposition that the wind speed does not change often within this short period.

**Figure 10.** Triple-line-to-ground (3LG) fault conditions.

Figure 11 presents the reactive power response of BSS (Case 2), which indicates that it can provide an effective amount of reactive power to the SCIG during transient periods as depicted in Figure 12. Due to this effective injection of reactive power from the BSS, the terminal voltage of the SCIG goes back to the nominal value more quickly in Case 2, whereas it fails in Case 1, as shown in Figure 13. As the terminal voltage does not reach 90% of the nominal value within 1.5 s based on standard grid code [23], it is disconnected from the main power grid by opening the circuit breaker (CB) at 2.0 s. The rotor speed response of the SCIG, as shown in Figure 14, is unstable in Case 1 but is stable in Case 2 after the fault. This is because the SCIG requires more reactive power during transient periods than steady-state periods to improve the air gap flux. If enough reactive power is not provided, the developed electromagnetic torque of the SCIG declines considerably. Thus, the SCIG's rotor speed increases considerably in Case 1 and makes the whole system unstable. On the other hand, in Case 2 the

SCIG gets enough reactive power from the BSS during a network disturbance situation, and therefore its rotor speed response is stable. The real power output of the SCIG is shown in Figure 15. The real power output goes back to the nominal value more effectively in Case 2 than Case 1. Finally, the rotor speed responses of conventional SGs are presented in Figure 16. The rotor speed of SGs are more stable in Case 2 than Case 1. Thus, from the above analysis it is clear that the LVRT capability can be improved by incorporating the proposed BSS.

**Figure 11.** Reactive power response of BSS (Case 2).

**Figure 12.** Reactive power response of SCIG.

**Figure 13.** Terminal voltage response of SCIG.

**Figure 16.** Rotor speed response of SGs.

#### *5.2. Steady-State Stability Analysis*

The actual wind speed value of Hokkaido Island, Japan is taken in this steady-state analysis as depicted in Figure 17. The total computational time is considered as 70 s.

Figure 18 shows the real power profile of SCIG-based WFs. The responses are identical for both cases, because no control system is involved in the SCIG. Additionally, the real power output is fluctuating because of the variable wind speed data.

**Figure 17.** Wind speed applied to FSWT-SCIG.

**Figure 18.** Real power response of FSWT-SCIG.

The BSS real power profile for Case 2 is presented in Figure 19. From the figure, it is clear that the BSS can ensure an effective amount of real power based on the frequency fluctuations. Thus, the frequency variation is smaller in Case 2 compared to Case 1, as depicted in Figure 20, which validates the importance of the proposed BSS. Figure 21 shows the real power profiles of conventional power plants (SGs). The real power outputs of SGs are fluctuating because of the variable outputs of SCIGs. In addition, there is small variance between the Case 1 and Case 2 responses. This is because BSS is providing and taking real power to and from the grid system, based upon frequency variations.

**Figure 19.** Real power output of BSS (Case 2 only).

**Figure 20.** Hybrid power system frequency response.

**Figure 21.** Real power response of SGs.

Finally, Figure 22 presents the mechanical power output of FSWT. The responses are identical for both cases, as no control system is involved in FSWT-SCIGs.

**Figure 22.** Mechanical power output of FSWT.

Table 1 shows the +Δf, -Δf, and σ for both cases, which are calculated from Figure 20. The +Δf, -Δf, and σ are smaller in Case 2 compared to Case 1.


**Table 1.** Comparison of different parameters of the frequency response graph.

#### **6. Conclusions**

To augment LVRT aptitude and minimize the frequency oscillations of a hybrid power system during transient and steady-state periods, a novel BSS-based FSWT-SCIG is proposed in this paper. Detailed design procedures of the proposed BSS, WFs, and hybrid power systems are explained adequately. The BSS can provide real and reactive power during steady-state and transient periods, respectively. The proposed BSS is composed of both LVRT enhancement techniques and frequency control algorithms. Different case studies are executed to show the usefulness of the proposed BSS. The LVRT characteristic is determined with respect to the standard grid code, taking a 3LG fault. Steady-state performance is tested using the actual wind speed data of Hokkaido Island, Japan. The simulation results clearly indicate that the LVRT aptitude can be improved, and frequency oscillations can be minimized effectively, by using the proposed BSS. Therefore, this proposed control technique has an encouraging prospective value.

As future work, the variable droop controller techniques of BSS with FSWT-SCIGs will be a strong candidate.

**Author Contributions:** M.R.H. and E.J. prepared the theoretical conceptions, and designed the proposed BSS and model of hybrid power system. M.R.H. executed the simulation studies. M.R.H. and E.J. wrote the manuscript. All authors have read and agreed to the published version of the manuscript.

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

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

#### **Appendix A**

The parameters of conventional SGs and SCIGs are depicted in Tables A1 and A2, respectively.


**Table A1.** SGs parameters.


**Table A2.** SCIG parameters.

#### **References**


© 2020 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* **Simple and Low-Cost Photovoltaic Module Emulator**

#### **Massimo Merenda 1,2,\*, Demetrio Iero 1,2, Riccardo Carotenuto <sup>1</sup> and Francesco G. Della Corte 1,2**


Received: 30 October 2019; Accepted: 26 November 2019; Published: 1 December 2019

**Abstract:** The design and testing phase of photovoltaic (PV) power systems requires time-consuming and expensive field-testing activities for the proper operational evaluation of maximum power point trackers (MPPT), battery chargers, DC/AC inverters. Instead, the use of a PV source emulator that accurately reproduces the electrical characteristic of a PV panel or array is highly desirable for in-lab testing and rapid prototyping. In this paper, we present the development of a low-cost microcontroller-based PV source emulator, which allows testing the static and dynamic performance of PV systems considering different PV module types and variable operating and environmental conditions. The novelty of the simple design adopted resides in using a low-cost current generator and a single MOSFET converter to reproduce, from a fixed current source, the exact amount of current predicted by the PV model for the actual load conditions. The I–V characteristic is calculated in real-time using a single diode exponential model under variable and user-selectable operating conditions. The proposed method has the advantage of reducing noise from high-frequency switching, reducing or eliminating ripple and the demand for output filters, and it does not require expensive DC Power source, providing high accuracy results. The fast response of the system allows the testing of very fast MPPTs algorithms, thus overcoming the main limitations of state-of-art PV source emulators that are unable to respond to the quick variation of the load. Experimental results carried on a hardware prototype of the proposed PV source emulator are reported to validate the concept. As a whole result, an average error of ±1% in the reproduction of PV module I–V characteristics have been obtained and reported.

**Keywords:** photovoltaic emulator; photovoltaic panel; single diode model; MPPT

#### **1. Introduction**

The design of electronic power converters for photovoltaic (PV) applications requires a stable and repeatable PV source for experimental testing under realistic operating conditions, which can accurately reproduce the relationship between the output voltage and current of a given PV module.

Furthermore, the possibility to test variable conditions of the PV source is crucial as it is part of the validation of the final product, assessing the behavior in the broadest range of operative condition modifications as temperature, irradiation, and shadowing.

PV real installation does not satisfy at all the requirements hereafter: the I–V characteristics are linked to slowly varying operational parameters like temperature and irradiation, they require in-field test systems and apparatus, test conditions are defined by the actual meteorological conditions that should be jointly acquired [1] and which can rapidly change during the test [2].

Therefore, a PV source emulator is required to complete the on-lab assessments under variable operating conditions in a reasonable amount of time.

Typically, a PV source emulator reproduces the I–V curve of an actual PV module starting from a constant DC source, using both different conversion strategies and power sizes.

Commercial PV source emulators are available in the market, enabling the user to select different PV module or PV array emulations with variable power range [3–5]. However, commercial PV source emulators present several drawbacks, as high cost and a limitation in the rapidly changing atmospheric conditions emulation [6].

Many researchers tried to overcome the limitation of commercial products or to develop low-cost and affordable PV source emulators. Many possible approaches to performing the task of PV source emulator design were found in the literature.

The simplest model of photovoltaic generator emulator can be obtained by connecting in series a DC voltage generator and a variable resistor [7]. The open-circuit voltage VOC is set by the maximum output voltage of the DC generator, while the short-circuit current ISC depends both on the output voltage of the DC generator and on the value of the resistance of the variable resistor. For a given value of the series resistance RS, if the load resistance is varied from its minimum value to its maximum value, a linear I–V characteristic with a negative slope will be obtained. The main advantage of this technique is the simplicity of implementation, however, the characteristic I–V obtained differs significantly from that of a real photovoltaic source. Moreover, this type of PV source emulator is characterized by a low efficiency (maximum 50%) due to dissipative losses on the series resistance.

A further method is based on the use of an analog amplification technique that allows to independently amplify the low current and voltage values typical of a photodiode operating in the photovoltaic mode so as to make them coincide with those of a standard photovoltaic module [8,9]. Since this type of emulator is made entirely with analog components, it has a high bandwidth, which allows using this circuit to test photovoltaic inverters with maximum power point tracker (MPPT) algorithms operating at high frequency [10–12]. On the other hand, the main disadvantage of this circuit is the high power dissipation that involves the use of heat sinks with a large surface area.

In [11] the logarithmic approximation of the ideal single diode model is used, and the power stage consists of a DC power supply feeding a linear voltage regulator.

To overcome the disadvantage of the high power consumption of PV source simulators based on analog electronics, several solutions based on the use of DC/DC static converters (choppers) have been proposed, such as [13–20]. To determine the output voltage and current values of the DC/DC converter, this is controlled by a feedback control where the output current of the chopper is compared with a reference current. The reference current can be determined in real-time by means of a mathematical model of the photovoltaic module (PV-model) [19] or extrapolated from data stored in a look-up-table (LUT). The first approach requires knowledge of the parameters, which is difficult to achieve in some situations. The most commonly used approach is to derive an analytical model to represent the I–V curves from the data available from the datasheet of the photovoltaic panel manufacturer [21]. The choice of whether to use a mathematical model of the photovoltaic module or a LUT must be made considering several factors such as the speed of response of the system, accuracy, and use of hardware resources in terms of both computational and memory. The complexity of the problem increases if there is the necessity to emulate modules with different I–V characteristics since each of them will require its own look-up-table. Another disadvantage of emulators using look-up-tables is that the I–V characteristic of the module, between two successive points stored in the look-up-table, is obtained by linear interpolation, which makes the system less accurate than the mathematical model-based approach. In contrast, emulators based on the resolution of a mathematical model of the PV module are more accurate and do not require a large amount of memory [22]. However, in order to obtain a detailed representation of the I–V characteristic, the mathematical model will contain high order equations, leading to an increase in computational time and thus to a slower system.

In [23] is proposed a solution with a field programmable analog array, characterized by great ease of reconfiguration and programming with respect to field programmable gate array (FPGA) or digital signal processing (DSP) based implementations. No digital to analog converters (DAC) or analog to digital converters (ADC) is needed while the final cost remains quite high due to the need for at least a DC/DC converter.

In [24] is proposed a solution that adopts modular hardware, configurable software, systematic modeling, and design methods, requiring a PC running Matlab/Simulink to determine the controller parameters.

Another method builds an equivalent photovoltaic source using an unlighted photovoltaic panel and a DC current power supply [10]. However, this approach requires the use of an actual PV panel that must be changed if it is necessary to emulate a different panel; also, the temperature effect is not easily simulated.

In [25] a dual-mode regulator consisting of a voltage regulator and a current regulator, connected by two diodes for power hybridization, is proposed. The system switches between voltage and current regulation, thus requiring complex and costly electronics.

In this paper, in order to overcome high realization costs, reduced accuracy and versatility, we present a low-cost, microcontroller-based PV source emulator, which allows for testing the performance of PV systems including different PV module types at user-selectable operating conditions. The I–V characteristic is calculated in real-time using a simple diode model, and it does not use any DC-DC converter, reducing the noise from high-frequency switching, and reducing or eliminating ripple and the demand of output filters. Moreover, it does not require the use of expensive DC power sources and can be used for laboratory tests and rapid prototyping by researchers and students. In addition, the proposed solution provides accurate emulations over the full span of emulated power source, differently from other state-of-art solutions that provide good results only closer to the maximum power point (MPP). The model implemented takes into account fast-changing environmental conditions that can be accurately tracked and/or emulated with the use of actual temperature, humidity and illumination sensors or by software techniques.

The paper is organized as follows. Section 2 introduces the photovoltaic cell model. Section 3 explains the working principle of the proposed PV source emulator and the experimental setup. Section 4 reports the experimental results and compares them with simulations, at different conditions. Section 5 draws the paper conclusions.

#### **2. PV Cell Model and Characteristics**

Each photovoltaic cell is characterized by some basic parameters provided by the manufacturers, referring to the standard test conditions (STC) which specifies an irradiance of 1000 W/m2, a cell temperature of 25 ◦C and an air mass 1.5 (AM1.5) spectrum:


The Short-circuit current depends linearly on the value of the irradiance, whereas the influence of the temperature can be expressed by the coefficient *kI* (Temperature coefficient of short-circuit current) that indicates the percentage variation of the short circuit current as the temperature changes from the value determined under STC. Contrary to the short-circuit current, the open-circuit voltage remains relatively constant when the radiation changes but is strictly dependent on the cell temperature. The coefficient *kV* (Temperature coefficient of open-circuit voltage) expresses the variation of the open-circuit voltage as the temperature changes with respect to the reference value calculated under

STC. The photovoltaic cell absorbs most of the incident solar radiation but there is a significant portion of the absorbed radiation that is not converted into electricity but generates heat, which causes an increase of the temperature of the cells that affects *ISC* and *VOC*, and consequently the conversion efficiency.

In the dark, the I–V characteristic of a photovoltaic cell shows an exponential shape like the I–V characteristic of a diode. As a result, a photovoltaic cell exposed to solar radiation can be assimilated from a circuital point of view to a current generator with a diode in parallel (Figure 1). Various models are available in literature [26–30] and the single diode model is one of the simplest models.

**Figure 1.** Photovoltaic cell: equivalent circuit of the single diode model.

The current generator delivers an *IPH* current directly proportional to the solar radiation incident on the photovoltaic cell. Two resistors have been added to take into account the internal losses of the photovoltaic cell:


This model can be extended to model the operation of a photovoltaic module by specifying the number of cells connected in series *Ns* and in parallel *Np*.

Various mathematical models are available describing the electrical behavior of a photovoltaic cell, which differs according to the precision of the mathematical model to be obtained and the number of parameters available. Simplified models have been developed taking into account only the parameters that can be measured practically [31]; in this work, the mathematical model follows equations in [32–34]. The thermal voltage *Vt* is defined as

$$V\_t = \frac{kT\_{op}}{q} \,\tag{1}$$

where *q* is the charge of an electron, *k* is the Boltzmann constant, *Top* is the temperature in K.

*VOC* depends on the saturation current density of the solar cell *IS* and the photo-generated current *Iph*:

$$V\_{\rm ox} = \ln \frac{I\_{\rm pl}}{I\_{\rm s}} V\_{t\_{\rm l}} \tag{2}$$

The Shockley equation that relates the current and voltage of the cell in zero-illumination condition is adjusted for a photovoltaic module [32] by specifying the number of cells connected in series *Ns* and in parallel *Np*:

$$I\_d \quad = I\_s \Big(e^{\frac{V + R\_S I}{nV\_l N\_S}} - 1\Big) \mathcal{N}\_{p\prime} \tag{3}$$

where *n* is the ideality factor which is defined as how closely a diode follows the ideal diode equations. The reverse saturation current can be obtained by:

$$I\_s = I\_{rs} \left(\frac{T\_{op}}{T\_{ref}}\right)^3 e^{\frac{-qE\_g}{mk} \left(\frac{1}{T\_{op}} - \frac{1}{T\_{ref}}\right)}\tag{4}$$

with *Eg* that is the extrapolated energy bandgap at 0 K. *Irs* is the value of the saturation current at *Top*:

$$I\_{rs} = \frac{I\_{\rm SC}}{\frac{V\_{\rm ocq}}{c^{\rm nkT\_{op}}} - 1}.\tag{5}$$

The current flowing through the shunt resistance *RSH* is defined as:

$$I\_{\rm sh} = \frac{V + R\_S I}{R\_{\rm sh}},\tag{6}$$

and the photo-generated current is defined as:

$$I\_{ph} = G\_k \left[ I\_{sc} + k\_I (T\_{op} - T\_{ref}) \right]\_{\text{f}} \tag{7}$$

with *Gk* being the solar irradiance and *Isc* the short circuit current, *kI* = (*ISC*(*Top*) − *ISC*(*Tref*))/(*Top* − *Tref*). Finally, the characteristic equation of a photovoltaic panel using the equivalent circuit of Figure 1 is deduced:

$$I = \, \, I\_{\rm plr} \mathcal{N}\_{\mathcal{P}} - I\_d - I\_{\rm slr} \,. \tag{8}$$

#### **3. Description of the PV Source Emulator**

#### *3.1. System Overview*

Starting from a circuit model of a photovoltaic module and from the knowledge of the parameters of that model, it is possible to create a MATLAB Simulink model useful to test the behavior of a generic photovoltaic module and to trace its I–V and P–V characteristics when the load conditions or the environmental parameters to which the module is subjected, such as temperature and radiation, vary. The Simulink model of the photovoltaic module used in this work is based on the single diode circuit model of the Solarex MSX-60 photovoltaic module model available on [35].

It is worth noting that the novelty proposed in this work resides in the accurate emulation and curve-fitting of the characteristic of a real PV module by the proposed PV source emulator, and not in the model itself.

The model parameters have been adapted to simulate the output characteristic of a 12 W photovoltaic module with the parameters reported in Table 1. The block diagram of the proposed photovoltaic source emulator is shown in Figure 2.

**Table 1.** Basic Parameter of the Simulated PV module at Standard Test Conditions (STC).


**Figure 2.** Block diagram of the PV source emulator.

#### *3.2. Emulation Technique*

The I–V characteristic of a photovoltaic module is a monotonous decreasing function, in fact, the current supplied by the photovoltaic module is maximum *I* = *ISC* when it is in a short circuit condition, and decreases as the voltage across the module increases. Referring to the I–V characteristic in Figure 3, it can be seen that, for each voltage value, the current supplied by the photovoltaic module can be determined as the difference between the short circuit current *ISC* and a loss current *ILOSS*:

$$\forall V \in (0, V\_{\infty}) \to I(V) \;=\; I\_{\infty} - I\_{\text{less}}(V). \tag{9}$$

The technique proposed in this paper is based on the use of:


**Figure 3.** Graphic representation of the emulation technique; the current on the load is obtained as the difference between the *ISC* and the *ILOSS*.

Based on the data returned by the mathematical model of the photovoltaic module, the control system determines the value of the current *ILOSS* and generates a control signal that is applied to the gate of the MOSFET in order to modulate the drain current so that it results in *IDRAIN* = *ILOSS*. The current circulating in the MOSFET is sensed by the control system that aims to minimize the error between the target *ILOSS* and the one that actually flows on the MOSFET. A proportional-integral-derivative (PID) controller allows generating the suitable control signal to achieve the required current regulation.

#### *3.3. Experimental Setup*

The control logic and the mathematical model of the photovoltaic module have been implemented on an STM32F401RE microcontroller (STMicroelectronics), mounted on the STM32 Nucleo board. A specifically made shield board attached on the Nucleo board implements the necessary hardware that allows to control the MOSFET and sense current and voltage (Figure 4).

**Figure 4.** A picture of the realized photovoltaic source emulator prototype: the custom made shield is mounted on top of an STM32 Nucleo board by STMicroelectronics.

The microcontroller implements the PID controller that allows modulating the control signal to achieve the required current regulation. It generates a 3.3 V PWM control signal and a TC4424A (Microchip, Chandler, AZ, USA) driver produces a PWM signal between 0 V and 8 V, which is filtered by a low-pass RC filter to extract the average value and used to control an IRF820 MOSFET (International Rectifier Semiconductors) in linear mode. The average value of the PWM signal depends on the duty cycle *D* = *Ton*/*T* of the signal, defined as the ratio between the pulse active time *Ton* and the period *T* of the signal. The average value of the gate signal can, therefore, be adjusted by acting on the duty cycle according to the relationship:

$$V\_{out} = V\_{H}D\_{\prime} \tag{10}$$

where *VH* is the maximum voltage of the PWM signal.

The PWM frequency of the control signal is 50 kHz and the RC filter is set with a resistance R = 150 kΩ and a capacitance C = 10 μF for a cut-off frequency of 0.106 Hz to minimize the control signal high-frequency components.

The microcontroller firmware configures and initializes the microcontroller peripherals needed to interact with the PV source emulator hardware, and implements the photovoltaic emulator code. The internal 12-bit ADC is used to measure the voltage on the load through a voltage divider, and the current through a shunt resistor of 10 mΩ and a current sense amplifier INA283 (Texas Instruments, Dallas, TX, USA) with a gain of 200 V/V; this configuration allows to measure up to 1.65 A of current with very low power dissipation.

After the initialization, the firmware cyclically: (1) reads the voltage on the load and current *ILOSS* passing through the MOSFET, (2) calculates the target *ILOAD,ref* by using the PV model equations and Equation (9), and (3) determines, by mean of a digital PID controller, the variation of duty cycle of the PWM control signal required to produce the desired *ILOSS,ref* current.

The constant current generator is chosen such that the voltage and current ratings are higher than the *ISC* and *VOC* of the panel to be emulated reported in Table 1. A Jolight KL824-04 power supply that delivers 700 mA with a voltage range up to 30 V and its output has been connected to a variable resistive load of a maximum of 110 Ω. The system is supplied by an AC-DC miniature switching power supply (Bias Power BPSX 1-08-50) that converts 230 V AC main voltage to 8 V and 5 V DC voltage to supply the boards.

The digital multimeter Agilent U1272A and the LeCroy WaveSurfer 343 oscilloscope were used to monitor and acquire the signals.

#### **4. Results**

#### *4.1. Simulation Results*

In order to test the Simulink model of the photovoltaic module, simulations have been carried out at different solar irradiances and operating temperatures. Figure 5 shows the I–V and P–V characteristics generated by the model for different values of irradiance and temperature.

**Figure 5.** I–V and P–V characteristics generated by the model: (**a**) I–V characteristic at 25 ◦C, AM1.5, at different irradiance values; (**b**) P–V characteristic at 25 ◦C, AM1.5, at different irradiance values; (**c**) I–V characteristic at different temperatures, G = 1000 W/m2, AM1.5; (**d**) P–V characteristic at different temperatures, G = 1000 W/m2, AM1.5.

#### *4.2. Experimental Results*

The first test conducted aims to verify the ability of the photovoltaic emulator to follow the I–V characteristic of the simulated photovoltaic module in the Simulink environment under STC conditions. For the test, the photovoltaic source emulator has been programmed to *VOC* = 25 V and *ISC* = 0.7 A. Figure 6 shows the comparison of the I–V characteristics generated by the Simulink model and that of the proposed photovoltaic source emulator. It is possible to note that the emulator faithfully reproduces the characteristic of the simulated photovoltaic module. The right terminal part of the I–V characteristic cannot be reproduced by the emulator because the value of the power resistor used as a load in the tests could not assume sufficiently high resistance values, being limited to 110 Ω.

**Figure 6.** Comparison between the simulated I–V characteristic and the output I–V characteristic of the photovoltaic source emulator under STC conditions (1000 W/m2, 25 ◦C).

The absolute deviation value between the simulated I–V characteristic and the one reproduced by the photovoltaic emulator has been calculated, according to:

$$Abs(Error)^{\circ}\_{0} = Abs(I\_{load\_{Modul}} - I\_{load\_{PVEmidatur}})100\_{\prime} \tag{11}$$

and the results are shown in Figure 7. The deviation for a large part of the characteristic is less than 1% and overall is below 5%. The maximum error is reported very close to *VOC* where a slight variation of the voltage causes a sudden and large current variation. The accuracy of the system demonstrates the effectiveness of the proposed PV source emulator in reproducing the I–V characteristic.

**Figure 7.** Maximum absolute deviation between the simulated I–V characteristic and the one reproduced by the proposed photovoltaic source emulator.

#### 4.2.1. Results at Different Environmental Conditions

Other tests have been carried out to verify that the photovoltaic source emulator is able to follow the characteristics of I–V and P–V at different values of the environmental parameters. From the graphs shown in Figures 8 and 9, it can be seen that even when irradiation and temperature conditions vary, the photovoltaic source emulator can fit the target I–V and P–V characteristics.

**Figure 8.** Comparison of simulated and emulated characteristics at different irradiation conditions: (**a**) I–V characteristic; (**b**) P–V characteristic.

(**b**)

**Figure 9.** Comparison of simulated and emulated characteristics at different temperatures: (**a**) I–V characteristic; (**b**) P–V characteristic.

#### 4.2.2. Dynamic Performance

In previous paragraphs, the ability of the photovoltaic source emulator to reproduce the I–V and P–V characteristics under very slowly varying load and fixed environmental conditions has been shown. On the other hand, a photovoltaic emulator must also be characterized by a dynamic point of view, evaluating the time necessary to track the sudden changes in load resistance.

To test the settling time of the control signal, the filter has been set to a cut-off frequency of 10.6 Hz and the value of the load resistance was changed using a rheostat to increase the load resistance from 5 Ω to 30 Ω. The results are reported in Figure 10 and show a response time of less than 150 ms. The system has also been tested as a power source with two different MPPTs, a commercial SolarEdge

Power Optimizer and an experimental MPPT [36], showing a correct behavior within the limits of its power range.

**Figure 10.** Transient response of the control signal following an instantaneous increase of the load resistance from 5 Ω to 30 Ω.

#### **5. Conclusions**

In this paper, we presented the design, test, and results of the development of a low-cost microcontroller-based PV source emulator, which allows testing the static and dynamic performance of PV systems considering different PV module types and variable operating and environmental conditions. The photovoltaic source emulator is based on a completely new technique, which consists in subtracting an adequate amount of current from a fixed direct current source so as to reproduce the desired I–V characteristic. Direct current sources can be found on the market at a very low price, in comparison with systems based on expensive DC voltage sources. Moreover, the proposed method has the advantage of reducing noise from high-frequency switching, reducing or eliminating ripple and the demand of output filters, and it does not require expensive DC Power source, providing high accuracy results. In fact, very good accuracy in the reproduction of PV module I–V characteristics has been obtained and reported with an average and maximum error of, respectively ±1% and ±5%. Experimental results on a hardware prototype of the proposed PV source emulator validate the concept, showing a very good adherence to the simulation.

The fast dynamic response of the system (150 ms) allows the testing of very fast MPPTs algorithms, thus overcoming the main limitations of state-of-art PV source emulator that is unable to respond to the quick variation of the load. The system has been tested as a power source with two different MPPTs showing a correct behavior within the limited power range.

A drawback of the proposed system is mostly the heat dissipation over the transistor used in linear region, which in fact reduces the efficiency of the system. However, for the purpose of this work, such drawback is considered acceptable, allowing the reduction of the Bill of Material of the board cost to less than 20 dollars and providing, at the same time, an accurate yet simple method for emulating photovoltaic sources.

**Author Contributions:** Conceptualization, M.M.; Data curation, M.M. and D.I.; Formal analysis, M.M.; Investigation, M.M., D.I., R.C. and F.G.D.C.; Methodology, M.M., R.C.; Software, M.M. and D.I.; Supervision, M.M.; Writing—original draft, M.M.; Writing—review & editing, M.M., D.I., R.C. and F.G.D.C.

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

**Acknowledgments:** PAC Calabria 2014–2020 Asse Prioritario 12, Azione 10.5.12, is gratefully acknowledged by one of the authors (D.I.).

**Conflicts of Interest:** The authors declare no conflict 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*

### **Coordinated Frequency Stabilization of Wind Turbine Generators and Energy Storage in Microgrids with High Wind Power Penetration**

**Moses Kang 1, Gihwan Yoon 1, Seonri Hong 1,2, Jinhyeong Park 2, Jonghoon Kim <sup>2</sup> and Jongbok Baek 1,\***


Received: 5 November 2019; Accepted: 18 November 2019; Published: 21 November 2019

**Abstract:** This paper proposes a coordinated control scheme for wind turbine generators (WTGs) and energy storage in microgrids with high wind power penetration. The proposed scheme aimed to reduce the system frequency deviation caused by variations in wind power and loads. To stabilize the frequency, the WTG and energy storage system (ESS) are used for kinetic energy generation and electrical energy storage, respectively. When the WTG contributes excessively to frequency stabilization in the microgrid with a high wind power penetration, the system frequency may fluctuate considerably. Thus, it is necessary to adjust the contribution of a WTG and to share it with other sources. To achieve our objective, we proposed a coordinated control scheme between the WTG and ESS that shares their releasable and absorbable energies. The coordinated control consistently calculated the releasable and absorbable energies of the WTG and ESS and determined weight factors related to the energy ratios. Accordingly, the weight factors improved the ability of providing supporting frequency stabilization of the WTG and ESS by increasing the stored energy utilization. The performance of the scheme was investigated using MATLAB Simulink Electrical. The results show that the proposed coordinated control successfully stabilized the system frequency by calculating the appropriate contributions required from the WTG and ESS.

**Keywords:** frequency stabilization; coordinated control; wind turbine generator; high-fidelity battery model; releasable and absorbable energy

#### **1. Introduction**

The system frequency in a power system is indicative of the balance between the generation and consumption of active power and must be maintained within the normal range at all times. In a conventional power grid, synchronous generators that have a spinning reserve increase their mechanical power by relying on the deviation of the frequency [1]. However, in a power grid with high wind power penetration, the output power of a wind turbine generator (WTG) is critical for the maintenance of the system frequency. Hence, a WTG should contribute the system frequency stabilization because active power from the maximum power point tracking (MPPT) control results in large fluctuations in the system frequency [2]. Some countries specify requirements for the reduction of the ramping rates of the output power of a WTG to overcome fluctuations in the system frequency [3,4].

Several control schemes for smoothing the output power of a WTG by controlling the pitch angle have been reported [5–10]. However, these methods substantially decrease the captured power from the incoming wind power, and control schemes that entail releasing the kinetic energy stored

in the rotating masses of WTG blade and gearbox have been proposed [11–13]. Therefore, a WTG can temporarily absorb or release electric energy to the rotating masses and contribute to the system frequency stabilization. However, in a power system with a high wind power penetration, an output with an excessive ramp rate of the WTG might adversely affect the system frequency stabilization.

Accordingly, control schemes for coordinated WTGs and energy storage have also been proposed [14–16]. Chunghun et al. [14] proposed a coordinated control of a WTG and ESS to reduce the output power fluctuation of a WTG. The WTG operated based on the wind speed variation and size of the ESS capacity when de-loaded and they successfully improved the grid reliability, especially in the case of a large wind speed variation. Ziping et al. [15] proposed maximizing the inertial response of a WTG to arrest the system frequency nadir when the large disturbances occurred in a power system. They used a small-scale battery ESS to reduce the second frequency dip that can occur while recovering the reduced rotor speed through the inertial response of the WTG. Akie et al. [16] proposed the coordination control of the WTG and ESS using load estimation via a disturbance observer in an isolated grid. In their study, frequency stabilization was supported through mitigating the fluctuation of a WTG using a pitch angle control and an active power control of the ESS that was applied to the low-frequency and high-frequency domains, respectively. These conventional papers propose coordinated controls of a WTG and ESS, and they have responded to issues such as power smoothing, primary frequency control based on large disturbance, and frequency stabilization. However, they do not deal with concerns about the high wind power penetration level.

This study proposes a coordinated control scheme for a WTG and ESS in a microgrid with a high wind power penetration to improve the frequency stabilization. This was achieved through the continuous calculation of the releasable and absorbable energy of a WTG and ESS, along with the determined weight factors related to the energy ratios. Thus, the weight factors improved the ability for supporting frequency stabilization of a WTG and ESS by increasing the stored energy utilization. Contrary to Chunghun et al. [14] and Akie et al. [16], in this study, an ESS had a high utilization to maintain the system reliability in an isolated microgrid with a high wind power penetration. The performance of the scheme was investigated using MATLAB R2018b Simulink Electrical.

The rest of the paper is structured as follows. In Section 2, in addition to the typical variable speed WTG model, the high-fidelity battery model is briefly described. In Section 3, the proposed coordinated control of the WTG and ESS is explained, including the aim of the proposed scheme, the control strategy for frequency stabilization, and its advantages. In Section 4, we describe three cases that were conducted to demonstrate the superior operation for system frequency regulation of the coordinated control of WTG and ESS under varying wind speed conditions and set values of the initial state of charge (SOC). In Section 5, in-depth conclusions are provided.

#### **2. The WTG and Battery Models**

The WTG and battery models system supports the frequency stabilization in isolated microgrids by controlling the active powers based on the system frequency variation. A WTG is a permanent magnet synchronous generator (PMSG) and it can control the active power related to its rotor speed. In this paper, the high-fidelity battery model was adjusted to verify the correct performance of the proposed scheme.

#### *2.1. WTG Model*

The PMSG configuration is presented in Figure 1a. The mechanical output power of the turbine, *Pm*, is given by:

$$P\_m = \frac{1}{2} \rho \pi R^2 \upsilon\_w^3 c\_p(\lambda, \beta),\tag{1}$$

where ρ, *R*, *vW*, *CP*, λ, and β are the air density, blade length, wind speed, power coefficient, tip-speed ratio of the rotor blade tip speed to wind speed, and blade pitch angle, respectively. According to Siegfried [17], *cP* used in this paper can be represented by:

$$C\_p(\lambda, \beta) = c\_1 \left(\frac{c\_2}{\lambda\_i} - c\_3 \beta - c\_4\right) \times e^{-\frac{c\_5^\*}{\lambda\_i}} + c\_6 \lambda\_\star \tag{2}$$

where

$$\frac{1}{\lambda\_i} = \frac{1}{\lambda + 0.08\beta} - \frac{0.035}{\beta^3 + 1} \tag{3}$$

and the coefficients *c*<sup>1</sup> to *c*<sup>6</sup> are *c*<sup>1</sup> = 0.5176, *c*<sup>2</sup> = 116, *c*<sup>3</sup> = 0.4, *c*<sup>4</sup> = 5, *c*<sup>5</sup> = 21, and *c*<sup>6</sup> = 0.0068. In this study, λ*opt* and *CP*,max were set to 8.1 and 0.48, respectively.

**Figure 1.** The PMSG model. (**a**) Typical configuration of a PMSG; *Vr, Ir*: voltage and current in the rotor circuit; *Vt, It*: voltage and current at the terminal; *Vr,ref, Vt,ref*: reference RSC and GSC voltage; *VDC*: DC-link voltage; *Vg*, *Ig*: voltage and current at the point of common coupling (PCC); ω*r*: rotor speed; β: pitch angle. (**b**) Operational characteristics of a PMSG. (**c**) Operational characteristics of a frequency stabilization scheme.

The maximum power point tracking (MPPT) output, *PMPPT*, is represented as:

$$P\_{\rm MPPT} = k\_{\rm 3} \alpha\_{\rm r.}^3 \tag{4}$$

where ω*<sup>r</sup>* is the rotor speed and *kg* is a constant that is set to 0.512 in this paper. The rotor-side converter (RSC) in the PMSG controls the active and reactive power injected into a grid., and the grid-side converter (GSC) controls the DC-link and terminal voltages.

Figure 1b shows the mechanical power curves at different wind speeds as indicated by the thin solid lines. The maximum power limit was set to 1.1 p.u. and the operating range of the rotor speed of the PMSG was between 0.6 p.u. to 1.2 p.u. [17], which is represented in Figure 1b by the red dashed lines.

A controllable WTG (of type III and type IV) can aid in frequency stabilization by using the kinetic energy stored in its rotor. The WTG is connected to the power system through power electronic devices, which means the frequency from the generator side is decoupled from the system frequency, unlike a synchronous generator, which is directly connected to the power system. Hence, for it to regulate the system frequency, the reference power based on the system frequency must be adjusted. Figure 1c illustrates the frequency stabilization control scheme, which is based on the frequency deviation. In Figure 1c, the total active power reference, *Pref*, consists of the active power reference for the MPPT control, *PMPPT*, and additional power reference based on the droop loop, Δ*P*, which can be expressed as:

$$
\Delta P = -\frac{1}{R}(f\_{\text{sys}} - f\_{\text{nom}})\_\prime \tag{5}
$$

where *fsys*, *fnom*, and 1/*R* are the system frequency, nominal frequency, and loop gain for droop, respectively. When the system frequency is larger than the nominal frequency, WTG reduces the output power through the droop loop. Thus, the system frequency automatically reduces and the rotor speed of a WTG increases. When the rotor speed reaches the maximum, WTG reduces the output power by increasing the pitch angle, consequentially rejecting the wind energy.

#### *2.2. Battery Model*

Battery models integrated in the wind farm are commonly used for simplified models that only have fixed parameters regardless of the SOC variation. However, in this paper, a high-fidelity battery model with parameters of a battery equivalent circuit based on the SOC was used to accurately examine the performance change of the battery due to the proposed coordinated control. Figure 2 shows the equivalent circuit models that can be used to represent the electrical property of Li-ion batteries and Figure 3 shows the experimental data of an open circuit voltage and line current. These data were extracted from a lithium-ion battery when the battery was discharged by inversely pulsating in 5% increments of SOC.

**Figure 2.** General equivalent circuit model (two R-C branches).

**Figure 3.** Pulse discharge in 5% increments of the SOC. (**a**) Experimental data of open circuit voltage. (**b**) Experimental data of discharged current.

The pulse type tests cause the circuit dynamics of battery, which can provide necessary data about the performance of the battery cell at different points of the SOC. Figure 4 shows one pulse of the discharge test. To estimate *Rseries*, the voltage drops and rated current were used, which can be represented as:

$$R\_{series} = V\_{drop} \times I\_{rated} \tag{6}$$

where *Vdrop* and *Irated* are the voltage drop and rated current, respectively. Using the experimental data, in this paper, the R-C ladder parameters were estimated using MATLAB Curve Fitting. The resistance and capacitance of the two ladders was estimated using the equation for curve fitting determined by:

$$dL\_{\rm CCV} = ae^{-t/b} + ce^{-t/d},\tag{7}$$

where *a*, *b*, *c*, and *d* are denoted as *R*transient\_*S*, τtransient\_*S*, *R*transient\_*L*, and τtransient\_*L*, respectively. The *C*transient\_*<sup>S</sup>* and *C*transient\_*<sup>L</sup>* were calculated using:

$$\mathcal{L}\_{transient\\_S} = R\_{transient\\_S} \times \tau\_{transient\\_S} \tag{8}$$

$$\mathcal{L}\_{transient\\_L} = R\_{transient\\_L} \times \tau\_{transient\\_L} \tag{9}$$

**Figure 4.** One pulse from the discharge test.

#### **3. Coordinated Frequency Stabilization between the WTG and Energy Storage**

The aim of the proposed coordinated frequency stabilization scheme was to reduce the system frequency deviation in an isolated microgrid with a high wind power penetration. This was achieved by calculating the releasable and absorbable energy of a WTG and ESS and determining the related weighting factors from the coordinated control. The weighting factors were calculated using the releasable and absorbable energy of the WTG and ESS to the power system. Figure 5 shows the flowchart for the coordinated frequency stabilization between the WTG and ESS. The algorithm presents the host controller for the coordination between the WTG and ESS that regulates the system frequency to the nominal frequency and increases the system reliability.

**Figure 5.** Flowchart for the coordinated frequency stabilization between a WTG and ESS.

The resource and system values, such as *wr*, SOC, and *Fsys*, were required when implementing the proposed algorithm. It performed the following series of steps:

1) The algorithm calculated the releasable and absorbable maximum energy of the WTG and ESS. The releasable and absorbable maximum energy of the WTG were represented as

$$E\_{\rm WTG\\_rel\\_max} = \frac{1}{2} \Im \left( \omega\_{\rm max}^2 - \omega\_{\rm min}^2 \right) \tag{10}$$

$$E\_{\rm WTG\\_abso\\_max} = \frac{1}{2}J(\omega\_{\rm min}^2 - \omega\_{\rm max}^2) \tag{11}$$

where *J*, *wmax*, and *wmin* are the inertia constant, maximum rotor speed, and minimum rotor speed of a WTG, respectively. The releasable and absorbable maximum energy of an ESS were represented using:

$$E\_{ESS\\_rel\\_max} = C(SOC\_{max} - SOC\_{min}),\tag{12}$$

$$E\_{\rm ESS\\_abs\\_max} = C(SOC\_{\rm min} - SOC\_{\rm max}) \,\,\,\,\,\tag{13}$$

where *C*, *SOCmax*, and *SOCmin* are the capacity, maximum SOC, and minimum SOC of a battery, respectively.


$$E\_{\rm WTG\\_relc\\_ratio} = \frac{1}{2}I(\omega\_r^2 - \omega\_{\rm min}^2) / E\_{\rm WTG\\_relc\\_max} \tag{14}$$

$$E\_{\rm WTG\\_abso\\_ratio} = \frac{1}{2}J(\omega\_r^2 - \omega\_{\rm max}^2)/E\_{\rm WTG\\_abso\\_max}.\tag{15}$$

The releasable and absorbable energy ratio of ESS were represented as:

$$E\_{ESS\\_rel\\_ratio} = C(SOC - SOC\_{min}) / E\_{ESS\\_rel\\_max} \tag{16}$$

$$E\_{\rm ESS\\_above\\_ratio} = C(SOC - SOC\_{\rm max}) / E\_{\rm ESS\\_above\\_max} \tag{17}$$

4) The energy ratio consisted of two values from Step 1 to Step 3, i.e., the ratio for the releasable energy and the ratio for the absorbable energy. The weighting factors of the WTG and ESS were calculated for two cases, i.e., one without a power system and the other with excessive electricity, which could be confirmed through the system frequency in Step 2.

The weighting factors of the releasable energy were represented as:

$$
\alpha\_{\rm WTG} = p \times E\_{\rm WTG\\_rel\\_ratio} / (E\_{\rm WTG\\_rel\\_ratio} + E\_{\rm ESS\\_rate\\_ratio}),
\tag{18}
$$

$$
\alpha\_{ESS} = q \times E\_{ESS\\_rel\\_ratio} / \left( E\_{WTG\\_rel\\_ratio} + E\_{ESS\\_rel\\_ratio} \right). \tag{19}
$$

The weighting factors of absorbable energy were represented as:

$$
\alpha\_{WTG} = p \times E\_{WTG\\_abso\\_ratio} / (E\_{WTG\\_abso\\_ratio} + E\_{ESS\\_abso\\_ratio}),
\tag{20}
$$

$$
\alpha\_{ESS} = q \times E\_{ESS\\_above\\_ratio} / \left( E\_{WTG\\_above\\_ratio} + E\_{ESS\\_above\\_ratio} \right),
\tag{21}
$$

where *p* and *q* are the coefficients related to the penetration levels of WTG and ESS, respectively. The penetration levels of the WTG and ESS needed to be considered when determining the proper weight of the control for the frequency stabilization of the power system.

The weighting factors calculated using the coordinated control were multiplied and converted to the conventional frequency stabilization scheme as shown in Figure 6. Figure 6a shows the operational characteristics of a WTG; to support the frequency stabilization, the additional reference power, Δ*P*, was calculated and added to the reference of the MPPT control. When the frequency fluctuated, Δ*P* was calculated using the multiplication of the inverse of the system frequency and weighting factor according to the releasable and absorbable energy. The reference active power of ESS was calculated using the droop loop multiplied by a weighting factor. Thus, the WTG and ESS could contribute to the frequency stabilization and also adequately utilize the stored energy by sharing their releasable and absorbable energies.

**Figure 6.** Operational characteristics of the proposed coordination control scheme. (**a**) Active power control of a WTG. (**b**) Active power control of an ESS.

#### **4. Case Studies**

The isolated microgrid was modeled to investigate the performance of the coordinated frequency stabilization scheme. It was simulated using MATLAB Simulink Electrical simulator. The model system consisted of the static load, asynchronous motor, ESS, diesel generator, and PMSG, and they were connected in parallel, as shown in Figure 7. Furthermore, the initial values of the microgrid are shown in Table 1. In the Appendix A, the parameters that affected the dynamics of the model system are explained, namely the parameters of the asynchronous motor and diesel generator. In this study, the system frequency was computed using zero crossing detection [18]. The WTG and ESS had a droop loop to allow them to aid in the stabilization of the system frequency (see Figure 1c). In this model, the wind power penetration level, which is defined as the capacity of wind power divided by the peak load, was calculated to be 40.0%.

The performance of the frequency stabilization control of a WTG is affected by the system frequency, which depends on the balance between supply power and demand power. Thus, we investigated the performance of the frequency stabilization schemes under various wind speeds. In addition, the proposed scheme had a positive performance, even in cases where the wind speed was kept very low. Furthermore, in the case of load variations, the performance of the proposed scheme was verified.

**Figure 7.** A single-line-diagram of the isolated microgrid model.


**Table 1.** Initial values of the microgrid consistence.

The performance of the coordinated control scheme was compared to a case where the WTG and ESS participated in frequency stabilization. In addition, it was also compared to a case where the WTG did not support the frequency stabilization but ESS supported it. In the conventional case, the droop gains of the WTG and ESS were set to −200 and −20, respectively. Furthermore, the coefficients *p* and *q* in the coordinated control were set to 1.5 and 3, respectively.

Table 2 shows the organization of the case studies to performance of the frequency stabilization control. Cases 1–3 analyze the performance of the proposed scheme according to the retention status of the releasable and absorbable energy of the WTGs and ESS. The main cause of the system frequency fluctuations in this case was the wind speed variation. Case 4 analyzes the performance of the proposed scheme due to rapid load changes. The following subsections describe the comparative analysis results for the frequency stabilization for the four cases.



#### *4.1. Case 1: Variable Wind Speed, 50% of Initial SOC, and Constant Loads*

In this case, the initial SOC of the ESS was set at 50% and both the WTG and ESS supported the system frequency stabilization. Figure 8 shows the wind speed variation profile, and based on the fluctuation of the output power of a WTG from wind speed variation, the system frequency fluctuated. Figure 9 shows the simulation results, including the effects of the wind speed variation. The frequency deviation for the proposed scheme was less than that of the conventional scheme. The peak-to-peak of the system frequency for the MPPT, conventional scheme, and proposed scheme were 0.3930 Hz, 0.3966 Hz, and 0.3404 Hz, respectively. This was because the coordinated control arbitrated the releasable and absorbable energy of WTG and ESS; thus, in the results for the proposed scheme, the active power of the ESS was released more in line with the conventional scheme (see Figure 9c). The active power of the WTG rapidly reduced as the wind speed significantly decreased between 80.0 s and 82.0 s. The system frequency decreased to 59.71 Hz for the conventional scheme, and the decrease was less than that of the proposed scheme by 0.063 Hz. This was because the output power of a WTG in the conventional scheme was abruptly reduced and the output of an ESS could not easily and rapidly compensate for the decrease whereas the stored kinetic energy of the WTG was significantly released. However, the proposed scheme determined the weighting factors by considering their releasable and absorbable energy. The sudden decrease in wind power output due to wind speed decrease resulted in a decrease in releasable energy. Thus, αWTG decreased, whereas αESS increased; accordingly, ESS could compensate for the reduced output power of the WTG by releasing its electrical energy.

The reduced amount of SOC for the conventional and proposed schemes were 0.2984% and 0.4802%, respectively (see Figure 9e). Because the coordinated control increased the additional active power using weighting factors related to SOC, the weighting factors of the WTG and ESS were calculated for the releasable and absorbable energy. In this case, the ESS had enough releasable and absorbable energy, and thus, αESS was determined such that the ESS had a greater contribution compared to the WTG, as shown in Figure 8f. Note that the high value of coefficient *p* could adversely affect the frequency stabilization when the penetration level of the WTG was high.

**Figure 8.** Wind speed (m/s) (variation profile for case 1 and case 2.

**Figure 9.** *Cont*.

**Figure 9.** Simulation results for case 1: (**a**) system frequencies, (**b**) active powers of the WTG, (**c**) active powers of the ESS, (**d**) rotor speeds of the WTG, (**e**) SOCs of the ESS, and (**f**) weighting factors of the coordinated control.

#### *4.2. Case 2: Variable Wind Speed, 25% of Initial SOC, and Constant Loads*

The results for case 2 are presented in Figure 10. In this case, the initial SOC was set at 25% and was less than that of case 1. The peak-to-peak of the system frequency for the proposed scheme was 0.3556 Hz, which was less than in the MPPT by 0.0365 Hz, and less than in the conventional scheme by 0.0405 Hz. When the frequency deviation was smaller than zero, WTG and ESS increased their output powers. However, the results of the peak-to-peak of the system frequency for the proposed scheme was greater than in case 1. This was because the releasable energy of not only the ESS, but also the WTG, was smaller than in case 1. However, in situations where the energy was absorbed, the active power of the ESS was larger than that of case 1 (see Figure 10c), since the initial SOC was set at a low value. Thus, the reduced amount of SOC for the proposed scheme was 0.3411% (see Figure 10e), lower than that of the proposed scheme in case 1 by 0.1391%.

Figure 10f shows the weighting factors of the coordinated control, and because of the low SOC, αWTG was determined for a high value in comparison to the results for case 1 when the frequency deviation was lower than zero. Thus, the WTG released more kinetic energy stored in the rotor; accordingly, *wr* slightly decreased (see Figure 10d). In addition, the determined αESS was lower in comparison to the results in case 1. Hence, the released energy of the ESS decreased and the absorbed energy increased in comparison to the results in case 1.

**Figure 10.** *Cont*.

**Figure 10.** Simulation results for case 2: (**a**) system frequencies, (**b**) active powers of the WTG, (**c**) active powers of the ESS, (**d**) rotor speeds of the WTG, (**e**) SOCs of the ESS, and (**f**) weighting factors of the coordinated control.

#### *4.3. Case 3: Variable Wind Speed and Low Wind Speed, 50% of Initial SOC, Constant Loads*

The performance of the coordinated control was also affected as the wind speed remained low, which meant that WTG had low stored kinetic energy to release when the system frequency was lower than the nominal frequency. Figure 11 shows the wind speed variation profile for case 3, and in this profile, the wind speed was maintained at a low speed after 54 s.

**Figure 11.** Wind speed (m/s) variation profile for Case 3.

Figure 12 shows the results for case 3. The peak-to-peak of the system frequency before 54 s for the MPPT, conventional scheme, and proposed scheme were 0.3930 Hz, 0.3770 Hz, and 0.3325 Hz, respectively. In addition, the peak-to-peak of the system frequency after 54 s for the MPPT, conventional scheme, and proposed scheme were 0.0282 Hz, 0.0285 Hz, and 0.0184 Hz, respectively. This was because the output power fluctuations of a WTG were reduced with the low wind speed, consequently resulting in temporary fluctuations in the system frequency from 50 s onwards, as shown in Figure 12a. The amount of SOC for the proposed scheme was reduced by 0.6613%, which was larger than the results of the proposed scheme in case 1 by 0.1811%. In this case, the static load resulted in a deviation of the system frequency deviation after 54 s. However, if a larger disturbance were to occur in a power system, the system frequency would decrease because the WTG had no releasable kinetic energy. The proposed scheme could calculate the weighting factor of the ESS due to the shortage of the releasable energy that could be emitted from the wind turbine, thus preventing the large decrease in frequency in such a situation.

**Figure 12.** *Cont*.

**Figure 12.** Simulation results for case 3: (**a**) system frequencies, (**b**) active powers of the WTG, (**c**) active powers of the ESS, (**d**) rotor speeds of the WTG, (**e**) SOCs of the ESS, and (**f**) weighting factors of the coordinated control.

#### *4.4. Case 4: Load Variation, Constant Wind Speed, and 50% of Initial SOC*

The system frequency deviation was also based on the load variation. Figure 13 shows the load variation profile for case 4. The load fluctuated between 2 MW and 5.5 MW, and the peak load occurred at 48 s for 5.5 MW. The load variation resulted in significant system frequency fluctuations. In this case, the coefficients *p* and *q* in the coordinated control were set at 0.8 and 3.4, respectively.

**Figure 13.** Load variation (p.u.) profile for Case 4.

Figure 14 shows the results for case 4. In this case, the initial SOC was set at 50% and the wind speed was constant at 10 m/s. The peak-to-peak of the system frequency for the proposed scheme was 0.2841 Hz, less than that of the MPPT by 0.030 Hz, and smaller than in the conventional scheme by 0.087 Hz. This resulted in a higher peak-to-peak system frequency for the conventional scheme in comparison to the MPPT because the WTG excessively contributed to the frequency stabilization, as shown in Figure 14b,d. In particular, the system frequency drastically decreased in the process of recovering the kinetic energy since the WTG significantly increased the output power to compensate for the load variation at 48.0 s. The proposed scheme prevented the excessive contribution of the WTG in the frequency stabilization because the weighting factor was accurately calculated based on the kinetic energy of the wind turbine; this is important since significant increases in wind turbine output due to frequency drops can have a negative impact on isolated microgrids with a high wind power penetration.

Figure 14e shows the SOC of the ESS. The reduced amount of SOC for the proposed scheme and conventional scheme were 0.4225% and 0.2731%, respectively. In the proposed scheme, the WTG had a lower contribution to frequency stabilization than in the conventional scheme. Thus, the contribution of the ESS was increased to perform the frequency stabilization, as shown in Figure 14f. As a result, the frequency stabilization control was performed stably by preventing an excessive contribution toward the frequency stabilization by the WTG.

In all four cases, the results show that the releasable and absorbable energy of a WTG and the ESS was shared well in the proposed scheme and this enabled it to successfully control the frequency stabilization. Hence, the accurate determination of the contribution to the frequency stabilization of a WTG prevented its excessive contribution, and thus, in cases of high wind power penetration levels, the system frequency deviation successfully decreased in the proposed scheme.

**Figure 14.** *Cont*.

**Figure 14.** *Cont*.

**Figure 14.** Simulation results for case 4: (**a**) system frequencies, (**b**) active powers of the WTG, (**c**) active powers of the ESS, (**d**) rotor speeds of the WTG, (**e**) SOCs of the ESS, and (**f**) weighting factors of the coordinated control.

#### **5. Conclusions**

The coordinated frequency stabilization of a WTG and ESS for increasing utilized energy to improve the frequency stabilization were investigated. The ability of a WTG and ESS to support the frequency stabilization support was dependent on how the stored kinetic energy of the WTG and ESS was used. The proposed scheme consistently calculated the releasable and absorbable energy of the WTG and ESS and determined weighting factors related to the energy ratios. In each frequency support control loop of the WTG and ESS, the determined weighting factors produced an additional active power reference. Therefore, the active power references for supporting frequency stabilization were based on the ability for the utilized energy of WTG and ESS.

The simulation results showed that the proposed coordinated control scheme successfully improved the system frequency and prevented the excessive contribution of a WTG in power systems with a high wind power penetration. Furthermore, the proposed scheme ensured minimized resource losses of the participating frequency support as they had low releasable or absorbable energy capacities.

The advantages of the proposed coordinated scheme are that it can ensure adequate utilized stored energy. Therefore, the proposed scheme may provide potential solutions to ancillary services, especially in isolated microgrids, by increasing the reserve power in an electric power grid.

**Author Contributions:** M.K., G.Y., and J.B. mainly proposed the coordinated scheme. M.K., G.Y., S.H., J.K. and J.B. performed the simulation tests and analyzed the results. J.P. and J.K. contributed the design for the high-fidelity battery model and revised the original scheme. All authors contributed toward writing the paper.

**Funding:** This research was funded by Korea Institute of Energy Technology Evaluation and Planning (KETEP) and Ministry of Trade, Industry & Energy (MOTIE), No. 20182410105280.

**Acknowledgments:** This work was supported by the KETEP and the MOTIE of the Republic of Korea. (no. 20182410105280).

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

#### **Appendix A Appendix**

The detailed parameters of an asynchronous were used as introduced in Ziping et al. [15]. The capacity of the asynchronous motor was 4 MW. The stator resistance and inductance of the motor were set to 0.02 p.u. and 0.04 p.u., respectively. The rotor resistance and inductance of the motor were set to 0.02 p.u. and 0.04 p.u., respectively. The mutual inductance and inertia constant were set to 1.36 p.u. and 0.1 p.u., respectively.

Figure A1 shows the typical governor and diesel engine block diagram. In this Figure, *Tr*1, *Tr*2, *Tr*3, *K*, *Ta*1, *Ta*2, *Ta*3, and *Td* were set to 0.01, 0.02, 0.2, 40, 0.25, 0.009, 0.0384, and 0.024, respectively. The inertia time constant of a diesel generator was set to 5 s.

**Figure A1.** A governor and diesel engine block diagram.

#### **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* **Development and Calibration of an Open Source, Low-Cost Power Smart Meter Prototype for PV Household-Prosumers**

#### **F. Sanchez-Sutil 1, A. Cano-Ortega 1, J.C. Hernandez 1,\* and C. Rus-Casas <sup>2</sup>**


Received: 1 July 2019; Accepted: 6 August 2019; Published: 7 August 2019

**Abstract:** Smart meter roll-out in photovoltaic (PV) household-prosumers provides easy access to granular meter measurements, which enables advanced energy services. The design of these services is based on the training and validation of models. However, this requires temporal high-resolution data for generation/load profiles collected in real-world household facilities. For this purpose, this research developed and successfully calibrated a new prototype for an accurate low-cost On-time Single-Phase Power Smart Meter (OSPPSM), which corresponded to these profiles. This OSPPSM is based on the Arduino open-source electronic platform. Not only can it locally store information, but can also wirelessly send these data to cloud storage in real-time. This paper describes the hardware and software design and its implementation. The experimental results are presented and discussed. The OSPPSM demonstrated that it was capable of in situ real-time processing. Moreover, the OSPPSM was able to meet all of the calibration standard tests in terms of accuracy class 1 (measurement error ≤1%) included in the International Electrotechnical Commission (IEC) standards for smart meters. In addition, the evaluation of the uncertainty of electrical variables is provided within the context of the law of propagation of uncertainty. The approximate cost of the prototype was 60 € from eBay stores.

**Keywords:** advanced metering infrastructure; data acquisition; IEC standards; low-cost; open source; power measurement; smart meter; uncertainty evaluation

#### **1. Introduction**

Smart meter roll-out in households with PV distributed generation, hereafter known as PV household-prosumers, provides easy access to on-time detailed meter measurements, which enable advanced energy services. The range of services provided include the application of demand response measures [1–6], smart home/building automation [7,8], and the provision of balancing services such as frequency control services (frequency containment reserve [9–12] and frequency restoration reserve [13]). The design of these services is based on the training and validation of models. However, this requires temporal high-resolution data for generation/load profiles collected in real-world household facilities. The optimal sizing of storage and generation facilities for these PV household-prosumers [3,14–17] also depends on the availability of reliable PV household profile data. The criteria for this sizing are based on technical, economical, and hybrid indicators [18]. Furthermore, the monitoring of PV household generation/load profiles has experienced an exponential growth in recent years [19–31]. PV] household-prosumers generally include a battery energy storage system (BESS) [18,32].

BESSs, whichmanage household appliances [17,33,34] and/or renewable generation (e.g., PV[17,33–37]), often experience significant power fluctuations (range of 0.01−5 Hz [35,36,38–40]). These involve high charge/discharge powers. These rapid fluctuations should be taken into account in the design

and assessment of advanced energy services and/or their sizing. For example, when longer time frames are envisaged in profile data (e.g., 1 or 5 min vs. 1 s), the sizing of storage and generation facilities for PV household-prosumers can lead to the miscalculation of costs [41]. In this context, the results may overestimate self-consumption and self-sufficiency ratios of these PV prosumers [3,18] and underestimate battery aging [42].

Regarding the availability of household consumption profile data, there are currently a small number of open-source datasets with varying levels of detail and scale. The projects in References [19,20] provided active power data at a sampling rate of 6 s and 8 s, respectively. Certain datasets, such as those in References [21,22], sampled data at 10 kHz, but only for a few weeks. Others, such as References [23–26], recorded data for at least a year, but at sampling intervals of 1 min or more. In addition, Reference [27] aggregated current and voltage at 6 s. Some publicly available datasets focused on capturing many individual appliance signatures [28,29], whereas other datasets offered aggregate and submetering measurements, sampled at 1 Hz, such as References [27,30,31].

The absence of reliable household consumption profile data, namely, data of temporal high-resolution (timeframe for data availability about 4 Hz or 0.25 s) was evidently a problem. To overcome this obstacle, this research study developed and calibrated a prototype of an accurate low-cost OSPPSM. In short, major contributions of the prototype (see Section 2) are the following: (i) it is able to monitor and store the fundamental AC electrical variables (*v*, *i*, *PF* (cos ϕ)) and the derived variables (active and reactive power *p*, *q*) within an non-intrusive load monitoring (NILM) scheme, (ii) it is able to monitor at temporal high-resolution (4 Hz, 0.25 s), and to store data both locally and in the cloud. In this way, PV household-prosumer profiles are available to accurately assess different advanced energy services provided by PV household-prosumers.

The rest of the paper is structured as follows. Section 2 overviews the state of the art regarding prototypes of power smart meters for households. Section 3 reviews the theoretical framework for electrical measurements. Section 4 describes the prototype from both a hardware and software perspective. Section 5 outlines the standard procedure for calibrating the prototype and describes the uncertainty assessment. Section 6 presents the results and discusses them. Lastly, the conclusions derived from this study as well as plans for future research are given in Section 7.

#### **2. Research on Power Smart Meter Prototypes for Households**

This section assesses the state of the art regarding prototypes of power smart meters for households. Depending on the support platform, these prototypes can be classified as follows: (i) Arduino open-source platform [3,7,14,43–57], (ii) field-programmable gate array (FPGA) technology [4,41], (iii) Lopy [5], and (iv) others [6,8,51,52].

The following research studies on the Arduino platform are presented in ascending order, depending on the number of functions offered by each prototype. Reference [43] developed a general–purpose voltage and current monitoring system designed for mobile devices via Bluetooth communication. It used an Arduino Nano board [53] to monitor instantaneous values. The research in Reference [47] developed a prototype for a power factor (PF) compensation monitoring system, capable of compensating at the industry or household level. This involved the measurement of voltage, current, and active power by means of a D1R1 Arduino microcontroller, based on an ESP-8266EX platform. The study in Reference [48] remotely controlled an energy meter by disconnecting and reconnecting the service of a particular consumer, based on an ATMega328P microcontroller. Reference [49] designed a meter that monitored energy and also sent data to the Internet by means of a wireless transmission system. The meter used global system mobile (GSM) and ZigBee wireless communication protocols. The study in Reference [44] developed a low-cost system for monitoring and remotely controlling greenhouses. The system used fuzzy logic to adapt to environmental conditions by means of an Arduino Mega board [54].

On the other hand, focusing on applications for PV systems on the Arduino platform, the research in Reference [45] developed a household monitoring system with a data logger, based on an Arduino platform. Hall-effect sensors with an analogical to digital converter (ADC) (LTS-15NP) were planned for currents. Reference [3] arranged a set of sensors based on an Arduino platform for monitoring and controlling household appliances with PV and BESS, which provided significant insights into their respective benefits. The monitoring system in Reference [46] had an Arduino Mega 2560 microcontroller board [58] and different sensors, with a clock speed of 16 MHz. It offered considerable flexibility to acquire data, and interface with the computer. The current, from the INA 219 DC [55] sensor, had a resolution of 0.1 mA and 1% accuracy.

Concerning FPGA technology, the smart meter developed in Reference [4] permitted a reconfigurable architecture. It allowed users to select the proper processing modules, depending on their application. The meter had voltage and current signals at a high sampling rate under a non-intrusive load-monitoring (NILM) scheme.

With regard to Lopy technology, the research in Reference [5] presented the proof-of-principle of a user-friendly monitoring system for household power consumption that made consumers aware of its consumption and impact. It was designed with a Lopy 4 module based on ESP32, and Wi-Fi connection to upload data to the Internet.

As for other platforms, the study in Reference [51] designed a monitoring system for stand-alone PV systems that provided pulse width modulation (PWM) signals for the battery charge controller. Reference [8] developed the prototype of a low-cost power smart meter, based on an ADE7913 chip. This meter was able to adapt its behavior to the grid with a high level of accuracy. Reference [6] designed an open-source, low-cost single-phase energy smart meter and power quality (PQ) analyzer that could be easily set up and used by inexperienced users at home. This instrument was able to retrieve a large amount of information related to energy consumption and PQ variables, which complied with national and international standards.

Regarding the calibration of meter prototypes, only Reference [52] addressed this issue with a PQ meter, according to the IEC standard 61000-4-7 [56]. Reference [50] devised a method for calibrating a ZMPT101B voltage sensor, using polynomial regression.

Concerning the evaluation of uncertainty, Reference [57] compared three methods to assess uncertainty in impedance monitoring. Moreover, Reference [58] applied a method to evaluate the uncertainty of data aggregation for root mean square (R.M.S) voltage [59].

This literature review [3–8,43–51] reflects that an accurate low-cost prototype for monitoring PV household-prosumers at temporal high-resolution has still not been developed and validated. Major shortcomings found in the prototypes proposed thus far include the following.


This study developed and calibrated a prototype of an accurate open-source, low-cost, OSPPSM in order to acquire the PV household-prosumer profiles at temporal high-resolution. This prototype has an Arduino low-cost, open-source platform and is able to monitor and store the fundamental AC electrical variables and the derived variables within an NILM scheme. This prototype has none of the previously mentioned shortcomings. The OSPPSM is, thus, able to monitor at temporal high-resolution (4 Hz, 0.25 s), and stores data both locally and in the cloud. The stationary analysis has 10-cycle analysis window with a sampling rate of 1 kHz. In this way, PV household-prosumer profiles are available to accurately assess different advanced energy services provided by PV household-prosumers. These services account for the effects of both the fast short-term fluctuations of input profiles (<4 Hz) and their hourly/daily/weekly/monthly variability.

#### **3. Theoretical Background for Electrical Measurement**

In electrical systems, time-invariable voltages or currents are almost impossible. Therefore, the window size of the analysis is assumed to be stationary. The windowing results in a given time localization and the spectrum this obtained is called a local spectrum. This window moves along the entire length of the signal in order to calculate the localized spectra. The window that measures electrical variables (e.g., voltage, current, harmonics, etc.) is a 10-cycle time interval for a 50-Hz power system (Class-A performance [59]).

To accurately measure an electrical signal, the sampling frequency should be at least twice the highest frequency of the signal. Since this study used a 1 kHz sampling frequency, the number of samples *ns* for the 10-cycle analysis window was, thus, 200.

The R.M.S. value of an electrical variable (e.g., *v*, *i*) in a specified analysis window is given by the aggregation using the square root of the arithmetic mean of the squares of the *ns* instantaneous values taken [4,5,59]. The instantaneous value of the active power is given by the product of the instantaneous values of voltage and current [60]. The average active power for a set of samples *ns* is given by the equation below [60].

$$p^{w\chi} = \frac{\sum\_{n=1}^{n\_0} \upsilon^{ins, n} \cdot i^{ins, n}}{n\_s} \tag{1}$$

The variable power factor *PF* can be expressed as the ratio of the average active power to the product of the R.M.S. values of voltage and current, respectively [4,5,47]. Lastly, the R.M.S. reactive power *q* is given by the equation below.

$$q^{r.m.s.} = v^{r.m.s.} \cdot i^{r.m.s.} \cdot \sin(ar\cos q) \tag{2}$$

#### **4. Design of the On-Time Single-Phase Power Smart Meter (OSPPSM)**

#### *4.1. Hardware Design*

This study designed and developed an OSPPSM for households with both local and cloud storage, based on AUR3 [61] and AD1R1 [62] Arduino boards. The OSPPSM (Figure 1) is modularly integrated, which means that, in the case of malfunction, parts can be replaced without affecting the general operation of this electrical measuring instrument (MI).

**Figure 1.** OSPPSM prototype.

In the first phase, the analog voltage and current sensors [63] on the AUR3 Arduino board of this electrical MI capture and process fundamental electrical variables, such as the voltage *v*, current *i*, and *PF (cos* ϕ*).* This is followed by the calculation of derived variables, active *p,* and reactive *q* power. In a second phase, the AD1R1 Arduino board uploads the data to Firebase [64] using a Wi-Fi connection.

This OSPPSM receives two signals from the consumer unit to which it is connected: voltage and current. Each signal comes from the sensors, and is read through three analog inputs, including one for voltage and two for current.

Although it was possible for the the MKR WiFI 1010 Arduino board [65] to have more than one analog input and Wi-Fi connection for access to the Firebase, this option was disregarded because of its high price. Moreover, other low-cost Arduino Wi-Fi boards (e.g., wemos D1 R1 [62], wemos d1 mini [62], and NodeMCU [66], etc.) usually have only one analog input, and, therefore, could not be used. Even a single board could perform all of the tasks (i.e., acquisition of electrical signals, processing, and upload data to the cloud). This had the drawback of requiring high board features. This research, thus, decided on a dual board configuration in order to obtain the following: (i) significant cost reduction, (ii) improved device performance in terms of time of computation, thanks to dual processing, which provided shorter interval times for managing recordings. Figure 2 shows a hardware block diagram of the OSPPSM.

**Figure 2.** Hardware block diagram of the OSPPSM.

Figure 3 shows the wiring diagram of the OSPPSM. The Arduino boards are fed through one of the two 12 V AC outputs, which is rectified to DC to match the supply voltage of the AUR3 and AD1R1 boards (range 7–12 V DC). For the voltage signal, the ZMTP101b [67] voltage transformer is used to transform the 230 V AC signal to 5 V DC accepted by the AUR3 analog input. The A0 input is reserved for the voltage.

**Figure 3.** Wiring diagram of the OSPPSM.

The STC-013 current sensor [68] has a 1-V DC output. This is largely due to the ADS1115 analog digital converter [69], which adapts to the 5-V DC voltage for the analog inputs of the AUR3 board. The A4 and A5 inputs are reserved for current.

#### 4.1.1. Microcontroller

The microcontroller is a small computer inside of a single integrated circuit, and contains one or more CPUs, RAM memory, and programmable input/output peripherals. They are widely used in industrial and residential equipment, because they are able to control signals and devices.

The rapid evolution of electronic devices had led to the availability of low-cost powerful hardware tools, which provide a viable solution for measuring and monitoring applications. In this context, the AUR3 board performs data digitization, processing, and transmission. It has a high 16-MHz clock speed, which obtains measurements in shorter time intervals (0.25 s). This is one of the aims of our OSPPSM.

The AUR3 board is based on the ATmega328P microcontroller on a platform for open-source electronic prototypes. Its technical specifications are given in Reference [61].

#### 4.1.2. Wireless Communication

The wireless communication module is based on the AD1R1 board and serves as an interface between the microcontroller and the cloud data storage (i.e., Firebase). This board uses the ESP8266 platform as the core of operations, which allows WEP (Wired Equivalent Privacy) or WPA/WPA2 (Wi-Fi Protected Access) authentication for secure Wi-Fi communication. Furthermore, it operates with 802.11 b/g/n wireless systems, which are supported by most routers and modems on the market. These features signify that the average data upload time to the cloud is 0.15 s, which is shorter than the 0.25-second time interval of the planned power. The technical specifications of AD1R1 are given in Reference [62].

#### 4.1.3. Current Sensor

Both invasive and non-invasive sensors are on the market. Invasive sensors require modification of the electrical installation, whereas non-invasive sensors measure current without any modification. Techniques used to measure electrical currents include Hall Effect sensors and current transformers, which all transform the electrical current signal into a proportional voltage signal.

The STC-013 non-invasive current sensor [68] from YHDC is planned for the OSPPSM. It has a core to be installed at the service cable of the consumer unit of the monitored household. Options range from 5 to 100 A. The 30-A option is tuned for households, since it reaches a 6600-W power, which is higher than the average of most households. The 100-A limit allows 23,000-W household power.

An ADC, model ADS1115 [69] (Texas Instruments brand) matches the STC-013 output voltage to the 5-V DC level of the AUR3 board.

#### 4.1.4. Voltage Sensor

There are various options for measuring and adapting voltage to the analog input signal of the AUR3 board: (i) a 230/12 V transformer, AC/DC rectifier, and voltage divider for adapting toa5V DC, (ii) a 230/24 V transformer, AC/DC rectifier, and DC meter FZ0430 that gives a maximum of 5 V DC, (iii) a 230/24 V transformer, AC/DC rectifier, and INA219 DC that gives a maximum of 5 V DC, and (iv) a ZMPT101b voltage transformer that directly provides a maximum of 5 V DC. Because most of these possibilities require several components, option (iv) was selected because it adapted best to the AUR3 board level. The technical specifications of the ZMPT101b voltage transformer are given in References [67].

#### 4.1.5. Datalogger Shield

One problem that can arise is that, depending on network usage, the Internet connection for uploading data to the cloud is not always guaranteed, or may be excessively slow. For this reason, the OSPPSM was equipped with a datalogger shield with an 8 GB SD memory card. The storage capacity adopted has an autonomy of two years as well as five floating point data types for variables *v*, *i*, *PF*, *p,* and *q*, every 0.25 s. In addition, the datalogger shield includes a real-time clock that records the date and time of the measurements.

#### *4.2. Software Design*

Figure 4 shows a process timeline for the OSPPSM. In a first parallel process, the software in the AUR3 main microcontroller (Section 4.2.1) determines the fundamental and derived electrical variables, sends them through the serial port, and, lastly, stores them on the data logger. In a second parallel process, the software in the AD1R1 board (Section 4.1.2) uploads data to the Internet through the Wi-Fi connection.

**Figure 4.** Process timeline for the OSPPSM.

#### 4.2.1. Measurement and Computation of the Electric Variable

The microcontroller in the AUR3 board determines the fundamental and derived electrical variables, as reflected in the flowchart in Figure 5. The first step involves the initialization of the system. This includes putting the serial port in the data-sending mode by resetting analog inputs, the initialization of the SD memory card system, and the initiation of the clock in real time. However, these processes are only performed when the meter is connected. The second step is the measurement of fundamental electrical variables through analog inputs A0, A4, and A5. The fundamental and derived electrical variables are computed as specified in Section 3. Electrical variables are then sent through the serial port to the AD1R1 board, and, lastly, the fundamental and derived electrical variables are stored in the SD memory card as a backup copy. The measurement and storage of these variables are continuously performed while the meter is connected.

**Figure 5.** Flowchart for the measurement and computation of the electric variable: AUR3 board.

The maximum times for each task are shown in Figure 4: (i) 200 ms for the 10-cycle analysis window, (ii) 30 ms for calculating fundamental and derived variables, (iii) 1 ms for sending data to the AD1R1 board, (iv) 9 ms for storing all of the variables in a backup SD memory, and (v) a waiting time of 10 ms.

The software is implemented in the Arduino open-source platform [70], which is able to acquire data each millisecond, which signifies a 1-kHz sampling frequency. As a result, 200 measurement samples are acquired in the 10-cycle analysis window.

#### 4.2.2. Cloud Data Uploading

The IoT has various options for storing data records in the cloud, such as ThingSpeak [50,71–73] and MQTT [74–77]. In their free version, both platforms store data records every 15 s. However, for shorter time intervals, it is necessary to purchase a standard commercial license. Even in that case, the shortest possible rate limit is 1 s.

Our study required data record storage and availability every 0.25 s. The only platform that provides this rate in its free version is Google's Firebase [64] platform with compatible data record storage times of every 0.1 s.

Cloud data uploading follows the flowchart in Figure 6. The upload program is located in the AR1D1 board [62], and performs the following tasks: (i) initialization of the system, which includes the preparation of the serial port in the data reading mode, the initialization of the Wi-Fi system to connect the household wireless network, and the initialization of the Firebase system, (ii) data reading from the AUR3 board, (iii) data uploading to the cloud using Firebase, and (iv) confirmation of data uploading. Tasks (ii-iv) are continuously performed while the meter is connected.

**Figure 6.** Flowchart for cloud data uploading: AD1R1 board.

The maximum times for each task are shown in Figure 4: (i) 1 ms for data reading from the serial port, (ii) 150 ms for data uploading to the cloud, (iii) 50 ms for confirming the data uploading by the Firebase server, and (iv) a wait of 49 ms.

#### **5. Standard Guidance on Calibration and Uncertainty Evaluation for Power Smart Meters**

This section provides the theoretical background for the characterization of errors, which includes the standard tests that should be used to calibrate power smart meters and the evaluation procedure of the uncertainty in measurements.

#### *5.1. Characterization of Errors*

The error of an MI (e.g., a power smart meter) is obtained by subtracting the true value from the indicated value [78]. In particular, the intrinsic error [79] of an *n*th measurement of the variable *xi* is the error of the MI as compared to the reference measurement standard (RMS) when used under reference conditions.

$$E\_{\mathbf{x}\_{j}^{n}} = 100 \times \frac{(\mathbf{x}\_{j,ref}^{n,MI} - \mathbf{x}\_{j,ref}^{n,RMS})}{\mathbf{x}\_{j,ref}^{n,RMS}} \tag{3}$$

The mean absolute percentage error (MAPE) and the mean relative error (MRE) for a set of measurements ns of the variable *xj* = [*x*<sup>1</sup> *j* , *x*<sup>2</sup> *j* , ... , *xns <sup>j</sup>* ] are given by Reference [51].

$$MAPE\_{x\_j} = \frac{100}{n\_s} \times \sum\_{n=1}^{n\_s} \left| \frac{(\mathbf{x}\_{j,ref}^{n,MI} - \mathbf{x}\_{j,ref}^{n,RMS})}{\mathbf{x}\_{j,ref}^{n,RMS}} \right| \tag{4}$$

$$MRE\_{x\_j} = \frac{100}{n\_s} \times \sum\_{n=1}^{n\_s} \frac{(\mathbf{x}\_{j,ref}^{n,MI} - \mathbf{x}\_{j,ref}^{n,RMS})}{\mathbf{x}\_{j,ref}^{n,RMS}} \tag{5}$$

The characterization of the intrinsic error distribution *Exj* = [*Ex*<sup>1</sup> *j* , *Ex*<sup>2</sup> *j* , ... , *Exns j* ] can be performed by moments, which are a set of descriptive constants of the distribution. Thus, the first moment mean (μ) of the distribution *Exj* is given by the equation below.

$$
\mu\_{E\_{\mathbf{x}\_j}} = \frac{\sum\_{n=1}^{n\_s} E\_{\mathbf{x}\_j^n}}{n\_s} \tag{6}
$$

The second moment is the variance (σ) of the distribution.

$$
\sigma\_{E\_{x\_{\hat{j}}}}^2 = \frac{\sum\_{n=1}^{n\_s} \left(E\_{X\_{\hat{j}}^n} - \mu\_{E\_{x\_{\hat{j}}}}\right)^2}{n\_s - 1} \tag{7}
$$

Alternatively, the standard deviation can be obtained as follows.

$$
\sigma\_{E\_{x\_j}} = \sqrt{\sigma\_{E\_{x\_j}}^2} \tag{8}
$$

#### *5.2. Standard Calibration Test*

This section provides a brief description of the common standard tests that should be used to calibrate a power smart meter. It is necessary to apply standard calibration tests for voltmeters [80], ammeters [80], watt meters [81], varmeters [81], and PF meters [82]. Additionally, functional tests for measuring, recording, and displaying PQ parameters in instruments for the distribution grid are relevant [83].

The accuracy of an electrical MI characterizes the degree of proximity between the indicated value and the true value. In particular, the accuracy class categorizes the potential errors within specified limits [78]. In the calibration of an electrical MI, the indicated values [79] of the MI are compared with those of a RMS (indicative of the highest metrological quality) under different working points at reference conditions [78]. As a result of these tests, a maximum intrinsic error is obtained, which defines the accuracy class of the calibrated electrical MI [78]. In what follows, the common standard tests are described.

The intrinsic value test determines the intrinsic error of an electrical MI for the fundamental and derived electrical variables under reference conditions [78]. The measuring range of the fundamental variables (*v, i, PF* (*cos* ϕ)) includes the interval of 0% to 120% of the rated value at different points on the scale [83]. For ammeters (current measuring [80]) and voltmeters (voltage measuring [80]), both variable magnitudes must be modified. For PF meters (PF measuring), the PF should be modified [82]. For watt meters (active power measuring) and varmeters (reactive power measuring [81]), once the rated voltage and reference PF are fixed, the current should be changed [83].

The current magnitude distortion test [83] superposes a 20% harmonic third-magnitude wave on the sinusoidal fundamental electrical variables, while adapting the fundamental component to maintain the resulting R.M.S. value. In the case of watt meters, varmeters, and PF meters, a waveform with 20% of the third harmonic to the rated voltage and current is superposed, and the fundamental component is adapted to maintain the resulting R.M.S. value [80–82]. The intrinsic error is then determined.

The alternating current frequency variation test applies a frequency variation from 40 to 60 Hz to fundamental electrical variables [83]. Particularly for PF meters, the frequency change applies to voltage and current, with different PFs (PF: 0.5 lagging, 1, 0.5 leading). For watt meters and varmeters, the PF is set at the reference value [81].

The alternating current/voltage component variation test performs two assessments on PF meters [82]. The first one focuses on the voltage variation, and fixes the current at 50% of its rated value with three voltage magnitudes: (i) rated value, (ii) lower limit of the nominal range of use (NRU), and (iii) higher limit of the NRU. In addition, it is necessary to include different PFs (0 lagging, 1, 0.5 lagging, and 0.5 leading). The second assessment focuses on the current variation, and fixes the voltage at a rated value, with three current magnitudes: (i) rated value, (ii) lower limit of the NRU, and (iii) higher limit of the NRU. Once again, the different PFs should be analyzed [83]. In the case of watt meters and varmeters [81], the current is set to 80% of the upper limit of the NRU and PF at reference conditions with three voltage magnitudes: (i) rated value, (ii) lower limit of the NRU, and (iii) higher limit of the NRU. The intrinsic error is then evaluated [78].

The PF variation test focuses only on the variable active power (wattmeter) and reactive power (varmeter) [81]. This includes two assessments at reference frequency. The first is at the nominal current, where the voltage measuring range is from the lower to upper limit of the NRU, with different PFs (1, 0.5 lagging, 0.5 leading). The second is at nominal voltage, where the current fulfills the relevant previous variation range [83]. The intrinsic error [78] is then evaluated.

The continuous overload test applies an overload of 120% for two hours on fundamental electrical variables. For watt meters, varmeters, and PF meters, the 120% overload applies to the current, once the rated voltage and reference PF have been fixed [83]. The intrinsic error [78] applies to the evaluated quantities.

#### *5.3. Uncertainty in Measurements*

The objective of a measurement is to determine the true value of a measurand [84]. However, the result of a measurement is an estimate of this true value. It should, thus, be accompanied by a statement of the uncertainty of that estimate [85]. Consequently, the uncertainty reflects the lack of exact knowledge of the value of the measurand [84].

#### 5.3.1. Uncertainty of Fundamental Variables and Standard Uncertainty

The uncertainty evaluation associated with the measurements of a fundamental variable is characterized by the standard uncertainty [84]. This can be obtained from a Type A or Type B evaluation. These are essentially two ways of evaluating uncertainty components [84], which are based on different procedures and probabilistic distributions.

The standard uncertainty type A for a series of observations *ns* of the variable *xj* = [*x*<sup>1</sup> *j* , *x*<sup>2</sup> *j* , ... , *xns j* ] is characterized by a statistical analysis, in particular, the estimated variance [84].

$$
\sigma\_{\mathbf{x}\_j}^s = \sigma\_{\mathbf{x}\_j}^s(\mu\_{\mathbf{x}\_j}) = \sqrt{\frac{\sum\_{n=1}^{n\_t} \left(\mathbf{x}\_j^n - \mu\_{\mathbf{x}\_j}\right)^2}{n\_s - 1}} \tag{9}
$$

where:

$$\mu\_{\mathbf{x}\_{\circ}} = \frac{\sum\_{n=1}^{n\_s} \mathbf{x}\_j^n}{n\_s} \tag{10}$$

In addition to previous data, the evaluation of standard uncertainty type B requires knowledge of the MI, manufacturer specifications, and calibration and uncertainty data, defined by the manufacturer [84].

#### 5.3.2. Uncertainty of Derived Variables and Combined Uncertainty

The combined uncertainty of a derived variable *y* of two or more fundamental variables (*xj*, *xm*, ... , *xw*) is characterized by a numerical value expressed in the form of standard deviation obtained by applying the usual method of the combination of variances [84].

$$\boldsymbol{\sigma}\_{\boldsymbol{y}}^{\boldsymbol{c}} = \sqrt{\sum\_{z=1}^{n\_{\boldsymbol{\sigma}}} \left[ \frac{\partial f}{\partial \mathbf{x}\_{z}} \right]^{2} \left[ \boldsymbol{\sigma}\_{\mathbf{x}\_{z}}^{\boldsymbol{s}} (\boldsymbol{\mu}\_{\mathbf{x}\_{z}}) \right]^{2} + 2 \sum\_{z=1}^{n\_{\boldsymbol{\sigma}}-1} \sum\_{j=z+1}^{n\_{\boldsymbol{\sigma}}} \frac{\partial f}{\partial \mathbf{x}\_{z}} \frac{\partial f}{\partial \mathbf{x}\_{j}} \left( \boldsymbol{\sigma}\_{\mathbf{x}\_{z}}^{\boldsymbol{s}} (\boldsymbol{\mu}\_{\mathbf{x}\_{z}}) \cdot \boldsymbol{\sigma}\_{\mathbf{x}\_{z}}^{\boldsymbol{s}} (\boldsymbol{\mu}\_{\mathbf{x}\_{j}}) \cdot \boldsymbol{\rho} (\mathbf{x}\_{z}, \mathbf{x}\_{j}) \right) \tag{11}$$

where:

$$\rho(\mu\_{\mathbf{x}\_{\mathbf{x}}}, \mu\_{\mathbf{x}\_{\mathbf{j}}}) = \frac{\sum\_{n=1}^{n\_s} \left(\mathbf{x}\_z^n - \mu\_{\mathbf{x}\_z}\right) \times \left(\mathbf{x}\_{\mathbf{j}}^n - \mu\_{\mathbf{x}\_{\mathbf{j}}}\right)}{n\_s - 1} / \sigma\_{\mathbf{x}\_z}^s \cdot \sigma\_{\mathbf{x}\_{\mathbf{j}}}^s \tag{12}$$

Regarding the OSPPSM, the combined uncertainty of the derived variables, active *p*, and reactive *q* power, can be obtained using the formulas below [84].

$$
\sigma\_p^\varepsilon = \begin{pmatrix}
[\mu\_i \mu\_{PF}]^2 \cdot (\sigma\_v^s)^2 + [\mu\_v \mu\_{PF}]^2 \cdot \left(\sigma\_i^s\right)^2 - [\mu\_v \mu\_i \sin(ar \cos(\mu\_{PF}))]^2 \cdot \left(\sigma\_\varphi^s\right)^2 \\
+ 2 \begin{pmatrix}
[\mu\_i \mu\_{PF}] \cdot [\mu\_v \mu\_{PF}] \cdot \sigma\_v^s \cdot \sigma\_i^s \cdot \rho(\mu\_{\mathcal{V}} \,\mu\_i) \\
+ [\mu\_i \mu\_{PF}] \cdot [-\mu\_v \mu\_i \sin(ar \cos(\mu\_{PF}))] \cdot \sigma\_v^s \cdot \sigma\_\psi^s \cdot \rho(\mu\_{\mathcal{V}} \,\mu\_\psi) \\
+ [\mu\_v \mu\_{PF}] \cdot [-\mu\_{\mathcal{V}} \mu\_i \sin(ar \cos(\mu\_{PF}))] \cdot \sigma\_i^s \cdot \sigma\_\psi^s \cdot \rho(\mu\_i, \mu\_\psi)
\end{pmatrix}
\end{pmatrix} \tag{13}
$$

$$
\sigma\_{q}^{\varepsilon} = \begin{pmatrix}
\left[\mu\_{l}\sin(\operatorname{arc}\cos(\mu\_{lF}))\right]^{2}\cdot\left(\sigma\_{v}^{\ast}\right)^{2} + \left[\mu\_{v}\sin(\operatorname{arc}\cos(\mu\_{lF}))\right]^{2}\cdot\left(\sigma\_{i}^{\ast}\right)^{2} + \left[\mu\_{v}\mu\_{i}\mu\_{F}\right)\right]^{2}\cdot\left(\sigma\_{\varphi}^{\ast}\right)^{2} \\
+ 2\left\{\begin{array}{l}
\left[\mu\_{l}\sin(\operatorname{arc}\cos(\mu\_{lF}))\right]\cdot\left[\mu\_{v}\sin(\operatorname{arc}\cos(\mu\_{lF}))\right]\times\sigma\_{v}^{\ast}\circ\sigma\_{i}^{\ast}\circ\rho(\mu\_{l\nu}\mu\_{i}) \\
+ \left[\mu\_{l}\sin(\operatorname{arc}\cos(\mu\_{lF}))\right]\cdot\left[\mu\_{l}\mu\_{i}\mu\_{lF}\right]\cdot\sigma\_{v}^{\ast}\circ\sigma\_{q}^{\ast}\circ\rho\left(\mu\_{\nu}\mu\_{\varphi}\right) \\
+ \left[\mu\_{\overline{v}}\sin(\operatorname{arc}\cos(\mu\_{lF}))\right]\cdot\left[\mu\_{\overline{v}}\mu\_{i}\mu\_{lF}\right]\cdot\sigma\_{i}^{\ast}\circ\sigma\_{q}^{\ast}\rho\left(\mu\_{i}\mu\_{\varphi}\right)
\end{array}\right\}\tag{14}$$

#### 5.3.3. Confidence Level of the Uncertainty Evaluation

The uncertainty value when a measurement is taken depends on the confidence level and the sample number *ns* of the measurement. Nonetheless, given a certain confidence level, the sample number can be determined. The definition of the confidence interval [84] for the mean μ*xj* of a measurement set *ns* of variable *xj* is given by the formula below.

$$\left(\mu\_{\boldsymbol{x}\_{\boldsymbol{j}}} - Z\_{\frac{\sigma}{2}} \cdot \frac{\sigma\_{\boldsymbol{X}\_{\boldsymbol{j}}}^{\boldsymbol{s}}}{\sqrt{n\_{\boldsymbol{s}}}}, \mu\_{\boldsymbol{x}\_{\boldsymbol{j}}} + Z\_{\frac{\sigma}{2}} \cdot \frac{\sigma\_{\boldsymbol{X}\_{\boldsymbol{j}}}^{\boldsymbol{s}}}{\sqrt{n\_{\boldsymbol{s}}}}\right) \tag{15}$$

and the probability that the mean will be in this confidence interval is shown below.

$$\mathbb{P}\left(\mu\_{x\_j} - Z\_{\frac{\alpha}{2}} \frac{\sigma^s\_{x\_j}}{\sqrt{n\_s}} < \mu\_{x\_i} < \mu\_{x\_j} + Z\_{\frac{\alpha}{2}} \cdot \frac{\sigma^s\_{x\_j}}{\sqrt{n\_s}}\right) = 1 - \alpha \tag{16}$$

When evaluating the uncertainty of the different levels in Reference [84], the 99% level is usually set. This confidence level (1-α) is defined as the probability that the measurement mean will be within this range, which is shown in Equation (16).

Assuming an N(0,1) normal Gaussian distribution for the measurements and a set confidence level α*set* of 1%, the corresponding value of *Z*α*set* 2 is 2.58. Therefore, once the value *Z*α*set* 2 is known, the minimum number of samples needed to attain a confidence level α*set* is shown below.

$$n\_{s\text{-min}} \ge \left(\frac{Z\_{\frac{\alpha^{\text{set}}}{\mathcal{Z}}} \circ \sigma\_{X\_f}^s}{\alpha^{\text{set}}}\right)^2 \tag{17}$$

#### **6. Results**

The OSPPSM was tested in the electrical engineering laboratory at the University of Jaen (Spain), Figure 7. This meter was connected to Wi-Fi and Firebase during all of the tests to store the data. In order to create the testing conditions, a grid emulator and a programmable electronic load were used. This equipment had larger regulation possibilities that significantly exceeded the requirements to perform the calibration standard tests. Moreover, an electrical RMS was used as a reference for the calibration. The following subsections describe the test equipment.

**Figure 7.** Test equipment and OSPPSM in the laboratory at Jaen university.

The tests allowed us to determine the accuracy class reached by the OSPPSM, based on the maximum error observed. Additional tests were also conducted to evaluate the uncertainty that fully defined the OSPPSM.

#### *6.1. Test Equipment*

#### 6.1.1. Electrical Reference Measurement Standard (RMS)

The electrical RMS to perform the calibration of the OSPPSM was the Class-A power quality (PQ) analyzer (FlukeTM 1760TR Fluke Corporation, Everett, WA, USA), which is a high-end model of the brand, that allows the recording of a multitude of electrical variables compatible with calibration standard tests. Table 1 shows the main characteristics of Fluke 1760TR.



#### 6.1.2. Grid Emulator

The Cinergia GE+15 unit emulates a low voltage grid. This allowed us to modify parameters such as frequency, phase angle, magnitude, and harmonic context in the main voltage. This capability was required for calibration standard tests. Table 2 shows the main characteristics of the used grid emulator.


**Table 2.** Main features of grid emulator, model Cinergia GE+15.

#### 6.1.3. Programmable Electronic Load

Calibration standard tests require variable loads. Therefore, a programmable electronic load, model Cinergia EL+15, made it possible to adapt the required load for each specific standardized test. Table 3 shows the characteristics of the programmable electronic load used in this study.



#### *6.2. Calibration Standard Test*

#### 6.2.1. Intrinsic Value Test

Figure 8a, Figure 9a, Figure 10a,b, Figure 11a, and Figure 12a portray the correlation between the values in the OSPPSM for the variables, *vOSPPSM*, *iOSPPSM*, *PFOSPPSM*, *pOSPPSM*, and *qOSPPSM*. They also show the reference values in the RMS for *vRMS*, *iRMS*, *PFRMS*, *pRMS*, and *qRMS* under different intrinsic value tests on a 0.25 s basis. The intrinsic errors obtained for the variables are reflected in Figure 8b, Figure 9b, Figure 10c, Figure 11b, and Figure 12b. As can be observed, the intrinsic error did not exceed 1% for each electrical variable measured (*v*, *i*, *PF*, *p,* and *q)*, which signified that the OSPPSM is in the accuracy class 1.

The results of the Kolmogorov-Smirnov test (95% confidence level) show that the intrinsic error follows a beta distribution for voltage measurement (*p*-value = 0.104), and a uniform distribution for both current measurement (*p*-value = 0.312) and PF measurement (*p*-value = 0.311). This uniformity in the intrinsic error distribution highlights the accuracy of the OSPPSM, with a maximum intrinsic error value of 0.9783% as a voltmeter and 0.91% as a PF meter, wattmeter, and varmeter.

**Figure 8.** Voltmeter test: (**a**) OSPPSM vs. RMS voltage. (**b**) Intrinsic error of voltage measuring.

**Figure 9.** Ammeter test: (**a**) OSPPSM vs. RMS current. (**b**) Intrinsic error of current measuring.

(**c**)

**Figure 10.** PF meter test: (**a**) 30 A, OSPPSM vs. RMS PF. (**b**) 8 A, OSPPSM vs. RMS PF. (**c**) Intrinsic error of PF measuring, 8 A and 30 A.

**Figure 11.** Wattmeter test: (**a**) OSPPSM vs. RMS active power. (**b**) Intrinsic error of active power measuring.

**Figure 12.** Varmeter test: (**a**) OSPPSM vs. RMS reactive power. (**b**) Intrinsic error of reactive power measuring.

Table 4 displays the MAPE and MRE statistical error indicators as well as the standard deviation. The MAPE was less than 0.48%, and MRE was below 0.07%. During all of the intrinsic value tests, the standard deviation did not exceed 0.55%.


**Table 4.** Intrinsic value test: maximum intrinsic error (%), MAPE (%), MRE (%)*,* and standard deviation (%).

#### 6.2.2. Current Magnitude Distortion Test

Figures 13 and 14 display the results of the voltage variation, which show the relationship between the voltage *vOSPPSM* and the reference voltage *vRMS*. They also show the intrinsic error for variables *vOSPPSM*, *pOSPPSM*, and *qOSPPSM*. Figures 15 and 16 focus on the current variation, which reflects the relationship between the current value *iOSPPSM* and the reference current *iRMS*. The intrinsic error for the variables *i*, *pOSPPSM*, and *qOSPPSM* is also shown.

The error graphs underline the fact that the intrinsic error was less than 1%, which signifies that the OSPPSM belongs to accuracy class 1. Furthermore, the maximum intrinsic error for the voltage variation and current variation was lower than 0.99%. Once again, the intrinsic error had a uniform distribution.

Tables 5 and 6 show the MAPE and MRE statistical error indicators as well as the standard deviation for the voltage and current variation, respectively. The voltage variation test did not exceed 0.49% for the MAPE, 0.49% for the MRE, and 0.56% for the standard deviation. Meanwhile, the current variation test indicated that the MAPE and MRE values and standard deviation were similar to those of the voltage variation test.

**Figure 13.** Voltmeter test: (**a**) OSPPSM vs. RMS voltage. (**b**) Intrinsic error of voltage measuring.

**Figure 14.** PF meter, wattmeter, and varmeter test: intrinsic error of different variables measuring the voltage variation.

**Figure 15.** Ammeter test: (**a**) OSPPSM vs. RMS current. (**b**) Intrinsic error of current measuring.

**Figure 16.** PF meter, wattmeter, and varmeter test: intrinsic error of different variable measuring for current variation.


**Table 5.** Current magnitude distortion test: maximum intrinsic error (%), MAPE (%), MRE (%), and standard deviation (%): voltage variation.

**Table 6.** Current magnitude distortion test: maximum intrinsic error (%), MAPE (%), MRE (%), and standard deviation: current variation.


#### 6.2.3. Alternating Current Frequency Variation Test

Figures 17a and 18a illustrate the values of the variables *vOSPPSM* and *iOSPPSM* in relation to the reference values *vRMS* and *iRMS*. The results of the intrinsic error for variables *v*, *i*, *PF*, *p,* and *q* are depicted in Figure 17b, Figure 18b, Figure 19, and Figure 20. As a result, the intrinsic error for none of the variables studied exceeded 1%, which confirmed the inclusion of the OSPPSM in accuracy class 1. The distribution of errors was again uniform with a maximum value of 0.98%.

**Figure 17.** Voltmeter test: (**a**) OSPPSM vs. RMS voltage. (**b**) Intrinsic error of voltage measuring.

**Figure 18.** Ammeter test: (**a**) OSPPSM vs. RMS current. (**b**) Intrinsic error of current measuring.

**Figure 19.** PF meter test: Intrinsic error of PF measuring (*PF*: 0.5 lagging, 1, 0.5 leading).

**Figure 20.** Wattmeter and varmeter test: Intrinsic error of different variable measuring.

Table 7 summarizes the statistical error indicators. As can be observed, the maximum MAPE value for the different electrical variables did not exceed 0.63%. The MRE did not reach values higher than 0.05%, and the standard deviation did not exceed 0.8%.

**Table 7.** Alternating current frequency variation test: maximum intrinsic error (%), MAPE (%), MRE (%), and standard deviation (%).


#### 6.2.4. Alternating Current/Voltage Component Variation Test

Tables 8 and 9 show the results for the alternating current/voltage component variation test, which changed the voltage and current when OSPPSM acted as a PF meter. The maximum intrinsic error was lower than 0.98% for both assessments. This maintained the OSPPSM in accuracy class 1. The tables also include the statistical error indicators. In this regard, the maximum MAPE value was below 0.34% for both assessments, whereas the maximum MRE value did not exceed 0.26% for the voltage variation, and 0.24% for current variation. The standard deviation was lower than 0.48%.

Table 10 gives the results obtained when the OSPPSM acted as a wattmeter and varmeter. The fact that the maximum intrinsic error was 0.97% signifies that OSPPSM continued in accuracy class 1. The maximum MAPE and MRE values were 0.512% and −0.034%, respectively. The standard deviation was 0.582%.



Wattmeter Varimeter

0.950

0.920

 0.970

 0.940

 0.940

 0.483

 0.453

 0.453

 0.003

 0.028

 0.028

 0.553

 0.523

 0.523

 0.970

 0.506

 0.512

 0.512

 0.010

−0.034

−0.034

 0.572

 0.582

 0.582

256 V

24 A

= 1

*Electronics* **2019** , *8*, 878

196



Wattmeter, *PF*:1

Varmeter, *PF*:1

Wattmeter, *PF*:0.5 lagging)

Varmeter, *PF*:0.5 lagging Wattmeter, *PF*:0.5 leading)

Varmeter, *PF*:0.5 leading

 0.910

 0.910

 0.950

 0.950

 0.950

 0.930

 0.950

 0.950

 0.450

 0.466

 0.492

 0.026

 0.910

 0.950

 0.460

 0.494

 0.501

 0.950

 0.970

 0.544

 0.463

 0.480

 0.004 −0.014

 0.057 −0.027 −0.005

 0.016

 0.518

 0.546

 0.564

 0.125 −0.028

 0.597

 0.541

 0.556

 0.567

 0.538

 0.538

 0.950

 0.930

 0.413

 0.490

 0.480

 0.032

 0.031

 0.960

 0.900

 0.523

 0.419

 0.467

 0.980

 0.940

 0.472

 0.483

 0.454

 0.100 −0.020

 0.028

 0.064 −0.035

 0.581

 0.493

 0.555

 0.542

 0.502

 0.531

−0.050

−0.048

 0.507

 0.552

 0.520

#### 6.2.5. PF Variation Test

Table 11 shows the first assessment of the PF variation test. This test changed the voltage when the OSPPSM acted as a wattmeter and varmeter. Since the intrinsic error attained a 0.97% maximum value, the OSPPSM remained in accuracy class 1.

Table 12 shows the second assessment of the PF variation test. This test changed the current when the OSPPSM acted as a wattmeter and varmeter. Since the intrinsic error reached a 0.98% maximum value, the OSPPSM remained in accuracy class 1.

#### 6.2.6. Continuous Overload Test

Table 13 gives the results of the continuous overload test. The maximum intrinsic error was lower than 0.99%. Consequently, the OSPPSM continued in accuracy class 1.

**Table 13.** Continuous overload test: maximum intrinsic error (%), MAPE (%), MRE (%), and standard deviation (%).


#### *6.3. Uncertainty Evaluation*

Table 14 shows 10 independent sets of simultaneous observations for the three fundamental variables *v*, *i,* and *PF* (cos ϕ). Because the variables were simultaneously measured, they were correlated. Evidently, these correlations should be taken into account in the uncertainty evaluation of derived variables *p* and *q*.

**Table 14.** Fundamental variables: input quantities from 10 sets of simultaneous observation.


Table 15 summarizes the standard uncertainty results for the fundamental variables. Accordingly, Table 16 shows the absolute precision of these variables in relation to the recommendations and requirements of the JCGM guide 100:2008 [84].




**Table 16.** Fundamental variables and absolute accuracy.

The relationship between the derived and the fundamental variables is described in Section 3. After the application of Equations (13) and (14), Table 17 gives the standards uncertainties for the derived variables, according to Reference [28].

**Table 17.** Derived variables and calculated values for derived quantities *p* and *q*.


The results in Table 18 reflect the absolute accuracy of the derived variables, according to the JCGM guide 100:2008 [84].

**Table 18.** Derived variables and absolute accuracy.


As can be observed in the results of the uncertainty evaluation, the maximum uncertainty percentage was achieved for variable *p*, with a 0.0063% value, whereas the rest of the variables had lower values. In order to achieve a 99% confidence level (α*set* = 1%) when evaluating uncertainty, the minimum number of samples required for the active power measurement, according to Equation (17), is:

$$n\_{s\text{-min}} \ge \left(\frac{2.58 \times 1.031}{1}\right)^2 = 7.08\tag{18}$$

and for the reactive power measurement:

$$m\_{\text{s-min}} \ge \left(\frac{2.58 \times 1.011}{1}\right)^2 = 6.81\tag{19}$$

The 10 samples taken were sufficient to fulfill the set confidence level of 99%.

#### **7. Conclusions and Discussion**

This research study developed and successfully calibrated a new prototype of an accurate low-cost OSPPSM for collecting generation/load profiles at temporal high-resolution in real-world PV household-prosumer facilities. This OSPPSM was based on the Arduino open-source electronic platform. Input data were gathered with a set of sensors based on Arduino components. The NILM approach used in the OSPPSM makes it ideal for measuring electrical variables without modifying the monitored household.

This prototype has a number of advantages. More specifically, it determines fundamental and derived electrical variables in conformity with the IEC 61000-4-30 standard. The stationary analysis has a 10-cycle analysis window with a sampling rate of 1 kHz. Thanks to its dual board, the computational time is extremely fast. In fact, the OSPPSM is able to perform real-time monitoring with temporal high-resolution data, every 0.25 s (4 Hz). Evidently, this real-time calculation capacity and the big-data support in the cloud have promising applications, especially all that concerns the provision of advanced energy services for PV household-prosumers. The design of these services is based on the training and validation of models. However, this requires temporal high-resolution data for generation/load profiles that can be collected by using this prototype in real-world household facilities. It should be highlighted that these services account for the effects of both the fast short-term fluctuations of input profiles (<4 Hz) and their hourly/daily/weekly/monthly variability.

Another promising application of the prototype is the verification of household status by using a computer or mobile device that is able to perform the appropriate actions.

This prototype was calibrated as accuracy class 1, according to IEC standards for power smart meters. This was confirmed by the results of the calibration standard tests, in which there was a maximum error of 0.99% and a maximum uncertainty of 0.0063%. Moreover, the Kolmogorov-Smirnov tests performed on the OSPPSM, working as an ammeter and PF meter, showed uniform distributions of the intrinsic error distributions. This highlights the accuracy of the OSPPSM.

Furthermore, the prototype design features easy-to-obtain hardware and open-source software. This means that it is freely accessible to researchers and users in general for their own design and use in a non-intrusive way. With no loss of accuracy and uncertainty, the cost of this prototype is considerably lower than commercially available power-energy loggers (about 1400 €). It also has equivalent measurement functionalities without cloud data uploading.

The results obtained in this research justify the continuation and further development of the OSPPSM prototype. Further research will focus on building additional OSPPSMs and testing them in real-world scenarios by deploying a network of OSPPSMs in different PV household-prosumers. For the benefit of the research community, an open web interface will be designed to visualize the main electrical variables at temporal high-resolution of the monitored PV household-prosumers.

**Author Contributions:** All the authors contributed substantially to this paper. F.S.-S., A.C.-O., and C.R.-C. performed the simulations and experimental work, and also wrote the paper. J.C.H. provided the conceptual approach, commented on all the stages of the simulation and experimental work, and revised the manuscript.

**Funding:** This research was funded by the Agencia Estatal de Investigación (AEI) and the Fondo Europeo de Desarrollo Regional (FEDER) aimed at the Challenges of Society (Grant No. ENE 2017-83860-R "Nuevos servicios de red para microredes renovables inteligentes. Contribución a la generación distribuida residencial").

**Acknowledgments:** This research was funded by the Agencia Estatal de Investigación (AEI) and the Fondo Europeo de Desarrollo Regional (FEDER) aimed at the Challenges of Society (Grant No. ENE 2017-83860-R "Nuevos servicios de red para microredes renovables inteligentes. Contribución a la generación distribuida residencial").

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

#### **Abbreviation**

Nomenclature *AAxi* : absolute precision of variable *xj* AC: alternating current ADC: analogic to digital converter BESSs: battery energy storage systems DC: direct current *E*: intrinsic error *F*: frequency FPGA: field programmable gate array GSM: global system mobile *i*: current IoT: Internet of Things MAPE: mean absolute percentage error MI: measuring instrument

MRE: mean relative error *n*: index for the set of samples *ns*: number of samples *nv*: number of fundamental variables NILM: non-intrusive load monitoring NRU: nominal range of use OSPPSM: on-time single-phase power smart meter *P*: active power PF:power factor *PF:* power factor (=cos ϕ*)* PQ: power quality PV: photovoltaic PWM: pulse width modulation *q*: reactive power R.M.S: root mean square RMS: reference measurement standard *s*: apparent power *v*: voltage *x*: fundamental electrical variable *y:* derived variable WEP: wired equivalent privacy *z*: index for the set of variables Greek symbols μ*:* mean μ*xj* : mean of variable *xj* ρ(μ*xz* , μ*xj*): correlation coefficient of variables *xz*, *xj* σ: standard deviation σ2: variance σ*s xj* : standard uncertainty type A for the variable *xj* σ*c <sup>y</sup>*:combined uncertainty of variable *y* ϕ:phase angle of current 1-α: confidence level Subscripts *din*: declared input *i:* current *j, m, w*: *j*th *m*th, *w*th variable *max*: maximum *min*: minimum *OSPPSM*: on-time single-phase power smart meter *p*: active power *PF*: power factor *q*: reactive power *ref*: reference *v*: voltage *xj*: variable *xj* Superscripts *avg*: average *k*: *k*th specified analysis window *ins:* instantaneous *n*: index for the set of samples *set*: set *r.m.s*: root mean square

#### **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/).

## **Intermittent Renewable Energy Sources: The Role of Energy Storage in the European Power System of 2040**

**Henrik Zsiborács 1, Nóra Heged ˝usné Baranyai 1,\*, András Vincze 2, László Zentkó 3, Zoltán Birkner 4, Kinga Máté <sup>5</sup> and Gábor Pintér <sup>1</sup>**


Received: 21 May 2019; Accepted: 18 June 2019; Published: 26 June 2019

**Abstract:** Global electricity demand is constantly growing, making the utilization of solar and wind energy sources, which also reduces negative environmental effects, more and more important. These variable energy sources have an increasing role in the global energy mix, including generating capacity. Therefore, the need for energy storage in electricity networks is becoming increasingly important. This paper presents the challenges of European variable renewable energy integration in terms of the power capacity and energy capacity of stationary storage technologies. In this research, the sustainable transition, distributed generation, and global climate action scenarios of the European Network of Transmission System Operators for 2040 were examined. The article introduces and explains the feasibility of the European variable renewable energy electricity generation targets and the theoretical maximum related to the 2040 scenarios. It also explains the determination of the storage fractions and power capacity in a new context. The aim is to clarify whether it is possible to achieve the European variable renewable energy integration targets considering the technology-specific storage aspects. According to the results, energy storage market developments and regulations which motivate the increased use of stationary energy storage systems are of great importance for a successful European solar and wind energy integration. The paper also proves that not only the energy capacity but also the power capacity of storage systems is a key factor for the effective integration of variable renewable energy sources.

**Keywords:** solar energy; wind energy; energy storage; renewable energy integration; Europe

#### **1. Introduction**

#### *1.1. Changes in the Spread of Photovoltaic and Wind Energy Technologies in the World*

Today's boost in energy demand and shift towards a low-carbon economy brings about an increased need for the deployment of cutting-edge technologies and services in the energy sector [1,2]. Addressing climate change and the excessive greenhouse gas (GHG) emissions are among the top urging issues at a global level. On the pathway towards a low-carbon future, the use of renewable energies will undoubtedly have a key role [3,4]. Variable renewable energy (VRE) sources, such as photovoltaic (PV) energy, may serve as a remedy in order to mitigate the adverse effect of the above factors, given their sustainable, clean, and ecofriendly nature [5–7]. Current ambitions targeting the reduction of GHG-emissions attribute a growing importance to the electricity sector alongside a more distributed generation (DG). When it comes to tackling climate change, PV and wind energy technologies will be key drivers in paving the way towards sustainability and energy conservation. However, today the integration of VRE sources poses a challenge to be addressed for the successful decentralization of the electricity network. From the point of view of power quality, PV and wind energy have some disadvantages. The intermittent nature of VRE sources and distributed generation remain a challenge to grid operators when scheduling power generation. On the other hand, distributed energy generation may enhance the further spread of smart grids and micro grids and, therefore, ensure a greater share of clean energy in the energy mix [8–14].

PV and wind technologies play a key role in the shift towards green growth, a low-carbon economy, and a greater share of renewables in the energy mix [15]. In the last decade, support schemes such as the feed-in-tariff system, the declining initial capital expenditure due to the boost in innovation, and technology have proved to be essential factors that underpin this phenomenon [16–18]. Statistics show a considerable growth of PV and wind energy globally; 7.5% of the total 26.5% share of renewables in electricity generation was produced by VRE installations in 2017. In the same year, the global built-in PV and wind capacity amounted to 941 GW (Figure 1). The key players of the PV electricity market were China (131.1 GW), followed by the EU (108 GW), the USA (51 GW), and Japan (49 GW). China (188.4), the EU (168.7 GW), and the USA (89 GW) were also leaders in terms of wind capacity, followed by India with a share of 32.8 GW [17,19].

**Figure 1.** Estimated renewable energy share of global electricity production, 2017, based on [17].

#### *1.2. Energy Challenges with the Spread of Variable Renewable Energy Sources*

Today, the integration of VRE sources into the electricity grid is one of the crucial issues to be addressed at an international and national level. For example, the European Union (EU) has set the ambitious goal to cut its overall GHG emission by more than 80% by 2050, as well as to become the global leader in the usage of renewable energy sources (RES). To achieve this goal, member states shall endeavor in the coming years to significantly increase the share of intermittent renewable energy sources in their energy mix. By integrating more VRE sources into the European grid system, it will be essential to tackle the need for a more flexible electricity grid. Subsequently, cost competitive energy storage technologies will be drivers in creating the necessary secure balance between distributed and centralized electricity generation and the integration of a higher share of viable renewables such as solar and wind energy [20]. However, due to their variable power generation nature, the integration of PV and wind power into the electricity grid is a challenge, since the existing grids and their capacities were established to comply with less or non-variable energy sources, dispatchable power generation, and predictable load peaks. In general, today's electricity grids are able to handle a low increase in load as a result of newly built-in VRE capacities, but a massive load increase can cause discrepancies in the macro energy system. In order to mitigate and successfully tackle regional differences arising from the variable solar and wind potentials, the electricity system of the new era should not only be flexible

but also possess a sufficient backup capacity. The flexibility of the grid is an essential factor in handling network constraints caused by VRE generation during the peak hours of demand. On the other hand, storage capacity may be beneficial when there is an incline in sunshine hours and wind speed [21–24].

#### *1.3. The Importance of Energy Storage Systems and their Future Role*

According to the European vision, the energy system will rely significantly on renewables by 2040, more specifically on non-dispatchable and VRE power, which at the same time will bring about the partial decentralization of the energy system [25–27]. The optimal share of VRE sources in the energy mix depends on various factors. The flexibility of the grid, the back-up capacity, the quality and capacity of the transmission system [28–31], as well as load performance characteristics [32–34] and the actual local weather patterns may determine the volume of VREs that can be safely fed into the system [35–37]. A potential solution to compensate for the uncertainty arising from the variable nature of VREs is to upgrade and enhance the overall flexibility of the electricity grid. By adding storage capacity to the energy system, greater flexibility can be achieved through the provision of a back-up potential for shaving of peak loads or filling valleys [35,36,38].

Today, there exist multiple storage technologies and solutions that are able to compensate for the intermittent nature of VRE sources (Figure 2), namely electro-chemical energy storage, electro-mechanical energy storage, electrical energy storage, thermal storage, and chemical energy storage. The key solutions for large-scale energy storage include compressed air storage, pumped hydro storage (PHS), molten salt thermal storage, or flow batteries (Figure 3). The details of the specific features of these energy storage technologies, however, are not included in this manuscript. The abbreviations for all technologies are listed in the abbreviations section. Overall, the global energy storage capacity including both stationary and grid-connected capacities amounted to approximately 159 GW, of which 153 GW was PHS in 2017 [17,39].

**Figure 2.** Classification of energy storage technologies by the form of stored energy [39].

**Figure 3.** Energy storage technologies by discharge time and power capacity [39].

At the beginning of 2017, the global, overall, new advanced energy storage capacity amounted to around 5.9 GW. In this year, the energy these energy storage technologies put into operation accounted for approximately 0.5 GW of the final total. The share of electrochemical storage solutions (battery) had increased considerably, by 0.4 GW, at the beginning of 2017 up to a total of 2.3 GW [17]. Due to its user-friendly, economical nature and rather simple deployment, battery storage is one of the most popular options when considering energy storage solutions both at a domestic and industrial level. The use cases of energy storage are shown in Figure 4, but an explanation of these features is not provided in the present paper [9,14,40].

**Figure 4.** The 10 most common use cases of energy storage systems until August 16, 2016, based on [9] (Projects can have multiple use cases).

Compared to the approximately 4.67 TWh of 2017, if the current trends persist and the share of VREs in the global energy mix doubles, there will be a considerable growth in the overall energy storage capacity by 2030 up to about 6.62–15.89 TWh [8]. However, this increase is slightly unpredictable at present. According to the relevant forecasts, the share of PHS technologies will fall to approximately 90% of the overall installed storage capacity by 2030. In the meantime, the declining production cost of storage appliances will bring about an explosive development of cutting-edge battery technologies and the diversification of their possible uses, inter alia both at grid and self-consumption level (e.g., rooftop solar PV). Based on current projections and future scenarios [10], non-pumped hydroelectricity storage will grow from an estimated 162 GWh in 2017 to 5.8–8.4 TWh by 2030. Key drivers behind the boost in the energy storage market will be behind-the-meter and utility-scale solutions. The battery capacity of stationary applications is expected to increase from the estimated 11 GWh in 2017 up to about 100–421 GWh by 2030. Using battery electricity storage integrated into small-scale PV systems will be one of the most common and marketable ways of battery deployment in the period until 2030. In the near future, the economic viability of stationary battery electricity storage solutions is expected to drastically advance across Europe and beyond due to beneficial factors, such as increased residential and commercial electricity rates, better support schemes (e.g., relatively low feed-in-tariffs), and competitive cost structures. Moreover, alongside with the spread of favorable support schemes for VRE's, new markets for additional products and services are also expected to appear [8–14].

#### *1.4. European Electricity Consumption and Energy Storage Aspects*

According to data from the European Network of Transmission System Operators for Electricity (ENTSO-E), in 2017 the European total electricity consumption amounted to 3,329 TWh, showing a moderate increase (+0.2%) compared to the previous year's data. In the same year, the peak demand on the electricity grid was measured on 18 January and amounted to 542 GW (4 GW less than in 2016). With regard to the net generating capacity (NGC), the figures show a slight decline for nuclear (−2.3%) and fossil fuels (−3.1%) from 2016 to 2017. On the other hand, the net generating capacity for solar and wind energy grew by 6.1% and 9.8% in the same period. The thirty-six member countries of ENTSO-E are Austria, Albania, Bosnia and Herzegovina, Belgium, Bulgaria, Switzerland, Cyprus, Czech Republic, Germany, Denmark, Estonia, Spain, Finland, France, United Kingdom, Greece, Croatia, Hungary, Ireland, Iceland, Italy, Lithuania, Luxembourg, Latvia, Montenegro, Macedonia, Netherlands, Norway, Poland, Portugal, Romania, Serbia, Sweden, Slovenia, Slovakia, and Turkey. It should, however, be noted that Albania (member since March 2017) and Turkey (observer member) are not included in the statistics. The summary data are shown in Tables 1 and 2 [41].


**Table 1.** European electricity consumption and maximum peak loads between 2013 and 2017 [41].


**Table 2.** Evolution of electricity consumption between 2016 and 2017 in Europe [41].

The overall net generating capacity from renewable electricity sources (RES) (without hydro energy) has a share of approximately 30% of the total NGC. Meanwhile, electricity produced from hydro power showed a considerable decline caused by decreased water discharge (9.3%). On the regional level, the energy demand shows disparities. While the energy demand is extensively growing in Eastern Europe and shows a moderate growth in the Hispanic Peninsula, there is a slight decline in electricity consumption in some European countries, such as Germany, Austria, and Great Britain. However, the Central European countries (except for Germany and Austria) remain stable in their demand [41]. In Europe the installed PHS capacity in 2017 reached 50.5 GW (approx. 1.9 TWh energy capacity based on [11,40,42–44]), of which a capacity of more than 59% was found in 5 countries, namely Italy, France, Germany, Austria, and Spain (Figure 5). Based on the ENTSO-E scenarios, the PHS capacity increase is expected to be in the range of 58–76 GW by 2040 [27,45]. At the beginning of 2017 other storage technologies represented about 1.3% of the total storage capacity based on thirty ENTSO-E countries [9,46].

y

**Figure 5.** European installed pumped hydro storage (PHS) generation capacity in 2017 based on [45].

#### **2. Material and Methods**

In the research project, the 2040 scenarios titled Sustainable Transition (ST), Distributed Generation (DG), and Global Climate Action (GCA) developed by the European Network of Transmission System Operators were examined in relation to the VRE integration targets and the theoretical maximum considering the technology-specific storage aspects. In the modelling we combined only the main findings of the manuscripts that examined the European level and the general, global conclusion from Blanco-Faaij (2018) [47]. These manuscripts also analyzed the power capacity and/or the energy capacity of stationary storage technologies for secure European grid balancing. Thus, the first common point of the analyzed manuscripts is the provision of the balance of the European grid system by stationary storage technologies. Other key components for analysis at the European level were annual demand, VRE penetration, and energy storage capacity, which can be well defined. This approach was published by Blanco-Faaij in 2018 [47]. VRE gross electricity generation is a percentage of the total electricity demand and this value can also be easily determined. According to the authors, the carefully selected articles complement each other's results, and the conclusions of the manuscripts were applied to the European grid sector.

#### *2.1. Description of the ENTSO-E Scenarios*

The ST scenario seeks economical, quick, and sustainable CO2 reduction by replacing lignite and coal by gas in the power sector. In this case energy generation by gas is popular due to the relatively cheap global gas prices and the strong growth of bio-methane. A regulatory framework in place decreases the use of coal power plants. Gas-based energy generation largely provides the necessary flexibility to balance renewables in the power system. In this storyline, climate action is achieved with a mixture of emission trading, national regulation, subsidies, and schemes [27].

In the DG scenario, significant leaps in the innovation of commercial/residential storage technologies and small-scale generation are a key driver in climate action. This case represents a more decentralized development with focus on end-user technologies. Smart technologies, PV systems, electric vehicles, and dual-fuel appliances allow consumers to switch energy depending on market conditions. Biomethane growth is strong as connections to distribution systems grow, utilizing local feedstocks. In this storyline, the electricity demand flexibility is substantially increased, both in industrial and residential solutions, helping electric power adequacy. Wintertime, however, with low solar availability and high heating needs remains a challenge, since batteries cannot be used for seasonal storage [27].

The GCA scenario represents a global effort towards full speed decarbonization. The emphasis is on renewables and nuclear energy in the power sector. Commercial and residential heat becomes more electrified, leading to a steady decline in demand for gas in this sector. The decarbonization of transportation is achieved through gas and electric vehicle growth and the power-to-gas production sees its strongest development within this scenario. Gas power plants provide the flexibility needed within the power market, helping facilitate intermittent renewable technologies within it [27]. The European electricity consumption and maximum peak load features, production capacities and generation in 2040 based on the examined scenarios are shown in Table 3 and Figure 6. These input data were important for modeling.

**Table 3.** European electricity consumption and maximum peak load features in 2040 based on the examined scenarios [27].


**Figure 6.** Installed production capacities and generation in Europe based on the 2040 scenarios [48].

The ENTSO-E scenarios take into account the impact of EV penetration in the electricity demand. However, it is stationary storage technologies that ensure that the potential uncertainty of the power supply resulting from VRE penetration is eliminated [27].

#### *2.2. European Energy Storage Case Studies for VRE Integration*

An important variable that defines the energy storage capacity requirement is the energy production from the VRE sources in the energy mix [47,49]. Several studies were reviewed to estimate the European stationary storage size as a fraction of VRE penetration and annual demand. With the solution, it is possible to determine the average energy storage fraction requirements expressed in energy storage capacity (TWh). This refers to the amount of energy that can be stored at the same time and not energy delivered throughout a year. The energy storage fraction and the energy storage capacity are relative numbers to compare across studies. In this manuscript a polynomial regression model was developed in MATLAB by combining the logic of 7 studies [13,22,47,50–53]. These sources are meta-analyses, in which hundreds of manuscripts were analyzed and evaluated. The model calculates the average energy storage fraction in the context of VRE gross electricity generation, expressed as a percentage of the total electricity demand. The issue of the energy storage fraction has been analyzed in many studies in the context of VRE energy production. Blanco and Faaij [47] summarize the factors that determine this fraction based on 79 sources and conclude that there are significant differences between countries (Tables 4 and 5). For this reason, the model proposes that the storage requirement should be examined at the European level, defining an average value. Tables 4 and 5 show the summarized VRE penetrations of 10–100%. A general conclusion by Blanco and Faaij [47] is that even for high VRE penetrations of 90–95%, the storage fraction is at most 1.5% of the annual demand, while that for a VRE penetration of 100% this share is highly uncertain. However, it should be noted that according to [13,51–53], there is no need for a high degree of storage flexibility for a VRE percentage of 40–50%. The figures presented in Table 4 are listed in an increasing order of 'VRE penetration', while Table 5 displays the data in the increasing order of the 'energy storage fraction'.


**Table 4.** Recommended annual storage features in Europe, with less than 100% VRE penetration, based on [47].


**Table 5.** Recommended annual storage features in Europe, with a renewable energy sources (RES) penetration of 100% based on [47].

#### **3. Results**

#### *3.1. Determination of the European Storage Fractions*

The issue of storage fractions has been analyzed in many studies in the context of gross VRE electricity generation. In this manuscript, a polynomial regression model was developed in MATLAB by combining the logic of seven studies [13,22,47,50–53]. Blanco and Faaij [47] summarize the factors that determine the mentioned fractions based on 79 sources and conclude that there are significant differences between countries. Other sources [22,47,50] were suitable for investigating the storage fractions as a function of gross VRE electricity generation at the European level. These baseline values have been applied to modelling:


From the reviewed studies it became evident that the 40–50% energy production share from VRE in the European power grid sector is a critical value [13,51–53]. Above this level the need for energy storage dramatically increases (Figure 7) as evidenced by most studies. Below 40–50% of VRE share the storage fraction increases basically linearly, but most studies gave diverging storage fraction values for the 50–100% VRE share. With the relationship created, fraction values up to a VRE penetration of 95% were analyzed (Figure 7). Based on the reviewed studies, the figures given for the recommended storage capacities at an all European level in the case of generating 100% of the annual demand by using RES show far too great a variation to be reliable (Table 5) [35,37,47,49,70,75,76]; therefore, a VRE penetration of 100% was not examined in this research. With the help of a polynomial regression model, an equation that describes the average European storage fraction related to the percentage of gross VRE electricity generation was developed. To build the equation (Equation (1)) that best models the storage fraction as a function of VRE share in consumption, the equation takes into consideration the joint slopes of source [22] for VRE shares below 45% and [47,50] above 45%, resulting in the final figures of storage fractions as shown in the figure below. With Equation number 1 (Table 6), it is possible to determine the energy storage capacity volumes of electricity (at stationary storage systems) at the European level, assuming appropriate demand-side management, smart market regulations, advanced weather forecasting systems, and continuous, ideal European network development to maintain secure

electricity supplies through balancing. The R-square and adjusted R-square values of the MATLAB model derived from the input data are 1.

**Figure 7.** Result of the average European storage fraction analysis.


**Table 6.** Result of the European storage fraction analysis.

#### *3.2. Determination of the European Storage Power Capacity*

It should be noted that there is no unified solution for determining the necessary future storage power capacity size requirements in Europe, but there are some well-defined ranges. Due to the lack of data, it is the studies [22,47,50,77] that can provide adequate information on the necessary future storage capacity requirements needed for balancing the European grid. In these sources, the 16–48% and the 80% VRE penetration ranges can be determined [22,47,50,77]. In the case of a European annual demand of 4900 TWh and 80% VRE integration, a 125 GW storage power capacity is recommended for grid balancing. In the model, the value of 125 GW was adjusted proportionally to the annual demand values of the 2040 ENTSO-E scenarios [22,47,50,77]. The starting point of the modeling was the power capacity context of [22] up to 45% of VRE penetration, then due to the lack of data, polynomial regression models were applied to the GW values of VRE gross electricity generation of 45–80%. The relationship is confirmed by the work of Cebulla et al. [49] and the results approximate the values of 'balanced' and 'wind+' of [49] (the PV and wind ratios between installed capacities for the first category were 2:1–1:1.5, while the second category value was 1:1.5). Based on this, the power capacity requirements for the VRE objectives of the ENTSO-E scenarios were determined (Figure 8). In addition, the theoretical maximum VRE integration potentials of the summarized European power capacity of all storage technologies were also determined.

**Figure 8.** European power capacity requirement analysis results based on different VRE penetration levels of the 2040 ENTSO-E scenarios.

#### *3.3. European Variable Renewable Energy Integration Possibilities*

The power capacity of PHS was calculated on the basis of the ENTSO-E ST, DG, and GCA scenarios. From the energy capacity input data of [11,40,42–44] the sources, the PHS energy capacity was estimated by linear change due to lack of data (Tables 7 and 8). The International Renewable Energy Agency (IRENA) published a comprehensive study [10] on the future of energy storage trends, cost, and markets. This report breaks down the electricity storage energy capacity growth by storage technology according to four scenarios in 2030. However, the scenarios differ significantly and IRENA'S reference data were taken into account for the calculations. Considering the IRENA, the Global Energy Storage Database (DOE) studies, and the ENTSO-E Ten Years Network Development Plan 2018 Storage project database [9,10,78], it was assumed that the estimated European power capacity of other storage technologies will be 5% (scenario 1) and 25% (scenario 2) compared to the PHS values in 2040, and the average charge/discharge period was assumed as (other storage technologies) 8/8 h (scenario 1) and 12/12 h (scenario 2) (Tables 7 and 8).

**Table 7.** Power capacity and energy storage capacity results of the European energy storage systems in 2040, based on [9–11,27,40,42–44,78,79], scenario 1.



**Table 8.** Power capacity and energy storage capacity results of the European energy storage systems in 2040, based on [9–11,27,40,42–44,78,79], scenario 2.

From the electricity demand and the VRE penetration in the ENTSO-E ST, DG, and GCA scenarios, the energy storage capacity requirements and the storage fraction requirements were calculated by using Equation (1) (Table 9). Based on the analyzed scenarios, the fraction values were between 0.033% and 0.166%, which would mean 1.35–6.82 TWh energy storage capacities. In addition, the power capacity requirements of the energy storage systems of the three scenarios for the VRE integration would be in the range of 57–76 GW.

**Table 9.** Results related to the European storage power capacity and energy storage capacity requirements in 2040.


It was examined whether the VRE penetration targets of the ENTSO-E scenarios would be feasible considering the estimated storage power capacity and the energy capacity of stationary storage systems based on the approaches of scenario 1 and 2. It was also determined whether the power capacity or the energy storage capacity is the limiting factor in terms of successful VRE integration. Based on the results, we came to the conclusion that due to the need for a secure electricity supply both factors are equally important for successful VRE integration (Figure 9). The results showed that achieving a minimum of approximately 45–50% VRE penetration integration could be a realistic target in the European power grid sector until 2040. The ENTSO-E ST and DG scenarios appear to be rational goals. For the GCA scenario, the 55% VRE penetration rate seems to be feasible compared to the 59% target. According to the results, energy storage market developments and regulations that motivate the increased use of energy storage systems are of great importance for a successful European solar and wind energy integration.

**Figure 9.** The feasibility of the European VRE integration target based on the various scenarios.

#### **4. Conclusions**

This study examined the European variable renewable energy integration challenges related to the power capacity and energy capacity of stationary storage technologies. It also analyzed and presented the feasibility of the European VRE electricity generation targets and the theoretical maximum related to the 2040 scenarios. The determination of the storage fractions, the power capacity, and the energy storage capacity were modelled in a new context. Based on the results we came to the conclusion that due to the requirement of a secure electricity supply, all factors are equally important for successful VRE integration. The results showed that achieving a minimum of approximately 45–50% VRE penetration unitl 2040 could be a realistic target in the European energy grid sector. The ENTSO-E ST and DG scenarios appear to be rational goals. For the GCA scenario, a 55% VRE penetration rate seems feasible compared to the 59% target. For the success of European VRE integration, energy storage market developments and regulations that motivate the increased use of energy storage systems are crucial.

**Author Contributions:** H.Z. was mainly responsible for the technical and modelling aspects, and conceived and designed the manuscript. All authors contributed equally in the analysis of the data and the writing and revision of the manuscript.

**Acknowledgments:** We acknowledge the financial support of Széchenyi 2020 under the EFOP-3.6.1-16-2016-00015.

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

#### **Abbreviations**

The following abbreviations are used in this manuscript:


#### **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/).

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

*Electronics* Editorial Office E-mail: electronics@mdpi.com www.mdpi.com/journal/electronics

MDPI St. Alban-Anlage 66 4052 Basel Switzerland

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