analysis, modelling and control of a dc microgrid: ac grid
TRANSCRIPT
Treball de Fi de Màster
Màster en Enginyeria de l’Energia
Analysis, modelling and control of a DC
microgrid: AC grid connection and renewable energy integration
MEMÒRIA
Autor: Albert Andreu Solà Director: Oriol Gomis Bellmunt Convocatòria: Juny 2021
Escola Tècnica Superior d’Enginyeria Industrial de Barcelona
Pàg. 2 Memory
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 3
Summary
In this project the concept of smart grids and specially microgrids is studied and analysed in
order to propose a system that can generate the power necessary for a certain grid in a DC
based microgrid. The microgrid modelled in this system is composed by a photovoltaic plant
and a wind farm that generate the energy necessary for a certain proposed grid from the
CIGRE benchmark.
The interesting point of this project, apart from the modelling of the generation plants and
their converters, is the interconnection between both systems. The original grid is an
alternating current grid based on a small town in southern Germany and the proposed
microgrid is a direct current grid modelled by the author of this project, so, the
interconnection of both will be done with a voltage source converter. The control of this
device is what will help the system overgoing different problems that may occur. Together
with the modelling of this system, different tests are done to the different parts that compose
it in order to assure a perfect operation of the system.
Pàg. 4 Memory
Index
INDEX _______________________________________________________ 4
1. PREFACE ________________________________________________ 8
1.1. Project’s origin................................................................................................ 8
1.2. Motivation ....................................................................................................... 8
2. INTRODUCTION ___________________________________________ 9
2.1. Objectives ...................................................................................................... 9
2.2. Range .......................................................................................................... 10
3. STATE OF ART __________________________________________ 11
3.1. Smart grids ................................................................................................... 11
3.1.1. Smart grid characteristics ................................................................................. 12
3.1.2. Smart grid challenges ...................................................................................... 14
3.1.3. Smart grid security ........................................................................................... 14
3.1.3.1. Adaptive protection ............................................................................... 15
3.2. Microgrids .................................................................................................... 15
3.2.1. Microgrid structure ........................................................................................... 16
3.2.2. Challenges in microgrid protection ................................................................... 17
3.2.2.1. Changes in fault currents ..................................................................... 17
3.2.2.2. Blinding of protection ............................................................................ 17
3.2.2.3. False tripping ........................................................................................ 18
3.2.2.4. Unsynchronized and automatic reclosing ............................................. 18
3.3. CIGRE Benchmark ...................................................................................... 18
3.4. Voltage source converter ............................................................................. 20
3.4.1. Clarke transformation ....................................................................................... 21
3.4.2. Park transformation .......................................................................................... 22
3.4.3. Instantaneous power theory ............................................................................. 23
3.4.4. General control scheme ................................................................................... 26
3.4.5. Current loop control.......................................................................................... 27
3.4.6. Phase locked loop ............................................................................................ 29
3.4.7. DC voltage regulator ........................................................................................ 29
4. CASE STUDY: DC MICROGRID IMPLEMENTATION ____________ 31
4.1. Grid’s data .................................................................................................... 31
4.2. Grid model ................................................................................................... 34
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 5
4.3. Wind farm model .......................................................................................... 35
4.3.1. First wind farm proposal .................................................................................. 35
4.3.2. Second wind farm proposal ............................................................................. 36
4.3.3. Third wind farm proposal ................................................................................. 37
4.3.4. Wind farm simulation ....................................................................................... 42
4.4. PV plant model ............................................................................................. 47
4.4.1. PV plant simulations ........................................................................................ 50
4.4.1.1. First simulation ..................................................................................... 50
4.4.1.2. Second simulation ................................................................................ 53
4.4.1.3. Third simulation .................................................................................... 54
4.5. VSC control model ....................................................................................... 57
4.5.1. VSC simulation ............................................................................................... 61
4.6. Microgrid model ............................................................................................ 64
4.7. System simulation ........................................................................................ 65
CONCLUSIONS ______________________________________________ 69
ACKNOWLEDGEMENTS _______________________________________ 71
BIBLIOGRAPHY ______________________________________________ 72
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 7
Pág. 8 Memory
1. Preface
In this section the project’s origin and the motivation will be explained.
1.1. Project’s origin
The project origin is from the necessity of our actual World to change its electrical system
from the conventional one with big centralized generation to a new scheme more
decentralized where the generation and the consumption are nearer. This is also why I
started studying this master, in the next few years a change on the electrical paradigm is
required and I want to be involved in order to help save our planet.
1.2. Motivation
As mentioned in the previous section the main motivation of this project is the necessity of
making this type of projects in order to show the World that we are capable of having our
own energy and also that we can generate that power from renewable sources, in order to
make it easier for the future generations to survive.
The fact of working with a smart grid comes from the motivation I had on working with this
type of devices as I see them as the best option in terms of electrical development for the
future.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 9
2. Introduction
The introduction of renewables in the electric systems all over the World is becoming more
and more common nowadays due to the transition to a more distributed electric system and
the necessity of reducing the greenhouse gases emissions. Renewable plants like wind
farms or solar fields are wide spread all over the Earth, configurating a robust system
together with the conventional plants and helping to reduce the environmental impact of the
electricity generation, but the society’s development will need a more distributed system,
where the places of generation and consumption of electricity are as near as possible,
reducing the losses and therefore boosting the efficiency.
One of the main challenges that engineers have to face when designing a distributed system
with renewables is the conversion from AC signal to DC signal and vice versa that has to be
implemented due to the fact that most of the renewable energies produce in direct current.
This forces engineers to set converters and inverters to interconnect the generation with the
distribution and transmission, which sometimes can be very expensive and represent a big
part of the inversion.
In order to reduce the implementation of these electronic devices we can congregate all the
renewable generation in a DC smart grid and then connect it to the distribution grid, reducing
the number of inverters and converters to the ones that connect both systems. This would
affect to the decentralization of the electric system because we reduce it but it would also
help with its robustness as we concentrate all the DC generation at one point, making it
easier to control.
So, in this project, a DC smart grid with solar and wind generation will be modelled and
simulated in different scenarios with the objective of evaluating how it works and if it would be
possible and beneficial to operate. This will also include any type of energy storage
necessary and will not take into account any conventional generation plant. The model will
be simulated in Simulink and using the CIGRE benchmark models.
2.1. Objectives
The objectives of this project are:
- Make a research on Smart grids and microgrids, focusing on the challenges
present on their security and reliability.
- Implement two medium voltage grids from CIGRE benchmark on Simulink
and simulate them connected to the grid, in order to demonstrate the
Pág. 10 Memory
problems that can happen in this type of system.
- Implement a microgrid on the previous system which generates all the
necessary power to the system.
- Implement a control management device that regulates the connection
between both grids and solves all the problems present in a typical grid.
- Propose different devices in order to counter all the previous problematic
situations.
2.2. Range
From the previous objectives some of them were accomplished and the others will be left as
ways of continuing the work done in this project.
- A research on microgrids, smart grids and voltage source converters was done in
other to show the reader the different options present on this field.
- The CIGRE grid was modelled and simulated in Simulink thanks to the Simscape
library.
- The microgrid has been implemented generating power to the system but not all the
necessary, this is one of the lacking points of the system.
- The control management implemented is a voltage source converter that has
successfully connected both systems in order to operate together
- The devices that can be used in order to counter the problems that may appear have
not been mentioned, this is one of the lacking points of the system.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 11
3. State of art
In this project different theorical aspects will be treated but basically we can distribute them in
the following topics: smart grids, distributed generation in microgrids and the CIGRE
benchmark. All these topics are important in order to understand the way the system
proposed works and is necessary to know what other researchers have found about them
and try to continue or adapt their work while using the data they have obtained through the
research.
3.1. Smart grids
The existing world power system was built following the principles of the beginning of the last
century, with large central generators that supply electric energy through a high voltage grid
that interconnects the consumers with the producers at long distances using a series of step-
down transformers. The main characteristics of these grids are:
- Centralized generation
- One-way communication
- Unidirectional flow of energy between producers and consumers
- Manual testing, control and reset
- Electromechanical hierarchy structure
As the population grows and the civilized areas increase, it also repercussions in the
electricity demand which increases exponentially and the recent years has had an increase
of about a 5% per year. This, added to the fact that a significant part of the transmission and
distribution grid equipment has more lifetime than the one expected when it was designed,
requiring both replacement and modernization, changing like-for-like but also using new
elements in order to minimize the power losses.[1]
When talking about modernization and optimization of the actual network, the concept of
smart grid appears as an opportunity. Since 2005 the smart grid development has suffered
and increasing interest because of the implementation of information and communication
technologies. This aspect of the smart grid allows us to automatically control it helping with
the decarbonization of our World as it allows to connect different renewable generation
points together with storage helping with the monitorization of this type of energy.[2]
Pág. 12 Memory
3.1.1. Smart grid characteristics
In order to define a smart grid, we can not find an exact definition because there is a vast
array of them and no one is universally accepted. We could say as a general definition that a
smart grid is an intelligent electrical network that employs information, two-way cyber-secure
communication technologies and computational intelligence in an integrated way across the
whole range of the energy system from the generation to the end points of electricity
consumption. It involves the use of up-to-date digital technologies, multi-tariff meters and
power distribution devices that ensure the reliability and transparency of the processes of
energy production, transmission, distribution and consumption. In the following picture from
IEA done in 2011 the change from old to new electricity network model is shown. [1]
The International Energy Agency presented eight different features that describe a general
smart grid:[3]
1. Wide area monitoring and control: Intended for monitoring, control and optimization of
the power system over large geographic area, avoiding power supply disruptions and
outages and facilitating the integration of renewable energy sources.
2. ICT integration: Aimed to achieve real-time, two-way communication for more
effective energy management.
3. Integration of renewable energy resources and distributed generation: Extension of
the generation capacity of the power system through additional photovoltaic arrays,
wind farms, geothermal and biomass energy sources, etc.
4. Transmission enhancement applications: Application of advanced technologies to
enhance the transfer of power, reduce transmission losses, minimize chances of
Fig. 3.1. The process of smart grid’s evolution. Source: IEA 2011.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 13
overloading, improve controllability of transmission networks.
5. Distribution grid management: Combines sensing and automation technologies to
continuously maintain voltage levels, detect and locate faults, control DERs, and
reconfigure grid’s topology to ensure optimal operation of equipment and to avoid
outages.
6. Advanced metering infrastructure: Installation of smart meters and network
infrastructure to transmit data from consumers to the utility, software to proceed the
received data.
7. EV charging infrastructure: Connection of EVs to the grid for battery recharging and
electric energy exchange with the system during peak hours, handling of billing
functions.
8. Customer-side systems: Integration of automation systems to control a customer side
e.g. installation of the network sensors to monitor the power consumption from
heating, air conditioning, lightning and other household appliances, using of demand-
response hardware.
The span of these different features varies depending on the type, embracing the entire grid,
from generation, through transmission and distribution, to various types of consumers. These
different spans are shown in the following picture:[3]
Fig. 3.2. The span of smart grid technology facilities through the grid.
Source: Markovic.
Pág. 14 Memory
3.1.2. Smart grid challenges
There are a big number of challenges involved in the implementation of smart grids around
the world. A large number of countries do not have the resources and the previously well-
placed infrastructure to accommodate the needs of the distributed generation plants, also, it
would be an enormous investment for those countries. Some researches have been done in
countries like Brazil or India discussing this challenge.
Apart from this, another big challenge for the Smart Grids is the interoperability, that is what
defines and sets the interconnections, interfaces, requirements and technical standards for
the deployment of smart grid technology. So, in order to ensure a good quality in the
communication and operation of all power system devices, a good level of interoperability
has to be achieved. This is a problem when talking about smart grids because different
complications can arise because of the different distributed energy resources having
completely different operating characteristics or some renewable resources like wind or solar
that depend on the weather.[4]
As it has been introduced in the previous paragraph, renewable resources represent another
challenge for the smart grid system. Sources like wind and solar depend exclusively on
weather conditions, so, an efficient energy storage is required. Using renewable energy
based distributed generation the protection of our smart grid may be affected; it is a
challenge to operate the smart grid and monitor its protection under dynamic network
condition. [5]
3.1.3. Smart grid security
A smart grid has to have a very strong communication infrastructure in order to operate and
control properly the system, this fact makes security one of the main technical challenges.
Internet of Things has emerged as one of the enabling technologies for a smart grid, causing
problem because of the interconnectivity of so many devices. This makes improving the
cyber security a never-ending challenge with three main objectives: Confidentiality, integrity
and availability. Until now most of the research done to increment the efficiency and reliability
of smart grids involve using machine learning and datamining techniques together with
protection devices, Wide Area Monitoring Protection and Control used for protection, IEC
61850 based protection systems and mainly adaptative protection techniques, built upon
traditional methods. [6]
The classical protection techniques can be divided into three categories: Overcurrent
protection, distance protection and differential protection. The overcurrent relay is the most
commonly used equipment in power systems in order to protect the grid. It basically opens
the grid circuit when an overcurrent happens, sending a signal to the circuit breaker to open.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 15
They usually happen because of a short circuit in the line resulting in currents larger than the
load current, generating this fault on the system. A differential relay detects a fault when the
phasor difference and magnitude of the current flowing in and out an element of the system
is inequal. Finally, distance protection is the most commonly used protection relay in
transmission lines, where the relay operates with respect to fault impedance of the
transmission line.[4]
3.1.3.1. Adaptive protection
Adaptive protection is a protection philosophy which permits and seeks to make adjustments
to various protection functions, in order to make the more adequate for power system
conditions. This is not a new philosophy as Horowitz et al [7] presented more than three
decades ago results of a research into the possibilities of using digital techniques to change
the transmission system accordingly to the power system changes.
3.2. Microgrids
The system of this project will be energetically supplied by a microgrid connected through
transformers and converters to the other two grids. The trend of using microgrids as entities
that coordinate the distributed energy resources in a more decentralized way has been
motivated in the recent years by the need to improve resilience and reliability of power
systems, reduce greenhouse gases emissions and mitigate climate change.
A microgrid basically consists of distributed generation, energy storage systems and different
loads at the same voltage level. The main benefit from a network point of view is that
microgrids can be treated as controlled entities and may be considered also aggregated
loads. Moreover, the use of microgrids reduce the line losses and interruption costs and are
beneficial from a customers’ point of view since they can improve reliability and efficiency
while reducing blackouts.[8]
There are some microgrids that have been successfully implemented in the USA, Japan,
Korea, Spain, Finland and Germany but their widespread implementation is still limited
because of technical challenges. The most important one is the protection and security of the
system to all the disturbances present in a normal grid, basically overvoltages due to different
phenomena. Then the real challenge for the protection devices is to isolate as quick as
possible any element of the system when it is subjected to any of these problems that can
cause damage to the grid.
When integrating all the elements into a microgrid, traditional schemes may not operate
properly due to different issues like the topological changes in the power grid due to the
Pág. 16 Memory
nature of the distributed generation resources, bidirectional power flows, changes in fault
currents and basically the different types of distributed generation and their dynamic
behaviour.[5]
3.2.1. Microgrid structure
A microgrid can be considered a local system of power and energy delivery to individual
consumers that typically consists of a set of elements such as distributed generators, energy
storage systems, a communication infrastructure, loads and a central controller. This last one
is responsible for the central control and management of the microgrid and has several
functions while heading the hierarchical control system, whose second hierarchical control
level is composed of unit controllers located at loads and sources. The following picture
shows a traditional scheme for a microgrid.
The power generation in microgrids may be either a direct current or alternating current
supply, depending on the type of energy sources used. If the generation is in AC, then the
generated power is rectified to DC and integrated to the grid through a Voltage Source
Inverter controlled by Pulse Width Modulation technique. This results in a microgrid being a
perfect solution to manage local generations and loads as microgrids can potentially increase
the system power quality, efficiency and security for critical loads.
Fig. 3.3. Example of a microgrid structure. Source: Barra et al.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 17
A microgrid can be a single or three-phase system, connected to the medium or low voltage
and can operate in two different operational modes: connected or islanded. During grid
connected mode, the microgrid receives power from both the utility and from the generation
sources connected to the system. Under grid connected mode, major portion of the real
power required for the load is met by the distributed connected to the system and the
remaining portion and variation in the real power demand are met by the grid. During
islanded mode, load and generation experiment a shedding in order to maintain the power
balance and the critical loads are made to undergo load shedding.[4]
3.2.2. Challenges in microgrid protection
There are many reasons that make microgrids unstable like their dynamic characteristics,
their intermittent nature or the changes in fault current. Additionally, the topology of a
microgrid can be mixed, looped or meshed and they have bidirectional flows. The challenges
in microgrid protection that should be highlighted and will be discussed are:
- Changes in fault currents
- False tripping
- Blinding of protection
- Unsynchronized and automatic reclosing
3.2.2.1. Changes in fault currents
The changes in fault currents have a strong dependence on existing short-circuit sources in
the system. This short-circuit level is higher in transmission and distribution systems than in
the small distributed generation sources that may be connected to the microgrid. This means
that when the microgrid is working in islanded mode the fault current seen by protective
devices will be much smaller than the fault current seen when the microgrid is operating in
grid-connected mode. Apart from the operation mode the fault current level depends on the
type, control, placement, power rating and quantity of distributed generation units in the
microgrid. [4]
3.2.2.2. Blinding of protection
This phenomenon occurs when the fault current is detected by the security relay and
changes due to the connection of a distributed generation unit that can imply the
misoperation of protective devices upstream or downstream the affected relay. In order to
understand better the blinding of protection it can be considered the grid presented in Fig 4.4.
In this grid, for a fault current F1 the current detected by the overcurrent relay R3 trips the
relay and it can also trip erroneously the overcurrent relay R2 as its current is also increased
because of the presence of a distributed generation unit. In this case it’s commonly said that
Pág. 18 Memory
the relay R2 is blinded to the fault.[4]
3.2.2.3. False tripping
False tripping is another typical situation in microgrids that happen when a protective device
connected to a feeder responds to a fault current occurring in an adjacent feeder because of
the connection of distributed generation units. Referring again to the Fig. 4.4, when the fault
current F2 happens, the presence of the distributed generation unit can overcome the pickup
current of the overcurrent relay R1 leading to a false trip depending on the settings of both R1
and R4.[4]
3.2.2.4. Unsynchronized and automatic reclosing
When a distributed generation system is connected to the grid by a recloser, the
synchronism between the unit and the grid needs to be considered. If this connection occurs
not taking into account the synchronism between both systems, overvoltages, overcurrents
and large mechanical torques may occur. [4]
3.3. CIGRE Benchmark
In 1991, Szechtman and Wess elaborated a first approach of the CIGRE HVDC benchmark
model presented as a common reference for HVDC control studies. This benchmark allows
the user to find the best layout that fits all needs, because in order to cover all the spectrum
of studies pertinent to the integration of DER and renewable energy resources, a
Fig. 3.4. Hypothetical grid with two different branches and two current faults.
Source: Barra et al.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 19
comprehensive set of benchmarks was developed. The main aim of this benchmark is to
divide the electric power system until all levels of detail that are of interest for the evaluation
of the integration of renewable and distributed energy resources are reached.
Generally, an electric power system is described by its underlying network structure and the
resources connected to its nodes. In order to study the integration of renewable sources as
distributed generation in electric systems, the resource-side benchmark may be used as
many of the techniques for the implementation of this technology rely on resource-side
control and power electronic conversion.[9]
The medium voltage distribution network used in this project is extracted from this CIGRE
benchmark on its European configuration which is summarized in these points:[9]
• Structure: European MV distribution feeders are three-phase and either of meshed or
radial structure, with the latter dominating rural installations. The benchmark allows
flexibility to model both meshed and radial structures. Each feeder includes
numerous laterals at which MV/LV transformers would be connected. The nominal
voltage is 20 kV. The system frequency is 50 Hz.
• Symmetry: Efforts are typically made to balance the various low voltage laterals
along the MV lines, but some unbalances are still typically experienced in practice.
Unbalance is not explicitly included in the European benchmark, but it can be
Fig. 3.5. Hierarchy for identifying benchmarks.
Pág. 20 Memory
introduced if desired. Section 6.3 on flexibility provides further information.
• Line types: Overhead lines are used with bare conductors made of aluminium with or
without steel reinforcement, i.e. A1 or A1/S1A. Underground cables are XLPE with
round, stranded aluminium conductors and copper tape shields.
• Grounding: The grounding of the MV network largely depends on regional
preferences. European networks are typically ungrounded or impedance-grounded.
3.4. Voltage source converter
One of the most important parts of this project is the device that will connect the two
differentiated parts of the system, the inverter. Normally inverters are classified regarding the
kind of semiconductor used:
• Inverters based on Insulated-Gate Bipolar Transistors or similar technologies that can
provide fast switching and modulate any desired voltage. The resulting converters
are the so-called Voltage Sourced Converters which can control independently active
and reactive power, can provide black start capability and inject reduced harmonic
currents allowing to use lighter filters. The high switching frequency at which they are
operated implies higher losses, which is the main drawback of this technology.
• Inverters based on thyristor or similar technologies that require the grid to be
operated. The resulting converters are the so-called Line Commutated Converters
which can control active power while consuming noncontrollable reactive power,
require the grid to be operated and require large filters for the important harmonic
currents they generate. The main advantage is that they are available for higher
voltage and power and that they produce less losses since they commutate at low
frequency.
The most important part of power converters is the control as it assures a correct output of
the system. The main used control techniques for converters are feedbacks controllers
because they present several advantages compared to open loop-controlled converters. The
better security against disturbances on the grid and to different operation points and the fast
response and higher stability have proven necessary in most applications and have made
feedback control almost unavoidable.
In this project the control technique used is a linear control technique that is based on the
averaged model of the converter, which considers the control action to be able to change
continuously despite the discrete number of possible switching states of the converter. This
type of control uses a pulse width modulation technique, such as the sinusoidal PWM or the
space vector PWM, to transform the voltage output reference from the current controller into
the switching signals sent to the actual converter switching devices. The data received from
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 21
the controller output is usually treated with a transformation matrix like the so known Park
reference transformation matrix. Thanks to this transformation, both voltage and current
magnitudes become constant in steady state under grid balance conditions, making it
possible to use the classical proportional integrator regulators on the control part of the
system. For unbalanced conditions, some authors suggest to use an enhanced double
synchronous reference frame, using the Clarke transformation instead, changing the system
to a stationary reference frame which requires proportional resonant regulators but enables
proper operation of the system under such condition. In the following points the operation
mode of a voltage source converter will be explained.[10]
3.4.1. Clarke transformation
In order to apply the instantaneous power theory, the electrical quantities expressed in the
abc reference frame have to be expressed in the αβ0 orthogonal reference frame, using the
Clarke transformation that can be defined as:
[𝑥𝛼𝛽0] = [𝑇𝛼𝛽0][𝑥𝑎𝑏𝑐]
[
𝑥𝛼
𝑥𝛽
𝑥0
] =2
3
[ 1 −
1
2−
1
2
0 −√3
2−
√3
21
2
1
2
1
2 ]
[
𝑥𝑎
𝑥𝑏
𝑥𝑐
]
Once the control theory is applied, the electrical quantities are required to be again in the abc
reference frame, so the inverse matrix multiplication is done:
[𝑥𝑎𝑏𝑐] = [𝑇𝛼𝛽0]−1[𝑥𝛼𝛽0]
[
𝑥𝑎
𝑥𝑏
𝑥𝑐
] =
[
1 0 1
−1
2−
√3
21
−1
2
√3
21]
[
𝑥𝛼
𝑥𝛽
𝑥0
]
This transformation is graphically expressed at the Fig 4.6 where the voltage in the abc
reference frame is changed to the αβ0 orthogonal reference frame.
(1)
(2)
(3)
(4)
Pág. 22 Memory
3.4.2. Park transformation
Despite having the electrical variables in the αβ0 reference frame, in order to design the
control part of the system the electrical quantities have to be constant and not oscillating as
the αβ0 frame that has the same nature than the abc frame. Here appears a third reference
frame on which the quantities are constant achieved thanks to the Park transformation and
the synchronous reference frame. The Park transformation can be written as:
[𝑥𝑞𝑑0] = [𝑇𝑞𝑑0][𝑥𝑎𝑏𝑐]
Where the transformation matrix is:
𝑇(𝜃) =2
3
[ 𝑐𝑜𝑠(𝜃) 𝑐𝑜𝑠 (𝜃 −
2𝜋
3) 𝑐𝑜𝑠 (𝜃 +
2𝜋
3)
𝑠𝑖𝑛(𝜃) 𝑠𝑖𝑛 (𝜃 −2𝜋
3) 𝑠𝑖𝑛 (𝜃 +
2𝜋
3)
1
2
1
2
1
2 ]
Fig. 3.6. Clarke transformation graphically expressed.
Source: Renato Carlson
(5)
(6)
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 23
The inverse of this matrix is:
𝑇−1(𝜃) =
[
cos(𝜃) sin(𝜃) 1
𝑐𝑜𝑠 (𝜃 −2𝜋
3) 𝑠𝑖𝑛 (𝜃 −
2𝜋
3) 1
𝑐𝑜𝑠 (𝜃 +2𝜋
3) 𝑠𝑖𝑛 (𝜃 +
2𝜋
3) 1]
As before, this transformation is better understood with the geometrical representation:
3.4.3. Instantaneous power theory
This theory is applicable to balanced voltage systems, in the abc frame the instantaneous
voltages and currents of a balanced three-phase system can be expressed as:
𝑥𝑎(𝑡) = √2 𝑋 𝑐𝑜𝑠(𝜔𝑡 + 𝜙)
𝑥𝑏(𝑡) = √2 𝑋 𝑐𝑜𝑠 (𝜔𝑡 + 𝜙 −2𝜋
3)
Fig. 3.7. Park transformation graphically expressed.
Source: Mathworks
(7)
(8)
(9)
Pàg. 24 Memory
𝑥𝑐(𝑡) = √2 𝑋 𝑐𝑜𝑠 (𝜔𝑡 + 𝜙 +2𝜋
3)
Then, using the Clarke transformation these quantities can be expressed in the αβ0
reference frame:
𝑥𝛼 = √2𝑋 cos(𝜔𝑡 + 𝜙)
𝑥𝛽 = −√2𝑋 sin(𝜔𝑡 + 𝜙)
𝑥0 = 0
Where x0=0 because the system is balanced. Expressing the voltage and current as phasors
the power expression can be deduced from the three-phase expression:
√2𝑉𝛼𝛽 = 𝑣𝛼 − 𝑗𝑣𝛽
√2𝐼𝛼𝛽 = 𝑖𝛼 − 𝑗𝑖𝛽
𝑆 = 𝑃 + 𝑗𝑄 = 3𝑉𝛼𝛽𝐼𝛼𝛽∗ = 3(𝑣𝛼 − 𝑗𝑣𝛽
√2) (
𝑖𝛼 + 𝑗𝑖𝛽
√2)
From this expression we can deduce the active and reactive power as functions of voltages
and currents in the αβ0 frame.
𝑃 =3
2(𝑣𝛼𝑖𝛼 + 𝑣𝛽𝑖𝛽)
𝑄 =3
2(𝑣𝛼𝑖𝛽 + 𝑣𝛽𝑖𝛼)
The difference between both reference frames can be seen in the following graphs:
(10)
(11)
(12)
(13)
(14)
(15)
(16)
(17)
(18)
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 25
In the synchronous reference frame, the angle ϴ is used in the Park transformation in order
to obtain constant steady state quantities that can be expressed replacing the electrical
voltage angle ϴ=ωt+ϕ0 and transforming abc voltages and currents to the qd0 frame,
obtaining:
𝑉𝑞𝑑 =𝑣𝑞 − 𝑗𝑣𝑑
√2
𝐼𝑞𝑑 =𝑖𝑞 − 𝑗𝑖𝑑
√2
In this case, the power of a three phase system yields:
𝑆 = 𝑃 + 𝑗𝑄 = 3𝑉𝑞𝑑𝐼𝑞𝑑∗ = 3(𝑣𝑞 − 𝑗𝑣𝑑
√2) (
𝑖𝑞 + 𝑗𝑖𝑑
√2)
And reordering this expression, active and reactive power can be expressed as functions of
voltages and currents in the qd0 frame:
Fig. 3.8. Example of three-phase voltages in the abc and αβ0 frames.
Source: Egea-Alvarez et al.
(19)
(20)
(21)
Pàg. 26 Memory
𝑃 =3
2(𝑣𝑞𝑖𝑞 + 𝑣𝑑𝑖𝑑)
𝑄 =3
2(𝑣𝑞𝑖𝑑 − 𝑣𝑑𝑖𝑞)
In this case the voltages can be represented as:
3.4.4. General control scheme
A voltage source converter allows us to control the active and reactive power of two different
electrical variables. The reactive power reference is usually obtained from the grid operator
so it will be set to a value of 0 in this project. In renewable energy systems like the microgrid
of this work, the active power reference depends on the nature of the source connected in
the DC side. In our case, for a renewable energy system, it is adjusted to regulate the DC
bus voltage and to ensure the power balance. In this case the general control scheme is:
Fig. 3.9. Example of three-phase voltages in the abc and qd0 frames.
Source: Egea-Alvarez et al.
(22)
(23)
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 27
3.4.5. Current loop control
The current loop is the essential structure for a voltage source converter control as it permits
the regulation of the current flowing through the converter towards the grid.
There are two different control approaches in order to control the q and d components of the
current:
• Multivariable control, using a single two-dimension controller to manage both of them.
• Decoupling and independently controlling q and d components in the synchronous
reference frame.
In this project, the second approach will be used, so a decoupling of the voltages is required:
[𝑣𝑙𝑞
𝑣𝑙𝑑] = [
−𝑣𝑙𝑞 + 𝑣𝑧𝑞 − 𝑙𝑙𝜔𝑒𝑖𝑙𝑑−𝑣𝑙𝑑 + 𝑙𝑙𝜔𝑒𝑖𝑙𝑞
]
where 𝑣𝑙𝑞 and 𝑣𝑙𝑑 are the outputs of the current controllers and 𝑣𝑙𝑞 and 𝑣𝑙𝑑 are the voltages
to be applied by the converter. Substituting in the voltage equations:
Fig. 3.9. Grid converter control general scheme for renewable energy
generation systems. Source: Egea-Alvarez et al.
(24)
Pàg. 28 Memory
[𝑣𝑙𝑞
𝑣𝑙𝑑] = [
𝑟𝑙 00 𝑟𝑙
] [𝑖𝑞𝑖𝑑
] + [𝑙𝑙 00 𝑙𝑙
]𝑑
𝑑𝑡[𝑖𝑞𝑖𝑑
]
Applying the Laplace transformation, the transfer function between the controller voltages
and converter currents can be derived as:
𝑖𝑞(𝑠)
𝑣𝑙𝑞(𝑠)=
1
𝑙𝑙𝑠 + 𝑟𝑙
𝑖𝑑(𝑠)
𝑣𝑙𝑑(𝑠)=
1
𝑙𝑙𝑠 + 𝑟𝑙
The constants for the proportional integrator can be calculated as:
𝐾𝑝 =𝑙𝑙𝜏
𝐾𝑖 =𝑟𝑙𝜏
Where the 𝜏 is the closed loop time constant of the electrical system that must be chosen
considering the converter physical restrictions. The implementation of the overall current
controller is:
Fig. 3.10. Current controller. Source: Egea-Alvarez et al.
(25)
(26)
(27)
(28)
(29)
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 29
3.4.6. Phase locked loop
A phase locked loop or PLL is used to determine the angle and the angular velocity of the
electrical network. A three-phase PLL consists in a feedback of the d-axis voltage component
filtered by a PI controller. The output of the controller corresponds to the angular velocity of
the electrical grid and the integration of this signal corresponds the grid angle. A typical PLL
scheme is following:
The function Kf(s) of the PLL can be defined as:
𝐾𝑓(𝑠) = 𝐾𝑝 (
1𝜏𝑃𝐿𝐿
+ 𝑠
𝑠 )
Where 𝜏𝑃𝐿𝐿 is the PLL constant.
3.4.7. DC voltage regulator
In this system, the DC voltage regulator is required in order to control the voltage of the DC
bus ensuring power balance between the two sides of the converter, one in AC and the
other in DC. The proposed control scheme is sketched as:
Fig. 3.11. Phase locked loop scheme. Source: Egea-Alvarez et al.
Fig. 3.12. DC voltage regulator scheme. Source: Egea-Alvarez et al.
(30)
Pàg. 30 Memory
The proposed control scheme is sketched in Figure 13, where it can be seen that the
controlled quantity is E2 and a feed-forward scheme is used to improve the system response.
This is a common practice, since E2 is proportional to the energy stored in the capacitor, and
the output of the controller is the active power injected to the capacitor P*C. Therefore, the
power reference for the power converter will be P* = P*C +PDC, where PDC is the measured
power before the capacitor.
The P controller will be modelled following the equation:
𝐾𝑝𝐷𝐶 =𝐶
2𝜏𝐸
(31)
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 31
4. Case study: DC microgrid implementation
In the case study of this project a microgrid will be designed in order to supply the energy
required by two medium voltage AC grids interconnected. First of all, the two grids will be
defined together with their lines, loads and transformers parameters and then the microgrid
will be implemented concentrating all the generation and connected to the previous two
through a controller. After that, different tests will be done to the system in order to assure a
normal operation. All these simulations are done with Simulink, especially with the
Simscape’s electrical library.
4.1. Grid’s data
In this section the different parameters of the multiple parts of the system will be shown, all
this data is extracted from the “Benchmark systems for network integration of renewable and
distributed energy resources” file from CIGRE. The topology of the European version of the
MV distribution network benchmark is shown in the following scheme:
Fig. 4.1. Original grid layout. Source: CIGRE benchmark
Pàg. 32 Memory
In a first approximation of the model, the switches S1, S2 and S3 are considered lines and
this grid is supposed to be connected to a high voltage grid, so there’s no generation
included in both medium voltage grids as it is supposed to be in a DC microgrid connected in
S1.
Overhead lines are mounted on towers without neutral wires, and underground cables are
tape-shielded and buried in back-filled trenches with a protective plate. The network topology
and line lengths of the network are described in the following table:
In order to implement the line into Simulink three parameters are required in their positive
and zero sequence: resistance and reactance, given by the CIGRE benchmark, and
capacitance. Taking into account the previous data the capacitance of each line is given as:
𝐶 =𝐵′
𝜔
The value of the positive and zero sequence for the capacitance of the first 12 lines is
9,52·10-9 F/km, the value of the positive sequence for the last three lines will be 1,01·10-8
F/km and the zero sequence 4,07·10-9 F/km.
Once the data of all the lines is defined the loads have to be implemented. Each bus will
have a load with the following data:
Line segment
Node from
Node to
R’ph
(Ω/km) X’ph
(Ω/km) B’ph
(µS/km) R’0
(Ω/km) X’0
(Ω/km) B’0
(µS/km) L
(km)
1 1 2 0,501 0,716 47,493 0,817 1,598 47,493 2,82
2 2 3 0,501 0,716 47,493 0,817 1,598 47,493 4,42
3 3 4 0,501 0,716 47,493 0,817 1,598 47,493 0,61
4 4 5 0,501 0,716 47,493 0,817 1,598 47,493 0,56
5 5 6 0,501 0,716 47,493 0,817 1,598 47,493 1,54
6 6 7 0,501 0,716 47,493 0,817 1,598 47,493 0,24
7 7 8 0,501 0,716 47,493 0,817 1,598 47,493 1,67
8 8 9 0,501 0,716 47,493 0,817 1,598 47,493 0,32
9 9 10 0,501 0,716 47,493 0,817 1,598 47,493 0,77
10 10 11 0,501 0,716 47,493 0,817 1,598 47,493 0,33
11 11 4 0,501 0,716 47,493 0,817 1,598 47,493 0,49
12 3 8 0,501 0,716 47,493 0,817 1,598 47,493 1,3
13 12 13 0,510 0,366 3,172 0,658 1,611 1,280 4,89
14 13 14 0,510 0,366 3,172 0,658 1,611 1,280 2,99
15 14 8 0,510 0,366 3,172 0,658 1,611 1,280 2,00
Fig. 4.2. Lines parameters. Source: CIGRE benchmark
(31)
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 33
Finally, the transformers data will be:
Node from Node to Connection V1 [kV] V2 [kV] Z [Ω] S [MVA]
0 1 3-ph Dyn1 110 20 0.016+j1.92 25
0 12 3-ph Dyn1 110 20 0.016+j1.92 25
Fig. 4.3. Loads data. Source: CIGRE benchmark
Fig. 4.3. Transformers data. Source: CIGRE benchmark
Apparent power [kVA] Power factor Residential Commercial/
industrial Final data
No
de
Res
iden
tial
Co
mm
erci
al/
Ind
ust
rial
Res
iden
tial
Co
mm
erci
al/
Ind
ust
rial
Act
ive
po
we
r
[kW
]
Rea
ctiv
e
po
we
r [k
Var
]
Act
ive
po
we
r [k
W]
Rea
ctiv
e
po
we
r [k
Var
]
Act
ive
po
we
r [k
W]
Rea
ctiv
e
po
we
r [k
Var
]
1 15300 5100 0,98 0,95 12706,6 8522,4 4148,4 2966,6 16855,0 11489,0
2 0 0 0 0 0,0 0,0 0,0 0,0 0,0 0,0
3 285 265 0,97 0,85 235,1 161,1 199,1 174,9 434,2 336,0
4 445 0 0,97 0 367,1 251,6 0,0 0,0 367,1 251,6
5 750 0 0,97 0 618,7 424,0 0,0 0,0 618,7 424,0
6 565 0 0,97 0 466,1 319,4 0,0 0,0 466,1 319,4
7 0 90 0 0,85 0,0 0,0 67,6 59,4 67,6 59,4
8 605 0 0,97 0 499,1 342,0 0,0 0,0 499,1 342,0
9 0 675 0 0,85 0,0 0,0 507,1 445,5 507,1 445,5
10 490 80 0,97 0,85 404,2 277,0 60,1 52,8 464,3 329,8
11 340 0 0,97 0 280,5 192,2 0,0 0,0 280,5 192,2
12 15300 5280 0,98 0,95 12706,6 8522,4 4294,8 3071,3 17001,4 11593,7
13 0 40 0 0,85 0,0 0,0 30,1 26,4 30,1 26,4
14 215 390 0,97 0,85 177,4 121,5 293,0 257,4 470,3 378,9
Pàg. 34 Memory
4.2. Grid model
Once the data is defined the system can be implemented in Simulink, using different blocks
for each type of element. In a first model with only the two grids defined by the CIGRE the
layout is the following:
Fig. 4.5. Grid layout in Simulink. Source: Simulink database
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 35
In this model there’s a sensor of voltage and current connected between the 8th and 14th bus
that will be the emplacement of the microgrid. At this point the voltage and current of the
microgrid have values of 2379 V and 14,1 A.
4.3. Wind farm model
Once the both grids are implemented, the following step is the implementation of the different
elements of the microgrid, where basically the power will be generated. In order to create the
wind farm different options where proposed.
4.3.1. First wind farm proposal
The first proposal of wind farm consists in a permanent magnet synchronous machine that
has an input for the mechanic torque that can be generated by a special block of Simscape
named “Wind turbine”, the value is given in pu, so is previously multiplied by the nominal
power of the wind turbine, set in 8,5 kW. The wind farm is composed by default
aerogenerators with the following power characteristics:
Finally, a pitch angle generator is required in order to get the pitch angle of the machine from
its speed, in order to do this the following block is defined:
Fig. 4.6. Turbine power characteristics. Source: Simulink database
Pàg. 36 Memory
The rotor speed is obtained from the permanent magnet synchronous machine as a
parameter in rad/s and then converted in pu. The wind speed is a variable that will be used in
order to simulate different scenarios with different wind rate speed.
The problem of this program was that once the user executes it, the program runs very
slowly probably due to the pitch angle generator that creates algebraic looping.
4.3.2. Second wind farm proposal
The second option proposed involved the Simscape block Wind Turbine Induction Generator
(Phasor type). The wind turbine and the induction generator (WTIG) are shown below. The
stator winding is connected directly to the grid and the rotor is driven by the wind turbine. The
power captured by the wind turbine is converted into electrical power by the induction
generator and is transmitted to the grid by the stator winding. The pitch angle is controlled in
order to limit the generator output power to its nominal value for high wind speeds. In order to
generate power, the induction generator speed must be slightly above the synchronous
speed. But the speed variation is typically so small that the WTIG is considered to be a fixed-
speed wind generator. The reactive power absorbed by the induction generator is provided
by the grid or by some devices like capacitor banks, SVC, STATCOM, or synchronous
Fig. 4.7. Pitch angle controller.
Fig. 4.8. First wind turbine proposal.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 37
condenser.
The advantage of this block is that contains its own pitch controller and the only required
thing is a wind value and a protection system that controls the tripping of the wind turbine.
Once again, this program cannot be used because the analysis of this block has to be done
in phasor type and the rest of the system is in discrete type of analysis. One solution could
be a concurrent execution doing a partition of the model but apart of the complexity of this
procedure it may lead to different problems during the execution of it.
4.3.3. Third wind farm proposal
After trying to do a concurrent execution with the model proposed in the previous section with
no success the decision made is to use a special block designed by Richard Gagnon at
Hydro-Quebec that simulates a doubly-fed induction generator driven by a wind turbine. In
this section this block will be explained together with the description of the layout.
Fig. 4.9. Wind turbine induction generator block and scheme.
Fig. 4.10. Wind turbine induction generator block and scheme.
Source: Hydro-Quebec.
Pàg. 38 Memory
This block contains a subsystem that represents the internal scheme for a wind turbine. The
first important part is the drive train, where the previous mentioned block in first proposal
“Wind Turbine” is used to generate the torque of the wind turbine that is later on treated to
get the torque of the shaft which multiplied by the power base of the generator gives the
mechanical torque.
Where the drive train:
Once the mechanical torque is obtained, the electrical circuit for the representation of the
generator is done as previously, with a wound-rotor induction generator in this case and a
AC-DC-AC converter that regulates the output of the wind turbine:
Fig. 4.11. Turbine and Drive train layout in Simulink. Source: Hydro-Quebec.
Fig. 4.12. Drive train internal scheme. Source: Hydro-Quebec.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 39
Finally, the control part is done all together in another subsystem that will not be explained
because it has several control methods that would occupy lots of pages to explain. The
control contains a grid-side converter control system and a rotor side converter control
system that generate the pulses for the AC-DC-AC converter and a speed regulator and
pitch control for calculating the pitch angle. All these values are previously filtered and
transformed depending on the necessity of every control part. The parameters that define
this wind turbine were selected by looking at the average parameters of a 1,5 MW wind
turbine.
Generator data
Nominal power 1,5/0,9 MW
Line to line voltage 575 V
Frequency 50 Hz
Rs (pu) 0,023
Lls (pu) 0,18
Rr’ (pu) 0,016
Llr’ (pu) 0,16
Lm (pu) 2,9
Inertia constant 0,685 s
Friction factor (pu) 0,01
Pairs of poles 3
Fig. 4.13. Wind turbine internal layout. Source: Hydro-Quebec.
Fig. 4.14. Generator data for the wind turbine model.
Pàg. 40 Memory
Drive train data
Wind turbine inertia constant 0,4 s
Shaft spring constant (pu) 1,11
Shaft mutual damping (pu) 1,5
Turbine initial speed (pu) 1,2
Initial output torque (pu) 0,83
Control data
DC bus voltage Kp 8
Dc bus voltage Ki 400
Grid-side converter current Kp 0,83
Grid-side converter current Ki 5
Speed regulator Kp 3
Speed regulator Ki 0,6
Rotor-side converter current Kp 0,6
Rotor-side converter current Ki 8
Q and V regulator Kp 0,05
Q and V regulator Ki 20
Pitch controller Kp 150
Pitch compensation Kp 3
Pitch compensation Ki 30
Converter data
Maximum current (pu) 0,8
Grid-side coupling inductor: L (pu) 0,3
Grid-side coupling inductor: R (pu) 0,003
Nominal DC bus voltage 1150 V
DC bus capacitor 10000 µF
Line filter capacitor 120 kvar
Wind turbine data
Mechanical power 1,5 MW
Wind speed at nominal speed 11 m/s
Initial wind speed 11 m/s
Fig. 4.15. Converter data for the wind turbine model.
Fig. 4.16. Wind turbine data for the wind turbine model.
Fig. 4.17. Drive train data for the wind turbine model.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 41
Frequency of the grid-side PWM carrier 2700 Hz
Frequency of the rotor-side PWM carrier 1620 Hz
Maximum pitch angle 27°
Maximum rate of change of pitch angle 10°/s
Once the data is all defined, the layout presented in this project consists of 18 turbines,
distributed in groups of 6 turbines each, that will receive different speeds of wind. All this
groups of turbines are connected in parallel to a rectifier that has the following layout:
Finally, the overall wind farm layout is:
Fig. 4.18. Control data for the wind turbine model.
Fig. 4.19. 2-level rectifier layout where 1 and 5 are the DC ports and 2, 3 and 4 the AC ports.
Fig. 4.20. Wind farm of the project layout.
Pàg. 42 Memory
Where the voltmeter and scope connected at the DC side of the rectifier would represent the
connection to the microgrid.
4.3.4. Wind farm simulation
The wind farm simulations started wrong, as the output of the system was purely a voltage
source and the voltage at the wind turbines dropped to 0 once the desired voltage was
reached at the output. Adjusting the values of the rectifier to R=0,5Ω, L=5mH and C=2500µF
and setting a capacitors bank at the input of the wind turbines in the rectifier solved this
problem obtaining the following voltage and current at the wind turbine rotor expressed in pu:
Until T=2s the system is
transitioning to the steady state
and irregular values appear,
when the stability of the system
is reached, it is also reached the
constant voltage output of the
system, that is stepped until it
reaches the value of 16500 V
approximately.
Fig. 4.21. Voltage and current wind turbine output.
Fig. 4.22. Voltage wind farm output.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 43
This is not a desirable output, as the voltage is stepped and irregular at the beginning, also
the voltage at the wind turbines is too much bigger and it could lead to future problems at the
system. In this case the simulation was done with a time step of 0,0001 seconds and a
speed of wind of 10 m/s.
Increasing the speed to the nominal value of 11 m/s leads to a similar form of the voltage of
the turbine, with disturbances for the first two seconds and a half but then reaches a
stabilized mode where the voltage is more correct than it was before as it has a lower value
while the output of the system is almost the same.
Fig. 4.23. Voltage and current wind turbine output with 11 m/s of wind speed.
Fig. 4.24. Wind farm voltage output with 11 m/s of wind speed.
Pàg. 44 Memory
Finally, if the wind speed is lower than 10 m/s, for example 9 m/s, the output of the system is
even better, with no disturbances at the beginning of the simulation in the case of the voltage
and current in the rotor, expressed in pu:
The stabilized mode is reached faster than before and this is also reflected at the voltage
output of the whole system, despite the fact that in this case the voltage doesn’t even reach
the 14000 V value:
Fig. 4.25. Voltage and current wind turbine output with 9 m/s of wind speed.
Fig. 4.26. Wind farm voltage output with 9 m/s of wind speed.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 45
Wind is a meteorological phenomenon that is never constant, having differences on the wind
speed in a small amount of time, so in the following graphs the effect of increasing and
decreasing wind from 6 m/s to 11 m/s will be studied. In the first test, the wind has this form:
With the voltage and currents as expected, first decreasing when the wind speed starts
increasing and then increasing until the stabilized mode.
Fig. 4.27. Wind value increasing from 6 to 11 m/s.
Fig. 4.28. Voltage and current values with an increasing wind speed.
Pàg. 46 Memory
Finally, the output has no abrupt changes, meaning that the system is prepared for changes
in the wind speed:
So, the voltage output doesn’t change until a value near to 11 m/s is reached in the wind
speed, if this wind speed was maintained constant there will be a point where the system
reached the previous output with the 11 m/s wind speed. When the wind speed decreases
instead of increasing, the voltage and current at the wind turbine:
Fig. 4.29. Wind farm voltage output with an increasing wind speed.
Fig. 4.30. Wind turbine voltage and current with a decreasing wind speed.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 47
So, it’s clearly demonstrated that the wind farm operates better with low wind speeds,
offering a good output besides not being operating at nominal speed, thanks to the rectifier
PWM control. When working on these last simulations the capacitors values were changed,
in order to adapt to the differences that could provoke the wind speed changes, the parallel
capacitor at the DC side of the rectifier was changed to C=2200µF and the capacitor bank at
the AC side of the rectifier was changed to a 500 kvar value.
4.4. PV plant model
The implementation of the photovoltaic plant is easier as it exists a specific block that
simulates the operation of a group of photovoltaic panels taking into account two different
variables: irradiance and temperature, but in our case the temperature will not be taken into
account as we consider this block to be a robust discrete model and the temperature has
been internally set to the value of 25°C. Simulink also offers the possibility of choosing a
model of panel that exists in the real market, in the case of this project the model selected is
the SolarWorld Industries GmbH Sunmodule Protect SW 285 mono. Another important data
that has to be introduced is the number of solar panels that exist in the installation that will be
changed for different scenarios in order to change the output voltage and current of the plant.
The layout of the PV plant and the module V-I and P-V characteristics are the following:
Fig. 4.31. PV plant layout.
Fig. 4.32. PV array V-I and P-V characteristics.
Pàg. 48 Memory
The output of this PV plant will be regulated by a maximum power point tracker system or
MPPT, which will provide us the maximum power that the system can achieve by regulating
the voltage and current output of the PV panels. In order to implement this system in
Simulink a MATLAB code is written, with a perturb and observe technique program that will
change constantly the values of the voltage finding the optimal duty cycle. The input
parameters of this program will be provided in the Simulink interface and will be the initial,
maximum and minimum value of the duty cycle and the increment value used to increase or
decrease the duty cycle. Apart from these inputs, the voltage and current will be provided
directly by the system as an input of the function block and another input that will decide if
the MPPT is enabled or not. The voltage, power and duty cycle variables are declared as
persistent variables, which are local to the function in which they are declared, yet their
values are retained in memory between calls to the function. In the first run of the program, if
the voltage variable is empty, the voltage, power and duty cycle are defined in the first
iteration of the program as a value of 0 and the duty cycle as the decided parameter for initial
value. Once these variables are declared the program starts by calculating the difference
between the actual values and the values previously defined. If power and voltage are
decreasing, the duty cycle also decreases, if the power decreases but voltage increases, the
duty cycle is increased. When the power increases and the voltage also increase, the duty
cycle decreases and if the power increases but the voltage decreases the duty cycle is
increased. If the difference of the power is 0 or the duty cycle overpasses the limits set by the
maximum and minimum parameters, the duty cycle is set to be the previous one. The
program code is:
function D = MPPT(Param, Enabled, V, I)
Dinit = Param(1);
Dmax = Param(2);
Dmin = Param(3);
deltaD = Param(4);
persistent Vold Pold Dold;
dataType = 'double';
if isempty(Vold)
Vold=0;
Pold=0;
Dold=Dinit;
end
P= V*I;
dV= V - Vold;
dP= P - Pold;
if dP ~= 0 & Enabled ~=0
if dP < 0
if dV < 0
D = Dold - deltaD;
else
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 49
D = Dold + deltaD;
end
else
if dV < 0
D = Dold + deltaD;
else
D = Dold - deltaD;
end
end
else D=Dold;
end
if D >= Dmax | D<= Dmin
D=Dold;
end
Dold=D;
Vold=V;
Pold=P;
A DC-DC boost converter is required in order to control the output of the PV plant, in this
case the PWM control is done directly at the converter and with the duty cycle obtained with
the MPPT program, that enters the block at the input number 1. Inductances and reactances
are added in order to filter the input data and a condenser of 2200 µF and a diode are set at
the output in order to obtain a correct direct current output.
Fig. 4.33. DC-DC boost converter layout.
Pàg. 50 Memory
The overall layout for the PV plant is:
Where “Param” is a block that contains all the parameters listed above and mentioned
previously:
4.4.1. PV plant simulations
In order to assure a correct operation of the PV plant, different simulations where done, with
different scenarios in order to check what are the possible layouts for this system.
4.4.1.1. First simulation
In a first simulation we will vary the number of parallel strings and the number of series-
connected modules per string and see how this affects to the system.
- First scenario: 40 parallel strings and 5 series-connected modules per string
In this scenario, the irradiance is set 1000 W/m2. The voltage and current of the PV modules
are:
Parameter Value
Initial duty cycle (Dinit) 0,485
Maximum duty cycle (Dmax) 0,6
Minimum duty cycle (Dmin) 0,4
Duty cycle step (deltaD) 20·10-6
Fig. 4.34. PV plant and control layout.
Fig. 4.35. Control parameters.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 51
There’s a ripple between 200 and 205 volts and between 15 and almost 0 amperes that is
originated due to the MPPT system. When the MPPT point is found, there’s also an
overvoltage that can be seen better in the output of the PV plant, once the signal has been
treated by the DC-DC boost converter.
As expected, in this scenario the current is lower because there’s a small number of panels
in series in each string. In order to tackle the negative values that may appear in the current
of the photovoltaic power, which could produce damages to the system, another capacitor
with the same value is set in the input of the DC-DC boost converter. Apart from this, to
tackle the overvoltage originated when reaching the point of operation, the values of the
Fig. 4.36. PV plant voltage and current with 40 parallel strings and
5 series-connected modules per string.
Fig. 4.37. PV plant output voltage.
Pàg. 52 Memory
resistor and inductor are defined as R=0,5Ω and H=0,1mH taking into account that the
number of PV panels has to be increased in order to reach a suitable power and voltages
output.
- Second scenario: 100 parallel strings of 60 modules per string.
In the previous scenario only a few kilowatts of power were reached and for our installation
there are required a power of around 1’5 MW, this is the reason why the parallel strings are
increased to 100 and the modules per string to 60. With this layout and the settings changed
at the end of the previous scenario, the voltage and current at the PV plant is:
As the current signal has a very high ripple, the settings of the RL branch and capacitor have
to be changed. Now, the capacitor will be of a value of C=9100µF and the inductance
L=0.07mH. With these parameters the value of power is 1638 kW and the voltage and
current outputs are:
Fig. 4.38. PV plant voltage and current with 100 parallel strings
and 60 series-connected modules per string.
Fig. 4.39. PV plant voltage and current with 100 parallel strings and 60
series-connected modules per string and arranged RLC values.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 53
In this case we have an optimal output with a ripple in the current with values between 800
and 840 A and a voltage with a very low ripple. By the way, all these ripples are mitigated
through the DC-DC boost converter, which output is:
Finally, the voltage output value is 6000 V and this will have to be later adapted to the
voltage of the microgrid which has not already been decided.
4.4.1.2. Second simulation
In the second round of simulations, the duty cycle ranges will be analysed in order to know if
the actual ranges are correct. In the previous simulations, the duty cycle that helps to reach
the steady state is 0,5. In this
simulation the initial state for the duty
cycle will be set to 0,5 directly and the
difference between the voltages of
different cycles (DeltaDC) will be
changed to 50·10-6.With these
changes, the output signal of the
voltage of the system is smoother than
previously as the duty cycle is already
defined correctly at the beginning of the
simulation.
Fig. 4.40. PV plant final output of the first round of simulations.
Fig. 4.41. PV plant final output of the
second round of simulations.
Pàg. 54 Memory
4.4.1.3. Third simulation
In this last round of simulations, the solar data will be changed in order to not make it
constant and at 1000 W/m2 as it was before, testing more reasonable scenarios and looking
how the changes affect to the system.
- First scenario: Irradiance decreasing from 1000 to 500 W/m2.
In this case, in a simulation of 10 seconds, the decrease is done between t=2 s and t=7 s.
What this decrease on the irradiance causes to the voltage and current of the PV plant is
also a decrease on their values, decreasing the average power of the simulation from the
previous 1638 kW to 779,3 kW.
Fig. 4.42. Sun irradiance for this simulation.
Fig. 4.43. PV plant current and voltage output with a decrease on the irradiance.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 55
When the irradiance is lower, the system offers an output with less ripple than previously due
to the lower levels of voltage in respect to the parameters of the capacitors and RL branch of
the DC-DC boost converter. Finally, the output voltage of the system will be:
- Second scenario: Irradiance increasing from 500 to 1100 W/m2.
In this case two things were important to test, how the system responds when starts working
with less irradiance and how responds when this irradiance is higher than the nominal value
of 1100 W/m2. The irradiance in this case is:
The PV plant has a perfect adaptation to the 500 W/m2 irradiance, offering an output with no
ripples. When the irradiance increases, the ripple increases with it, but the average power of
Fig. 4.44. PV plant output voltage with a decrease on the irradiance.
Fig. 4.45. Sun irradiance for this simulation, with an increasing value.
Pàg. 56 Memory
the PV plant in this case is 1714 kW, so, the increase of the irradiance above the nominal
one, generates more power at the expense of having a greater ripple at the PV plant voltage
output:
Also, there’s an abrupt change on the voltage and current values at t=3 s, just right before
the ripple starts, so this is the point where the RL branch and capacitors values are
undersized in order to not decrease the output, despite having ripple. At the current graph it
can also be appreciated how the ripple has a higher value when the irradiance is over 1000
W/m2.
In a last round of simulations, the Sun irradiance was increased to unreachable levels like
Fig. 4.46. PV plant voltage and current output with an increasing irradiance.
Fig. 4.47. PV plant output with an increasing irradiance.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 57
1500 W/m2 and the ripple of the voltage plant and system output is constant but the ripple of
the current increases with the irradiance, so this fact is demonstrated. Finally, it was also
checked that for low power values the duty cycle was 0,4 and for big power values the duty
cycle was 0,5. The ranges of the duty cycle could be stretched but in order to overcome
possible overvoltages due to hot spots or operation problems the levels are maintained as
before.
4.5. VSC control model
At this point of the project, the original CIGRE grid and the project’s microgrid have been
defined and now is time to connect both of them. In order to do this operation, a voltage
source converter has to be implemented. The principal theorical aspects of this device have
been explained in the State of the Art of this work, so at this point the programming of this
part in Simulink will be explained. The general scheme of the voltage source converter is:
The Vzabc and Iabc values will be extracted through a block called Three-Phase V-I
Measurement from the grid part of the system, at the point of connection with the microgrid.
The voltage is then treated with Clarke and Park transformations in order to obtain the values
Fig. 4.48. Grid converter control general scheme for renewable energy
generation systems. Source: Egea-Alvarez et al.
Pàg. 58 Memory
in the qd0 plane:
In this block, called “Clarke + Rotation”, the value of the Vzabc vector is multiplied by the
Clarke matrix, defined in the theorical part of the project and previously multiplied by the
theta matrix or rotation matrix doing the Park transformation and obtaining the voltage in the
qd0 plane. This theta is obtained thanks to a phase locked loop or PLL with the following
scheme:
The Vzd value is obtained from the previous block, closing in this way the loop between them.
The reference value or Vzd_ref is 0. The values for the PI controller will be calculated lately.
Fig. 4.49. Clarke and Park transformations modelled in Simulink.
Fig. 4.50. PLL block that helps obtaining the theta value.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 59
With the same theta we obtained previously we can obtain the values of the Izabc parameter in
the qd0 plane and then implement a current loop control with the iq, id and Vzq values.
Finally, the final Vzabc of reference is obtained through the multiplication of the vector Vlqd0 by
the Theta inverse matrix that is programmed in a similar way than the original theta matrix:
Fig. 4.51. Current loop control layout.
Fig. 4.52. Theta inverse matrix Simulink implementation.
Pàg. 60 Memory
The general layout of the voltage source converter control part is:
This would be a typical voltage source converter modelled taking as reference the grid side
values but in the system of this project there’s presence of renewable energies and the
microgrid working in direct current mode, so it’s necessary to also know the values of the
microgrid side. In order to do this a DC voltage regulator as the one explained in the theorical
part of the project needs to be implemented and it will help to obtain the iq* parameter. At the
current loop, the iqref that was previously set as 200 A value, will be changed by an inport in
order to receive the output of the DC regulator. This DC regulator is modelled as:
Fig. 4.53. General layout of the voltage source converter control part.
Fig. 4.54. DC regulator layout in Simulink.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 61
Finally, the voltage source converter layout with the DC voltage regulator is:
4.5.1. VSC simulation
Once the voltage source converter is modelled, in order to simulate this part of the system a
three-phase source will be implemented simulating the grid and current source together with
a capacitor of value C=4700µF that will simulate the microgrid. The layout of this simulation
is:
Simulating this layout brought problems because of the controlled current source, that was
changed by an alternating current source that connected in parallel with the capacitor will
give us an output similar to the one of the microgrid. So, the voltage at the microgrid side is:
Fig. 4.55. Voltage source converter control part with DC voltage regulator.
Fig. 4.56. Layout for the simulation of the voltage source converter.
Pàg. 62 Memory
And the voltage at the grid side, generated by the three-phase source block is:
It is clear that the disturbance at the beginning of the simulation in the microgrid side, that
also happens in the simulation of the PV plant and wind farm, leads to a disturbance at the
beginning of the simulation at the grid side, which means that the system works correctly, as
a disturbance on one side affects to the other side. The tests that have to be done in this
case are related with overvoltages and phase short-circuits, so, in a first test, the microgrid
Fig. 4.57. Microgrid side voltage output.
Fig. 4.58. Grid side voltage output.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 63
will be modelled to have different overvoltages at some point of the simulation.
- First test, disconnection of the microgrid for 0,1 seconds at time 3 seconds.
In this case the microgrid is disconnected for 0,1 seconds and the response during this time
at the grid side is:
There is a slight increase on the voltage but only of one of the phases, while the other
phases remain equal and not affected, it is clear now that the system operates correctly.
- Second test, disconnection of the grid for 0,1 seconds at time 3 seconds.
This disconnection does not affect to the microgrid side as it is a independent current source
connected to a capacitor so it continues working. At the grid side, the recovery of the system
when the fault has passed is:
Fig. 4.59. Grid side voltage in case of disconnection of the microgrid.
Fig. 4.60. Grid side voltage in case of disconnection of the grid.
Pàg. 64 Memory
The voltage drops to 0 but it instantly recovers once it has passed the fault, originating only a
small overvoltage. This decrease on the voltage is reflected in the current, which increases a
lot during the 0,1 seconds of fault, resulting in a dangerous overcurrent that may lead to
problems in the devices connected to the grid if they are not prepared for this type of error.
During the rest of the simulation the currents at both sides are very small, a desirable fact
when a system of this magnitude is modelled. More tests can be implemented at the voltage
source converter, but it will be done with the all system already connected.
4.6. Microgrid model
The general layout of the microgrid, where the outports 1 and 2 indicate the connection with
the voltage source converter is:
Fig. 4.61. Grid side current in case of disconnection of the grid.
Fig. 4.62. Project’s microgrid layout.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 65
4.7. System simulation
The whole system implemented is the following:
On a first simulation, assuming a constant wind of 9 m/s and a constant irradiance of 1000
W/m2 the voltage and current at the interconnection point of the grid with the microgrid is:
It can be observed that as it happened before, the system has a small overvoltage and its
correspondent undercurrent in the beginning of the system, probably due to the start of
operation of the PV plant. The system works correctly in steady state and now different tests
will be done in order to know if the voltage source converter operates correctly. In a first
simulation, it is supposed that the feeder number 2 is disconnected for a few milliseconds
and then reconnected. The voltage at this point:
Fig. 4.63. Project’s system layout.
Fig. 4.64. Voltage and current at the interconnection point.
Pàg. 66 Memory
It is now clear that the voltage source converter works really well, offering a very short
transitionary state when disconnecting the feeder and low levels of overvoltages when it is
reconnected. The only problem at this point is the high levels of current that the system will
have and that could be dangerous for the system if it is not protected.
When the feeder 1 is disconnected, the same effect is produced but in different levels
because of the difference of load between both feeders.
Fig. 4.65. Voltage at the interconnection point when the feeder number 2 is disconnected.
Fig. 4.66. Current at the interconnection point when the feeder number 2 is disconnected.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 67
When the microgrid is disconnected, the system receives less power but it continues
operating with less voltage but more current in order to maintain the same power as
previously. For example, the voltage and current on the second feeder:
In this case the disturbances or overvoltages are not very important because the grid helps
recovering from the fault.
Finally, another typical problem that may occur is the disconnection of one of the phases
probably produced by the impact of a lightning for example. In this case, considering the
same time of disconnection as before but only for the phase A, the voltage and current at the
Fig. 4.67. Voltage at the feeder number 2 when the microgrid is disconnected.
Fig. 4.68. Current at the feeder number 2 when the microgrid is disconnected.
Pàg. 68 Memory
second feeder is:
Once again, the system works adequately to what is required as it overcomes the reduction
of voltage of the first phase and also it overcomes the diphase produced in the current,
obtaining again a perfect output once the fault has passed.
Fig. 4.69. Voltage at the feeder number 2 when there is a fault on the phase A.
Fig. 4.70. Current at the feeder number 2 when there is a fault on the phase A
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 69
Conclusions
To conclude with the work done in this project, there are different points that can be
commented that have been worked in this paper. First of all, on the theorical part of the
project different techniques and devices related with protection of smart grids and microgrids
have been presented, together with a clear definition of Smart Grid and their importance in
the future. Also in this part, the CIGRE benchmark has been presented which is a great help
when doing this type of researches. Finally, to close the theorical part, the voltage source
converter theory has been explained which may seem difficult but once implemented in
Simulink becomes more friendly to the user.
In the practical part the CIGRE medium voltage grid has been implemented in Simulink, by
using the Simscape library and a further work in this way could be doing the same but with
high voltage or low voltage grids. Next to this, the microgrid was implemented, which is the
part that has brought more difficulties to the system, especially the wind farm, as there was
not a specific block for simulating a wind turbine in discrete mode and finally it has been
necessary to use the block that created Richard Gagnon from Hydro-Quebec. Despite this
fact, all the wind farm operated correctly and in the separated simulations it can be seen how
thanks to the rectifier the system is able to adapt to the changes on wind.
The solar plant has been easier to implement as there is a specific block that simulates a
photovoltaic plant with the desired dimensions. Different tests have been done to this part of
the system showing a great performance even with irradiances over and under the nominal
one. It is also remarkable in this part the maximum power point tracker system that controls
the DC-DC boost converter and makes possible obtaining always the maximum power from
the solar plant.Finally, the voltage source converter part was one of the most difficult parts to
model because of the complexity of all the operations and the desire of the author of not
using the Simscape blocks that exist for this part. In the simulation done to the voltage
source converter independently and together with the rest of the system it has been show
how this device works perfectly, having a very small time of response when finding any
problem in the system.
In order to follow the work done in this project, an energy storage management could be
implemented. It was intended to do with blocks that are present in Simulink as the other
types of devices but it was impossible in this case, not obtaining any correct value in the
simulations. Another way of continuing this project could be working on the islanded mode
from the grid of the medium voltage grid and the microgrid, where all the power should be
supplied by the microgrid. These two options were tried in this project with no success and
this is why they do not appear.
Analysis, modelling and control of a DC microgrid: AC grid connection and renewable energy integration Pàg. 71
Acknowledgements
This project would not have been possible without the help of Oriol Gomis Bellmunt, who
gave me all the data referent to the CIGRE benchmark and the voltage source converter,
one of the main parts of the project. Apart from this he also helped me solving any doubt I
had.
Thanks also to my family and friends that have supported me since the first day I entered in
the UPC 6 years ago until this last project that marks the end of a beautiful stage of my life
and the beginning of a prosperous one.
Pàg. 72 Memòria
Bibliography
[1] I. Diahovchenko, M. Kolcun, Z. Čonka, V. Savkiv, and R. Mykhailyshyn, “Progress and Challenges in Smart Grids: Distributed Generation, Smart Metering, Energy Storage and Smart Loads,” Iran. J. Sci. Technol. - Trans. Electr. Eng., vol. 44, no. 4, pp. 1319–1333, 2020.
[2] N. Dkhili, J. Eynard, S. Thil, and S. Grieu, “A survey of modelling and smart management tools for power grids with prolific distributed generation,” Sustain. Energy, Grids Networks, vol. 21, p. 100284, 2020.
[3] D. Markovic, I. Branovic, and R. Popovic, “Smart Grid and nanotechnologies: a solution for clean and sustainable energy,” Energy Emiss. Control Technol., p. 1, 2015.
[4] P. H. A. Barra, D. V. Coury, and R. A. S. Fernandes, “A survey on adaptive protection of microgrids and distribution systems with distributed generators,” Renew. Sustain. Energy Rev., vol. 118, no. November 2019, p. 109524, 2020.
[5] B. J. Brearley and R. R. Prabu, “A review on issues and approaches for microgrid protection,” Renew. Sustain. Energy Rev., vol. 67, pp. 988–997, 2017.
[6] D. Fan, Y. Ren, Q. Feng, Y. Liu, Z. Wang, and J. Lin, “Restoration of smart grids: Current status, challenges, and opportunities,” Renew. Sustain. Energy Rev., vol. 143, no. March, p. 110909, 2021.
[7] S. H. Horowitz, A. G. Phadke, and J. S. Thorpe, “Adaptive transmission system relaying,” IEEE Trans. Power Deliv., vol. 3, no. 4, pp. 1436–1445, 1988.
[8] X. Zhou, T. Guo, and Y. Ma, “An overview on microgrid technology,” 2015 IEEE Int. Conf. Mechatronics Autom. ICMA 2015, pp. 76–81, 2015.
[9] K. Strunz, C. Abbey, C. Andrieu, R. C. Campbell, and R. Fletcher, Benchmark Systems for Network Integration of Renewable and Distributed Energy Resources, no. July. 2009.
[10] S. Paghdar, U. Sipai, K. Ambasana, and P. J. Chauhan, “Active and reactive power control of grid connected distributed generation system,” Proc. 2017 2nd IEEE Int. Conf. Electr. Comput. Commun. Technol. ICECCT 2017, pp. 47–81, 2017.