The application of the CLONALG algorithm in the process of optimal operation control of hybrid AC/DC low voltage microgrid

. The issue of optimal operation control of microgrids is a very important problem. As a result of changing weather conditions and the demand for the power of individual consumers, generation units and energy storage devices must constantly adjust their operation states. The optimization of the microgrid operation states can simultaneously provide the required level of power and energy and, for example, minimization of power losses or costs associated with the operation of this type of system. Among many available optimization methods, author of a paper decided to test the CLONALG algorithm, which is an implementation of artificial immune system. The article will presents the characteristics of selected CLONALG algorithm, and the description of the test microgrid together with the considered optimization criteria and constraints. The presentation and analysis of the obtained results from optimization calculations will be the main part of the paper. At the end of the paper observations and conclusion will be presented.


Introduction
The growing demand for electricity causes that an increasing number of consumers are considering installation of local distributed energy sources and storage units. With the development of technology, photovoltaic panel, wind micro turbine generation sets, gas micro turbines and fuel cells are becoming increasingly popular. Generated energy can be accumulate in battery energy storage units, flywheels and supercapacitors. The use of electric vehicle batteries is also considered [1].
Effective use of mentioned devices is possible thanks to their integration into the structures such as microgrids. The simplest way to build a microgrid is to transform an existing AC network by adding remote control breakers that can separate it from distribution system operator (DSO) power grids and necessary control system. However, such an approach is not without drawbacks. Most of installed microsources as well as energy storage units require the use of bidirectional electronic power converters (also multistage converters) to connect them to the AC power grid. It should be also mentioned that limited transmission capacities of AC power lines may prevent the simultaneous use of electricity receivers and charging of energy storage units.
Partially deprived of these drawbacks is the concept of hybrid AC/DC microgrid, presented in [2]. In this concept, two independent subgrids are distinguished, connected with each other by a central, bidirectional single-stage converter. Part of the generation and storage units can be connected directly to the DC subgrid or with use of a simple singlestage DC/DC converters. Also many of existing electricity receivers (e.g. light sources or heating devices) can operate properly on DC power supply. Such a solution can contribute to the reduction of power losses in the microgrid, which is an undoubted advantage of the hybrid system. The other benefits of hybrid AC/DC microgrid are presented in [3]. Possible topologies of hybrid microgrids are presented in [4].
Appropriate control of a significant number of microsources, energy storage units and AC/DC converter itself is not an easy task. Modification of an operation point of a single device can lead to undesired voltage surges and current overloads in the microgrid. In order to fully exploit the capabilities of the hybrid AC/DC microgrid, it is necessary to optimize its operation and adapt to new conditions. Coordination of the operation of various types of electronic power converters is described in [5]. Some exemplary applications and power management strategies of hybrid microgrids are presented in [6].

Artificial immune systems -clonal selection algorithm
The beginning of the development of artificial immune systems (AIS) is the 1990s. Like for other methods of artificial intelligence (e.g. genetic algorithms, artificial neural network, etc.), the operation of biological immune systems was an inspiration to create AIS. The main features of AIS, such as the ability to remember and learn new information, as well as recalling previously collected data, make this group of algorithms quite well suited to solve the following problems: fault detection, pattern recognition and protection of computer systems. The structure of artificial immune systems was proposed in [7].
Each of AIS algorithm should consists three different layers: representation layer, affinity measures layer and immune algorithm layer. In a representation layer system will create a set of antigens and antibodies. The task of a second layer is to measure the affinity of antibody to antigen and evaluate interactions in a set. The third layer represents different immune algorithms which are used to find a solution. One of algorithms applied in a third layer of AIS is a clonal selection algorithm (CLONALG).
The scheme of the artificial immune system based on the CLONALG algorithm is as follows: 1. generation of initial set of N antibodies; 2. presentation of antigen and calculation of affinity of antibody to antigen; 3. selection of N 1 antibodies with the highest affinities; 4. generation of clones of selected antibodies (directly in proportion to the affinity); 5. hypermutation of clones (inversely in proportion to the affinity); 6. adding mutated clones to the set; 7. replacement of N 2 antibodies with the lowest affinities to new ones generated randomly; 8. repeating from point 2. until the stop condition of algorithm is reached.
The use of CLONALG algorithm in optimization tasks is possible, but requires modification. Due to the fact that the optimal solution is unknown, it is not possible to present the antigen in the original approach. To solve this problem, in each iteration of the algorithm, it is assumed that the role of the antigen will be played antibody with the lowest or the highest (depending on the considered problem) value of evaluation function and all affinities will be determined for this antibody. Application of CLONALG algorithm in task of optimal sizing of hybrid AC/DC power system is presented in [8].

Formulation of optimization tasks
As part of the process of optimal operation control of hybrid AC/DC low voltage microgrid, three independent single-criteria optimization tasks were considered: -minimization of active power losses, -minimization of operation costs, -optimization of nodal voltage level.

Minimization of active power losses
The aim of this optimization task is to minimize the active power losses within a test AC/DC microgrid. The general form of the objective function presents the following formula: where: ΔP L -a sum of active power losses in power lines, ΔP TR -an active power losses in MV/LV transformer and ΔP EPC -an active power losses in electronic power converter.

Minimization of operation costs
In this task, operation points of microsources, energy storage units and electronic power converter will be chosen in such a way as to obtain the lowest costs of microgrid operation in a given optimization period. The general form of the objective function presents the following formula: where: K f -a sum of fixed microgrid operation costs (related to maintenance the connection with DSO power grid, microsources, energy storage units and infrastructure which enable consumers a connection of their devices to microgrid), K v -a sum of variable microgrid operation costs (related to the purchase of energy from DSO and customers as well as operation of microsources and energy storage units).

Optimization of nodal voltage level
The aim of the last optimization task is to achieve the smallest possible differences between the actual value of nodal voltage and nominal one. The general form of the objective function presents the following formula: where: NVF -a nodal voltage factor, U n -a nominal nodal voltage level, U -an actual nodal voltage level and i -a number of nodes.

Constraints
Optimal operation control of hybrid AC/DC low voltage microgrid must be accompanied by the fulfilment of the requirements contained on the set of constraints. In case where any of the formulated constraints will be affected, such a solution will be penalized. The general form of the penalized objective function presents the following formula: where: F o is an objective function, A and C are natural numbers (constant coefficients) and B is a variable coefficient. The form of parameter B is defined for each of the considered constraints. The values of parameters A and C determine the strength of a given constraint respectively in the range of small and significant exceedances of the permissible values. The set of constraints is formulated in the following way: -apparent power limit for microsources where: S -an actual value of apparent power and S n -a nominal value of apparent power; -power factor limit for microsources where: cos(φ) -an actual value of power factor and cos(φ) n -a nominal value of power factor; -long-term current carrying capacity limits for power lines where: I -an actual value of current and I dd -a long-term current carrying capacity; -apparent power limit for transformer -the form of parameter B is the same as in the case of formula (6); -nodal voltage level limit where: U min -a minimum permissible nodal voltage level, U -an actual nodal voltage level and U max -a maximum permissible nodal voltage level; -electronic power converter AC side active power limit where: P AC -an actual value of active power at AC side of a converter and S n -nominal apparent power of a converter; -active power limit for electronic power converter DC side where: F c -P DC -an actual value of active power at DC side of a converter; -power factor limit for electronic power converter -the form of parameter B is the same as in the case of formula (7); -active power limit for energy storage units where: P -an actual value of active power and P n -a nominal value of active power; -capacity limit for energy storage units where: A min -a minimum level of stored energy, A -an actual level of stored energy and A max -a maximum level of stored energy.

Description of test microgrid
To verify the proper operation of implemented optimization algorithm, a test hybrid microgrid was prepared. This test microgrid represents typical countryside power grid and consists of two major parts, AC grid and DC grid, connected together via electronic power converter (EPC). EPC is able to control active power flow between two grids, it also can be used to control reactive power flow in AC grid. Nominal apparent power of a converter is equal 125 kVA, and nominal voltage levels are equal 0.4 kV on AC and DC side. Both AC and DC grids are equipped with two radial low voltage power lines (DC lines are designed as double-track to increase long term current-carrying capacity). LV power lines are constructed with the use of AsXSn 4x70 mm2 (AC part) and AsXSn 2x70 mm2 (DC part) type conductors. Total length of each LV power line is equal to 360 meters. Line resistance per unit (R l ') and line reactance per unit (X l ') are respectively equal to 0.443 Ω/km and 0.083 Ω/km. The long-term current capacity is 213 amperes for AC lines and 426 amperes for DC lines.
Power loads (represent 22 residential and 2 public utility buildings) are connected only to AC power lines. Active power peak load vary from 1.379 kW to 4.098 kW for residential buildings and from 3.167 kW to 5.277 kW for public utility buildings. Total peak load of test microgrid is equal to 31.934 kW (on a working day) or 40.207 kW (on a holiday). The daily active power demand profiles of individual types of load are presented in Figure 1 and 2. It should be noted that the profiles of residential building loads are developed on the basis of actual measurements carried out by the author. Profiles of public utility building loads are assumed as fictional ones.  The power sources in test microgrid are mainly photovoltaic panels and micro wind turbine generation sets. Both types of renewable energy sources are connected only to DC microgrid. The total installed capacity of renewable sources is 80 kW. Microgrid is also equipped with reciprocating engine generation set with nominal apparent power equal to 61 kVA. This source can be used for normal microgrid operation (in synchronous mode with DSO grid) or to cover power demand and provide the necessary short circuit power level in island operation mode. Exemplary generation profiles (for selected days) of renewable energy sources are shown in Figures 3 and 4.  DC grid consist also 9 local energy storage units (located at energy consumers) and 1 central storage unit (located in converter station). The nominal power and capacity of each local energy storage unit are respectively equal to 50 kW and 37 kWh. Nominal parameters of central energy storage unit are equal to 40 kW and 160 kWh. It should be noted that the central energy storage operates as a reference source for DC grid.
AC microgrid is connected to DSO grid via 63 kVA MV/LV transformer and AFL-6 35 mm2 MV overhead power line. Key diagram of the hybrid AC/DC low voltage test microgrid is shown in Figure 5.

Implementation of CLONALG algorithm
Author of this paper decided to implement the CLONALG algorithm using DIgSILENT PowerFactory programing language (DPL) [10]. Such an approach enabled us for modelling and optimization of the test microgrid with a single computer software. The first step of developed DPL script is to load meteorological data and consumers power demand values. Then, a set of antibodies is created. In order to solve formulated optimization tasks, for each antibody (candidate solution) in the set the following vector will be defined:

Presentation of research result
To test the CLONALG optimization algorithm author perform series of 24 hours load flow simulations in a test microgrid. Each simulation consists of 144 independent optimization periods. The number of optimization periods results from the 10 minute delays between successive measurements of meteorological conditions used to determine the generation level of renewable energy sources. Author also assumed that all devices which form an AC microgrid are modelled as balanced three-phase components, and that during a single optimization period values of consumed and generated power do not change. Optimization calculation were carried out for four selected days within a year. Each day represents different season and one of this days is a working day. All calculation were carried out for the synchronous operation of microgrid. The values of the objective functions for a selected time moment are presented in Table 1. Results of 24 hours simulation for minimization of active power losses criterion are presented graphically in Figure 6. Optimization process (changes of objective functions values) is shown in Figure 7.

Summary and conclusions
As a conclusion the CLONALG algorithm was used in three tasks of optimization of operation points in hybrid AC/DC test microgrid. The results shows that the algorithm strives to find the smallest value of the objective functions for different initial conditions (e.g. season, type of a day, time and optimization task). The fluctuations in the values of objective functions observed in the initial phase of the algorithm (see Fig. 9) result from the violation of the constraints. In the tasks of optimization of nodal voltage level and minimization of operational costs algorithm is stabilized very quickly, after about 50 iteration. The task of minimization of active power losses is more complex and requires about 100 iteration to stabilized the solution.
Due to the way how CLONALG algorithm works, there is no certainty that the calculation results are global optimum of objective functions. As part of further research, in order to justify the applicability of artificial immune systems in the process of determining optimal operation points of hybrid AC/DC low voltage microgrid, author intends to test the CLONALG algorithm with use of other objective functions (e.g. minimization of amount of energy imported from DSO power grid, maximization of amount of energy generated in renewable energy sources) and different test microgrids. It is also very important to compare the obtained results with another commonly used optimization method.