# Multithreaded Multiswarm Model for Intelligent Economic Prosumer Load Dispatch for Battery Supported DC Microgrid

Authors: C. R. Sarin; Geetha Mani; Albert Alexander Stonier; M. Arivarasu; Ravi Samikannu; Srinivasan Murugesan
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

Economic load dispatch should be given special care even when the primary responsibility of any demand response model is to provide a consistent supply to the load. Demand can be satisfied by the utility grid as well as self-sustaining user sources. If a user generates excess power after meeting demand, the user can pool it and transfer it to the grid or neighboring consumers. This is referred to as the prosumer model, in which the user serves as both a producer and a consumer. Furthermore, some of the surplus power may be stored in energy storage devices. A sophisticated mathematical model is required to estimate how much power should be generated, pooled, pulled from the grid, gathered from close users, supplied to nearby customers, and so on. This paper tries to present a smart economic load dispatch model for a demand response system that combines a multithreaded swarm model with a reward-based reinforcement system to assure optimal source selection and power flow management. To identify the optimum cost-effective power sharing model among a user, the grid, and neighboring users, the system uses particle swarm optimization (PSO) and artificial bee colony (ABC) optimization. Both models have benefits and drawbacks, and not all models work well with all data input. Using two models at the same time consumes a significant amount of time and computational power. As a consequence, for each data input, an upper bound confidante (UBC) model is used in parallel to select the best economical swarm model based on a semisupervised reinforcement model. A weighted Boruvka’s algorithm based on transmission line cost and transmission loss is being used to construct an optimum economic power sharing model, which is backed by swarm models. The efficiency of each model is evaluated using the same data for both models, and error analysis is performed. It was discovered that each model performs differently for various data, and creating a reinforced multithreaded model helps to increase accuracy, reduce computing time, and improve efficiency.


---

## Body

## 1. Introduction

### 1.1. Background

In addition to delivering a consistent and high-quality supply, every power system model must be prepared to satisfy demand while expending the least amount of operational and capital resources. The task described above is termed as economical load dispatch [1]. Economic load dispatch is an inventory management technology in which the system chooses discrete combination energy sources from all accessible sources to achieve the lowest possible costs [2]. These challenges must be investigated in grid-connected microgrid models that comprise a diverse set of distributed energy sources (DESs) [3]. Depending on their socio-techno-economic restrictions, any residential, industrial, or commercial operator could utilize different energy sources [4]. Each source will have its own set of operating costs, capital expenditures, start-up delay, integration complexity, power-generating capacity, efficiency, pollution scale, operational lifetime, consumption time, dependability, and stability, to name a few [5]. Some characteristics improve responsiveness, while others reduce system quality, performance, and economy. All these factors should be addressed by an intelligent demand response system without sacrificing steady supply to demand [6, 7]. In traditional systems, electricity flows unidirectional from a main source to the load. However, if the system supports DES, even though the user is generally a load point, it may occasionally function as a source point. When a user’s power output exceeds demand, the energy can be pooled and sold to the grid. As a result, a diverse set of sources and loads will be dispersed over the microgrid, with heterogeneous multidirectional power flow between them [8, 9]. In order to make a combinatorial optimal decision among all of these attributes, a sophisticated mathematical model is necessary [10]. The DRS aims to identify the optimal solution by evaluating the fitness of these attributes by emphasizing positive features while minimizing negative traits within a reasonable range of alternatives.


### 1.2. Literature Review

Wen et al. examined the state of DES research in three areas: applications, assessments, and regional support measures [11]. They also analyzed the current status of DES approaches focusing on a number of variables such as energy, environment, society, and economy. The prior study offers information on the factors that impact DES. Tolmasquim et al. investigated electrical distributor techniques in the context of distributed energy resources, including SWOT assessments for internal and external electricity distributors in the DES distribution scenario [12]. This research examines the advantages and disadvantages of DES in detail. Wolsink focused on the sociopolitical layer for societal acceptance of DES, which combines high DES dispersion in intelligent microgrids to produce polycentricity rather than hierarchy [13]. This research contributes to the qualitative modeling of DRS based on the influence of consumer interactions on power systems. After determining the qualitative and quantitative properties of distributed energy sources, demand response models based on these inputs are established. McIlwaine et al. examined global electrical market trends, which include a majority of DES, as well as a global evaluation of energy storage, with a focus on power quality services at the distribution level [14]. Ehsan and Yang discussed active distribution network planning as well as distribution network planning in general [15]. Iqbal et al. used a nonlinear programming technique to model a DC microgrid system with peer-to-peer sharing, which allows users to share surplus energy from distributed energy resources with minimal system losses, including distribution and conversion losses, in comparison to the traditional factory-warehouse transportation method [16]. Zeng et al. presented a state-of-charge (SoC) dynamic balancing control approach for DES in DC microgrids that takes into account energy storage capacity disparity to achieve SoC balancing [17]. The aforementioned publications provide information on demand response strategies. The next step is to figure out how to put this concept into action.Ramadhani et al. reviewed the most up-to-date load flow methodologies for DES in great detail, including recommendations for the best modeling methodology for distribution networks with PV generating and EV charging [18]. Ullah et al. investigated the advantages and disadvantages of various integration approaches centered on interconnection challenges and opportunities for DC microgrids [19]. Holari et al. constructed a hybrid AC/DC microgrid system with variable demand and unknown characteristics in order to provide a coordinated performance strategy for power electronic converters in grid-connected and islanding operational scenarios for hybrid microgrid power management [20]. Liaquat et al. examines into a multitude of dispatch challenges as well as the nature of the objective functions in consideration. The study also includes recommendations on demand management problems as well as the underlying constraints associated with each optimization function [21]. Luna et al. showcased an energy management system for coordinating distributed household prosumer activities [22]. Zia et al. proposed a case study for a standalone marine microgrid system as well as a paradigm for smart demand management [23]. Ali et al. offered “The Day Ahead Shifting” approach for cost and peak load optimization on the demand side [24]. Iqbal et al. outlines an effective home energy management system for residential clients in research, which allows them to properly organize demand-responsive appliances in the context of local solar and energy storage systems [25]. Bhamidi and Sivasubramani presented the framework for a two-stage optimization model for smart home renewable energy resources and battery integration, as well as the association of prosumer-based energy management [26].The two preceding articles provide technical information for developing a load flow analysis within a DC microgrid. The next phase is to provide a framework for power management optimization. Mbuwir et al. optimized the power exchange between a microgrid and utility grid using the Jacobi-alternating direction multiplier approach, which assists in congestion management by breaking down the optimization problem into subproblems that are addressed locally and in parallel using fitted Q iteration [27]. Gunantara conducted a thorough examination of multiobjective optimization methods and applications [28]. Molzahn et al. focused research on distributed algorithms and their applications in optimized power system control [29]. Fan et al. provided a thorough and realistic assessment of recent developments in bioinspired algorithms, bioinspired swarm intelligence algorithms, bioinspired ecological algorithms, and multiobjective bioinspired algorithms [30]. The above three publications provide guidance for the application of bioinspired swarm intelligence in power system challenges. Chaudhari utilized ant colony optimization (ACO), particle swarm optimization (PSO), artificial bee colony (ABC), firefly algorithm (FA), and genetic algorithm (GA) to solve the travelling salesman problem, and provided an overview of the performance of the various algorithms using some standard benchmarks [31]. Shareef and Srinivasa Rao shown the combination of two swarming algorithms, ABC and FA, to improve the performance, and this hybrid algorithm is to regulate variables that are adjusted to get the best outcomes [32].


### 1.3. Motivation

The responsibility of a demand management system is to ensure uninterrupted power supply to the load while also taking into account heterogeneous social-techno-economic conditions. Distributed energy sources of diverse capacity, its type, and manufacturer are used in modern microgrid models. Furthermore, different sources may experience a delay in integrating with the grid due to technological hurdles, and they have a temporal limitation on how long they may be used. Each source will produce varying levels of pollution and have varying environmental implications. Due to the operational characteristics of the sources and coupling transience, the system will encounter certain dynamic disturbances that will influence the power quality. Every source needs a certain amount of upfront investment as well as ongoing operational costs. The operational and capital investment in the electric grid has a substantial influence as well. The impact of these sources on the overall quality of the power system is assessed using a variety of socio-techno-economic factors. As a result, DRS cannot expect the sources to behave in the homogeneous way when modeling demand responses.Because energy networks are typically designed to stave off peak demand, the aggregate capacity of installed sources is always substantially greater than the average demand. In the significant majority of situations, only a modest portion of the total installed capacity sources is required to fulfill demand. As previously stated, the DRS need to use sophisticated mathematical techniques to select the best sources from among all those accessible. Transmission line characteristics, particularly transmission loss and transmission cost, should be given further consideration when constructing an optimal load flow analysis. In addition to the fundamental qualities, a prosumer model may be layered on top of the previously stated models. A prosumer is a person who consumes as well as generates energy. Extra energy generated by a user can be pooled and shared with other users or the grid. When energy is pulled from the nearest accessible source, transmission loss is reduced, resulting in a more cost-effective and energy-efficient system. Hence, the DRS should be built to handle all of these aspects and make the best combinatorial decision possible between the socio-techno-economic factors mentioned above.The most adaptable approach for dealing with such a challenge is to combine bioinspired algorithms with a range of mathematical techniques. As previously stated, this paper supports the use of multiple optimization models in parallel threads. This research employs the artificial bee colony (ABC) and particle swarm optimization (PSO) methods. Every method will have its own set of benefits and drawbacks. PSO is significantly more profitable when there are multiple local optimum models to choose from, the global best is less desirable, or convergence is delayed. PSO, on the other hand, may fail if the preliminary parameters are mistakenly inputted or if there is a high-dimensional search space. The ABC has several advantages, including fast convergence, cognitive speed, and flexibility, but it can also lead to premature convergence or erroneous global best selection. As a result, deciding on the optimal strategy is a complex process and a reward-penalty ranking system-assisted reinforcement learning model that may be used to distinguish between the techniques. Each optimization strategy is assessed using reinforcement learning based on the reward - penalty contributions of each source/component. The upper confidence bound method is used to rank components with a balanced exploration-exploitation ratio.


### 1.4. Contributions

The main objective of this paper is to present a smart economic load dispatch model for a demand response system that combines a multithreaded swarm model with a reward-based reinforcement model to assure optimal source selection and power flow management. The swarm models employed in the study are PSO and ABC, which run in parallel and independently. The swarm model is used in two phases in two applications: economic modeling and optimum source allocation. The benefits and limitations of each model vary, as do the computer processing power and time. Different optimization techniques may demonstrate varying efficiency for different factors and operating ranges. Itis a waste of time and computing resources to run all of the models. Hence, only one model is chosen at a time using a semisupervised reinforcement learning approach. An upper confidence bound (UCB) is used to rate each approach in a reward-penalty scenario. Each method is evaluated after each outcome computation, and the data are submitted to UCB. Time and iterations are used as performance criteria to evaluate the models. The last phase comprises a weighted Boruvka model for optimal power flow analysis. The boundaries, constraints, and equalities will be built using the prosumer microgrid model, which will include the following features:(1)
A consumer may only use the main utility grid to meet their needs(2)
A user may be separated from the utility grid if they are capable of satisfying their own demand using their own resources. Swarm models will aid in the choice of the appropriate providers from all available sources in such scenarios.(3)
Users with the ability to generate more energy than their demand can trade it to the utility grid or nearby users. Adding more power to the grid through a prosumer model has numerous benefits. There are three options for prosumers.(a)
The user can sell their excess power to the grid in exchange for a monetary reward for each unit they provide. Swarm models can be used to create a monetization scheme as well as trade of ratio.(b)
There is also a supplement option, in which the user can pool additional energy into the grid or other users and then take it back whenever they need it for free or at a modest compensatory cost. Both a monetization and a trading strategy can be created using swarm models.(c)
Many users may have batteries installed in order to store energy for future usage. The surplus energy may be used to charge the battery or pool to the grid. Even though the user has more power, if it is more cost effective, the user can utilize electricity from the grid while conserving his own. Swarm models are used to assess how much power is shared and to simulate the economics of sharing.The swarm model will aid in source selection as well as the trading ratio between consumers and producers, depending on socio-techno-economic limitations.


## 1.1. Background

In addition to delivering a consistent and high-quality supply, every power system model must be prepared to satisfy demand while expending the least amount of operational and capital resources. The task described above is termed as economical load dispatch [1]. Economic load dispatch is an inventory management technology in which the system chooses discrete combination energy sources from all accessible sources to achieve the lowest possible costs [2]. These challenges must be investigated in grid-connected microgrid models that comprise a diverse set of distributed energy sources (DESs) [3]. Depending on their socio-techno-economic restrictions, any residential, industrial, or commercial operator could utilize different energy sources [4]. Each source will have its own set of operating costs, capital expenditures, start-up delay, integration complexity, power-generating capacity, efficiency, pollution scale, operational lifetime, consumption time, dependability, and stability, to name a few [5]. Some characteristics improve responsiveness, while others reduce system quality, performance, and economy. All these factors should be addressed by an intelligent demand response system without sacrificing steady supply to demand [6, 7]. In traditional systems, electricity flows unidirectional from a main source to the load. However, if the system supports DES, even though the user is generally a load point, it may occasionally function as a source point. When a user’s power output exceeds demand, the energy can be pooled and sold to the grid. As a result, a diverse set of sources and loads will be dispersed over the microgrid, with heterogeneous multidirectional power flow between them [8, 9]. In order to make a combinatorial optimal decision among all of these attributes, a sophisticated mathematical model is necessary [10]. The DRS aims to identify the optimal solution by evaluating the fitness of these attributes by emphasizing positive features while minimizing negative traits within a reasonable range of alternatives.


## 1.2. Literature Review

Wen et al. examined the state of DES research in three areas: applications, assessments, and regional support measures [11]. They also analyzed the current status of DES approaches focusing on a number of variables such as energy, environment, society, and economy. The prior study offers information on the factors that impact DES. Tolmasquim et al. investigated electrical distributor techniques in the context of distributed energy resources, including SWOT assessments for internal and external electricity distributors in the DES distribution scenario [12]. This research examines the advantages and disadvantages of DES in detail. Wolsink focused on the sociopolitical layer for societal acceptance of DES, which combines high DES dispersion in intelligent microgrids to produce polycentricity rather than hierarchy [13]. This research contributes to the qualitative modeling of DRS based on the influence of consumer interactions on power systems. After determining the qualitative and quantitative properties of distributed energy sources, demand response models based on these inputs are established. McIlwaine et al. examined global electrical market trends, which include a majority of DES, as well as a global evaluation of energy storage, with a focus on power quality services at the distribution level [14]. Ehsan and Yang discussed active distribution network planning as well as distribution network planning in general [15]. Iqbal et al. used a nonlinear programming technique to model a DC microgrid system with peer-to-peer sharing, which allows users to share surplus energy from distributed energy resources with minimal system losses, including distribution and conversion losses, in comparison to the traditional factory-warehouse transportation method [16]. Zeng et al. presented a state-of-charge (SoC) dynamic balancing control approach for DES in DC microgrids that takes into account energy storage capacity disparity to achieve SoC balancing [17]. The aforementioned publications provide information on demand response strategies. The next step is to figure out how to put this concept into action.Ramadhani et al. reviewed the most up-to-date load flow methodologies for DES in great detail, including recommendations for the best modeling methodology for distribution networks with PV generating and EV charging [18]. Ullah et al. investigated the advantages and disadvantages of various integration approaches centered on interconnection challenges and opportunities for DC microgrids [19]. Holari et al. constructed a hybrid AC/DC microgrid system with variable demand and unknown characteristics in order to provide a coordinated performance strategy for power electronic converters in grid-connected and islanding operational scenarios for hybrid microgrid power management [20]. Liaquat et al. examines into a multitude of dispatch challenges as well as the nature of the objective functions in consideration. The study also includes recommendations on demand management problems as well as the underlying constraints associated with each optimization function [21]. Luna et al. showcased an energy management system for coordinating distributed household prosumer activities [22]. Zia et al. proposed a case study for a standalone marine microgrid system as well as a paradigm for smart demand management [23]. Ali et al. offered “The Day Ahead Shifting” approach for cost and peak load optimization on the demand side [24]. Iqbal et al. outlines an effective home energy management system for residential clients in research, which allows them to properly organize demand-responsive appliances in the context of local solar and energy storage systems [25]. Bhamidi and Sivasubramani presented the framework for a two-stage optimization model for smart home renewable energy resources and battery integration, as well as the association of prosumer-based energy management [26].The two preceding articles provide technical information for developing a load flow analysis within a DC microgrid. The next phase is to provide a framework for power management optimization. Mbuwir et al. optimized the power exchange between a microgrid and utility grid using the Jacobi-alternating direction multiplier approach, which assists in congestion management by breaking down the optimization problem into subproblems that are addressed locally and in parallel using fitted Q iteration [27]. Gunantara conducted a thorough examination of multiobjective optimization methods and applications [28]. Molzahn et al. focused research on distributed algorithms and their applications in optimized power system control [29]. Fan et al. provided a thorough and realistic assessment of recent developments in bioinspired algorithms, bioinspired swarm intelligence algorithms, bioinspired ecological algorithms, and multiobjective bioinspired algorithms [30]. The above three publications provide guidance for the application of bioinspired swarm intelligence in power system challenges. Chaudhari utilized ant colony optimization (ACO), particle swarm optimization (PSO), artificial bee colony (ABC), firefly algorithm (FA), and genetic algorithm (GA) to solve the travelling salesman problem, and provided an overview of the performance of the various algorithms using some standard benchmarks [31]. Shareef and Srinivasa Rao shown the combination of two swarming algorithms, ABC and FA, to improve the performance, and this hybrid algorithm is to regulate variables that are adjusted to get the best outcomes [32].


## 1.3. Motivation

The responsibility of a demand management system is to ensure uninterrupted power supply to the load while also taking into account heterogeneous social-techno-economic conditions. Distributed energy sources of diverse capacity, its type, and manufacturer are used in modern microgrid models. Furthermore, different sources may experience a delay in integrating with the grid due to technological hurdles, and they have a temporal limitation on how long they may be used. Each source will produce varying levels of pollution and have varying environmental implications. Due to the operational characteristics of the sources and coupling transience, the system will encounter certain dynamic disturbances that will influence the power quality. Every source needs a certain amount of upfront investment as well as ongoing operational costs. The operational and capital investment in the electric grid has a substantial influence as well. The impact of these sources on the overall quality of the power system is assessed using a variety of socio-techno-economic factors. As a result, DRS cannot expect the sources to behave in the homogeneous way when modeling demand responses.Because energy networks are typically designed to stave off peak demand, the aggregate capacity of installed sources is always substantially greater than the average demand. In the significant majority of situations, only a modest portion of the total installed capacity sources is required to fulfill demand. As previously stated, the DRS need to use sophisticated mathematical techniques to select the best sources from among all those accessible. Transmission line characteristics, particularly transmission loss and transmission cost, should be given further consideration when constructing an optimal load flow analysis. In addition to the fundamental qualities, a prosumer model may be layered on top of the previously stated models. A prosumer is a person who consumes as well as generates energy. Extra energy generated by a user can be pooled and shared with other users or the grid. When energy is pulled from the nearest accessible source, transmission loss is reduced, resulting in a more cost-effective and energy-efficient system. Hence, the DRS should be built to handle all of these aspects and make the best combinatorial decision possible between the socio-techno-economic factors mentioned above.The most adaptable approach for dealing with such a challenge is to combine bioinspired algorithms with a range of mathematical techniques. As previously stated, this paper supports the use of multiple optimization models in parallel threads. This research employs the artificial bee colony (ABC) and particle swarm optimization (PSO) methods. Every method will have its own set of benefits and drawbacks. PSO is significantly more profitable when there are multiple local optimum models to choose from, the global best is less desirable, or convergence is delayed. PSO, on the other hand, may fail if the preliminary parameters are mistakenly inputted or if there is a high-dimensional search space. The ABC has several advantages, including fast convergence, cognitive speed, and flexibility, but it can also lead to premature convergence or erroneous global best selection. As a result, deciding on the optimal strategy is a complex process and a reward-penalty ranking system-assisted reinforcement learning model that may be used to distinguish between the techniques. Each optimization strategy is assessed using reinforcement learning based on the reward - penalty contributions of each source/component. The upper confidence bound method is used to rank components with a balanced exploration-exploitation ratio.


## 1.4. Contributions

The main objective of this paper is to present a smart economic load dispatch model for a demand response system that combines a multithreaded swarm model with a reward-based reinforcement model to assure optimal source selection and power flow management. The swarm models employed in the study are PSO and ABC, which run in parallel and independently. The swarm model is used in two phases in two applications: economic modeling and optimum source allocation. The benefits and limitations of each model vary, as do the computer processing power and time. Different optimization techniques may demonstrate varying efficiency for different factors and operating ranges. Itis a waste of time and computing resources to run all of the models. Hence, only one model is chosen at a time using a semisupervised reinforcement learning approach. An upper confidence bound (UCB) is used to rate each approach in a reward-penalty scenario. Each method is evaluated after each outcome computation, and the data are submitted to UCB. Time and iterations are used as performance criteria to evaluate the models. The last phase comprises a weighted Boruvka model for optimal power flow analysis. The boundaries, constraints, and equalities will be built using the prosumer microgrid model, which will include the following features:(1)
A consumer may only use the main utility grid to meet their needs(2)
A user may be separated from the utility grid if they are capable of satisfying their own demand using their own resources. Swarm models will aid in the choice of the appropriate providers from all available sources in such scenarios.(3)
Users with the ability to generate more energy than their demand can trade it to the utility grid or nearby users. Adding more power to the grid through a prosumer model has numerous benefits. There are three options for prosumers.(a)
The user can sell their excess power to the grid in exchange for a monetary reward for each unit they provide. Swarm models can be used to create a monetization scheme as well as trade of ratio.(b)
There is also a supplement option, in which the user can pool additional energy into the grid or other users and then take it back whenever they need it for free or at a modest compensatory cost. Both a monetization and a trading strategy can be created using swarm models.(c)
Many users may have batteries installed in order to store energy for future usage. The surplus energy may be used to charge the battery or pool to the grid. Even though the user has more power, if it is more cost effective, the user can utilize electricity from the grid while conserving his own. Swarm models are used to assess how much power is shared and to simulate the economics of sharing.The swarm model will aid in source selection as well as the trading ratio between consumers and producers, depending on socio-techno-economic limitations.


## 2. Adaptive Multiswarm Economic Demand Response Model

This study aims to develop an intelligent demand response model based on a multithreaded swarm model and an exploitation-exploration model. Figure1 shows a block diagram of the entire model. The architecture of the system is divided into two segments. The first layer has two elements. One is an edge computing hardware model that comprises an energy monitoring circuit to track energy consumption and generation. As an energy monitoring circuit, a potential divider supported a ZMPT101B DC voltage sensor and a MAX471 based current sensor that are combined with an MKL25Z128VLK4 MCU. The second element is a centralized data processing unit (CDPU) made up of a 1 GHz BCM2835 single-core CPU with 512 MB RAM that serves as the system’s central hub and is linked to the edge controller through WPWAN. For ease of implementation, the data are acquired from a real-time environment, but the load scheduling is carried out by manual switching. The system will keep track of each user’s energy output and consumption. The data are transmitted to a central database for further analysis. The second layer is the software layer, which contains all of the mathematical models as well as their code. The second layer is made possible by the CDPU itself. Multiple swarm models, UBC, and Boruvka analysis are used in the software layer at various phases. The entire presentation is divided into four blocks. UBC will be able to operate only if there are enough readily available inputs for modeling. As a consequence, the system will only use UBC after the first six iterations as indicated in the previous paragraph.Computational Block I- Power system models: the power system constraints, limits, and objective function are all set up in this block. There are four subblocks in this block. For an ith user, PLi is the load demand, PSGi is the solar generation, PBi is the battery supply, PDGi is the generation from diesel generator, PWi is the generation from wind, PMSi is the generation from miscellaneous units, PUGi is the ith user consumption from utility grid, and PXj is the generation from jth user so that j can be varied for each user except j = i, and x is the type of source. To begin, the system makes certain that the total supply constantly exceeds the load. To do this, four options are available.Sub-block I Case I: as seen in equation (1), all power is drawn from the user’s own sources if they are sufficient. If the user’s demand is not met by their own sources, the main grid delivers all of the power, as shown in equation (2).(1)PLi≤PSGi+PBi+PDGi+PWi+PMGi,(2)PLi≤PUGi.Sub-block I Case II: as previously stated, under some circumstances, some energy is pulled from the utility grid and some from local sources linked to the utility grid. The percentage share of each source is calculated using a swarm optimization approach based on economic and transmission network factors. The swarm approach attempts to reduce total power sharing while lowering overall costs. Equations (3)–(5) provide the boundaries and constraints for power sharing where W represents the weight of each source, while C represents the cost of each share.(3)PLi≤WSG∗PSGi+WB∗PBi+WDG∗PDGi+WW∗PWi+WMG∗PMGi+WUG∗PUGi+WX∗PXJ+N,(4)CSG+CB+CDG+CW+CMG+CUG+CXJ..N⇒Min,(5)PLi−WSG∗PSGi+WB∗PBi+WDG∗PDGi+WW∗PWi+WMG∗PMGi+WUG∗PUGi+WX∗PXJ+N⇒Min.Sub-block III Case III: even though a user is self-sufficient, if electricity is available at a reduced cost from the utility grid or nearby sources, the user may utilize it. This may also be used to store lower-cost grid energy or current power production from the user to the battery for later use when prices rise. The boundaries and constraints for power sharing are defined by equations (6)–(8) where WExt and WUser represent the grid and user power contributions, respectively, whereas CExt and CUser reflect the cost constraints of both the grid and the user.(6)PLi<WExt∗PExti+WUser∗PUseri,(7)CExt+CUser⇒Min,(8)PLi−WExt∗PExti+WUser∗PUseri⇒Min.Sub-Block IV Case IV: the user can offer their excess power to the grid/nearby users in return for a monetary benefit for each unit provided. Equations (9)–(12) illustrate trading strategies and proportions based on technological and economic aspects. The system will seek to maintain user contribution weights Xi as low as possible, while keeping the user revenue ZOUT as high as possible and the cost of power acquired from the grid, ZIN as low as possible.(9)PLi<XUser∗PUseri,(10)ZOut⇒Max,ZIntake,⇒Min,ZOut+ZIntake⇒Min,(11)PLi−XUser∗PUseri⇒Min,(12)XOut∗Pouti⇒Max,whereasPout determines the power pooled and Puser is local power drawn. Even though the system maximizes the cost of income to users, it will always try to reduce overall cost.Computational Block II - Optimization: mathematical models of optimization systems are included in this section. Even when the identical data are fed into both swarm models, PSO and ABC, outcomes will differ. As a result, each block is considered as a separate subchapter, with only one chosen for implementation based on its performance.Sub-block I PSO: the first input vector is set to the overall population. Optimization issues are now defined by suitable equality constraints, inequality constraints, and boundary problems. The cost function, loss factor, and objective function for each of the earlier cases have now been established. Using the aforementioned criteria, the fitness of each particle in terms of velocity and position is now evaluated. New values of the global best (GBest) and local best (LBest) are tested for each cycle. This approach is continued until the exit iteration criteria or the lowest cost are satisfied. The GBest is utilized as the output.Sub-block II ABC: initially, input variables are specified in terms of the general population. As explained in the prior section, optimization problems are now given with proper constraints, boundary problems, and objective functions. The next two steps entail the creation of employer and out-looker bees, followed by a fitness evaluation based on food sampling at each level. Each cycle, new values for the global best (GBest), and local best (LBest) are evaluated. This process is repeated by new scout bees until the conditions for the lowest cost or exit iteration are met. The GBest is taken as the output.To begin, the system will use ABC and PSO to calculate the exchange of ratios between sources. The next phase will result in the optimum source combination based on economic factors. Based on this data, power flow analysis is performed using Boruvka load flow analysis.Computational Block III - Optimal Power Flow: initially, each user’s linkages to neighbors and the grid, as well as the grid architecture, are identified. Each transmission station is now weighted (K) based on maximum capacity and transmission line cost. Equation (13) explains the power equation, where U is the voltage and Y is the transmission line impedance.(13)Pi=Kij∗Ui∑i,jNYij∗Uj.The method is now repeated until the least loss path is identified by selecting the lightest weighted node for a user. This procedure is repeated until a user is connected to at least one other user or grid. The following step is to utilize UCB to determine the best swarm model.Computational Block IV - UCB: after a number of iterations, this block is utilized to identify the best swarm optimization model. This is split down into sections.Sub-block I: The models receive a credit or penalty based on the number of times their divergence between real and planned is less than 5%.Sub-block II: we compute the average reward Ri, maximum range N, deviation delta, and the machine’s confidence interval up to n rounds at a time, and range ri is found as shown in equations (14) and (15)(14)rin=RinNin,(15)Δi=ri.Sub-block III: the machine with the maximum UCB is selected:(16)rin−Δirin+Δi⇒SEL.Figure 1
Architecture of multiswarm model for an intelligent economic load dispatch.


## 3. Results and Discussions

A simulation framework is created to put the notion into action. A proteus design suite simulation is used to generate sample data. Some of the sample information comes from the real world and is fed into the simulation. Figure2 shows a distribution system consisting of 20 homes each of whom is connected to one or more of their neighbors. Each user is connected to a battery, a solar photovoltaic (SPV), a diesel generator (DG), a microwind source (MWG), and different miscellaneous sources (MS) such as a natural gas turbine. There is also a direct or indirect link to the main grid (MG). The sample status of connected sources for a set of users is shown in Table 1. Each source has a maximum capacity of 1 kW.Figure 2
Sample grid used for simulation.Table 1
Sample source connection status of 10 users.
UsersBatterySGDGMWGMG1NoNoYesNoYes2YesYesNoYesNo3YesYesYesNoNo4YesNoYesNoYes5NoNoNoNoYes6YesYesNoNoYes7NoNoNoNoYes8YesNoNoNoNo9YesNoNoYesYes10NoYesYesYesNoNote.∗Yes: source is connected; No: source is not connected.As such, each user will have access to a variety of sources, and each user may connect to one or more sources at the same time. Analysis is performed based on this data. Table2 displays the example source generation status of five users whose load is smaller than the production capacity. Table 3 displays the example source generation status of five users whose load exceeds production capacity.Table 2
Sample source generation status of 5 users - demand less than generation.
UsersBattery (Watts)SG (Watts)DG (Watts)MWG (Watts)MS (Watts)Load (Watts)1016257044321.1820088900908.8232287100844121850.9147000523001263.81515508275629022500.02Table 3
Sample source generation status of 5 users - demand greater than generation.
UsersBattery (Watts)SG (Watts)DG (Watts)MWG (Watts)MS (Watts)Load (Watts)1003345733421279207470151013853014476001203.8440105637001556.15732761068101878.24The next step is to calculate transmission line factors. Each transmission line has its own transmission loss, which is denoted by a per unit value ranging from 0 to 1. Table4 shows the sample transmission line per unit loss for three different sample consumers across five different interconnections.Table 4
Transmission loss parameters between nodes.
NodeTransmission loss1 to 120.1541 to 140.4861 to 170.1932 to 70.9893 to 180.906The next step is to design the cost factor for transmission between the users. For the transmission between user, for each side, the cost of transmission will be different. This is due to the fact that a user may sell energy at a separate price while purchasing energy at a different price. Bidirectional cost variations for five transmission elements are shown in Table5. Table 6 depicts the cost of pooling as determined by each user over a 24-hour period, whereas Table 7 depicts the individual cost factor split of five users during a defined time period. As a result, each user (HG), node, and grid (MG) will have a unique price indexing, and the system will have to select the optimal economic model from among all potential ones.Table 5
Cost factors of transmission system between nodes.
Flow ACostFlow BCost1 to 120.20212 to 10.3231 to 140.70914 to 10.5541 to 170.05417 to 20.3022 to 70.6047 to 30.963 to 180.19918 to 40.175Table 6
Cost of pooling of 5 users for a day.
TimeUser 1User 2User 3User 4User 50–40.4560.3320.6740.2940.7644–80.4890.490.9680.540.4768–120.7820.7760.6560.6170.90612–160.4710.4750.8080.3160.33616–200.7230.1720.4350.7550.60620–240.450.3740.5690.1360.786Table 7
Cost of pooling divisions of 5 users.
UsersFixed costOperating costTransmission costUser 10.0540.1410.251User 20.020.2190.092User 30.1120.1630.029User 40.0270.140.373User 50.170.1710.232In the following stage, the optimization method must be implemented. The first step is to establish how much power will be pulled from the grid and how much from local users. This was done first for ABC and then for PSO. UBC will use this information later to choose the best approaches. For preliminary purposes, the load is adjusted from no load to full load. For home grid (HG) and main grid (MG), the performance of each approach across these values is determined by calculation time and iterations. Table8 depicts the performance analysis of the swarm models as the load step varies for 100 W. It has been discovered that when it comes to low load, PSO has demonstrated the best performance; thus, GBest is a suitable choice, whereas lower load may utilize ABC. However, this is not always the case; thus, a UCB is used at this stage to select the best model.Table 8
Compassion of ABC and PSO for a full load range.
TimeLoad (W)PSOABCBestHG (W)MG (W)Time (m/s)Total (W)HG (W)MG (W)Time (m/s)Total (W)1106.726.9653113.6812.33088.2512.33ABC22014.779.2152223.9818.073.1974.6621.26ABC32520.2510.7231430.9724.424.1175.0328.53ABC44026.6714.5630741.2341.052.5380.643.58PSO55039.914.2231454.1245.238.7286.453.95ABC66037.2930.2631067.5552.519.7190.762.22ABC77550.2526.2531476.564.9518.8886.883.83PSO89057.7141.3731799.0857.3436.9582.394.29ABC910069.4538.76310108.2164.1245.6187109.73PSONote.∗HG: home grid; MG: main grid.The number of iterations has an effect on the computations as well. As a result, the influence of iterations is discovered in the following step. Figure3 shows the effects of iterations in terms of RMSE, whereas Figure 4 shows the consequences of iterations in terms of time. It should be emphasized that as the number of iterations rises, so does the accuracy. However, this is not a linear deviation, and if required, an early stop is possible, as inaccuracy beyond a certain number of repetitions is less effective. When it comes to iterations and time, though, it resembles a stepped linear curve.Figure 3
Effects of iterations in RMSE.Figure 4
Effects of iterations in time.After assessing the impact of iterations and time, the exit criteria were defined. As shown in Table9, after 100 iterations of the PSO technique, the optimal solution shifts from local to global best. Hence, it is set as the exit point.Table 9
Drift fromLBest to GBest for PSO.
IterationsLBestGBest1059.2159.212050.6859.213086.8486.844078.3686.845069.9786.846068.7386.847058.9786.848025.3586.849097.1897.1810090.9997.18At this point, a comparison of PSO and ABC solution convergence might be considered. As previously stated, the optimal output is typically achieved in fewer than 200 iterations. Different techniques will indicate different fitness convergence in distinct ranges. As previously stated, ABC has a superior impact over PSO in a number of scenarios. This does not imply, however, that ABC is always the better choice. Figure5 depicts the comparison of PSO and ABC solution convergence for three different cases for both methods.Figure 5
Comparison of PSO and ABC solution convergence.So, once the cost functions and source status have been determined, the following step is to select a trading ratio between users and grid. The fixed cost (FC) and operating cost (OC) for both the home grid and the main grid, as well as the transmission line cost, have all been specified. It is expressed in a scale of 0 to 1. The cost of pooling is determined by the user and the main grid. After meeting his own needs, the user will constantly seek to contribute as much energy to the grid as feasible. The user will also make an effort to reduce supply while boosting cost. Table10 depicts trade pooling for five users. The same procedure will be followed for nearby houses that will be replaced by the utility grid if the cost exceeds the grid’s cost. Table 11 depicts grid pooling among individual houses while also taking transmission line characteristics into consideration.Table 10
Grid pooling decision making with only main grid.
UsersCost factorsForecasted power (W)Demand (W)HGTFMGMGHGActual demandPooled powerFCOCFCOCUser 10.980.820.410.800.2052.7885.8145.49138.58User 20.840.900.980.260.5661.9999.88171.58161.87User 30.680.540.100.370.2851.9990.16170.23142.15User 40.740.400.020.410.5165.3451.28125.94116.62User 50.760.540.310.310.7439.9285.37137.81125.29Table 11
Grid pooling decision making with nearby users.
UsersCost factorsForecasted power (W)Demand(W)HGTFMGMGHGLoadPooledFCOCFCOCUser 10.7440.4750.64910.51606167.161User 20.7370.1330.1930.7290.99145.6587.67136.11133.32User 30.7430.540.5570.0540.81710018114.35118User 40.3840.0050.060.9770.32581.6767.88160.61149.55User 50.2690.680.2980.0310.50510059.75160.54159.75Once the trade of ratio and percentage share of each user has been determined, the following stage is to locate the best sources. In most situations, the system will be built to satisfy peak demand, but because peak load occurs only for a portion of the day, alternative source combinations will be available to meet the need. Both PSO and ABC are being used at this time. Implementation involves two phases: bounding and nonbounding paradigms.As long as power generation is fixed, boundary models are employed to calculate power. Solar and wind energy are unreliable, and additional power must be obtained through a grid connection as necessary. In this situation, an unbounded model is employed. Source selection using PSO is shown in Table12. Table 13 compares the efficacy of PSO and ABC when it comes to selecting sources.Table 12
Source selection using PSO.
Battery (WH)SG (W)DG (W)MWG (W)MS (W)Total generation (W)Total load (W)User 1Generation0641910014616971000Cost factor0.2590.550.7070.2640.733After optimizationFinal selection00910014610561000User 2Generation78866573446364032902000Cost factor0.8060.1110.8760.0470.795After optimizationFinal selection7880734064021622000User 3Generation40556555243219421481700Cost factor0.3340.2790.7180.9630.28After optimizationFinal selection405565552019417161700∗MS: miscellaneous sources.Table 13
Comparison of PSO and ABC.
PSOBattery 1 (WH)Battery 2 (WH)SG 1 (W)SG 2 (W)DG 1 (W)DG 2 (W)MWG 1 (W)MWG 2 (W)MS 1 (W)MS 2 (W)Total966153844436999221883883957955195Total demand2408.66 W155.230.00954.528013.84010.2293.9768.53105.7Demand2456Time257 millisecondABCBattery 1 (WH)Battery 2 (WH)SG 1 (W)SG 2 (W)DG 1 (W)DG 2 (W)Wind 1 (W)Wind 2 (W)MS 1 (W)MS 2 (W)Total966153844436999221883883957955195Total demand2729.0612 W003847.300922188367.39231.50628.84Demand2456Time167 millisecond∗MS: miscellaneous sources.When the source optimization is complete, the power flow analysis is carried out using the specified sources and transmission line factors. Table14 provides the nodes and transmission line factors that were chosen, whereas Figure 6 depicts the optimum power flow between sources.Table 14
Selected nodes and transmission line factors.
FromToTF080.7140.2260.9250.5370.9470.6510.4530.3650.8670.86100.1711790.68100.2940.51010.5Figure 6
Optimal power flow between nodes.The UBC is now being used to determine the optimal optimization model for the next iteration. UBC is used to assess each model’s output in terms of both time and accuracy. As a result, the system will continually evaluate the results of each model. Whenever a new value arrives for execution, the UBC will choose the best model based on the incentives and penalties from previous stages. Table15 shows example of each model’s rewards and penalties, and Figure 7 provides 360-instances of selections of the swarm model.Table 15
Selected nodes and transmission line factors.
ABCPSORewardsPenaltiesRewardsPenalties0.410.920.180.10.880.790.450.350.210.690.030.230.840.760.690.120.550.280.320.580.280.820.10.90.980.570.960.50.650.830.340.46Figure 7
UBC selection of the swarm model.


## 4. Conclusion

This work developed a smart economic load dispatch model for a demand response system by combining a multithreaded swarm model with reward-based reinforcement learning. Particle swarm optimization and artificial bee colony (ABC) optimization methods were used to analyze users, the grid, and neighboring users in order to determine the most cost-effective power sharing model. An upper bound confident (UBC) model is used as a semisupervised reinforcement model for each input data point to choose the best swarm model. The weighted Boruvka’s Algorithm is used to determine the optimal power flow depending on transmission line costs and transmission losses. Each model’s efficiency is assessed using the identical data for both models, and an error analysis is carried out. RMSE is used to verify the effectiveness of the findings. When it comes to economic trade calculations, ABC is proven to have an advantage over PSO in the majority of cases. PSO is still more accurate for optimal power sharing. A multithreaded model with improved accuracy, processing time, and efficiency was constructed supported by UBC.



---

*Source: 7739945-2022-03-21.xml*