Comparative study of metaheuristics methods applied to smart grid network in Morocco

Received Mar 9, 2019 Revised Jul 8, 2019 Accepted Nov 21, 2019 The economic dispatch problem of power plays a very important role in the exploitation of electro-energy systems to judiciously distribute power generated by all plants. The unit commitment problem (UCP) consists mainly in finding the minimum cost schedule for a set of generators by switching on or off each one over a given time horizon to meet the demand and satisfy different operational constraints, This research article integrates the crow search algorithm (CSA) as a local optimizer of Eagle strategy (ES) to solve unit commitment problem in smart grid system and economic dispatch of two electricity networks: a testing system 7 units and the Moroccan network.. The results obtained by ESCSA are compared with various results obtained in the literature. Simulation results show that using ES-CSA can lead to finding stable and adequate power generated that can fulfill the need of both the civil and industrial areas.


INTRODUCTION
Morocco is a country where the energy policy takes a capital importance in the same way as the emerging ones. The evolution of electricity demand is due to several factors. The evolution of the population, increases the domestic consumption, the modernization of lifestyles and the rural electrification also accentuate the dependence of the citizens in their daily life of the electrical network. Moreover, the country agrees and knows the advantage strong demand at the industrial level. Development plans and support industries have been launched and have generated foreign and local investment in many heavy energyintensive industries. The awareness of these issues has led to strategic investment and development laws that allow and support the diversity of the electricity system in Morocco. Projects launched at the national level for several years and focused on renewable energy confirm an energy transition. . They help reduce the dependence of the fossil fuel sector on huge fluctuations [1].
The electricity produced in Morocco is mainly produced by the National Office of Electricity and Drinking Water and three other independent electricity producers [2]: the wind power plant Abdelkhalek Torres (THEOLIA 50 MW), the energy Jorf Lasfar (JLEC 2020 MW) and basic electrical energy (EET 380 MW). Morocco adopted its with corresponding targets for 2020 in 2009 and renewed it in Paris at the end of 2015 with targets until 2030. The national energy strategy focuses on four main objectives: securing energy supply, controlling demand energy, generalize access to energy for all segments of the population at affordable and competitive prices and preserve the environment [3]. Smart grids are a set of technologies, concepts and approaches, allowing the integration the generation, transmission, distribution and use into one internet by full use of communications technology, advanced sensor measurement technology, computer technology, information technology, control technology, new energy technologies [4]. However, Smart Grid uses digital technology to control grid and choosing the best mode of power distribution to reduce energy consumption, reduce costs, increase reliability and also increase transparency in the network. Therefore, the system intelligent will have a significant impact in the fields of finance and economics of the power industry [5]. Although, the traditional network is a oneway network in which the electrical energy produced in power plants is channeled to consumers without information to create an automated and distributed network of advanced power supplies.
The unit commitment problem plays a significant role in optimizing the cost of generating electrical power by planning production units based on the allocation of the production cost of each unit and the actual output power [6]. They involves scheduling the on/off states of generating units to minimize the operating cost for a given time horizon. The committed units must meet the systems fore-casted demand and spinning reserve requirement at minimum operating cost, subject to a large set of operating constraints. The UC problem, one of the most important tasks in short-term operation planning of modern power systems, has a significant influence on the secure and economic operation of power systems [7]. Optimal commitment scheduling cannot only save millions of dollars for power companies; it also ensures system reliability by maintaining the proper spinning reserve.
The problem of economic dispatching is also applied in the integrated planning system of electrical energy production devices. Some methods have been published to solve the problem of economic dispatching and the optimal power flow. Researchers have published some methods to solve EDP and OPF problems. The direct method is precise and very simple but limited by the quadratic objective function [8]. The economic dispatch problem (EDP) is one of the power management tools that are used to determine real power output of thermal generating units to meet required load demand. The economic dispatch problem of power plays a very important role in the exploitation of electro-energy systems to judiciously distribute power generated by all plants [9]. The EDP results in minimum fuel generation cost, minimum transmission power loss while satisfying all units, as well as system constraints, [10][11].
The growing development of information networks and computer systems, power grids should also evolve in depth. Today, a substantial movement has begun to implement the smart grid industry around the world. Since with the creation of intelligent networks, it is possible to access the internal network from external spaces, it is also necessary to protect the data against unauthorized access and information. Therefore, a firewall must be used for information security.
The firewall, based on existing security regulations, Given the discussions on passive defense topics and the importance of information security in smart grids systems. Although the firewall plays a major role in establishing security, and its proper installation, we must also take advantage of other security mechanisms to improve the security of the Smart Grid system [12]. The rest of this paper is organized as follows. Section 2 presents the smart grid system In morocco, Section 3 contains the problem formulation of the ED and UCP. Section 4 briefly presents the basics of ES and CSA. Section 5 briefly presents the case study . Section 6 provides the computational results.Finally, Section 7 outlines the conclusions.

SMART GRID IN MOROCCO 2.1. Regulatory frameworks for the electricity sector
Some years after its independence, Morocco took the decision to take on its own account a strategic sector of the economy such as security. Thus he oversaw the organization of the transmission and distribution of electrical energy. It has, however, promoted a regulatory framework without which the management of this sector would be impossible. Through a legal arsenal in the form of laws, dahirs and official decrees, stakeholders in the sector have been defined by specifying their responsibilities, their fields of intervention and their responsibilities [13][14].
Indeed, by Dahir 1-63-226 of August 5, 1963, the National Office of Electricity (ONE) was created in January of the same year under the administrative supervision of the Minister of Public Works. According to the evolution of the sector over the years this dahir has been completed and modified by the decrees and dahirs of the years 1994,2002,2006,2008,2015,2016. Except the restrictions of article 3 of the same dahir and renewable energies, managed by law 13-09, the ONE is responsible for the public service, the production of the transmission and the distribution of electrical energy [15]. Law N ° 48-15, appeared on July 7, 2016, gave birth to a national authority of regulation of the sector of electricity bearing the name ANRE. This law also prescribes the missions of the manager of the national electricity transmission network and the distribution network operators. In addition to the tasks assigned to it by Law No. 13-09, the National Transmission System Operator carries out its duties in accordance with the provisions of this law and the clauses of its specifications approved by regulation. The National Transmission System Operator is responsible for the operation, maintenance and development of the national transmission system and, where applicable, for its interconnections with the transmission networks of foreign countries. Similarly, he is responsible for [16]: Manage the flow of electrical energy on the national transmission grid,To ensure a realtime balance between production capacity and consumption needs, by making use of available production capacities and taking into account exchanges with other interconnected networks;Ensure the safety of the national transmission system, its stability, reliability and efficiency. Law No. 13-09 on renewable energies, promulgated by the Dahir No. 1-10-16 of 26 Safar 1431 (February 11, 2010) published in the Official Bulletin No. 5822 of the 1st Rabii II 1431 (March 18, 2010) put end to the monopoly of electric power generation by the national office of electricity and drinking water at least for renewable energies. Thus, by this law the production of electric energy from renewable energy sources is provided by the ONE, concurrently with legal entities of public or private law or natural persons, in accordance with the provisions of this law and texts. Taken for its application. Table 1 details the laws and regulation realted to RE that were issued since 2006 [17]. Table 1. Moroccan laws Another Moroccan initiative is the program of rural electrification that started in 1996. At that time, the rural electrification rate was 11% only, at the end of 2017 this rate attained 99.64%, Figure 1 presents how this rate kept increasing during these last years [18].

Moroccan electricity power industry
Before the 1990's Morocco faced shortage in its electricity supply and part of the country experienced regular power cuts. It was then imperative to reform the electricity sector in order to mitigate the shortage issue.Independent Power Producers (IPPs) were authorized to privately generate electricity which was monopolized by ONEE before. The reform aimed at reducing the electricity generation using oil and hydropower and shifting some of it to coal and natural gas. The reform set by Morocco did not cover only generation but it was extended to distribution. The privatization of the distribution sector helped establish and   Figure 2 details the situation of the Moroccan electrical industry in 2018 [18].

PROBLEM FORMULATION
The problem of unit commitment solved ideally by acquiring a comprehensive test of all the solutions and the best solution is chosen among them. All possible units providing load and reserve requirements would be tested and would choose the optimal solution that has the minimum operating cost [19],The output power of the production units with system constraints over a period T and the on / off times at each step required for the unit engagement problem. The significant term of the operating cost of a thermal unit is the output power of the engaged units [20], the cost of the fuel, FCi is represented in a quadratic form of output power in a given time interval in (1) Where a, b, c are unit cost coefficients and p is the unit generating power. The calculation of the start-up cost (SC) depends on the treatment strategy for a thermal unit during down time periods and an exponential cost curve shown in Equation (2) is its representation. where σ , δ , τ is the hot startup cost, the cold startupcost and the cooling time unit constant and T , is the time at which the unit has been turned off so The total production cost, F is the sum of the operating, startup and shut down costs for all the units illustrated in Equation (3) SCi =σi δi * 1 exp Where N is the number of generating units and the number of requests of different load is T at the estimated commitment, SD is the stop cost; some constraints must be taken into consideration to minimize F as: a. Power balance equation is given by equation (4): Where PD is the load demand and PL is the power loss of the system. b. The hourly spinning reserve (R) is given by equation (5): c. Unit rated minimum and maximum capacities as in equation (6): The initial conditions of each unit and the minimum activation / deactivation times (MUT / MDT) of the units are given by equations (7) and (8) respectively.
Where the unit off/on time is Toff/Ton the and the unit off /on [0, 1] status is Ut,i. the enhancement of ELD problem is represented by equation (9): Subject to the equality and inequality contraints are given by equations (10) and (11) respectively. ∑ Pi P P ( 1 0 ) P . P P .

OVERVIEW OF EAGLE STRATEGY AND CROW SEARCH ALGORITHM 4.1. Egale strategy
Eagle strategy is a two-stage optimization strategy was presented by [21]. This algorithm mimics behavior of eagles in nature. In fact, eagles use two different components to search for their prey. The first one is a random search performed by flying freely and the second one is an intensive search to catch prey when they see them. In this two-stage strategy, the first stage explores the search space globally by using a Levy flight: if it finds a promising solution, then an intensive local search is employed using more efficient local optimizer, such as hill-climbing and the down-hill simplex method. Then, the two-stage process commences another time with new global exploration, followed by local search in a new area. One of the remarkable advantages of such a combination is to use a parallel balance between global search (which is generally slow) and a rapid local search. There is another advantage that is called a methodology or strategy, not an algorithm. In fact, there are different algorithms that can be used at different times and stages during iterations. The main steps of the ES are outlined in Algorithm 1.

Algorithm 1 Eagle strategy 1 :
Objective function f(x) 2 : Initialization and random initial guess x t=o 3 : While (stop criterion ) do 4 : Global exploration by randomization (e;g ;levy flights ) 5 : Evaluate the objectives and find a promising solution 6 : Intensive local search via an efficient local optimizer 7 : If ( a better solution is found ) then 8 : Update the current best 9 : End if 10 : Update t=t+1 11 : End while

Crow search algorithm
The crow search algorithm (CSA) is a new population-based stochastic search algorithm recently proposed by [22]. The CSA is a newly developed optimization technique to solve complex engineering optimization problems [23][24]. It is inspired by the intelligent behavior of crows.The principles ofCSA are listed as follows [22]: d. Crows protect their caches from being pilfered through probability.
Following the above assumptions, the core mechanism of the CSA consists of three basic phases, namely initialization; generate a new position, and updating the memory of crows. At first, the initial population of crows represented by n dimension is randomly generated. At iteration t, the position of crow is specified by x , x , , x , , … . . , x , and it is assumed that this crow has memorized its best experience thus far in its memory m , m , , m , , … . . , m , To generate a new position, crow i select randomly a crow j, for example, from the population and attempts to follow it to find the position of its hiding place (mj ). In this case, according to a parameter named awareness probability (AP), two states may happen: State 1: Crow j does not know that crow i is following it. As a result, the crow i will determine the hiding place of crow j.
State 2: Crow j knows that crow j is following it. As a result, to protect its cache from being pilfered, the crow j will fool crow i by going to another position whitin the search space.
According to States 1 and 2, the position of the crows is updated as follows: x , x , r fl , m , x , , IF r AP , A random positonofsearch space, otherwise ( 1 2 ) Where rj is a uniformly distributed fuzzy number from [0; 1] and AP , denotes the awareness probability of crow j at iteration iter. Finally, the crows update their memory as follows: is better than f m , m , , otherwise ( 1 3 ) Where f(-) denotes the objective function value. It is seen that if the fitness function value of the new position of a crow is better than the fitness function value of the memorized position, the crow updates its memory by the new position. The above process is repeated until a given termination criterion (itermax) is met. Finally, the best solution of the memories is returned as the optimal solution found by the CSA. The main steps of the CSA are outlined in Algorithm 2: Algorithm 2 Crow Search Algorithm 1 : Randomly initialize the position of a flock of (NP ) crows in the search space.

:
Evaluate the position of the Crows 3 : Initialize the memory of each Crow 4 : While (iter itermax) do 5 : for i= 1: to NP do 6 : Randomly choose one of the crows to follow (for example, j) 7 : Define an awareness probability 8 : if (rj AP j,iter ) then 9 :

CASE STUDY
In this section, we will use our three methods to solve the problem of Economic Dispatch and Unit Commitment Problem in Smart Grid System of the Moroccan Network. This network consists of 112 knots with 7 units of production, 120 lines and 15 transformers [18].

RESULTS AND DISCUSSION
In this section, we present the results obtained based on ES-CSA for solving the economic dispatch problem and unit commitment problem and compare this result with the CSA [25] and ES [26]. A 7 unit's power unit system to explore our idea on using ES-CSA to find the optimal set of power generation of the system. ES-CSA will be used in this paper to solve the problem of economic dispatch and unit commitment. The programs are developed in MATLAB 7.9 environment.
This network supplies a total load of 4902 MW MW. The loss ratios are calculated directly using the calculation result of power flow. The tuning parameters for ESCSA are given in Table 2; the Table 3 shows the parameters of the cost function and the 7 generator, under study, while the matrix is the loss coefficient matrix of the 7 units power system. the generating unit data of the test system are given in Table 4 , From the results of Table 5, we notice that ES-CSA give us the same production cost, and CSA gives a slightly lower cost of $ 0.7 / h, ES-CSA gives us a good production cost and good accuracy,In the meantime, we examine the variation in the total fuel cost of test system with evolutionary generation numbers. For different test systems, the convergence processes of the best solution in the 30 trials are listed in Fig. 4. From Fig 4, it is easy to see the ES-CSA has satisfactory Con-vergence and the algorithm escaped from the local optima at the later iterations. It proved that the stochastic searching mechanism of ES-CSA, which is conducted by gravitational forces among agents, is efficient. And the proposed mutation strategies improved the performance of ES-CSA.In Figure 4, we show the convergence of the metaheuristic search process based on ES-CSA in both the best and average cases. To see the difference between our new approach and another known method, we will compare the production cost found by ES-CSA to that found by ES [27].In this case, we will test the operation of ES-CSA. For this, we will use a simple network of 112 nodes with 7 production units. The total demand of the network is equal to 4902 MW and loss coefficients are as follows: The simulation results are presented in Table 5.

CONCLUSION
In this paper, we proposed an eagle strategy based crow search algorithm (ES-CSA) to solve unit commitment problem and economic dispatch problem in smart grid system of the Moroccan electricity network, and for this we have proposed a binary hybrid metaheuristic based on two recent nature insperied methods namely Eagle strategy and Crow Serach Algorithm. The hybrid appraoch were developed using MATLAB and tested a network of 112nodes.The results have shown that our new method combines the advantages of CSA and ES to give us a better performance with optimal results in all cases, and respecting the constraints imposed.