## 1. Introduction

The European Union target for 2020, regarding CO_{2}decrease in the electricity sector,is of 20 %. This will assume animportant increase in PV installation all over Europe producing a few Giga Watts of additional capacity [1-4].

Today, the problem of energy efficiency becomes a very important issue. That means the entire industry is turning towards clean, renewable energy with different actively controlled loads, including Electric Vehicles (EV) and smart sensors. Increased distributed generation in the existing power systemsis becoming significant. In the near future it will be based on DER components including energy storage systems andon smart-grids [2, 5-12].

The battery package solutions are an interesting and useful option for storing surplus energy from the network (e.g. resulting from solar and wind intermittency) for a later use. It may also act as a peak shaving unit and thereby contribute to a stronger grid. Vanadium redox flow batteries have many advantages over other storage technologies, including storage efficiency, low maintenance costs and a long life cycle [13-17].

In order to study various aspects of Battery Storage Systems (BSS) accurate battery dynamic models are required [13-26].

Control strategies for battery energy storage systems have become a critical design issue. The challenge is to smooth the intermittent power output of RES, and to keep the rated voltage of the distribution substation within the standard limits [3, 9-12,19-24].

This paper focuses on simulation models, validated by measurements using experimental facility of an active and distributed power systems laboratory, with storage systems connected together with PV Systems and a Flex-House with controllable loads at a distribution network. Three types of local voltage control of the bus-bar to which the BSS was connected are also described, implemented and tested successfully.

This paper is structures as follows: in Section II, the distributed power system laboratory architecture is introduced; The Section III presents the simulation models of DER components used in this paper while the Section IV is devoted to implementation, simulation and testing of control strategies for DER components in a distribution network. Section V concluded this paper.

## 2. Distributed energy network architecture

The laboratory usedfor testing and to validate the simulation models in this research it is asmart grid with distributed control and with a high share of renewable systems.

The experimental facility of the lab contains a Wind/PV/Diesel Hybrid Mini-Grid with local storage and a novel control infrastructure. It includes two wind turbines (10 kW and 11 kW), three PV-plants (7.2 kW and 2 x 10 kW), a diesel gen-set (48 kW/60 kVA), an intelligent office building-Flex House with controllable loads (10 kW), a number of loads (75 kW, 3*36 kW), a Vanadium Redox Battery-VRB of 15 kW/120 kWh and three containers, each with an EV Li-ion battery pack of 50 Ah/16 kWh and 75 Ah/27 kWh, respectively and a bi-directional power converter of 90 kW.

The facility is spread across three sites located several hundred meters apart, as can be seen in Figure 1a).

At each of the sites there is a switchboard that let the already mentioned components to be connected to two bus bars. The components are all connected in one distributed control and measurement system that enables very flexible setup with respect to the experimental configuration [25-28], as it is shown in Figure 1b).

The acquisition of data and the control system (hardware and software) is capable for the supervision and control of the research platform with a high penetration of renewable energy systems. The software program, responsible for monitoring and supervision, is written in Java and is able to handle the data acquisition, and to control the outputs variable of the components. The sensors outputs are connected to a signal conditioning system, which in turn is connected to the data acquisition (DAQ) board based on SCADA System.

Certainof the active loads can be controlled by the centralized controller which is able to receive the data and the events from wireless switches and smart sensors. In control room, a small touch-screen graphical user interface can be used to change the controller policy (Figure 1c). The building controller can obtain information on the status of the power network, and based on that will adapt its control strategy accordingly. The control system is based on a closed loop controller, in which the active policies, measurement data and user settings can be communicated back to the grid.

All units of the distribution network – generators, loads, storage systems, and the switchgear – are automated and remote-controllable.

Each unit is locally monitored and controlled by a specialized controller node.

The node is able to connect together an industrial PC, data storage, measurements and I/O interfaces into a portable and compact container with the backup power and the Ethernet switch inside.

The flexible control system was used for testing the components and the control strategies implemented, for the validation of the simulation models.

## 3. Distributed energy resources components modeling

### 3.1. PV panel and system modeling and validation

The model of the PV system contains the PV panel’s model and the model of the inverter. It has as inputs the irradiation, the ambient temperature and the wind speed, which are converted into cell temperature and irradiation to be used as inputs for the model of the panels (Figure 2a), and as output the AC power from the inverter [25-28].The block *Measurements*, in Figure 1a), contains the inputs of the simulation model (irradiation, temperature and wind speed), which are used by the *Data processing* block as inputs to convert them into cell temperature and irradiation to be used further by *PV Panel* blocks, as inputs together with the number of cells in series (ns), the number of panels in series (nps) and with the number of strings in parallel (nsp).

The simulation model takes into account the variation of the parameters (open-circuit voltage-*V*_{OC} and short-circuit current-*I*_{SC}) with respect to temperature-*T*_{cell} and irradiation-*G*_{cell} and also the tilt angle and orientation of the panels.

The PV inverter is characterized by a power dependent efficiency where the input power of the model is the maximum DC power produced by the panels.

The dynamic model of the PV System (PV panels and PV inverter) has been built with standard block components from the library and also using the dynamic simulation language (DSL), in Power Factory, to implement the equations and to define the states and the parameters of the model.

The model of the panels is based on a single diode equivalent electrical circuit, described by an exponential equation [25-28], as can also be seen in Figure 2 b).

The simulation model was validated using experiments carried out using experimental facility of a research and development lab with real components [25-28], as was shown in Figure 1.

A block diagram with the PV model implementation steps (Figure 3a) and with a comparison between simulation and measurements (Figure 3b) is shown in Figure 3.

To validate the simulation model of the PV components and PV systemsand to show the significance of considering the atmospheric conditions, such as irradiation, temperature and wind speed, and also the orientation of the panels and its tilt angle, the simulations were compared with experimental results (Figure 3b) carried out using the experimental facilities of the distributed power system laboratory-SYSLAB, shown in Figure 1.

The SCADA system facility disposes of two types of available measured data: ambient parameters (took from a weather station as can be seen in Fig. 3a) and electrical parameters (taken from the DAQ board of the PV inverter).

The ambient data are the wind speed, the ambient temperature and the horizontal solar irradiance. The data read from the weather station is measured in different conditions as the PV array: the irradiance is measured on a horizontal plane and the station is positioned further and higher than the PV array. The electric data represent the DC current, voltage and power on each of the three PV input strings, measured directly by the PV inverter.

The electric measurements have a time period of 1 seconds and the environment measurements have a sampling time of 10 seconds; thus the system changes states each 10 seconds, and only once in this 10 seconds interval the model takes the current value from the previous state.

In Figure3b) is shown a comparison between measured and simulated output power, voltage and current (P_{DC}, I_{DC}, V_{DC}) for a time series of 1 day. Considering the tilt angle and panels’ orientation, the influence of solar irradiance and wind speed on the cell temperature the measurements and simulations are almost identically, as can be seen in Figure 3b).

### 3.2. Actively controlled loads

The simulation model of the intelligent office building, called Flex-House, is based on the equivalent electro-thermal model of the building (Figure 4) using a stochastic discrete-time linear state-space model (1), combining with physical knowledge regarding heat transfer inside the house, together with statistical methods to estimate model parameters [28-29].

The office building is heated by 10 electrical heaters of 1 kW each, which can be used as active controllable loads in the distribution system.

The model for the building is formulated as one room lumped-RC-model in accordance with the commonly used thermal-electrical analogy:

(1) |

Where Ci is the heat capacity of the house, R_{ia} represents the thermal resistance from the indoor to the ambient, A_{w} is the effective window area of the house with heating influence. The state space variables are: T_{i} – inside temperature, T_{m} – second inside temperature which defines an internal medium and T_{h} – temperature in the electrical heater.

Figure 4 a) shows the heat flow diagram for the building (upper) and the equivalent RC-circuit, as well.

The implementation of the simulation model (Figure 4b) is based on (1) and is divided into four separate parts, a thermal model of the building (*FH_ThermalSlot* block), a controller model (*FH_Controller* block), a module to read input data (*FH_Input Measurement* block) and a load connected to a power system (*FH_LoadSlot* block). The input values are measured ambient temperature and solar radiation.From the right the blocks are: input data reader, thermal model of the building, the building temperature controller and the power system load model.

Figure 4c) has shown a simulation of the temperature inside the building and the power consumption of the heaters, for one day, using measured temperature and solar radiation from SYSLAB via SCADA system, as inputs of the simulation model.

### 3.3. Battery energy storage components and systems modeling

We have used in this study, as battery energy storage components, 2 types of devices: a Li-ion battery of 26 kWh/75 Ah designed for EV applications and a Vanadium Redox Battery (VRB) package of 15 kW/190 kWh, for storing excess energy from the grid and to use it in order to control the grid voltage and frequency.

#### 3.3.1. EV battery modeling and simulation

An equivalent circuit modeling with one or two RC block model is the common approach for lithium-cell batteries [14-17]. A single RC block model is adequate for many problems of industrial relevance and has also been used in this paper in combination with a runtime-based electrical battery model (Figure 5).

The runtime electrical battery model (on the left in Figure 5) represents the battery lifetime and contains a self-discharge resistor (R_{self-discharge}), a condenser (C_{capacity}) and a current-controlled source (I_{batt}). R_{self-discharge} is used to characterize the self-discharge energy loss when batteries are stored for a long time and depends on SOC and temperature. C_{capacity} represents the whole charge stored in the battery (SOC) and can be express like in Figure 5 [14].

Where Cn represents the nominal capacity of the battery and f_{1}(cycle) and f_{2}(T) are cycle number and temperature dependent correction factors.

On the right side in Figure 5 it is represented the Thevenin electrical circuit model which represents the voltage-current characteristic of the battery. The model contains a series resistor (Rs) and a RC parallel network (Rt, Ct) to predict the transient response of the battery. Each parameter of the Thevenin circuit is a function of SOC, current and temperature and was implemented in MATLAB/Simulink and DIgSILENT Power Factory using two-dimensional look-up tables based on the measurements shows in Figure 6a).

The series resistance voltage droop (Vs) and the equivalent voltage transient response (Vt) are combined with the open-circuit voltage (VOC) to obtain the battery terminal voltage (V_{batt}), as it is described by the equations on the right side of the Figure 5.

The model of the battery pack was implemented based on the equations presented in Figure 5 and the measurements presented in [30] as shown in Figure 6. The model provides the SOC, power of the battery and the battery voltage as a function of SOC, current and temperature.

Each parameter of the Thevenin circuit is a function of SOC, current and temperature and was implemented using two-dimensional look-up tables based on the measurements at different SOC, current levels and temperatures using pulse current discharging/charging test.

In Figure 6b) was shown a time-series simulation with EVs battery cell and package voltage and SOC during the discharging mode when the battery was discharged from full rate to zero, when a battery constant pulsed current of 25 A was applied.

#### 3.3.2. Modeling of the vanadium redox battery system validated by measurements

The VRB model has been implemented in MATLAB/Simulink and DIgSILENTPowerFactory [25]-[26] and is based on the equivalent electrical circuit using the power balance between the input and the stored power.

The power flow is dependent on the efficiency of different components, such as: cell stacks, electrolytes, pumps, power converter and also on the power losses, as it is shown in Figure 7a).

Figure 7b) shows the schematic structure of the simulation model implemented in Power Factory, including Battery Model, charge/discharge controller, PLL block and Static Generator with its Controller. The VRB system frame also contains the measurements blocks, such as voltage, active & reactive power and frequency, used as inputs for different components of the model. The VRB Simulation Model has as outputs cell current and voltage and SOC level, which are the inputs for charge/discharge controller, as can also be seen in Figure 7b).

The simulation model was validated by measurements taken from the DAQ board of the VRB system.

The experiment have been acquired for a time scale of 36 hours considering the starting pointof the SOC=93.5%, meanwhile the battery was discharged with a constant power of P_{AC}=15kW, until the State of Charge decreased to SOC=18%. After that a sequence of charging was considered from SOC=14% until SOC=87% at the constant power of P_{AC}=10kW.

As can be seen in Figure 7c) a comparison between simulation results and experiments of the SOC level of the battery is presented. It is shown a very small difference between curves, which means that the developed simulation model can be consider an accurate tool for studying and analyzing the characteristics of the battery energy storage system in a distributiongrid.

These characteristics of the battery have been computed based on the results of experiments [14] where different electric values at different loads and SOC levels were measured. The simulation model was validated by measurements using experimental facility of the active and distributed power systems laboratory presented in Figure 1 [25-26].

## 4. Control strategies of DER components in a distribution network

As a part of the power system, the low-voltage distribution grid has the objective to provide energy to the end consumer.

A major objective in a distribution network is to control the voltage due to a large number of factors, such as various load profiles and load types or due to a different number of phases (asymmetrical distribution of DERs in the network).

In Figure 8 a) is depicted the configuration of the consumersalong a feeder in a distribution network with a voltage profile increasing or decreasing in function of the number of active loads (including EVs) and PV systems connected to the distribution network along the feeders.

Due to the PV penetration the voltage along the feeders could increase over the admissible limits defined by standards. Also, due to the EVs connected along the feeders the voltages can decreases exceeding the minimum level. In this case a local voltage controller using distributed energy storage and/or a local voltage controller by load shifting could be an option.

Three types of controllers for voltage regulation have been developed and implemented in MATLAB/Simulink and DIgSILENTPowerFactory, for controlling the bus-bar voltage at the connecting point.

One of them is based on local control by load shifting and two of them are controlling the voltage with the help of energy storage systems.

### 4.1. Voltage control by load shifting

The ability to control active units (only Flex House heaters in our case) will decrease the tension on the low-voltage distribution network by consuming locally the PV production. The energy management systems of the smart houses, such as the SMA Sunny Home Manager [17], can raise the contribution of PV energy being consumed at the distribution customer’s site. Therefore decentralized consumption is raised and the stress and losses in the grid are decreased.

#### 4.1.1. Implementation

To test the voltage controller the Flex House has only been connected with the PV system at the same bus-bar, as was shown in Figure 8b).

The simulation model of the intelligent office building, called Flex-House, is based on the equivalent electro-thermal model of the building, presented in (Figure 4) using a stochastic discrete-time linear state-space model (1) combining with physical knowledge regarding heat transfer inside the house together with statistical methods to estimate model parameters [13]-[15], [26].

The model contains 2 subsystems, a thermal model of the building and a voltage controller model. A module to read input data and a load connected to the power system is also included. The input values are measured ambient temperature and solar irradiation. Figure 9a) shows the block diagram of the building model implemented in MATLAB&Simulink with details about the voltage controller implementation using stateflow chart, presented in Figure 9b).

The voltage controller was developed using a state flow chart, which is an interactive graphical design tool for developing and simulating event driven system based on finite-state machine theory. It is a thermostatic control for the building, so that when the temperature inside the building is below a certain set point the heaters in the building turn on, and when the temperature is above another set point the heaters turn off.

#### 4.1.2. Simulation results versus measurements

Figure 10 point out the simulation results with a comparison between normal operation (Figure 10 a), when the voltage control is not activated, and the situation when the voltage at the local bus-bar is controlled using the load shifting (Figure 10 b) by consuming the PV energy production. The voltage was kept under a certain level (1.04 in this case) when the PV production growths, increasing the heaters power (FH power) and doing that the inside temperature of the house. As was shown in Figure 10 b) when the power production increased more heaters were switched on by the local controller and the inside temperature was increased from 21 ^{0}C to 27 ^{0}C.

To validate the local voltage controller in Figure 10c) it is shown an experimental test using the distributed power system laboratory presented in Figure 1, when the PV system was connected to the grid together with the Flex House.

The parameters which were monitored are heaters output power, the temperature inside the office building and the voltage, which was measured at the bus-bar where the Flex House was connected. As was shown in Figure 10c), when the voltage overtaken the maximum value, set it up at 398 V in this case, the local controller reacts by modifying the heaters power, and implicitly the inside temperature of the house.

The events that point out the state transitions are marked with colored circles. The marks in the first graphic correspond to the local controller response and are the effect of the voltage limit intersection with the voltage at the bus-bar. This voltage is also plotted in the third window. The red circles point out the events when the bus-bar voltage increases to the upper limit, while the blue circles show the events when safe voltage limits are touched and the local controller turns back to the control state.Finally, the green circles show the events when the lower voltage boundary is touched.

### 4.2. Voltage control using battery energy storage systems

#### 4.2.1. Implementation

Two voltage controllers have been developed and implemented based on finite state machine for controlling the bus-bar voltage at the connecting point (Figure 11).

An overvoltage controller, able to charge the battery when the bus-bar voltage exceeds the limits (Figure 11b), and a voltage controller able to set-up the battery to run in schedule mode (Figure 11c), have been implemented in MATLAB/Simulink and DIgSILENTPowerFactory.

The first controller adjusts the voltage at the bus-bar charging the battery when an overvoltage is detected. That means the voltage is adjusted at the bus bar when exceeds the maximum value (set-up here at 1.1 Un), due to the PV production, modifying the state of the battery (discharging/charging).

Only when an over-voltage is detected the controller will modify the charging state of the battery.

Another method of controlling the voltage with the help of storage energy systems it is to set the EV to run in schedule mode. That means the battery is scheduled to operate during the day in function of the weather conditions, such as PV penetration. This control method doesn’t require any voltage measurements on the bus-bar, but it has to be appropriately scheduled for charging with the right amount of energy in the middle of the day.

#### 4.2.2. Simulation results

This section shows two study cases with PV production for 1 week. The PV system is connected together with the Smart-House at the same bus-bar, whilst the battery energy storagesystem is connected to a different bus-bar at the same distributionnetwork, as can be seen in Figure 12 a). Due to the PV penetration, voltage at the bus-bar will exceds the upper acceptable value (set-up at 1.1 in this case regarding European norm EN 50160). Integration of energy storage systems in distribution network to store excessive energy can be a solution to alleviate the over-voltage problem.

Figure 12 b) shows the case when the voltage controller (presented in Figure 12 b)) is employed. The EV’s operation here is outlined as using the voltage control during the day, when the PV system is producing the power. The EV battery system is connected to the network only when an over voltage exists and it consums the surplus active power until the power injected into the grid is not affecting the voltage to the bus-bar, exceeding the voltage limit, as can also be seen in Figure 12 b).

In Figure 12 c) is shown the simulation results for another case when the voltage is controlled bya static battery storage system (VRB system in our case), arranging the battery to work in scheduling mode. The VRB was programmed to operate (charged) between 10-18 o’clock during the day, when the PV systems produce the active power, and has been discharged during the night, operating in an efficient way. The drawback of this case is that the VRB has to be suitably scheduled of charging itself with the appropriate amount of energy in the daytime.

## 5. Conclusion

In this paper we have described the development of simulation tools for DER components in a distribution network. The main focus was on modeling and implementation of the model components and systems with voltage controllers using a smart-house load shifting and using energy storage systems (EV battery), as well, for PV penetration.

The simulation models wereelaborated to simulate and test the growth PV production effects on voltage variations in a distribution network. Another objective has been to use it in simulating distribution system power constraints and methods for assisting high load cases.

The PV, Flex-House, VRB system and EV battery system simulation models have been implemented in two software packages, MATLAB/Simulink and DIgSILENT Power Factory, taking into accounts the characteristics, the efficiency and also the power losses of their components.

The models have been validated using measurements from a dedicated power system research lab with real components.

Comparison with experimental data, acquired using the SCADA system and processed in MATLAB, has shown that the models can be an accurate tool for prediction of energy production with Intelligent Houses and Battery Energy Storage Systems, as well.

Three types of voltage controllers have also been developed and implemented, using a state flow chart and a PI controller, based on finite-state machine. A voltage controller using load shifting (active units), an overvoltage controller, able to charge the battery when the bus-bar voltage exceeds the limits, and a voltage controller able to set-up the battery to run in schedule mode. In the case of the former, the EV battery is connected to the distribution network only when an over voltage appears and consumes the surplus active power until the power injected into the network is not causing the bus voltage to overtaken the limit. It means that the battery requires fewer charging/discharging cycles, leading to increased battery life.

Simulation results and experiments have shown that the controllers have been designed and implemented successfully.

As a future work we will try to develop and implement a coordinated control of DER components to improve the voltage profile of the distribution network.