# A Hybrid Sine Cosine-Particle Swarm Optimization Algorithm for Energy Optimization on Demand Side (DS) of Smart Grid

Raidar Ali

► To cite this version:

Raidar Ali. A Hybrid Sine Cosine-Particle Swarm Optimization Algorithm for Energy Optimization on Demand Side (DS) of Smart Grid. International Journal of Engineering Works, 2023, 10 (05), pp.37-45. 10.34259/ijew.23.10053745. hal-04112653

HAL Id: hal-04112653

https://hal.science/hal-04112653

Submitted on 31 May 2023

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_2.png" /></figure>

# A Hybrid Sine Cosine-Particle Swarm Optimization Algorithm for Energy Optimization on Demand Side (DS) of Smart Grid

Raidar Ali ID

Department of Electrical Engineering, UET Peshawar

Received: 08 April, Revised: 16 April, Accepted: 28 April

**Abstract**— Electricity has many advantages over other forms of energy, including ease of production, handling, flexibility, and efficiency, making it the most useful form of energy ever discovered. However, as the population grows, so does the electricity demand. Building new power plants requires a lot of effort, money, time, and resources. It is imperative to use the energy already available wisely. For the intelligent use of energy, a variety of approaches are used. To achieve the goals of lowering electricity costs, peak-to-average ratios (PAR), and user comfort, meta-heuristic optimization algorithms are frequently used and occasionally mathematically based optimization algorithms are employed. This concept also led to the creation of the Smart Grid (SG) and its concept. To use the energy effectively and conduct a comparison, a Synergy of Sine Cosine Algorithm (SCA) and Particle Swarm Optimization (PSO) are used in this paper.

**Keywords**— optimization algorithms, electricity cost, peak to average ratio(PAR), smart grid(SG), sine cosine algorithm(SCA)

## I. INTRODUCTION

The most significant form of energy, electricity, is a secondary energy source because it is produced using primary energy sources like coal, fuels, the sun, water's potential energy, and the heat energy of nuclear reactions. The ease of production, control, efficiency, and flexibility of electrical energy are the main factors for its popularity. One of the biggest problems communities face is the need for more electrical energy. To meet the growing demand of the unchecked population explosion, new methods are being investigated and researched. These methods should make it simple and efficient to generate electrical energy in large quantities. Some of these research techniques concentrate on enhancing conventional girds (CG). Conventional Grids are the conventional method for transmitting, regulating, and ultimately distributing the majority of generated electrical energy to the final consumers. To enhance the performance of the current conventional grids without requiring significant capital investment, new technologies are being combined with them. To improve the efficiency of the electrical grid system, outdated technologies are combined with cutting-edge ones.

The attempts to integrate technologies like information technology (IT), cyber security (CS), and control systems with the established electrical energy system led to the conception of the smart grid (SG). It is important to note that the smart grid is an advanced and sophisticated duplex system of electricity supply system in which the two-way interaction between the utility, which is the power-providing organization, and the consumer's Home Energy Management System (HEMS) makes it possible to use the available energy efficiently and intelligently in a way that benefits both the consumer and the power providing company. More specifically, a smart grid is a centralized power system driven by data processing of information technology for real-time tracking of all end user's electrical devices for the purpose of using electrical energy prudently using the concept of time slots. The incorporation of monitoring technologies into the infrastructure of the electrical power system reveals the advantages associated with real-time tracking, such as expected growth, and it also aids in long-term and strategic decision-making. Before the introduction of smart grid, the end user had no role in making the electrical power system more robust, dependable, and efficient; nevertheless, smart grid technology gives the end user this opportunity, with mutual advantage. The smart grid gained worldwide acceptance through the concept of mutual benefit, particularly from the global scientific community. This area has been the focus of research articles conducted in the power efficacy domain over the last few decades. For the intended results, new algorithms are being investigated. Which are implemented as an optimization technique for different kinds of real-world problems.

If a specific algorithm used to increase electric power performance produces results that are unsatisfactory in terms of one defined target, it frequently produces better results in terms of another defined objective. That is the primary motivation for using a hybrid approach (HA) or a synergy of two algorithms to solve optimization problems. In the following chapters, this document will explain the benefits of algorithm hybridization. The smart grid technology allows the end user to manage their energy consumption pattern, lowering their energy bills and attempting to make the system more sturdy and dependable. It is stated in [1 2] that more than 65% of electrical power is wasted during the procedure of generation and delivery to the end user. The old traditional conventional grids and the lack of
real-time electrical appliances are the primary causes of this large amount of energy waste. What if users could use all or a portion of this energy? It would undoubtedly make the power system much more reliable, robust, and efficient.

In most developing countries the electrical energy system is beset by a slew of issues ranging from old and outdated infrastructure to electricity theft, staff issues, and financial difficulties. This outdated and conventional system of electricity is unable to meet the requirements of a growing population. The incorporation of new technologies into the power system is imperative and cannot be ignored. Due to the traditional grid system's inability to prevent needless electrical power loss, distribution companies frequently discover losses during audits. As previously mentioned, the utility, which is the company that provides the power, benefits from smart grid because it lowers peak demand on it. Peak to Average Ratio (PAR), a special parameter defined for modeling and research purposes, is used to measure peak utility load to make the scientific method robust by only comparing the peak-to-average ratio of two-time slots or two different power systems. Why is a smart grid (SM) necessary? The traditional electricity system is to blame for more than 90% of electricity load shedding and failure, which provides the answer to this query. What if the power company could replace the traditional grid system with cutting-edge Smart Grid technology. The results will take the form of a dependable grid for distributing electricity. More precisely, switching from traditional grids to intelligent smart grids would be in the best interests of the general public as well as the utility, as user comfort would be fully utilized by interrupting power supply, and the utility's budget for fixing frequently occurring faults could be saved. The power supply income statement of the financial gain will be significantly increased as a result. Because of the protracted advantages associated with switching to a smart grid, the majority of researchers encourage utilities through their publications. To elaborate, the majority of energy is produced using non-renewable energy sources like coal, gases, diesel, etc., which is continuously lowering the air quality. The power generation industry is responsible for producing almost 40% of hazardous materials. Similar to how every other area of life does, fossil fuel use is shocking on a global scale.

## II. HOME ENERGY MANAGEMENT SYSTEM

The Home Energy Management System (HEMS) uses demand-side management to use electricity wisely. To put it differently, HEMS only prioritizes the residential optimization of electrical power. It is an area of research that considers a variety of electrical smart grid electricity system parameters, including the load profile, available resources, consumer energy usage patterns, scheduling pattern of various types of advanced scheduling algorithms, and the use of self-generated or, more particularly, renewable energy resources connected to the home's smart infrastructure. Anytime a smart home system is in use, the HEMS uses all the recorded parameters that are stored in its memory to carry out all decision-making processes. This is how real-time tracking should be used. Additionally, the HEMS scheme can be viewed as the primary household appliance control center for power management. To improve results and ensure robustness, efficiency, and

coordination between all smart sensors in a system, HEMS unifies and integrates them all. In [3], IEEE 802.15.4 and ZigBee are used in the HEMS deployment to achieve the specified goals. This is because wireless networks are gaining popularity day by day due to their dependability and newly emerging wireless communications technologies. The HEMS is investigated based on a unique duplex information-sharing technique known as power line communication, much like how it was done in [4]. The computational analysis for the proposed design in it shows a 10% decrease in the cost of electricity usage. That unquestionably represents a significant reduction in the price of electricity. Similar to how diverse optimization algorithms evolve as new controlling parameters are introduced to the algorithm, this may be further enhanced by adjusting and incorporating numerous different other variables and parameters. Similar work is done on the smart use of energy using the HEMS concept in [5]. It is noted that demand response is the main plan used in it to reduce energy consumption (DR). Effectiveness is boosted as a result of DR shifts and scheduling. Additionally, the document makes use of the idea of an optimized solution for a particular number of equipment and devices that are typically installed in a typical house; the idea can also be applied to industrial loads with only minor adjustments to a few optimization algorithm's parameters. The HEMS in the system set up in the consumer's propositions makes plans for all smart electrical devices using previously stored data from sensors and its reciprocal information dissemination with the power-providing company, according to the concluding remarks about the HEMS. The sole objective of this complicated and sophisticated power system is to use the electricity that is at our disposal wisely and intelligently, avoiding the need to build additional power plants to meet the increased electricity demand brought on by the sharp rise in the population.

## III. DEMAND SIDE MANAGEMENT

Over the recent decades, studies have been carried out in a wide range of power-related fields to learn how to use energy wisely. Demand side management (DSM) in particular makes it possible to optimize energy. The DSM is employed to lower the peak-to-average ratio (PAR), lessen customer discomfort, and save money on energy. Although demand-side energy optimization is a very challenging problem, academics are having success using a wide range of approaches and optimization algorithms. The challenge is to use the available energy sensibly and smartly. To use power resources efficiently, research has been conducted over the past several decades in a variety of power-related fields. As was previously mentioned, demand-side management (DSM) enables energy optimization. The DSM is employed to minimize user discomfort, decrease peak-to-average ratio (PAR), and lower electricity costs. In [6], a genetic algorithm is used in combination with renewable sources of energy and charge-storage devices like batteries. As the power grid quickly incorporates renewable energy. As discussed previously, we must use the energy we currently have intelligently and thoughtfully. When the power company is operating during peak times or the cost of energy per unit is greater than that of off-peak hours, the stored energy is used at those times. The researcher provides limitations on the charging and discharging
of storage devices. The industrial, commercial, and residential loads are balanced in [7]. The electrical loads for commercial, housing, and industrial buildings are balanced. The computer analysis shows that the suggested technique, which combines a genetic algorithm with DSM, produced the desired results; energy consumption is down by 21.91 % during peak hours, despite the authors' omission of a discussion of PAR. The scheme is stabilized as a result of the 21.91 percent reduction in power costs. The main stabilizing factor, known as the "peak to average ratio," is not addressed. ToU and CPP, two different RTP pricing signals, were used by the researchers of [8] under three different GA, Particle Swarm Optimization (PSO), and Multiple Knapsack Problem (MKP) conditions. The results of the study show that their proposed framework is workable. The minimization of costs has always been another objective of such an electricity network. In essence, pricing signals are a particular kind of data that the power-providing company provides to the users of electrical energy to inform customers of the cost of electricity. The HEMS then schedules the load based on the price signal and the demand from the user. On the demand side of the smart grid, the pricing signal is extremely important. To decrease total electricity use and balance load, mixed integer linear programming (MILP) for people was proposed as a scheduling algorithm in [9]. The proposed plan was successful in lowering the cost of power and PAR. Consumer comfort, nevertheless, is not at all taken into account. The effectiveness of the recommended strategy was found to surpass SBA, FA, and other meta-heuristic strategies in [10], where simulated results were also guaranteed. This was true for both the total electricity price and PAR. The household load was optimized by utilizing

RUOA suggested a method based on power usage patterns. The researcher built the load management scheme using existing SBA and FA meta-heuristic techniques, as well as the CPP and RTP pricing systems. In [10], a novel method, RUOA, is used to simulate the findings and compare them to meta-heuristic algorithms. The performance was excellent in terms of power utilization pattern. Performance of these algorithms. Also, in [11], the researchers successfully decreased energy consumption costs while preserving client comfort. Taking into account all of these strong arguments, the proposed solution to the load scheduling problem for interruptible and uninterruptible appliances in the Demand Response program has the potential to be a dependable method for future home EMS in a smart grid environment. The objective function has previously been created in order to achieve the best results for the energy consumption cost and the delay cost. Both interruptible and non-interruptible appliances in the home are to be included in the energy scheduling in this EMS.

A rooftop PV panel model is also provided in the article for consideration as a distributed renewable energy source. The proposed strategy drastically reduces the cost of electricity in [11]. The installation of solar panels further increased the system's dependability. The rapid integration of renewable energy sources into the electricity grid is a result of the depletion of non-renewable energy sources. In the next 20 to 40 years, most nations expect to move to renewable energy sources. Since if the government's power wings don't switch to

renewable energy sources, there won't be enough electricity for all businesses and power-consuming places. The incorporation of renewable energy into future networks is fervently emphasized in this study [11]. In terms of pricing, PAR, load management, and queue length—also known as user waiting time—three adaptable techniques—BSOA, TS, and TBSO— are presented and scaled in [12]. The author should be regarded as the DSM for maintaining the balance between supply and demand in the home sector for scheduling reasons. In order to manage the framework, DSM needs a realistic approach to schedule the devices in a way that maximizes user happiness while consuming the least amount of electricity. Simulations were used to verify the effectiveness of the suggested techniques. Savings-wise, TBSO performed better. In the future, more scheduling techniques will be used to achieve the aforementioned goals. Peak to average ratio, user wait time, and electricity cost were compared among the three flexible techniques. By the end of the essay, a detailed explanation of how each technique works is presented graphically. In [13], the multi-objective optimal load distribution problem is successfully solved by using the MVO approach. The results demonstrate that the proposed MVO approach may deliver superior results by overcoming early convergence flaws in PSO and genetic algorithms. According to the results, this MVO was able to meet goals that were on par with those of NSGA, MODE, PSO, PDE, SPEA, and GA. The novel wormhole, black hole, and white hole forecast models all address the problem of early convergence. In the future, it will be feasible to investigate improved solutions to difficult power network problems thanks to the MVO method's practicality and efficacy. Similar to [14], the effectiveness of HEMS is evaluated using the (HSA), (BFO), and Enhanced differential evolution. Electrical appliances are divided into three categories based on how much energy they typically use. The three categories are base appliances, interruptible appliances, and ultimately uninterruptible appliances. Appliances that are used frequently are called base appliances. Interchangeable appliances can be transferred from one era to another. On the other side, uninterruptible appliances are those that, once started, cannot be stopped until they have finished their duty. The real-time pricing (RTP) approach is used to compute energy bills. Without sacrificing user comfort, our objectives are to lower peak-to-average ratios, consume less energy, and cut power expenses. Yet, there is a barter or tradeoff involving different objectives. These simulation results show that convenience and expense (cost of electricity) are trade-offs. Results also show that HSA is more cost-effective than other methods. To accomplish the aforementioned objectives, the writers have used metaheuristic techniques. Three meta-heuristic techniques—the (HSA), (EDE), and (BFA). Finally, the results are evaluated. BFA and EDE, however, are more expensive than HSA. HSA greatly reduces the cost of power compared to the other two algorithms, with BFA incurring the most cost. Even yet, the price of a load when loads were not scheduled was less than the cost of an algorithm operating independently. This causes the system to schedule appliance based on the utility's pricing signal. Every pricing signal exhibits peaks and valleys based on the typical energy consume in order to make use of power at a cheaper cost per unit than
during load peak hours, optimization algorithm strategies try to
move consumer electrical appliances to off-peak hours.

The maximum amount of energy used in an unforeseen
situation is 12.0750 kWh, according to [14].

After the optimization algorithm had completed its work,
the updated values for the HSA, EDE, and BFA were 9.015,
9.475, and 9.775 kWh, respectively. When measured against
other algorithms, EDE performed well in the PAR. BFA did
reasonably well in terms of user comfort, but that is a
measurement of user convenience. It is abundantly evident
from the explanation above that not all optimization techniques
are effective in every circumstance. While some optimization
strategies are effective in real-world problems, others are not
an option patterns for consumers. Yet, there is typically a
compromise between the previously described qualities.
Similar to [15], the researchers rescheduled electrical
appliances using hybrid or synergy strategies based on cutting-
edge techniques to achieve the intended aims of decreasing
expenses, PAR minimization, and convenience (also known as
queue length). The objective of a smart grid is to use electric
resources wisely and effectively, as is well recognized. The
statistics and figures demonstrate that all of the set targets were
achieved by the meta-heuristics tactics applied (expense, PAR,
and convenience). Furthermore, the combined algorithm of the
used meta-heuristics performed better than the individual
component approaches. A technique analysis from the
perspective of goals is offered in the conclusion. The (HSA)
performed well in terms of reducing PAR. The (EWA) lowers
the cost of producing electrical energy per kWh to a figure that
is less than the HSA's.

Yet, as was already mentioned, the HSA has produced great
and superior results in decreasing PAR. In terms of the cost
incurred to produce 1 kWh, the hybrid technique did better
than all others. The author of this study used a variety of
residences to compare the predetermined goals.

IV. PROPOSED HYBRID METHODOLOGY AND SYSTEM MODEL

A power system model with various loads and various electrical load types according to the patterns of energy consumption is required in order to execute the proposed algorithms for optimization. In this work, a model with distinct home loads of three different kinds of nature according to energy use is provided. All of the specifics are shown in the Fig.1. Initially, energy is created in remote areas by turning any energy source into electrical energy. The potential energy of water is used to drive an impulse or reaction turbine, the heat energy of coal, or a nuclear reaction to create mechanical energy, which is then transformed into electrical energy. The conventional grid system is depicted in Fig.1. The proposed model is depicted in Fig.2.

<figure><img src="image_3.png" /><figcaption>Figure 1 Conventional Grid System</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>Figure 2 Smart Grid layout</figcaption></figure>

A. *Types of loads*

The three types of loads are Base load appliances,
Interruptible appliances, and Non-interruptible appliances.
Base appliances are those electrical devices and equipment
which are operated all the time, e.g. refrigerators. Non-
interruptible appliances refer to all those appliances which once
started cannot be stopped. While interruptible appliances can
be shifted from one-time slot to another time slot without any
tradeoff for the user's comfort.
$$E_{\text{base}} = \sum_{p=1}^{\text{No of base appliances}} \left( \sum_{\text{slot}=1}^{24} B_p \times \text{time of operation (1 hr)} \right) \quad (1)$$

$$C_{\text{base}} = \sum_{p=1}^{\text{No of base appliances}} \left( \sum_{\text{slot}=1}^{24} B_p \times 1 \times \text{PS}_{\text{slot}} \right) \quad (2)$$

Eq.(1) and (2) are used for the calculations of base load energy consumption in terms of units and the corresponding price of energy.

For *n* number of homes, the cost of electricity is calculated using eq.(3)

$$C_{\text{base}_n} = \sum_{h=1}^{n} \left( \sum_{p=1}^{\text{No of base appliances}} \left( \sum_{\text{slot}=1}^{24} B_p \times 1 \times \text{PS}_{\text{slot}} \right) \right) \quad (3)$$

$$E_I = \sum_{p=1}^{\text{No of interruptible appliances}} \left( \sum_{\text{slot}=1}^{24} I_p \times St_I \right) \quad (4)$$

$$C_I = \sum_{p=1}^{\text{No of interruptible appliances}} \left( \sum_{\text{slot}=1}^{24} I_p \times St_I \times PS_{\text{slot}} \right) \quad (5)$$

Eq.4 and 5 are used for the calculation of the consumption of electricity and cost for interruptible appliances.

$$E_U = \sum_{p=1}^{\text{No of un-interruptible appliances}} \left( \sum_{\text{slot}=1}^{24} U_p \times St_u \right) \quad (6)$$

$$C_U = \sum_{p=1}^{\text{No of un-interruptible appliances}} \left( \sum_{\text{slot}=1}^{24} U_p \times St_u \times PS_{\text{slot}} \right) \quad (7)$$

Eq.6 and 7 are used for non-interruptible appliances. One nature-inspired population-based optimization algorithm and one mathematical population-based SCA are used in the proposed methodology to schedule electrical loads in order to minimize electricity costs and PAR while maximizing user comfort. A hybrid version is also used to balance the exploitation and exploration processes to find the optimized result more robustly and efficiently. Load categories are shown in Fig.3.

<figure><img src="image_5.png" /><figcaption>Figure 3 Loads Categories</figcaption></figure>

## B. Particle Swarm Optimization (PSO)

PSO mimics the feeding and navigation patterns of a flock of birds or a school of fish. In PSO, each search agent has two vectors: a position vector and a velocity vector. A location vector's direction and speed are specified using velocity vectors. The formula for the velocity component of PSO is shown in Eq.(8).

$$\overline{V}_i^{d+1} = 2r_1 \overline{V}_i^d + 2r_2 (\overline{P}_i^d - \overline{X}_i^d) + 2r_3 (\overline{G}^d - \overline{X}_i^d) \quad (8)$$

$$\overline{X}_i^{d+1} = \overline{X}_i^d + \overline{V}_i^{d+1} \quad (9)$$

Eq.(9) is the position vector of particle swarm optimization. The new day's or new iteration location of a given search agent, according to Eq.(9), is the sum of the previous position and the velocity of the new iteration.

Inertia is the first component of Eq.(8), whereas cognitive and social components are the second and third components, respectively. By altering the coefficients c1 and c2, the influence of cognitive and social components on particle movement may be adjusted. Table.1 shows the initial parameter initialization of PSO.

<table><caption>Table 1 PSO Parameters Initialization</caption><thead><tr><td>PSO Parameter</td><td>Assigned value</td></tr></thead><tbody><tr><td>nVar (No of electrical Appliances)</td><td>16</td></tr><tr><td>noP (Each agent has 30 Dim)</td><td>30</td></tr><tr><td>wMax</td><td>0.9</td></tr><tr><td>wMin</td><td>0.2</td></tr><tr><td>c1 and c2</td><td>2</td></tr><tr><td>vMAX for bounding velocity</td><td>(ub-lb)*2</td></tr><tr><td>vMin</td><td>-vMAX</td></tr></tbody></table>

A detailed description of PSO is available in the flow chart of PSO in Fig.4.

## C. Sine Cosine Algorithm (SCA)

SCA uses sine and cosine functions to move and vary a stochastic probable candidate solution toward the ideal solution. This technique can include a lot of extra aspects and characteristics to make the process of researching and identifying the best answer easier, faster, more realistic, and succinct. According to [16], SCA can explore different parts of the search space, avoid local optimal stagnation, and proceed toward the global optimum. The SCA algorithm begins by presenting a group of randomly chosen potential solutions. The approaches then seek to enhance those randomly selected candidate solutions by repeating the SCA procedure. There is no information available on the number of iterations required for optimization since population-based algorithms are known to wander stochastically toward global maxima and minima. The area is explored stochastically using SCA.
<figure><img src="image_6.png" /><figcaption>Figure 4 PSO Flow Chart</figcaption></figure>

SCA is gaining popularity as a result of this attribute and its great exploration capabilities. Yet, as the number of searching agents and repetitions increases, so does the possibility of success. In our work, we used the position updating equations shown below [16]. The two position equation of SCA is shown in Eq.(10) and (11). Where $r_1, r_2$, and $r_3$ are random values ranging from 0 to 1.

$$P_{icurrent}^{t+1} = P_{icurrent}^{t} + r_1 \times \sin(r_2) \times |r_3 P_{idistination}^{t} - P_{icurrent}^{t}| \quad (10)$$

$$P_{icurrent}^{t+1} = P_{icurrent}^{t} + r_1 \times \cos(r_2) \times |r_3 P_{idistination}^{t} - P_{icurrent}^{t}| \quad (11)$$

Fig.5 shows the detailed flow chart of SCA.

## D. Hybrid Algorithm (SCA-PSO)

As part of this research, a synergy of two optimization algorithms is developed and simulated in MATLAB, and the outcomes from PSO and SCA are compared independently. The parameters of the two algorithms are combined to balance the exploitation and exploration processes. Because one of the algorithms chosen excels at exploring the search environment while the other excels at exploitation. All simulated results are generated in MATLAB. A hybrid sine cosine-particle swarm

optimization technique (SCA-PSO) is created and tested to measure and assess the efficacy of the Smart Grid (SM) on the usage side of the electrical energy system. Together with the SCA's reasonable runtime, faster convergence speed, and improved performance [18], PSO's parameter responsiveness and computing speed enabled the optimization process and its outputs to be substantially more productive and optimized. Coupled with an acceptable processing time, a high convergence rate, and improved SCA performance, PSO's [17] optimization power enabled the discovery of much more efficacious and optimized investigated parameters and their consequences. The basic notion used in the hybrid approach is that during position vector updating, the software stochastically picks either SCA's position updating formula or PSO's position updating formula. The software achieves a balance between exploration and exploitation by performing these actions. As a result, the whole search field is scanned with significant improvements in all measurement variables. Since the hybrid version met all of the intended objectives of lowering the peak to average ratio, lowering power costs, and increasing user comfort.

<figure><img src="image_7.png" /><figcaption>Figure 5 SCA Flow Chart</figcaption></figure>

## RESULTS AND DISCUSSION

The optimization algorithms were written in MATLAB R2010a. The majority of the graphs are presented in a single window using bar graph commands for comparative reasons. Stair graphs are also regarded to be useful for hourly load and
hourly cost comparison. This is not surprising given that each run of stochastic optimization methods delivers a unique outcome. As a result, this section has an average of 30 runs. Load scheduling does not consider appliances that cannot be stopped. Electrical appliances that can be turned off and on serve an important function. The timeline has 24 slots, beginning at 12 a.m. Our 16 applications are divided into three categories. Base loads, interruptible loads, and uninterruptible loads are their names. Following the model's simulation, the following results were obtained for the defined three parameters of Electricity cost, PAR and user's comfort.

<figure><img src="image_8.png" /><figcaption>Figure 6 Hourly Electricity Cost</figcaption></figure>

Fig.6 emphasizes the cost during peak hours the most. The unscheduled load graph clearly shows that a peak occurs between 14 and 19, which accounts for the majority of the price of electricity. Because the price signal provided by the utility is shown in Fig.7, the user will be encouraged to switch from on-peak to off-peak hours.

<figure><img src="image_9.png" /><figcaption>Figure 7 Pricing Signal</figcaption></figure>

The two scheduling methods, as well as their hybrid version, shift loads from peak to off-peak hours. Because of the scheduling of loads, the scheduled cost is lower than the unscheduled cost, as shown in Fig.8. This scheduling occurs during the electrical energy optimization process. HEMS handles the scheduling of various electrical appliances automatically. As previously stated, the HEMS system

monitors a specific user's energy usage pattern as well as the priority of various electrical appliances.

<figure><img src="image_10.png" /><figcaption>Figure 8 Accumulated Cost for 24 Hours</figcaption></figure>

The maximum cost is in the case of unscheduled load, as shown in Fig.8 in terms of the total cost for 24 hours. The three optimization algorithms, PSO, SCA, and SCA-PSO, significantly reduced the cost of electricity. The best performing algorithm, SCA-PSO scheduled algorithm, reduced the cost of electricity by approximately 37.5%. Similarly, SCA and PSO reduced electricity costs by 26.45% and 33.89%, respectively. The amount of time spent waiting is a measure of the user's inconvenience. Fig.9 depicts a graph of waiting time. If an algorithm schedules a specific appliance, this has a direct impact on user comfort. The most user comfort is in the case of unscheduled load, as shown in Fig.9, because there is no interruption of electrical loads. The algorithm that requires the user to wait for a specific period of time to operate it is most common in the case of PSO. Although the waiting times for SCA and PSO-SCA are nearly identical, SCA provides more comfort to the user than PSO. SCA and PSO-SCA, in particular, provide nearly 10% more comfort than PSO.

<figure><img src="image_11.png" /><figcaption>Figure 9 Waiting Time</figcaption></figure>

The optimization algorithms shift loads from on-peak to off-peak hours. The same discussion can be used to explain Fig.10. As the graph shows, the majority of the loads during peak hours are shifted to off-peak hours.
<figure><img src="image_12.png" /><figcaption>Figure 10 Hourly Load</figcaption></figure>

<figure><img src="image_13.png" /><figcaption>Figure 11 Peak to Average Ratio</figcaption></figure>

In the case of unscheduled load, the PAR is extremely high at 3.67 as depicted in Fig.11. SCA-PSO is the most effective at lowering PAR. Par is reduced by 45.03% using the PSO-SCA. This is very useful in terms of uninterruptible power supply from smart grid. PSO and SCA also reduce PAR to a value that is less than that of the unscheduled load but greater than that of the synergy form.

CONCLUSION

The hybrid version (SCA-PSO) did a good job of lowering electricity prices. The cost of electricity consumed is reduced by 37.5% when compared to the unscheduled load. SCA-PSO is our target algorithm for lowering electricity prices. The cost of electricity, on the other hand, was reduced by 33.89% in the case of PSO and by 26.45% in the case of SCA. SCA-PSO is one of the DSM algorithms that significantly reduces the cost of electricity. For PAR, in case of unscheduled load, the PAR was extremely high at 3.67. SCA-PSO produces the best results when it comes to lowering PAR. The PSO-SCA reduces PAR by 45.03%. This is great for the smart grid's continuous power supply. PSO and SCA both reduce PAR to a level higher than the synergy form but lower than the unscheduled load. The length of time spent waiting is a measure of user's wait for a specific equipment to be turned on. If an algorithm schedules a specific appliance, the user's comfort is directly impacted. Because there is no interruption of electrical loads, the unscheduled load situation in Fig.10 provides the highest level

of user comfort. The algorithm that forces the user to wait for a specific amount of time to operate PSO is the most common. Although the waiting times for SCA and PSO-SCA are nearly identical, the former provides the user with more comfort. In particular, when compared to PSO, SCA and PSO-SCA provide nearly 10% more comfort. To summarize, PSO and SCA-PSO outperformed SCA in terms of lowering electricity costs. Similarly, in terms of user waiting time, SCA and SCA-PSO performed admirably in providing comfort to electricity users.

REFERENCES

[1] Using LabVIEW.,2012. Int. J. Soft Comput. Eng., vol. 1, no. 6, pp. 98-106.

[2] Q. Hu, S. Member, F. Li, and S. Member., 2013. Hardware Design of Smart Home Energy Management System with Dynamic Price Response, IEEE Trans. Smart Grid, vol. 4, issue no. 4, pp. 1878-1887,

[3] Han, Dae-Man, and Jae-Hyun Lim.,2010. Smart home energy management system using IEEE 802.15. 4 and zigbee. IEEE Transactions on Consumer Electronics 56.3 ,pp:1403-1410.

[4] Son, Young-Sung, et al.,2010. Home energy management system based on power line communication. IEEE Transactions on Consumer Electronics 56.3, pp:1380-1386.

[5] Shareef, Hussain, et al., 2018. Review on home energy management system considering demand responses, smart technologies, and intelligent controllers. IEEE Access 6, pp: 24498-24509.

[6] M. H. Albadi., 2008. A summary of demand response in electricity markets, vol. 78, pp. 1989-1996.

[7] Irfan Jamil, Hong Lucheng, Salman Habib, Muhammad Aurangzeb, Emad M. Ahmed, Rehan Jamil, Performance evaluation of solar power plants for excess energy based on energy production, Energy Reports, Volume 9, 2023, Pages 1501-1534, https://doi.org/10.1016/j.egyr.2022.12.081.

[8] A. Khalid, N. Javaid, and A. Mateen., 2016. Demand Side Management using Hybrid Bacterial Foraging and Genetic Algorithm Optimization Techniques, 10th Int. Conf. Complex, Intelligent, Softw. Intensive Syst., vol. 2013, pp. 494-502.

[9] F. Baig, a Mahmood, N. Javaid, S. Razzaq, N. Khan, and Z. Saleem., 2013. Smart home energy management system for monitoring and scheduling of home appliances using zigbee, J. Basic. Appl. Sci. Res, vol. 3, no. 5, pp. 880-891.

[10] A. Tascikaraoglu, A. R. Boynugri, and M. Uzunoglu., 2014. A demand side management strategy based on forecasting of residential renewable sources: A smart home system in Turkey, Energy Build., vol. 80, pp. 309-320.

[11] I. Jamil et. Al "Evaluation of Energy Production and Energy Yield Assessment Based on Feasibility, Design, and Execution of 3 × 50 MW Grid-Connected Solar PV Pilot Project in Nooriable", International Journal of Photoenergy, vol. 2017, Article ID 6429581, 18 pages, 2017. https://doi.org/10.1155/2017/6429581

[12] S. Chen et al., 2017. Butler, Not Servant: A Human-Centric Smart Home Energy Management System, IEEE Commun. Mag., vol. 55, no. 2, pp. 27-33.

[13] N. Loganathan, P. S. Mayurappriyan, and K. Lakshmi., 2018. Smart energy management systems : a literature review, vol. 01016, pp. 1-8.

[14] Q. Hu, S. Member, F. Li, and S. Member.,2013. Hardware Design of Smart Home Energy Management System with Dynamic Price Response, IEEE Trans. Smart Grid, vol. 4, no. 4, pp. 1878-1887.

[15] A. Zafar, S. Shah, R. Khalid, S. M. Hussain, H. Rahim, and N. Javaid., 2017. A meta-heuristic home energy management system, in Advanced Information Networking and Applications Workshops (WAINA), 2017 31st International Conference on, pp. 244-250.

[16] Ahmed Shaban, Hagag Maher, Mahmoud Elbayoumi, Suzan Abdelhady., 2021. A cuckoo load scheduling optimization approach for smart energy management, Energy Reports, Volume 7, pp. 4705-4721,
[17] S. Mirjalili., 2016. Sca: a sine cosine algorithm for solving optimization problems, Knowledge-Based Systems, vol. 96, pp. 120–133.

[18] Lee, Kwang Y., and Jong-Bae Park., 2006. Application of particle swarm optimization to economic dispatch problem: advantages and disadvantages. IEEE PES Power Systems Conference and Exposition. IEEE.

[19] Gabis, A.B., Meraihi, Y., Mirjalili, S. et al., 2021. A comprehensive survey of sine cosine algorithm: variants and applications. Artif Intell Rev 54, pp. 5469–5540 https://doi.org/10.1007/s10462-021-10026-y

How to cite this article:

Raidar Ali "A Hybrid Sine Cosine-Particle Swarm Optimization Algorithm for Energy Optimization on Demand Side (DS) of Smart Grid" International Journal of Engineering Works, Vol. 10, Issue 05, PP. 37-45, March 2023.
https://doi.org/10.34259/ijew.23.10053745.

<figure><img src="image_14.png" /></figure>