# Modelling and Optimization in Microgrids

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Microgrid Structure

#### 2.1. Component Layer

#### 2.2. Communication Layer

#### 2.3. Information Layer

#### 2.4. Application Layer

#### 2.5. Business Layer

## 3. Differences between Microgrid and Similar Network Structures

#### 3.1. Standalone Grid

#### 3.2. Hybrid Power Plant

#### 3.3. Virtual Power Plant

#### 3.4. 100RE Grid

## 4. Classification of Microgrids

#### 4.1. Microgrids for Urban Use

#### 4.2. Microgrids for Rural Use

#### 4.3. Microgrids for Industrial Use

## 5. Modeling of Components of Microgrids

#### 5.1. Modeling of Controllable Loads: Electric Vehicles

#### Example of a Controllable Load in Simulink

- (1)
- A binary block (0/1) tells if the electric vehicle is active during the day and performs initialization (car_arrived). A signal builder generates for the charging time of the car (here determined as the average of the field test data) the maximal charge in uncontrolled load mode. Power consumption is delayed to the arrival time at the charging station.
- (2)
- The initialization state of charge of the car (determined as the averaged value from field tests) will be loaded with the power value generated by the signal builder until the battery is fully charged. The exact value of the charge depends on the technology of the battery. In the absence of empirical data, a value of 99% can be assumed.
- (3)
- When the SoC threshold is achieved, the power consumption goes into a decay curve until eventually the battery is completely loaded. If the battery is fully charged, the system goes into trickle charge. This was in the field determined with 0.2 kW, but is heavily dependent on the particular system.
- (4)
- If the battery is fully charged before the departure time (set by the user) is reached, no more energy can be fed into the battery; however, the battery can still be discharged into the system, if allowed by other constraints.
- (5)
- The battery can be discharged to supply the system only until a minimum value is reached (to be defined by the user). Subsequently, only positive values can be transferred to the battery module.
- (6)
- As described previously, the charging characteristic must define when limiting of the charging power becomes ineffective, so that the battery at departure has the desired SoC.
- (7)
- The limit is determined from the available system power. If the available power of the microgrid is lower than the needs of all electric vehicles, all are limited to the extent that the power balance is reached. The limitation of charging power can be enforced uniformly. All active vehicles are limitable in the system that are not fully discharged or excluded by reaching the boundary of the charging characteristic. The individual limitation of electric cars requires high computing power and would cause the simulation to be unnecessarily complicated.

#### 5.2. Modeling of Feature-Dependent Generation

_{PV,max}and Q

_{PV,max}represent the maximum possible feed, required at a given time point by the microgrid. Current infeed will have always a lower value (power generated from the current PV insolation or the maximum required power by the microgrid).

#### Example of PV Infeed Modelling in Simulink

- (1)
- For the power balance within the closed unit of a microgrid, the radiation must be limited to the power requirements of the elements of the microgrid. For this purpose, the maximum power feed to the storage, real-time power requirement of the load, as well as the real-time power requirement superimposed grid are added together. This represents the upper limit of power consumption in the microgrid. The correct sign is assured via the matcher “min/max”, so the power in the system does not exceed the limit. From the comparison between the input values and system set values, the possible PV irradiation limitation can be determined. This comparison has not been realized in the model shown, since it can be determined (if desired) directly from the simulation system.
- (2)
- The limit on the PV infeed described in 2 must be adjusted as soon as the existing system storage cannot absorb more energy. For this, the SoC of the storage has to be incorporated into the PV model over a “From” block. Via a relay, the real-time SoC of storage is compared with a definable value. When achieved, the switch block is switched to the second path. In order to prevent an infinite loop in the circuit of the switch block (when the state of the storage corresponds to the limit value and with the switching, the level drops, this forces the repeated switching), a second threshold value may be set in the relay; for that, the relay is to be only switched again. For the upper limit, a value less than 100% should be selected since the microgrid elements may show a time constant, so although the switching command has been issued, the response is delayed (SoC recommendation = 99%). The lower threshold should have a distance of less than 2% of the SoC to prevent unnecessary PV limitations (SoC recommendation = 98%).
- (3)
- If the limit of the SoC is reached, the power cannot be fed into the system, resulting from the real-time power requirement of the load and the real-time power demand from the grid. This summed power demand corresponds to the maximum power that is fed into the system.

#### 5.3. Modeling of Controllable Generation

#### Example of CHP Modelling in Simulink

- (1)
- In order to determine the active and reactive power required by the system, the real-time power values of the active components are added. Only real power is to be made available to the storage from the mini-CHP. The minimum (=0), as well as the maximum (>0) are limited for the active power by means of a “saturation” block. The maximum can be set by a variable during the initialization, which was defined in the workspace. As a result, the power of the mini-CHP can be easily adapted during optimization. The reactive power has independent limits of the real power, so a separate “saturation block” is necessary.
- (2)
- A logical “OR” operator is used to decide under which conditions the mini-CHP is required. On the one hand, the mini-CHP is switched on when the storage level falls below a defined SoC (e.g., 10%). Then, the mini-CHP remains switched on until the storage reaches a second threshold value (e.g., 50%). On the other hand, the mini-CHP is used as support to charge the electric cars. When limiting the charging power per car (50% of the maximum power), the mini-CHP is also switched on until the load limitation of the load drops below this value.
- (3)
- A “delay” block and a “rate limiter” block are used for the reaction time and the rate of change of the mini-CHP. The respective values can be taken from the manufacturers’ data.

#### 5.4. Modelling of Storage

#### Example of Storage Modelling

- (1)
- The real power and reactive power of all elements of the microgrid are combined. For this purpose, the instantaneous active and power performance values of all models are imported into the model storage via a “From” block and are then added separately according to active and reactive power.
- (2)
- Since the real power of the storage is limited, the sum of the active power of all other components must be limited to the minimum and maximum. For this purpose, an upper and lower limit value can be entered. Since all components have their own limitations, which is based on the maximum of the storage, there should be in principle no violation of the limit values. In order to be able to calculate the actual storage from the simulation, however, the limit value violations, should they occur, should be included in the simulation. For example, a limit value may be briefly exceeded if an electric car is connected to a charging column. These excesses can be realized by short-term overloading of the inverter of the storage.
- (3)
- For clarity, the simple reactive power limitation and SoC determination are omitted.

## 6. Interconnection of Components within the Microgrid

## 7. Modelling of the Power Grid

#### Modelling of a Grid Connection Point

- (1)
- The load profile (Figure 9) is loaded into the model via a “from file” block. We assume a constant power factor over the entire simulation time of the model. The reactive power curve can be determined accordingly.
- (2)
- If the storage can take up the energy from the grid connection point, the power that is to be fed into the microgrid from the network can be assumed without restriction. According to these specifications, the storage must be designed in such a way that the power flow is positive, as well as negative. If the storage is full, only the power that is needed as the balance of the other microgrid elements can enter into the system.
- (3)
- This also applies to the power that the microgrid can provide to the superimposed network. Here, as long as the storage has enough energy, an unrestricted availability can be assumed. However, if the storage is empty, only the balance of power of the other components can be assumed as available.

## 8. Optimization of Microgrid Components

#### 8.1. Control Concepts for Microgrids with a Focus on the Load Supply

#### 8.2. Optimization of Microgrid to Support a Medium Voltage Network

#### 8.2.1. Feature-Dependent Generation

#### 8.2.2. Storage

#### 8.2.3. Load

#### 8.2.4. Mini-CHP

#### 8.3. Optimization of Components

- (1)
- All electric cars are fully charged at the end of the day,
- (2)
- No PV energy has been lost and
- (3)
- The default load profile has been fully followed at the GCP.

#### 8.4. Results of Optimization and Discussion

## 9. Discussion and Outlook

## Acknowledgments

## Author Contributions

## Conflicts of Interest

## References

- Information Platform of German Network Operators, EEG-Anlagenstammdaten. Available online: www.netztransparenz.de (accessed on 1 May 2016).
- 50Hertz Transmission GmbH. 50Hertz GmbH Internal Company Report. Unpublished work.
- Eltawil, M.A.; Zhao, Z. Grid-connected photovoltaic power systems: Technical and potential problems—A review. Renew. Sustain. Energy Rev.
**2010**, 14, 112–129. [Google Scholar] [CrossRef] - Pinto, R.; Mariano, S.; do Rosário Calado, M.; de Souza, J.F. Impact of rural grid-connected photovoltaic generation systems on power quality. Energies
**2016**, 9, 739. [Google Scholar] [CrossRef] - Kenneth, A.P.; Folly, K. Voltage rise issue with high penetration of grid connected PV. In Proceedings of the 19th World Congress The International Federation of Automatic Control, Cape Town, South Africa, 24–29 August 2014. [Google Scholar]
- System Integration of Renewables: Implications for Electricity Security; International Energy Agency: Paris, France, 2016.
- Lasseter, R.H. MicroGrids. In Proceedings of the 2002 IEEE Power Engineering Society Winter Meeting, New York, NY, USA, 27–31 January 2002; pp. 305–308. [Google Scholar]
- Hatziargyriou, N.; Asano, H.; Iravani, R.; Marnay, C. Microgrids. IEEE Power Energy Mag.
**2007**, 5, 78–94. [Google Scholar] [CrossRef] - Schiffer, J.; Zonetti, D.; Ortega, R.; Stankovic, A.; Sezi, T.; Raisch, J. A survey on modeling of microgrids—From fundamental physics to phasors and voltage sources. arXiv. 2016. Available online: https://arxiv.org/abs/1505.00136 (accessed on 1 December 2016).
- Aziz, M.; Oda, T.; Mitani, T.; Watanabe, Y.; Kashiwagi, T. Utilization of electric vehicles and their used batteries for peak-load shifting. Energies
**2015**, 8, 3720–3738. [Google Scholar] [CrossRef] - Misak, S.; Stuchly, J.; Vramba, J.; Vantuch, T.; Seidl, D. A novel approach to adaptive active relay protection system in single phase AC coupling Off-Grid systems. Electr. Power Syst. Res.
**2016**, 131, 159–167. [Google Scholar] [CrossRef] - Lopes, J.A.P.; Soares, F.J.; Almeida, P.M.R. Integration of electric vehicles in the electric power system. Proc. IEEE
**2011**, 99, 168–183. [Google Scholar] [CrossRef] - Latvakoski, J.; Mäki, K.; Ronkainen, J.; Julku, J.; Koivusaari, J. Simulation-based approach for studying the balancing of local smart grids with electric vehicle batteries. Systems
**2015**, 3, 81–108. [Google Scholar] [CrossRef] - Guerrero, J.M.; Chandorkar, M.; Lee, T.L.; Loh, P.C. Advanced control architectures for intelligent microgrids—Part I: Decentralized and hierarchical control. IEEE Trans. Ind. Electron.
**2013**, 60, 1254–1262. [Google Scholar] [CrossRef] - Porsinger, T.; Janik, P.; Leonowicz, Z.; Gono, R. Component modelling for microgrids. In Proceedings of the 2016 IEEE 16th International Conference on Environment and Electrical Engineering (EEEIC), Florence, Italy, 7–10 June 2016. [Google Scholar]
- Porsinger, T. Contribution to the Sizing of Components of Microgrids. Ph.D. Thesis, Brandenburg Technical University Cottbus-Senftenberg, Cottbus, Germany, 2014. [Google Scholar]
- Woitow, M. Influence of Microgrids on MV Network. Master’s Thesis, Brandenburg Technical University Cottbus-Senftenberg, Cottbus, Germany, 2014. [Google Scholar]
- Savadogo, S. Network Dynamics of Photovoltaic Systems. Master’s Thesis, Brandenburg Technical University Cottbus-Senftenberg, Cottbus, Germany, 2011. [Google Scholar]
- Janik, P.; Waclawek, Z.; Schwarz, H.; Porsinger, T. Assessment of PV generation based on spherical irradiation measurements. In Proceedings of the International Conference on Renewable Energies and Power Quality (ICREPQ ’14), Córdoba, Spain, 8–10 April 2014. [Google Scholar]
- Distributed Generation in 2020; VDE Publishing: Frankfurt, Germany, 2007.
- Diekmann, B.; Rosenthal, E. Energy—Physical Fundamentals of Generation, Transformation and Use; Springer: Berlin, Germany, 2014. (In German) [Google Scholar]
- Bodach, M. Energy Storage in LV Network for Integration of Fluctuating, Distributed Sources of Energy. Ph.D. Thesis, Technical University Chemnitz, Chemnitz, Germany, 2006. [Google Scholar]
- Rudion, K.; Orths, A.; Styczynski, Z.A.; Strunz, K. Design of benchmark of medium voltage distribution network for investigation of DG integration. In Proceedings of the 2006 IEEE Power Engineering Society General Meeting, Montreal, QC, Canada, 18–22 June 2006. [Google Scholar]
- Misak, S.; Stuchly, J.; Platos, J.; Kromer, P. A heuristic approach to active demand side management in off-grid systems operated in a smart-grid environment. Energy Build.
**2015**, 96, 272–284. [Google Scholar] [CrossRef] - Sorensen, D.C. Newton’s method with a model trust region modification. SIAM J. Numer. Anal.
**1982**, 19, 409–426. [Google Scholar] [CrossRef] - Yuan, Y. A review of trust region algorithms for optimization. In Proceedings of the Fourth International Congress on Industrial and Applied Mathematics (ICIAM), Edinburgh, UK, 5–9 July 1999. [Google Scholar]
- Yuan, Y. Recent advances in trust region algorithms. Math. Program.
**2015**, 151, 249–281. [Google Scholar] [CrossRef]

**Figure 8.**Connection of a microgrid to the CIGRE benchmark network (HVN—high voltage network, HV—high voltage, MV—medium voltage, MG—microgrid).

**Table 1.**Results of the optimization of the component storage and PV as a function of the selected mini-CHP power.

Mini-CHP | PV | Storage Capacity | Storage Power |
---|---|---|---|

0 kW | 74 kW | 100 kWh | 26 kW |

5 kW | 61 kW | 100 kWh | 26 kW |

10 kW | 49 kW | 96 kWh | 26 kW |

15 kW | 35 kW | 91 kWh | 26 kW |

20 kW | 18 kW | 91 kWh | 26 kW |

25 kW | 10 kW | 91 kWh | 26 kW |

30 kW | 0 kW | 91 kWh | 26 kW |

© 2017 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/).

## Share and Cite

**MDPI and ACS Style**

Porsinger, T.; Janik, P.; Leonowicz, Z.; Gono, R. Modelling and Optimization in Microgrids. *Energies* **2017**, *10*, 523.
https://doi.org/10.3390/en10040523

**AMA Style**

Porsinger T, Janik P, Leonowicz Z, Gono R. Modelling and Optimization in Microgrids. *Energies*. 2017; 10(4):523.
https://doi.org/10.3390/en10040523

**Chicago/Turabian Style**

Porsinger, Tobias, Przemyslaw Janik, Zbigniew Leonowicz, and Radomir Gono. 2017. "Modelling and Optimization in Microgrids" *Energies* 10, no. 4: 523.
https://doi.org/10.3390/en10040523