Multi-Agent Based Optimal Operation of Hybrid Energy Sources Coupled with Demand Response Programs

: Electricity is an indispensable commodity on which both urban and rural regions heavily rely. Rural areas where the main grid cannot reach make use of distributed energy resources (DER), especially renewable energy sources (RES), in an islanded microgrid. Therefore, it is necessary to make sure there is a sufﬁcient power supply to balance the demand and supply curve and meet people’s demands. The work done in this paper aims to minimize the daily operating cost of the hybrid microgrid while incorporating a demand response strategy built on an incentive-based demand response (IBDR) model. Three case studies were constructed and analyzed to derive the best, most reduced daily operational cost. This was achieved using the CPLEX solver embedded in algebraic modeling language in the Advanced Interactive Multidimensional Modeling Systems (AIMMS) software with multi-agent system (MAS); the MAS was used to make sure that the developed intelligent-based agents work independently to achieve an optimal microgrid system. The sensitivity analysis employed established that case study 2 gave the most reduced daily operation cost (USD 119), which represents an 8% reduction in the daily operational cost from case study 1 and a 9% reduction from case study 3. Then, we achieved 17% and 25% reductions, as compared to speciﬁc other approaches.


Introduction
The social and economic aspects of human life heavily depend on electricity. Additionally, without electricity, it is practically impossible to carry out daily activities, especially with the impact of the COVID-19 pandemic on commercial centers and cities. Therefore, there is a need to strengthen and broaden electricity generation beyond what is currently obtainable to meet the demands of people [1]. Meanwhile, the conventional means of generating electricity pose risks to human health and call for an alternative, named a renewable energy resource. Furthermore, deploying RES comes with some advantages, such as a low contribution to the greenhouse effect, as mentioned earlier, reductions in power loss during transmission, grid security, and reserve generation capacity [2].
Renewable energy sources are vast and are not limited, which means they are continually available in abundance in nature. Examples include wind energy generators, solar voltaic energy generators, hydro and geothermal energy generators, etc. Some renewable energy resources are generated directly (from the sun) or indirectly (hydropower), and other natural sources are derived from the environment (geothermal) [3].
Demand response (DR) is gaining significant attention from both researchers and utility companies. DR can be defined as cutting electricity usage from the customer's side in return for an incentive. It accomplishes reductions in electricity consumption, thereby saving energy. Industrial electricity actors seek an alternative way to reduce costs while improving their overall operational efficiency; likewise, the residential sector is trying to reduce energy consumptions, especially at peak periods. Therefore, DR serves According to [1], MAS are intelligent entities capable of communicating with each other to form a bigger intelligent unit. They are autonomous and sensitive to their environment; they use their intelligence to predict and determine future actions to improve the microgrid's overall performance. They can either collaborate or work independently, depending on the nature of the task that needs to be accomplished by the agents.
A number of studies have investigated the behaviors of microgrids with RES penetration using a multi-agent method. Reference [2] developed a multi-agent approach to developing the energy management system of a microgrid. This was accomplished via According to [1], MAS are intelligent entities capable of communicating with each other to form a bigger intelligent unit. They are autonomous and sensitive to their environment; they use their intelligence to predict and determine future actions to improve the microgrid's overall performance. They can either collaborate or work independently, depending on the nature of the task that needs to be accomplished by the agents.
A number of studies have investigated the behaviors of microgrids with RES penetration using a multi-agent method. Reference [2] developed a multi-agent approach to developing the energy management system of a microgrid. This was accomplished via building three-tiered centralized and decentralized energy management system controls. It was achieved through a client-to-server structure and implemented using C++ programming language. To show the effectiveness of the developed model, the simulation results show that a multi-agent-based approach is an efficient technique to manage and control energy management and derive optimized output from a microgrid.
Ref. [3] implemented both centralized and decentralized demand response with multiagent intelligence in their hybrid power system. Their work focused on minimizing the cost of mismatch and user satisfaction in the system. The multi-agent system was designed to control and manage the power sources in the microgrid. Their simulation outcome shows that the incorporation of demand response into user satisfaction lowered the cost, as expected with the centralized implementation.
The work done in [4] was based on improving the operational efficiency of a microgrid in China. They developed and applied three layers of multi-agent system, including hybrid power sources such as the energy storage system, heat power-load, and demand response, in their microgrid, using China's case study. To further their work, three simulation cases were developed and solved with the MAS. The result prove that MAS can achieve the collaborative optimization of the energy sources in a microgrid.
The authors of [5] also worked on the energy management system of distributed energy sources in a microgrid. The microgrid here comprises renewable and non-renewable resources with seasonal load demands and a grid. A decentralized multi-agent system was developed to provide control over the complex energy management system. According to them, non-cooperative game theory was deployed for the multi-agent system's coordination. The distributed energy resources were simulated to find a lasting solution to fluctuations associated with the renewable energy source. The simulation results show that the proposed MAS enables higher-performance control and management than the normal centralized energy management system used in microgrids.
Reference [6] developed a MAS optimization context, integrating a real-time residential demand response program, which was further integrated into the power system marketplace. The agents considered can examine their environment, predict the load profile, and forecast the electricity price. To show the effectiveness of the proposed, some case studies were carried out, with the encouraging results of low variation in the aggregated load profile and decreases in energy price.
The authors of [7] conducted a similar study to that reported herein, but with a different approach. The objective of their work was to minimize the daily operating cost of a multi-energy system. This was done by deploying a price-based demand response program using market price elasticity as the basis, and the optimization process was constructed using MATLAB software. Consequently, the results from the research show that deploying a price-based DR within energy storage facilities is more effective in terms of cost reduction for the power purchased from the grid and the total operating cost of the system. Their results also established that the price-based elasticity derived is helpful to educating users on how to curtail their electricity usage or shift loads.
The study in [8] designed a multi-agent system with renewable energy resources; consisting of wind, PV, and a battery with sensitive and non-sensitive loads. The MAS system was modeled to correspond to each of the power sources and the load. For example, they had what is referred to as a PV-agent, a wind-agent, and a load-agent in the microgrid, in order to achieve optimal functionality in the system. The developed system was designed using Matlab Simulink, and executed on the JADE platform with macsimJX software. After testing the applicability of the proposed method, the outcome of the case studies shows that it is is suitable to be used in the implementation and control of energy management in the microgrid. The authors in [9] proposed a new business model framework for the energy retailer market in a community hybrid microgrid system. A complex optimization model was formulated and solved using a linear programming optimization solver. The microgrid comprises a diesel generator, a battery energy storage system, a utility grid and a photovoltaic system. The results show that the proposed model minimizes the daily operating cost of the microgrid significantly, but the amount of reduction was not mentioned, and demand response was not deployed in their work.
Other authors [10] proposed a new energy management system to minimize the daily operational cost of a hybrid microgrid system. The energy management system was designed to include upper and lower layers. At the upper end, a convex optimization technique was used to solve the optimization problem, while at the lower end a rolling horizon predictive controller was used to achieve their goal. Outcomes from the experimental lab-based microgrid confirm the ability of the proposed energy management system.
Additionally, the researchers in [11] focused on reducing the energy cost of a hybrid energy source microgrid; their sources included grid power, PV, and the battery energy system. Particle swarm optimization (PSO) in MATLAB was used to solve the optimization model. The results established that deploying RES, and especially a battery storage system, in a microgrid can significantly reduce the daily operating cost of such a microgrid.
Reference [12] employed some hybrid DR strategies in their proposed price-based (PBDR) and time of use (TOU) models using a day-ahead scheduling approach. The outcome shows that there was a significant reduction in the operating cost, as well as an increase in the social welfare, at 12% and 25%, respectively. The demand response (DR) program has always been among the best ways of enabling consumers to change their electricity usage pattern. Price-based and incentive strategies are the two main approaches involved, but the latter seems to be the most widely used, according to [13], because the price-based approach is more tailored to the pricing principle, while the incentive-based approach gives back to the people for changing their electricity usage pattern, especially at peak periods. Hence, many customers ordinarily prefer to engage in this type of program as compared to other DR strategies.
Comparing our approach with other approaches in the literature, and also according to [14], it is clear that incentive-based demand response (IBDRP) is more efficient when compared to other approaches, such as the price-based program. Additionally, from the reduction results, it is clear that our approach enabled a greater reduction in the operating cost.

Methodology
The methodology employed in this configuration makes use of five power sources. These comprise a photovoltaic (PV) system, a wind energy conversion (WEC) system, diesel generators, a battery pool and the conventional grid. The PV and diesel generator are used to charge the battery pool. The battery pool comprises multiple battery arrays, with each array having multiple batteries. Electrical power, derived from the PV, the diesel generators, the battery pool, and the grid system, are accessed via a selector entity.

The Designed Entities
The integration of an intelligent multi-agent system (MAS) to achieve a robust and adaptive power system requires the incorporation of the following adept entities:

1.
Source control entity (SCE): The SCE is a selector entity that controls which power sources supply the load to the end-user, considering the mode in which the system is operating at a particular point in time, i.e., if the system is working in the online mode or the offline mode. The SCE can also detect the mode (online mode or the offline mode) and switch automatically to meet the required load; 2.
Diesel generator entity (DGE): A DGE is another entity that provides power for charging the battery pool. It is driven via the supply of fossil fuel, i.e., diesel, to a power plant. The DGE monitors the functionality of the diesel generator in an epoch. It also determines the mean power output from the diesel generator; 3.
Solar irradiation monitoring entity (SIME): An SIME is an intelligent solar monitoring entity that monitors power output from the solar system. The SIME also computes parameters, such as the solar panel's expected electrical power output, and gives an indicator that displays the condition (good/bad) of the solar system. The functionalities of deciding the power output from the solar system and monitoring the solar system's health are achieved through an onboard computer sensor embedded in the SIME; 4.
Charge source selector entity (CSSE): A CSSE entity plays the charge selector role in the battery pool. The entity determines how much excess power is derived from either the diesel generator, the solar array, or a combination of both to charge the battery pool. The implied power selection functionality is executed by the charge source selector entity (CSSE). The proposed CSSE receives inputs from the SIME and the DGE. The CSSE executes its functionality if the power sources, i.e., the diesel generator and solar power system, are fully functional and are available. Given that the CSSE does not receive any input from the DGE., it uses electrical energy from the solar power system to charge the battery pool (stored energy is accessed in a later epoch). If the battery pool is fully charged, it becomes imperative to protect it from overcharging. This challenge is addressed by deactivating the battery pool charging process, which is also accomplished by the CSSE; 5.
The Battery power analysis entity: The battery power analysis entity is another important entity in the proposed hybrid electrical energy system. Its purpose is to identify the deteriorating batteries in each battery array. In executing this functionality, the battery power analysis entity connects with the battery power health monitoring entity. The battery power analysis entity uses data stored in the database aboard the battery health monitoring entity, i.e., DOD, BC, and the CTF. However, it uses the computed data on the battery's Ah-throughput and battery wear cost for its analysis. Figure 2 shows the relationship between the solar power system, the diesel generator, the SIME, the SCE, the DGE, the CSSE, the conventional grid, the battery pool (incorporating battery state data acquisition (BSDA)) and the end-user load. CTF. However, it uses the computed data on the battery's Ah-throughput and battery wear cost for its analysis. Figure 2 shows the relationship between the solar power system, the diesel generator, the SIME, the SCE, the DGE, the CSSE, the conventional grid, the battery pool (incorporating battery state data acquisition (BSDA)) and the end-user load. (1) The power online mode: In this mode, energy sources from either the solar power system, the diesel generator or the conventional grid are used to provide the electricity required by the end-user via the SCE. The combination of energy sources in the power online mode is also feasible. This becomes necessary when a single electrical power source cannot meet the end-user's load demand. In the power online mode, the amount of power drawn from the available and functional electrical power sources is determined by the load. Excess electrical power is used to charge the battery pool. The excess electrical power used to charge the battery pool arises from the diesel generator and the solar power system. If the battery pool is fully Figure 2. Relationship amongst the hybrid power system.
The system configuration described herein functions in two modes. These are the power online mode and the power offline mode.
(1) The power online mode: In this mode, energy sources from either the solar power system, the diesel generator or the conventional grid are used to provide the electricity required by the end-user via the SCE. The combination of energy sources in the power online mode is also feasible. This becomes necessary when a single electrical power source cannot meet the end-user's load demand. In the power online mode, the amount of power drawn from the available and functional electrical power sources is determined by the load. Excess electrical power is used to charge the battery pool. The excess electrical power used to charge the battery pool arises from the diesel generator and the solar power system. If the battery pool is fully charged, it becomes important that it is protected from overcharging. The CSSE addresses this issue. (2) The power offline mode: This mode becomes operational when using the solar power system and the diesel generators for providing electricity to end-users has become infeasible. This may be because of the non-availability of solar radiation (at night), a faulty diesel generator system, or because the diesel generator system is undergoing scheduled maintenance. In this situation, the electrical power stored aboard the battery pool and the grid system provides power to the end-user via the SCE. The power offline mode is also triggered when the electricity stored aboard the battery is used to provide power to the end-user via the SCE.

The Mathematical Formulations
The aim in this paper is to decrease the microgrid's daily operational cost as much as possible, so as to achieve the safe, secure and economical operation of the system. As such, our approach exploits any minimization of daily operation cost.

Objective Function
As stated before, our objective is to minimize the total daily operational costs of the hybrid energy sources detailed below [15].
where the cost of purchasing power from the utility grid is given below [16].
The cost of purchasing the fuel consumed by the diesel generator is given below, and is presumed to be quadratic [17].
gives the maintenance cost of PV and WEC system [18].
Additionally, the total daily cost of the battery energy system is as follows [4]: Finally, we must address the cost of demand response; the type of demand response deployed in this chapter is still based on the incentive-based model for residential users. It has been proven in the literature that incentive-based DR is the most suitable for residential users [19]. The strategy employed in this project is that whenever the demand is at its peak, some load is being interrupted, and thereby the user is getting paid according to the contract signed for assisting in cutting such loads.
where cost gd t is the cost of buying electricity from the grid at time (t), cost DG t stands for the cost of the electricity used in the diesel generator at time (t), cost OM stands for the maintenance cost of PV and wind, cost TCD is the total daily cost of the battery energy system, and lastly cost DR is the amount the customers get paid based on the contract signed for cutting loads. a and b are the generator fuel coefficient, p DG t is the output from the diesel generator, WD MA and PV MA are wind and PV maintenance costs, p wd t and p pv t are wind and PV output at time t. Cbss max is the maximum battery capacity, whilst LT and IR are the lifetime and interest rate of the installed battery, respectively. FC bss and MC bss are the fixed cost and maintenance cost of the battery energy system, respectively. A 1 , A 2 , A 3 are the coefficients of power interruption, and PDR is the total interruptible power. Some operational constraints are bound the optimization model's objective function. These include the equality and inequality constraints that the system must meet before delivering the optimum output. The model's equality constraints are shown below in Equations (7)-(9), and the inequality constraints are shown in Equations (10)- (16).
pbss min ≤ pbss t ≤ pbss max (14) pgrid min ≤ p gd t ≤ pgrid max (15) PDR min ≤ PDR t ≤ PDR max (16) where p DG t = hourly output from the diesel generator at time t p gd t = hourly output from the grid at time t p wd t = hourly output from the wind-powered generating unit at time t p pv t = hourly output from the PV at time t p BSS t = hourly output from the battery energy system at time t p load t = hourly electrical load at time t E BSS t = power stored in battery energy systems at time t ∩c and ∩ d = charge and discharge efficiency of battery pv min and pv max = minimum and maximum output from PV wd min and wd max = minimum and maximum output from wind RU DG and RD DG = up and down ramp rate for diesel generator pbss min and pbss max = minimum and maximum output from the battery storage system pgrid min and pgrid max = minimum and maximum output from the grid PDR min and PDR max = minimum and maximum producible power from demand response PDR t = the amount of interrupted electricity at time t A brief description of the optimization model constraints is now presented. The equality constraint in Equation (7) satisfies the power balance of the system, which is the energy balance between the demand and supply. Additionally, the limitations of Equations (8) and (9) deal with the charging and discharging of the battery energy system.
Constraints (10) and (11) are the PV and wind energy output, respectively, which must be within the limit of the predicted values.
Constraints (12) and (13) are the up and down ramp rate for the diesel generator, respectively.
Constraint (14) is the energy storage constraint. Constraint (15) is the grid-related constraint, which must be within the limit of the predicted values.
Constraint (16) is demand response-related; that is, the interrupted power must be within the limit of the producible power.

Numerical Simulation
MAS was deployed to make sure all the renewable energy used in the microgrid functions properly. The MAS intelligent entities (as stated in Section 2) were designed using MATLAB. To validate the proposed objective functions, a case study of one PV, one wind turbine, a diesel generator, and 10 willing customers was used. The minimization optimization was achieved using the CPLEX solver embedded in algebraic modeling language [17,20]. The program's status was optimal, and the solver achieved normal completion. The simulation was carried out on an Intel Pentium computer running Windows 10 with a central processing unit of 2.2 GHZ, 8 GB of RAM, and a 64-bit operating system with a solving time of 0.01 second. The numerical data used for the case studies was obtained from Harare's site in Zimbabwe [21], and are accordingly presented in Table A1 in Appendix A. Three case studies were validated with the modeling approach to assess the impact of the renewable energy sources and the battery storage system on the microgrid power system, as stated earlier in the MAS section. The amount of load curtailed, the cost of curtailed load, the amount of energy from the grid, the cost of power from the grid and the price of the diesel generator are all variables that will be evaluated when considering the three case studies. This further proves that the energy storage system and demand response balance the demand and generation curve, promote renewable energy source consumption, and reduce the operation cost of the microgrid.

1.
Case study 1: This case study considered the load achieved by the PV, the WD, the DG, and the utility grid. The battery energy storage system was not involved in dispatching the power, and no DR contract was signed with the residential users.

2.
Case study 2: In this case study, the addition of a battery energy storage system was considered in dispatching the power, so the sources were PV, WD, DG, utility grid, and battery energy storage system.

3.
Case study 3: Lastly, case study 3 utilized the PV, the WD, the DG, the utility grid, and the battery storage energy system with DR participation.

Results
In case study 1, the total load demand was met by the PV, WD, DG, and utility grid. The battery energy storage system was not considered while dispatching power to the end-users, and no DR contracts were signed beforehand with the microgrid operators. The simulation outcomes show the minimum daily cost for this microgrid to be USD 129. The numerical data and parameters used for the simulation are presented in Tables A1 and A2, while the optimal scheduling results of the case studies are presented in Tables A3-A5. Figure A1 presents the Math program's solution to the model, showing details of the program status as "optimal and up-to-date". Figure A2 shows the statistics for the variables in the model, Figure A3 depicts the constraint statistics, Figure A4 shows the matrix statistics of the model, and lastly Figure A5 shows the matrix view of the model. Figure 3 depicts the combined power sources' output for case study 1. From the analysis, the optimal dispatch of both the grid and the DG, as depicted in Figure 3, illustrate that the DG indeed executed its role as a proper back-up whenever the grid could no longer dispatch effectively, i.e., between 20:00 and 24:00, the DG took over optimal dispatching. Figure 4 illustrates the combined power output from the power sources for case study 2. From the analysis, the optimal dispatch of both the grid and the DG, as depicted in Figure 3, illustrate that the DG indeed executed its role as a proper back-up whenever the grid could no longer dispatch effectively, i.e., between 20:00 and 24:00, the DG took over optimal dispatching. Figure 4 illustrates the combined power output from the power sources for case grid could no longer dispatch effectively, i.e., between 20:00 and 24:00, the DG t optimal dispatching. Figure 4 illustrates the combined power output from the power sources study 2. In case study 2, the high optimal power dispatched from the battery storag greatly helped in keeping the other power sources low, as seen in Figure 4. Add it can be observed that wind power was the second largest source, following th energy system; this is as a result of the high wind and humidity on the site. Th followed by the PV. It can be observed that between the hours of 08:00 and 17:00 was able to dispatch due to the availability of sun at those periods. Finally, the dispatched during periods when both the battery energy system and the PV w able to dispatch (01:00-07:00). Figure 5 depicts the combined power output, while Figure 6. shows the co grid and the cost of DG in case study 3, respectively.
The inclusion of the battery also reduced the output from the grid and th well as their costs, as seen in Figure 7.
In Figure 5, a flat curve can be observed from 12:00 to 24:00 due to the avail the dispatch from the battery storage system. In case study 2, the high optimal power dispatched from the battery storage system greatly helped in keeping the other power sources low, as seen in Figure 4. Additionally, it can be observed that wind power was the second largest source, following the battery energy system; this is as a result of the high wind and humidity on the site. These were followed by the PV. It can be observed that between the hours of 08:00 and 17:00, the PV was able to dispatch due to the availability of sun at those periods. Finally, the grid was dispatched during periods when both the battery energy system and the PV were not able to dispatch (01:00-07:00). Figure 5 depicts the combined power output, while Figure 6. shows the cost of the grid and the cost of DG in case study 3, respectively.   Figure 6 depicts the curtailed power in different epochs, with their corresponding DR prices, as studied in case study 3. Therefore, the grid and DG cost were also reduced considerably, particularly during the hours when consumers saved power, as also seen in Figure below. In Figure 5, a flat curve can be observed from 12:00 to 24:00 due to the availability of the dispatch from the battery storage system. Figure 6 depicts the curtailed power in different epochs, with their corresponding DR prices, as studied in case study 3. Therefore, the grid and DG cost were also reduced considerably, particularly during the hours when consumers saved power, as also seen in Figure below.
The inclusion of the battery also reduced the output from the grid and the DG, as well as their costs, as seen in Figure 7. Figure 6 depicts the curtailed power in different epochs, with their corresponding DR prices, as studied in case study 3. Therefore, the grid and DG cost were also reduced considerably, particularly during the hours when consumers saved power, as also seen in Figure below.

Discussions
From the various sensitivity analyses performed in case study 1, Figure 3. reveals the degree to which the various power sources were dispatched. It is noted that PV dispatched more than all other power sources from 8:00 17:00 due to the high volume of sun available during that period of the day. At later hours, between 17:00 and 24:00 hour, the DG and grid dispatched to meet the demand.
Furthermore, in case study 2, the battery's presence greatly influenced the optimal power dispatch. Figure 4 shows that battery storage was able to dispatch power very well between the hours of 9:00 and 17:00. The PV is responsible for charging the battery. Additionally, the PV was responsible for charging the battery and making it possible for the battery to dispatch during the daytime, when the sun was available to charge it. Additionally, all other sources were kept low when the battery was dispatching, which greatly reduced their cost. The battery could also dispatch as a back-up source between the hours of 20:00 and 24:00.
Deploying DR within the microgrid, as in case study 3, gives room for residential consumers to participate in the DR program. In this case study, the microgrid's daily cost was USD 109, which is a 9% reduction from case study 2.
As regards the MAS aspect of the modeling, the BHME and BPAE function together in the microgrid to make sure the battery is in a good state. The BHME, for example, monitors the battery to see if the battery is deteriorating or not. Thus, with the intelligent entities in place, it could be observed from the results that the battery was able to func-

Discussions
From the various sensitivity analyses performed in case study 1, Figure 3. reveals the degree to which the various power sources were dispatched. It is noted that PV dispatched more than all other power sources from 8:00 17:00 due to the high volume of sun available during that period of the day. At later hours, between 17:00 and 24:00 hour, the DG and grid dispatched to meet the demand.
Furthermore, in case study 2, the battery's presence greatly influenced the optimal power dispatch. Figure 4 shows that battery storage was able to dispatch power very well between the hours of 9:00 and 17:00. The PV is responsible for charging the battery. Additionally, the PV was responsible for charging the battery and making it possible for the battery to dispatch during the daytime, when the sun was available to charge it. Additionally, all other sources were kept low when the battery was dispatching, which greatly reduced their cost. The battery could also dispatch as a back-up source between the hours of 20:00 and 24:00.
Deploying DR within the microgrid, as in case study 3, gives room for residential consumers to participate in the DR program. In this case study, the microgrid's daily cost was USD 109, which is a 9% reduction from case study 2.
As regards the MAS aspect of the modeling, the BHME and BPAE function together in the microgrid to make sure the battery is in a good state. The BHME, for example, monitors the battery to see if the battery is deteriorating or not. Thus, with the intelligent entities in place, it could be observed from the results that the battery was able to function well, and was also a good source of back-up. Another outstanding entity was the CSSE, which protects the battery from over-charging by removing the charging point as soon as the battery is fully charged. Additionally, the SCE was deployed to specifically detect which of the power sources is suitable to meet the load at a particular point in time. While the SIME takes control of monitoring the solar PV, the entity monitors the power output from the solar system and detects if there is any problem with the PV. However, all of these were put in place for the proper monitoring and running of the microgrid. Hence, each of the power sources was able to dispatch optimally, as expected.

Conclusions and Further Works
This research exploited both MAS and AIMMS software in a hybrid microgrid energy management system. The objective was to minimize the daily operating cost of the hybrid microgrid with an IBDR program. A MAS was exploited to make sure that all the power sources functioned properly; thus, using smart agents allows the microgrid to perform optimally. The battery storage system has helped alleviate the power supply pressure of other microgrid power sources. For instance, adding a battery to the microgrid relieved some of the pressure on the DG, and provided a more reliable power supply. However, the battery storage system is connected with the electricity price. Whenever the electricity price is low, the microgrid will buy electricity from the utility grid to charge the battery, or the PV when the sun is not available. Additionally, when the electricity price is high, the battery's energy will release power to the microgrid. Hence, the microgrid's daily cost stands at USD 119, an 8% reduction from case study 1. This shows that the battery's presence reduced the microgrid's daily operational cost, even when compared with the battery's price.
Consequently, from the analysis performed in the research, it can be established that the presence of a battery in case study 2 reduced the power outputs of other power sources and reduced the daily operation cost. We finally reached USD 119, which is an 8% reduction in the operational cost from case study 1 (USD 129). Lastly, in case study 3, the DR contract signed by the residential users to cut power at peak periods reduced the microgrid's operational cost to USD 109. This is a 9% reduction from case study 2. All of these results were successfully achieved with the help of the various intelligent entities deployed in the MAS.
In the future, we will use a price-based DR program and increase the number of customers participating in the program.