Signiﬁcance of SMES Devices for Power System Frequency Regulation Scheme considering Distributed Energy Resources in a Deregulated Environment

: Nowadays, the restructuring of power systems is extremely urgent due to the depletion of fossil fuels on the one hand and the environmental impact on the other. In the restructured environment, the incorporation of renewable energy sources and storage devices is key as they have helped achieve a milestone in the form of microgrid technology. As the restructuring of the power system increases, there are several types of generation sources, and distribution companies express their interest in trading in a deregulated environment to operate economically. When considering the power system deregulation, the contract value deviates in some situations, resulting in an imbalance between the generation and the energy consumption, which can bring the system into a power outage condition. In particular, load frequency control has been a great challenge over the past few decades to ensure the stable operation of power systems. This study considers two generation sources: mini-hydro in GENCO-1 and 3 and microgrid (combination of wind, fuel cell, battery storage, and diesel engine) in GENCO-2 and 4. It is two equal-area networks; in area-1, GENCO-1 and 2, and in area-2, GENCO-3 and 4 are considered, respectively. In addition, a FOPID controller and two ancillary devices, such as a uniﬁed power ﬂow controller and a superconducting magnetic energy storage system, have been incorporated. Three different test networks have been formed according to the contract value, such as unilateral, bilateral, and agreement violations. The simulation results show that ancillary devices and controller participation signiﬁcantly enhance the system response by reducing the frequency and tie-line power ﬂuctuation. To validate the efﬁcacy of the proposed method, respective performance indices and percentages of improvement have been obtained. Finally, this study demonstrated the effectiveness of the proposed restructured power system in a deregulated environment.


Restructured Power System Operation
One of the principal objectives in the area of modern power systems is to ensure their continuous and reliable operation. In the past, there has been a tendency to broaden the share of renewables in the overall energy production with a view of minimizing the environmental impact of the energy sector. However, the operation of renewable energy sources (RES), such as wind turbines and photovoltaics (PVs), especially without energy storage systems (ESS) coordination, is characterized by dynamic power fluctuations [1]. Sudden load demand-generation imbalances may lead to severe frequency and power deviations resulting in damaging the electrical infrastructure and to high economic losses [2]. Therefore, a robust structure must be designed against highly disruptive events to provide power supply to critical loads, especially taking into account the progressive development of renewable generation [3].
Thus, in recent years, there has been a tendency to investigate the load frequency control (LFC) of the power system due to the progressive changes in the generation structure, as a result of the development of RES cooperating with energy storage systems, which, working as microgrids, can affect power system stability. The issue of power system stability is linked to the response of the power system to a disturbance and can be defined as the capability to return to the normal state (all parameters of the power system are within acceptable limits) after an interruption [2]. Thus, the term stability is strictly related to the operation of voltage and frequency regulation systems [4].
Hossain et al. [5] showed that microgrids and distributed energy sources (DES) integrated with ESS are characterized by relatively low vulnerability to extreme weather conditions, allowing enhancing grid reliability and the possibilities of critical customer restorations. However, the authors noted that if RES, such as wind power and photovoltaics (PVs), do not cooperate with ESS, they significantly reduce power system safety due to high variability and unpredictable generation. This may constitute a premise that microgrids should be equipped with advanced control systems and smart metering to significantly reduce the restoration time for critical customers.
The importance of DESs is discussed above, and it is noted that this technology is increasingly implementing globally. Nowadays, using DESs, energy systems are moving towards decentralization to enhance reliability and resiliency. The advantages of a decentralized power system over a centralized one are depicted in Figure 1. On the other hand, socio-technical evolution and the importance of the energy system transition of the decentralized system are explained in [6][7][8].
Energies 2022, 15, 1766 2 of 34 [2]. Therefore, a robust structure must be designed against highly disruptive events to provide power supply to critical loads, especially taking into account the progressive development of renewable generation [3]. Thus, in recent years, there has been a tendency to investigate the load frequency control (LFC) of the power system due to the progressive changes in the generation structure, as a result of the development of RES cooperating with energy storage systems, which, working as microgrids, can affect power system stability. The issue of power system stability is linked to the response of the power system to a disturbance and can be defined as the capability to return to the normal state (all parameters of the power system are within acceptable limits) after an interruption [2]. Thus, the term stability is strictly related to the operation of voltage and frequency regulation systems [4].
Hossain et al. [5] showed that microgrids and distributed energy sources (DES) integrated with ESS are characterized by relatively low vulnerability to extreme weather conditions, allowing enhancing grid reliability and the possibilities of critical customer restorations. However, the authors noted that if RES, such as wind power and photovoltaics (PVs), do not cooperate with ESS, they significantly reduce power system safety due to high variability and unpredictable generation. This may constitute a premise that microgrids should be equipped with advanced control systems and smart metering to significantly reduce the restoration time for critical customers.
The importance of DESs is discussed above, and it is noted that this technology is increasingly implementing globally. Nowadays, using DESs, energy systems are moving towards decentralization to enhance reliability and resiliency. The advantages of a decentralized power system over a centralized one are depicted in Figure 1. On the other hand, socio-technical evolution and the importance of the energy system transition of the decentralized system are explained in [6][7][8]. As far as the practicability of the decentralized system is concerned, it would greatly contribute to rural area electrification. Generally, the reliability of power supply in rural areas is low, particularly in mountainous regions. On the other hand, there is a significant difference between the rural power grid and urban power grid in terms of its standard construction and equipment level. Implementing small hydropower in a rural area is simple but less optimistic and generally unreliable. However, the addition of other renewable sources, such as PV and wind, with small hydro can be the solution to provide reliable power to rural areas. With this objective, this design can be helpful for the energy providers to plan and expand their generations in rural areas. As far as the practicability of the decentralized system is concerned, it would greatly contribute to rural area electrification. Generally, the reliability of power supply in rural areas is low, particularly in mountainous regions. On the other hand, there is a significant difference between the rural power grid and urban power grid in terms of its standard construction and equipment level. Implementing small hydropower in a rural area is simple but less optimistic and generally unreliable. However, the addition of other renewable sources, such as PV and wind, with small hydro can be the solution to provide reliable power to rural areas. With this objective, this design can be helpful for the energy providers to plan and expand their generations in rural areas.

Deregulated Power System-Automatic Generation Control
The study of microgrid operation has been gaining more and more popularity in recent years; however, this involves a need to analyze load frequency control (LFC) and automatic generation control (AGC) issues in a deregulated power system. Taking into account participants of the electricity market, the deregulated power system consists of generation companies (GENCOs), distribution companies (DISCOs), transmission companies (TRANSCOs), and a power system operator, where each DISCO is able to contract power transactions with independent GENCOs [9]. Depending on possible transactions between GENCOs and DISCOs, there are three types of contracts, i.e., unilateral, also known as "poolco-based" contracts, bilateral contracts, and contract violation-based transactions. Unilateral transactions refer to DISCOs-GENCOs contracts within the same area. Bilateral contracts refer to transactions where the power is contracted by DISCO with any GENCOs within its own and other control areas. The last case, i.e., contract violation, refers to a situation where DISCO power demands exceed the power contracted with the GENCO [9,10].
Due to tie-line connections between operating areas, it is important to maintain system frequency in acceptable boundaries both in a normal state and during disturbances in power system operations, which may be triggered by generation-load imbalance. To meet these challenges, the researchers proposed several strategies for the operation of AGC in deregulated power systems [11]. Recent studies on the classical types of AGC controllers have focused mainly on thermal units [12,13]. In [12], the authors presented a comparison of linear, fixed controller types, i.e., integral (I), proportional-integral (PI), and proportional-integral-derivative (PID), operating in deregulated power systems. Among others, the dynamic response of the PID controller reveals its superiority, resulting in a sufficient reduction of frequency oscillation. A novelty in AGC of deregulated multi-area thermal units was presented in [13]. The authors investigated the impact of the fractionalorder proportional-integral-derivative (FOPID) controller on the dynamic response in the analyzed power system. The results indicated that the FOPID controller was characterized by the best performance compared to other controller types, i.e., integral, PI, and PID; furthermore, FOPID can reduce oscillations of the dynamic response not only at nominal loading but also for nominal loading contract violation. Similarly, Arya, in [14], proposed a hybrid FFOPI-FOPD controller (fuzzy fractional-order proportional integral-fractional order proportional derivative) for deregulated power systems, which has a series of advantages, such as minimal values of various error criteria, smooth frequency and generation response in random load demands, and the least oscillation in comparison with linear controllers.
The above-mentioned advantages lead to the conclusion that further studies should be carried out on the application of FOPID controllers in deregulated power systems, especially for a high level of RES integration with ESS.

Deregulated Power System-SMES and FACTS Devices
An extensive review on particular types of controllers in automatic generation-controlled power systems was presented in [15][16][17]. Ghasemi-Marzbali [15] pointed out that, as in [16], classical, linear methods are affected by optimization problems, especially in research on locally optimal solutions. In [15], the author found the potential of new methods capable of improving the accuracy of the solution, such as intelligent algorithms, fuzzy controllers, artificial neural network controllers, and supplementary devices, such as flexible AC transmission systems (FACTS) devices. Pappachen et al. [17] also emphasized the issue of FACTS devices in deregulated power systems, which are used for power flow control, improving network stability and power transmission flexibility, and enhancing power security [18]. FACTS devices, such as the Thyristor-Controlled Phase Shifter, Thyristor-Controlled Series Capacitor (TCPS), Interline Power-Flow Controller (IPFC), and Unified Power-Flow Controller (UPFC), are dedicated to deregulated power systems because of their capability for power frequency oscillation damping [17]. The authors also presented the importance of active energy storage devices, such as superconducting magnetic energy Energies 2022, 15, 1766 4 of 32 storage (SMES) or redox flow batteries (RFB). Incorporating them into a deregulated power system affects power system safety and improves effective frequency control. For the best results, the coordination of energy storage devices and FACTS devices was suggested.
Regarding the concurrent incorporation of active energy storage and FACTS devices in deregulated power systems for AGC purposes, this issue is presented relatively rarely [9,[19][20][21][22][23][24][25][26]. In [19], the authors investigated the impact of the coacted application of IPFC and RFB placed in the tie-line on AGC performance. A similar analysis of the coordinated deployment of IPFC and RFB was conducted in [9]; AGC operation was improved by the PID controller with a filter. Dhundhara et al. [20] highlighted the possibility of using capacitive energy storage to balance the grid frequency and power in terms of an unforeseen load change operating with TCPS. Another novelty in [20] was modeling the thermal and hydro, and gas generating units in the control area. The coordinated application of SMES and TCPS devices was presented in [21][22][23]. In [21], the authors presented a two-area power system model composed of thermal and hydropower units. The operation was improved by an artificial neural network based on an adaptive neuro-fuzzy system, whose performance results were more effective compared to the conventional PI controller and the fuzzy logic controller. On the other hand, in [22], the authors adopted a two-area thermal and gas generating unit system to investigate the Teaching-Learning-Based Optimization and Pattern Search technique with a Tilted Integral Derivative controller for AGC. The influence of the TCPS-SMES coordinated application on the frequency stabilization of the two-area hydro-thermal power system with penetration of wind turbines was presented in [23].
Furthermore, the effect of double-fed induction generators connected to wind turbines, which affects system inertia, was considered. The results showed that the integration of TCPS-SMES improved the dynamic response through active power support. When it comes to concurrent active energy storage and integration of UPFC, in [24], the authors proposed UPFC and RFB to upgrade the operation of the power system. The concept of a two-area system considering thermal, hydro, wind, and diesel generating units based on a realistic network is an interesting aspect of that research. LFC improvement was performed with the use of a Modified Integral Derivative controller optimized with a novel hybrid Differential Evolution and Pattern Search method. In [25,26], the authors showed the effect of the combination of SMES and UPFC. In [25], a two-area power system included thermal and hydro generating units, where AGC was performed with a FOPID controller. The authors emphasized that SMES constitutes a relevant device able to provide a dynamic response to power disturbances in deregulated power system areas, especially with UPFC integration. In [26], the authors proposed a firefly algorithm to optimize the fuzzy PID controller for AGC purposes in a two-area thermal, hydro, and gas power system. The improvement of dynamic responses was achieved with the coordinated operation of UPFC and SMES.

Motivation and Aim of the Work
Despite a valuable analysis of AGC performance, the authors of the above-mentioned papers focused mostly on thermal or hydro-thermal generating sources in deregulated power system areas with the coordinated application of FACTS and active energy storage devices. In [24,25], the authors took into account the share of RES as an element of the analyzed generation system through wind power generation.
This research gap may serve as motivation to undertake further research projects focused on RES integration in deregulated power system areas and on examining controller responses.
The main purpose of this article is to investigate the AGC performance of the studied deregulated two-area test system with the effects of SMES and UPFC devices. Over the past few decades, the penetration of non-hydro renewables has been increasing; however, hydropower is also a clean energy generation source, which can largely participate in the energy sector at a low running price. Nowadays, small/mini/micro hydropower plants are installed throughout the world, which play a crucial role in rural electrification. On the other hand, small/mini/micro hydropower plants can be interconnected into other renewable- based generating stations, which can be termed as microgrids. With these combinations, power can be delivered to consumers through a deregulated environment, where GENCOs and DISCOs have their specific share. Due to environmental uncertainties when considering renewable sources, the generation can fluctuate, leading to an imbalance in frequency deviation. A large deviation can cause the system to collapse, leading to a power system blackout. To this end, efficient storage units and flexible power control devices can be used to counterbalance fluctuation during transient processes. The participation of the SMES unit is vital for the proposed model, as it would provide a high energy back up with a high return efficiency (up to 95%) [27]. In addition, it can operate very fast in a millisecond, which has the key requirement for frequency and generation control.
From the above discussion, the objectives of this research are as follows: 1.
Integrate a RES microgrid operating with SMES into the hydropower unit.

2.
Model and examine the AGC performance, specifying three different transaction cases: unilateral, bilateral, and contract violation.

3.
Investigate the impact of SMES and UPFC devices on high load-changing conditions and uncontracted transactions.

Model Description
The proposed test system is a two-area multi-unit system. Each of the two equal areas, connected with a tie line, includes hydropower units and microgrid parts, which include: The role of hydropower is also important for climate change mitigation and is one of the cheapest renewable energy sources [28]. Although the initial cost is high, the running cost is very low. Hydropower is nowadays very popular in the European region and south China as well. Recent research on the hydro potential for energy production in European countries also inquires the restorability potential of historic hydro sites, such as weirs, dams, and watermills, for small, mini, and micro hydropower infrastructures, including their technical and economic feasibility. In [29], the highest total potential microhydro generation from existing historic sites is estimated for France, Poland, and Finland. Meanwhile, in south China, they have abundant hydro resources and installed more than 1900 power stations [30]. Therefore, if the resources are available, they can be connected to other systems to make them hybrid, and the local power supply will be more accessible without the need for grid supply. The investigated test system is supplemented with the coordinated UPFC device, which is installed in series with the tie line, and SMES units installed in each of the analyzed areas. As far as power system stability is concerned, these devices can significantly dampen the system oscillation and improve the system response and control the power flow. Control of frequency is studied in this paper by using FOPID controllers and ancillary devices.
The key parameters of the two-area multi-unit system model are included in Appendix A.
In this model, a fractional-order proportional-integral-derivative (FOPID) controller is proposed for load frequency control of a two-area multi-unit power system in a deregulated environment. The operation of the two-area power system, which is governed by the controller, needs to arrange an optimization technique to tune and optimize the controller gains. As above, in this paper, a new optimization technique, i.e., Swarm Robotics Search and Rescue (SRSR), is applied to tune the parameter value for the AGC of the two-area power system, coordinated with ancillary devices in the power system, in order to enhance system stability in load frequency control operation.

Deregulated Power System
The total vertical integrated utility (VIU) power system includes GENCOs, TRAN-SOs, DISCOs, along with independent system operators (ISO), and Independent Power Producers (IPPs), as shown in Figure 2. ulated environment. The operation of the two-area power system, which is governed by the controller, needs to arrange an optimization technique to tune and optimize the controller gains. As above, in this paper, a new optimization technique, i.e., Swarm Robotics Search and Rescue (SRSR), is applied to tune the parameter value for the AGC of the twoarea power system, coordinated with ancillary devices in the power system, in order to enhance system stability in load frequency control operation.

Deregulated Power System
The total vertical integrated utility (VIU) power system includes GENCOs, TRANSOs, DISCOs, along with independent system operators (ISO), and Independent Power Producers (IPPs), as shown in Figure 2.  Due to the specificity of the deregulated power system, there are various contract possibilities between GENCOs and DISCOs. Combinations of contracted scenarios can be represented by the DISCO Participation Matrix (DPM), which helps us to identify the contracts easily, presented in (1). The number of columns is equal to the number of DISCOs, while the number of rows refers to the number of GENCOs in a given power system [22]: The contract participation factor cpfij specifies the fraction of the total load power contracted by the j-th DISCO to the i-th GENCO [11]. In general, they satisfy (2): The studied model of the two-area system (resources can be seen in Figure 3) includes power units listed in Table 1. The deregulated power system with ancillary support, such as SMES and UPFC, is modeled in this study. Simulations are carried out through MATLAB software with the transfer function model (see Figure 4) and in consideration of Due to the specificity of the deregulated power system, there are various contract possibilities between GENCOs and DISCOs. Combinations of contracted scenarios can be represented by the DISCO Participation Matrix (DPM), which helps us to identify the contracts easily, presented in (1). The number of columns is equal to the number of DISCOs, while the number of rows refers to the number of GENCOs in a given power system [22]: The contract participation factor cpf ij specifies the fraction of the total load power contracted by the j-th DISCO to the i-th GENCO [11]. In general, they satisfy (2): The studied model of the two-area system (resources can be seen in Figure 3) includes power units listed in Table 1. The deregulated power system with ancillary support, such as SMES and UPFC, is modeled in this study. Simulations are carried out through MATLAB software with the transfer function model (see Figure 4) and in consideration of the open market. Symbols 1 -8 in Figure 4 represent the participation of DISCOs, as discussed in Table 2.
MATLAB software with the transfer function model (see Figure 4) and in consideration of the open market. Symbols 1 -8 in Figure 4 represent the participation of DISCOs, as discussed in Table 2.

Agent Generation Company Type of Generation Unit
The scheduled power balance between the agents based on a tie line is represented as (4): where PL(DC1−GC2)-the demand from DISCO to GENCO (agent-2), PL(DC2−GC1)-the demand from DISCO to GENCO (agent-1).  Table 1. Generation companies in the modeled deregulated power system. The contracts existing between each GENCO and DISCO in the analyzed power system model are represented by the adjusted DPM matrix, expressed in (3).

Agent Generation Company Type of Generation Unit
The scheduled power balance between the agents based on a tie line is represented as (4): where P L(DC1−GC2) -the demand from DISCO to GENCO (agent-2), P L(DC2−GC1) -the demand from DISCO to GENCO (agent-1). The actual tie-line power is given by (5): The actual tie-line power is given by (5): Microgrid-1  Thus, the error of the tie-line power exchange at any instant, indicated by ∆P error tie12 , implicates the area control error (ACE) in the particular area, presented in (6) [31].
The area control error for each agent is specified as (7) and (8) for agent-1 and agent-2, respectively: Energies 2022, 15, 1766 9 of 32 In the steady-state, the cpf factors express the required power generation from a particular GENCO (pu). Finally, expression (9) refers to the total load requirement from the particular DISCO with uncontracted demand and is given as: where ∆P Gi -desired power generation, ∆P Lj -total demand of jth DISCO, ∆P UCi -uncontracted demand, and apf -area participation factor.

Unified Power Flow Control (UPFC)
Nowadays, FACTS have become a favorable model for power system applications due to their ability to increase stability and power transmission capability and their flexible control.
Among FACTS devices, the UPFC is selected for the analyzed power system model, with respect to its ability to regulate the power flow in the transmission line, enhance the dynamic stability, lessen the oscillation of the power system, and deal with the voltage level [32]. Generally, the UPFC converter topology is based on PWM and is installed in series with the tie line.
The deregulated two-agent power system with a UPFC unit is depicted in Figure 5. The shunt converter supplies the regulated shunt voltage; hence, the real part of the current in the shunt branch maintains the real equilibrium power required by the series converter.  Taking into account the above dependencies, according to (10), the real power component is defined in (12): where Vse/Vsh-magnitude of series/shunt voltage; Vs/Vr-magnitude of sending and receiving end voltage; Φse/Φsh-phase angle of series/shunt voltage; X-line inductance; and δ = δs − δr-angle of vs. with respect to Vr. Based on (12), it can be observed that if Vse = 0, it means that the real power refers to an uncompensated system. Notwithstanding the foregoing, at any power angle, the UPFC series voltage magnitude may still be adjusted between 0° and 360°.
The UPFC transfer function model is expressed in (13) [25]: where TUPFC-time constant of UPFC. As per Figure 5, the complex power at the receiving station is given by (10), and the magnitude of series voltage is expressed in (11).

Superconducting Magnetic Energy Storage Device (SMES)
Taking into account the above dependencies, according to (10), the real power component is defined in (12): where V se /V sh -magnitude of series/shunt voltage; V s /V r -magnitude of sending and receiving end voltage; Φ se /Φ sh -phase angle of series/shunt voltage; X-line inductance; and δ = δ s − δ r -angle of vs. with respect to V r . Based on (12), it can be observed that if V se = 0, it means that the real power refers to an uncompensated system. Notwithstanding the foregoing, at any power angle, the UPFC series voltage magnitude may still be adjusted between 0 • and 360 • .
The UPFC transfer function model is expressed in (13) [25]: where T UPFC -time constant of UPFC.

SMES-General Information
SMES is a type of modern energy storage device whose performance is based on the superconducting coil, usually made of niobium-titanium (NbTi) or magnesium diboride (MgB 2 ) [25].
The operation of SMES is based on the accumulation of direct current electricity in a superconducting electromagnet in the form of energy. In a superconducting winding coil, current flows with a minimum loss depending on the type of superconductor, with liquid helium or with nitrogen. This makes it possible to achieve significant current densities in the thin superconducting wire or high-temperature superconducting tape and in a tightly wound winding, relatively high magnetic field energy density. Thus, in small volumes, superconducting coils can accumulate high energies. Although superconducting reservoirs are characterized by a lower energy density in relation to a conventional lead-acid battery, their advantage is a very high density of power that can be charged up or delivered to the grid in a short period of time. Moreover, they are characterized by high efficiency, resulting from the natural conversion of magnetic field energy into electricity and the practically unlimited storage time of the field energy only conditioned by the operation of the cooling system. In the case of SMES, it is necessary to provide a converter for grid forming control [33]. During power exchange, SMES plays a key role in stabilizing the power system in a controlled manner.
Moreover, the megawatt (MW) capacity has been specified from the peak value of the power deviation in the case of SMES. Subsequently, the megajoule (MJ) capacity is found from the energy deviation of SMES, which can be seen in (14) [25].
where ∆E SM Max -maximum energy deviation and ∆E SM Min -minimum energy deviation. The SMES unit with a small storage capacity may constitute a cost-effective device whose performance helps compensate for energy and power for frequency oscillations at the beginning of the functional process and may be useful in power investigations [34]. The schematic block diagram of the SMES device is depicted in Figure 6.
The analyzed model of a deregulated power system includes not only SMES devices but also batteries. When it comes to comparing SMES devices and batteries, each of them plays a different role in power systems due to their work specifications, which are presented in Table 3 [25]. On the other hand, the best compassion of SMES with other storage devices can be seen in [35,36]. The reason behind the application of SMES in the proposed system is that it is a fast-acting device without any delay, which is important for a reliable power supply. As the renewable sources are intermittent, the generation may become low for a while, and at that time, the fast-acting compensation device is required to meet the immediate load demand. The example of SMES unit application in the power system is shown in Figure 7. The following characteristics indicate a high potential for the participation of SMES devices at the beginning of the functional process in order to dynamically respond to disturbances in the power system. the power deviation in the case of SMES. Subsequently, the megajoule (MJ) capacity is found from the energy deviation of SMES, which can be seen in (14) [25].  The SMES unit with a small storage capacity may constitute a cost-effective device whose performance helps compensate for energy and power for frequency oscillations at the beginning of the functional process and may be useful in power investigations [34]. The schematic block diagram of the SMES device is depicted in Figure 6.

Line Filter
Interface Advanced DG storage The analyzed model of a deregulated power system includes not only SMES devices but also batteries. When it comes to comparing SMES devices and batteries, each of them plays a different role in power systems due to their work specifications, which are presented in Table 3 [25]. On the other hand, the best compassion of SMES with other storage devices can be seen in [35,36]. The reason behind the application of SMES in the proposed system is that it is a fast-acting device without any delay, which is important for a reliable power supply. As the renewable sources are intermittent, the generation may become low for a while, and at that time, the fast-acting compensation device is required to meet the immediate load demand. The example of SMES unit application in the power system is shown in Figure 7. The following characteristics indicate a high potential for the participation of SMES devices at the beginning of the functional process in order to dynamically respond to disturbances in the power system. Table 3. Comparison between SMES devices and batteries in power system applications.

SMES Devices Batteries Power density
Higher Lower Energy density Lower Higher Figure 6. Schematic block diagram of the SMES device. Table 3. Comparison between SMES devices and batteries in power system applications.

SMES-Power Modulation
Power modulation carried out within the SMES device operation is strictly connected to its components: DC superconducting coil, AC and DC converter, and transformer (stepdown) [37]. Taking into account the operation of the converter during DC voltage variations, two modes can be distinguished according to the delay angle (α):

SMES-Power Modulation
Power modulation carried out within the SMES device operation is strictly connected to its components: DC superconducting coil, AC and DC converter, and transformer (step-down) [37]. Taking into account the operation of the converter during DC voltage variations, two modes can be distinguished according to the delay angle (α): The superconducting inductor DC voltage E d (losses are neglected) can be expressed as (15): where α-delay angle, I d -current flow through the superconducting inductor, R c -commutating resistance, and V d0 -maximum circuit voltage.
In the case of dynamic changes that cause disturbances in the analyzed object, ∆E di (s) and ∆I di (s) are given in the Laplace domain as follows in (16) and (17) [27].
where K Idi -feedback gain of ∆I di , T dci -time delay (converter), K 0i -constant, and L iinductance of the coil.
To express the inductor power deviation (in the time domain), the real power ∆P smi (t) is expressed in (18): Further, the energy stored in the SMES unit ∆W smi (t) can be seen in (19). The block diagram of the SMES unit is presented in Figure 8. Further, the energy stored in the SMES unit ∆Wsmi(t) can be seen in (19). The block diagram of the SMES unit is presented in Figure 8.  Finally, the input signal for the SMES device control should include ∆Eerror(s). Thus, the ∆Ed(s) signal is given as (20): where KSMES-gain constant, TSMES-time constant, and ∆Eerror(s)-reference value minus output response.

Load Frequency Control-FOPID Controller
Recent developments in control theory have led to a renewed interest in enhancing transient performance through the PID controller with fractional calculus, where the de- Finally, the input signal for the SMES device control should include ∆E error (s). Thus, the ∆E d (s) signal is given as (20): where K SMES -gain constant, T SMES -time constant, and ∆E error (s)-reference value minus output response.

Load Frequency Control-FOPID Controller
Recent developments in control theory have led to a renewed interest in enhancing transient performance through the PID controller with fractional calculus, where the derivative and integral are non-integer types [38]. This distinction is further exemplified in fractional calculus using a mathematical procedure, and it is a non-local calculus. It offers an exceptional mechanism for the characterization of memory and the inherited properties of several resources and processes. These dynamics are taken into consideration; it turns out that a fractional derivative is key in comparison to classical controllers.
Furthermore, the PID controller has been reformed using the concept of fractional calculus, and with that, two control actions, such as derivative and integral. The formation of derivative and integral gain with two more degrees of the tunable parameter gives the greatest extent of flexibility and, therefore, further enhances the performance of classical PID controllers. The FOPID controller is the same as the PID controller except for the two more tunable parameters. Therefore, due to the extra two tunable parameters (µ and λ), the FOPID controller is otherwise called a two-degree of freedom controller, as shown in Figure 9a. It is interesting to note that the FOPID controller can act as a PI, PD, and PID controller with the variation of the values of µ and λ from 0 to 1, and it is defined via µ versus λ diagram, shown in Figure 9b.  Table 4 signifies that the different control actions can be made with a FOPID controller and can be used in different industries according to the requirements. Therefore, this controller has been referred to as one of the best controllers in terms of its performance and measures.

Controller
Transfer Function PD 0 1 + The transfer function of the FOPID controller is expressed as (21) In this study, the FOPID controller is used for the purpose of minimizing the frequency deviation. As can be seen in Figure 4, the controller will act after getting the feedback signal from the output (as a function of frequency), and then the setpoint can be changed in terms of the gain parameters setting of the controller. Accordingly, the frequency deviation will be minimized, and eventually, stable operation can be achieved. In  Table 4 signifies that the different control actions can be made with a FOPID controller and can be used in different industries according to the requirements. Therefore, this controller has been referred to as one of the best controllers in terms of its performance and measures. Table 4. Comparison of PD, PI, PID, and FOPID controllers' tunable parameters.

Controller µ λ Transfer Function
The transfer function of the FOPID controller is expressed as (21) In this study, the FOPID controller is used for the purpose of minimizing the frequency deviation. As can be seen in Figure 4, the controller will act after getting the feedback signal from the output (as a function of frequency), and then the setpoint can be changed in terms of the gain parameters setting of the controller. Accordingly, the frequency deviation will be minimized, and eventually, stable operation can be achieved. In this study, the authors have incorporated the FOPID controller for the best use in terms of system complexity as it operates in a deregulated environment. In addition, it is suited for industrial application as it has two more tunable parameters, which can enhance the transient performance. Moreover, the FOPID controller is important because different contract scenarios are considered in this study. In particular, in the case of contract violation, the system frequency deviates substantially, which has been minimized by the FOPID controller with ancillary services (UPFC and SMES). In this paper, the FOPID controller gains are tuned and optimized with a new optimization technique, i.e., Swarm Robotics Search and Rescue (SRSR), described in detail in Section 5.

Optimization Algorithm
This study considers a novel heuristic optimization method, such as Swarm Robotics Search and Rescue (SRSR), to tune the gains of the FOPID controller. This algorithm has been recently developed, and it adopts an artificial intelligence-based approach to solve continuous non-linear optimization problems.
Generally, the SRSR algorithm is based on the idea of novel swarm robotics and is programmed to recognize specific objects; in this case, to search and rescue a victim in a post-disaster location, i.e., during missions of high-level danger or in unavailable working places. The interaction among robots within a swarm is a master-slave-based operation, where one robot has superiority over the others; however, each one is able to play a temporary master role during a mission. The current role of each individual depends on the quality of the robots' position in the search space. The main task of the master robot is to control the entire swarm and send its updated position to slave robots in a victim searching process in order to direct the swarm to a location with the highest likelihood of victim presence because of its highest peripheral perception from the victim. Slave robots are allotted to a local search near the position of a leader. The new position of the robots can be ranked depending on whether the new position is better than the previous one [39].
When it comes to the SRSR optimization algorithm, the victim location refers to the best global solution. Firstly, robots are randomly distributed in the analyzed area, investigating their local area. On the basis of the gathered data, the roles of master and slave robots are defined. The algorithm basically distinguishes three phases, listed below [39]. The detailed flowchart of the SRSR is shown in Figure 10.

Results and Discussion
The simulations based on the time-domain analysis are performed with the help of the Matlab/Simulink platform. The system parameters (testing) are presented in Appendix A. The proposed system model contains two generation companies and two distribution companies in each agent. Each DISCO is characterized by a 20% load demand.
The observed load perturbation leads to system frequency deviation and power exchange interruption within the tie line. To control and stabilize dynamic frequency changes during load deviations, the incorporation of ancillary devices into the power system should be considered. In the analyzed power system model, SMES is included in both control areas, whereas UPFC is placed along the tie line. The output power generation of each GENCO having different coordinated controllers with various contract scenarios is shown in Table 5. The optimality and effectiveness of the SRSR algorithm have been verified with various benchmarking functions, as can be seen in [39], where the simulations indicated the possibility of implementing the SRSR algorithm in practical electrical power system problems.
Due to the fact that the controller plays an important role in providing a proper setpoint to minimize error and deviations, the authors have tested five benchmark functions to show the effectiveness of the algorithm compared to four other optimization algorithms. The results of the benchmarking test functions are presented in Appendix B.
The SRSR algorithm has been used in this study to optimize the FOPID gains, which has numerous advantages compared to the others, and its effective performance can be verified based on the test function solutions, especially taking into account the standard deviation values.

Results and Discussion
The simulations based on the time-domain analysis are performed with the help of the Matlab/Simulink platform. The system parameters (testing) are presented in Appendix A. The proposed system model contains two generation companies and two distribution companies in each agent. Each DISCO is characterized by a 20% load demand.
The observed load perturbation leads to system frequency deviation and power exchange interruption within the tie line. To control and stabilize dynamic frequency changes during load deviations, the incorporation of ancillary devices into the power system should be considered. In the analyzed power system model, SMES is included in both control areas, whereas UPFC is placed along the tie line. The output power generation of each GENCO having different coordinated controllers with various contract scenarios is shown in Table 5. For all of the three above scenarios, it has been assumed that the total load demand of each DISCO is 0.1 (pu), and the AGC participation factor (apf) is equal for each GENCO: • apf 1 = apf 2 = 0.5 for agent-1, • apf 3 = apf 4 = 0.5 for agent-2.
When it comes to the simulation of current conditions in the analyzed two-area multiunit system, in the unilateral (Test 1) and the bilateral cases (Test 2), the conditions are moderate, with only 10% (0.1 pu) load change considered, and generations are followed as per the contract. However, in the contract violation case (Test 3), the conditions become extreme because 30% (0.3 pu of extra load) has been added unexpectedly. This uncontracted load may constitute a simulation of an adverse event that can disrupt the power system operation. In this case, the frequency deviation can be large, and it may lead to a power system outage.
As noted above, significant changes in the frequency value can lead to power system failure. Hence, a better control strategy and the ancillary device should be adopted to make the system resilient in extreme operating conditions. As far as the deregulated power system is concerned, it has a different contract agreement, and the improper transaction can cause the system to collapse, which needs to be taken care of. To this end, the UPFC and SMES play a key role in maintaining system stability. The UPFC can flexibly transmit power, and the SMES can provide instant support according to need. In this way, the system can operate smoothly under different contract scenarios, which are discussed below.
The results presented in each scenario are focused on the LFC problem. The model has been simulated without the connection of ancillary service, then only UPFC is added, and finally, both UPFC and SMES are added. Each time the output is saved then compared.

Test 1-Unilateral Transaction Scenario
In the case of a unilateral transaction, power contracts between GENCOs and DISCOs are closed only within the same agent. For the purpose of further simulations, only contracts within agent-1 are taken into account. It is assumed that DISCO-1 and DISCO-2 have signed contracts only with GENCO-1 and GENCO-2. In a stable region, power generated by GENCOs must be equal to the demand of the DISCOs according to the contract between them. In the case of a unilateral test, the load has been changed to 10%, and the fixed contract provided for 20% from GENCO-1 and 80% from GENCO-2. The DPM matrix that represents the unilateral contract (Test 1) is estimated and given in (22).
Due to the fact that DISCO-3 and DISCO-4 have no contracts with the GENCOs within agent-2, their contract participation factor (cpf) values in the DPM matrix (22) are equal to 0. The changes in key parameters (frequency and tie-line power fluctuations) in the deregulated power system incorporated with the SMES-UPFC devices and the FOPID controller under the unilateral contract are presented in Figure 11. Based on Figure 11a-c, the frequency response and the tie-line power exchange are improved with the incorporation of the FOPID controller and SMES-UPFC device.

Test 1-Unilateral Transaction Scenario
In the case of a unilateral transaction, power contracts between GENCOs and DISCOs are closed only within the same agent. For the purpose of further simulations, only contracts within agent-1 are taken into account. It is assumed that DISCO-1 and DISCO-2 have signed contracts only with GENCO-1 and GENCO-2. In a stable region, power generated by GENCOs must be equal to the demand of the DISCOs according to the contract between them. In the case of a unilateral test, the load has been changed to 10%, and the fixed contract provided for 20% from GENCO-1 and 80% from GENCO-2. The DPM matrix that represents the unilateral contract (Test 1) is estimated and given in (22).  In order to calculate the desired power generation of each GENCO, Equation (9) can be adjusted as (23): Considering the power generation of the particular GENCO, according to the DPM matrix (22), is calculated as follows: ∆P GENCO-1 = (0.2 × 0.1) + (0.7 × 0.1) + (0 × 0.1) + (0 × 0.1) = 0.09 pu and correspondingly: The power outputs by GENCOs with SMES-UPFC and FOPID incorporation are presented in Figure 11d,e. The controller performance analysis is carried out in terms of peak overshoot and settling time. In Test 1, only contracts within agent-1 are taken into account; therefore, the scheduled steady-state tie-line power flow is equal to zero, and the actual power on the tie line settles to zero. The dynamic performance that can be observed in Figure 11 indicates the oscillations of the test system without UPFC and SMES devices, which are significantly reduced with the use of ancillary devices.

Test 2-Bilateral Transaction Scenario
In the case of a bilateral transaction scenario, each DISCO can contract power with each GENCO without any agent limitations. The DPM matrix that represents bilateral contracts (Test 2) is assumed and given in (24).
Based on the bilateral contracts, the tie-line power exchange from agent-1 to agent-2 is given by: Based on (25), the actual tie-line power is equal to 0.05 pu. Taking into account the power generation of the particular GENCO, according to the bilateral contract DPM matrix (24), is calculated as follows:

Test 3-Agreement Violation Scenario
In the case of agreement violation, despite the contracted power, DISCO demands excess uncontracted power, usually provided by the GENCO within the same agent. The total load demand in the particular agent results from the sum of the contracted load of all particular DISCOs and uncontracted excess load.
The Test 3 scenario is generally based on the bilateral contract scenario (Test 2) with the additional assumption that uncontracted excess power for DISCO-1 is equal to 0.1 pu. Therefore, the total load demand in each agent can be expressed as follows: • In agent-1: The total load demand (∆PD1) = (contracted load of DISCO-1 + contracted load of DISCO-2) + uncontracted excess load = (0.1 + 0.1) + 0.1 = 0.3 pu.
Considering the power generation of the particular GENCO, according to the contract violation case, is calculated as follows (26) Figure 13 shows the output power generation of each GENCO (Figure 13d-g) and the frequency deviation (Figure 13a,b) and tie-line power (Figure 13c) as well. In the case of contract violation in agent-1, the surplus demand of DISCO-1, GENCO-1, and GENCO-2 is disturbed by the uncontracted load demand. Based on Figure 13c, it can be observed that in the deregulated environment, contract violation acts both on the load demand and the power exchange of the tie line. Detailed results of the transient response under frequency and tie-line power exchange deviations are presented in Figures 14 and 15, respectively.

Test 3-Agreement Violation Scenario
In the case of agreement violation, despite the contracted power, DISCO demands excess uncontracted power, usually provided by the GENCO within the same agent. The total load demand in the particular agent results from the sum of the contracted load of all particular DISCOs and uncontracted excess load.
The Test 3 scenario is generally based on the bilateral contract scenario (Test 2) with the additional assumption that uncontracted excess power for DISCO-1 is equal to 0.1 pu. Therefore, the total load demand in each agent can be expressed as follows:
Considering the power generation of the particular GENCO, according to the contract violation case, is calculated as follows (26):  Figures 14 and 15, respectively.
In the case of the contract violation scenario, the authors have assumed that if the contract value is not followed due to any high-disruptive events, it needs to be demonstrated how the system can get disrupted and how it can be controlled. In this case, the frequency deviation can be large, which can lead to a power system outage. This can be avoided by proper tune setting of the controller and ancillary device application. After implementing the ancillary devices, if the deviation is minimal and in an acceptable range, then the system can be called resilient. Therefore, as per the result, the frequency deviation characteristics are close to zero with the use of ancillary devices. In the case of the contract violation scenario, the authors have assumed that if the contract value is not followed due to any high-disruptive events, it needs to be demonstrated how the system can get disrupted and how it can be controlled. In this case, the frequency deviation can be large, which can lead to a power system outage. This can be avoided by proper tune setting of the controller and ancillary device application. After implementing the ancillary devices, if the deviation is minimal and in an acceptable range, then the system can be called resilient. Therefore, as per the result, the frequency deviation characteristics are close to zero with the use of ancillary devices.
As can be seen in Figure 11d,e, Figure 12d-g, and Figure 13d-g, the final and settled value of the GENCOs matches the mathematical calculations, and the power deviations are reported in Table 5.
The proposed model comprises a deregulated power system having the SMES-UPFC combination with FOPID controller operation. The time-domain analysis with different controllers is realized in terms of peak overshoot and settling time too.
The settling is used as a performance index, as shown in Figures 16 and 17. Eventually, the FOPID, with the help of a storage device, shows excellent improvement. Therefore, it is concluded that the participation of storage devices (such as SMES) significantly improves the stability of the system in terms of frequency and exchange power.  This study demonstrates the importance of ancillary devices in frequency regulation schemes. In a low-level fault condition (small deviation of frequency), the system can maintain stability using ancillary services. When considering a high-level fault (large deviation of frequency due to renewable intermittency or contract violation), the system can collapse, which can be evaded by using ancillary services. Therefore, the study uses an ancillary service with three different scenarios: without UPFC, UPFC only, and then UPFC+SMES for unilateral, bilateral, and contract violation. It can be observed that SMES contributes significantly to reducing the frequency and power deviation. Moreover, based on the results, it can be seen that superior results are obtained with a coordinated application of UPFC and SMES devices, compared to others, as the performance indexes, in terms of settling time and peak overshoots, are accordingly lowered. The main gist of this research is that if there is a fixed contract between the GENCO and DISCO, then the GENCO should provide the contract power to DISCO. Thus, GENCO should have the required generation capacity to meet the contract value. However, at certain times, due to intermittencies, the generation is not sufficient, and the storage unit can help meet the contract value. Thus, the system can avoid interruption and power outage problems. As can be seen in Figures 11d-g, 12d-g, and 13d-g, the final and settled value of the GENCOs matches the mathematical calculations, and the power deviations are reported in Table 5.
The proposed model comprises a deregulated power system having the SMES-UPFC combination with FOPID controller operation. The time-domain analysis with different controllers is realized in terms of peak overshoot and settling time too.
The settling is used as a performance index, as shown in Figures 16 and 17. Eventually, the FOPID, with the help of a storage device, shows excellent improvement. Therefore, it is concluded that the participation of storage devices (such as SMES) significantly improves the stability of the system in terms of frequency and exchange power.  As far as the practicability of the proposed system is concerned, it would greatly contribute to the electrification of rural areas. Generally, power supply reliability in rural areas is low, particularly in mountainous regions. In addition, there is a large gap between the rural power grid and urban power grid in terms of its standard construction and equipment level. The implementation of small hydro in a rural area is simple but less optimistic and generally unreliable. However, the addition of other renewable sources, such as photovoltaics and wind, with small hydro can be the solution for providing reliable power to rural areas. With this objective in mind, such a design can be helpful for energy providers in planning and expanding their generation capabilities in rural areas. Furthermore, the proposed design is a purely renewable-based generation scheme, which has a significant value for a sustainable world. However, the proposed scheme has certain limitations, as such design can only be installed in the mountainous area, where hybrid generation can take place, including hydro and other renewables, such as PV and wind.
(a) (b) Figure 16. Comparison of the impact of ancillary device on deregulated power system operation in the case of three contracts with respect to the frequency deviation-percentage improvements relative to the case without ancillary: (a) frequency improvement in area-1; (b) frequency improvement in area-2.
(a) (b) This study demonstrates the importance of ancillary devices in frequency regulation schemes. In a low-level fault condition (small deviation of frequency), the system can maintain stability using ancillary services. When considering a high-level fault (large deviation of frequency due to renewable intermittency or contract violation), the system can collapse, which can be evaded by using ancillary services. Therefore, the study uses an ancillary service with three different scenarios: without UPFC, UPFC only, and then UPFC+SMES for unilateral, bilateral, and contract violation. It can be observed that SMES contributes significantly to reducing the frequency and power deviation. Moreover, based

Conclusions
In this paper, the authors have presented a power system restructured environment using a hydro unit and microgrid by focusing on the system dynamic responses and considering various transaction scenarios. Over the past few decades, the power system has experienced many highly disruptive events, which impacted the social and global economy. As the traditional power systems become centralized, a series of events can largely affect the customers. Therefore, more decentralized networks need to be established in the form of microgrid technology and its interconnection with other networks. This would help avoid the impact following disruptive events, as decentralized networks can operate in an isolated mode. The proposed methodology can be a practical solution to rural electrification, where building a traditional power system is difficult and expensive.
With these objectives, this study demonstrates the importance of a decentralized network and its effectiveness through controllers, such as FOPID, and ancillary devices, such as SMES and UPFC, in a deregulated environment. In addition, a novel artificial intelligence optimization algorithm has been considered to tune the FOPID controller in order to enhance the stability of the power system. Furthermore, different test studies have been carried out through three contract scenarios: unilateral, bilateral, and agreement violation. The simulation results demonstrate that SMES and UPFC devices significantly reduce the frequency and tie-line power deviations.
On the other hand, the microgrid has remarkably maintained the system stability even during the uncontracted scenarios due to the presence of ancillary devices. It has been noted that the participation of controllers with appropriate gain values, as well as ancillary devices, can substantially enhance the system stability during extreme events (such as high-load changing conditions and contract violation conditions). Finally, the percentage of system performance improvement using SMES and UPFC devices has been presented, and it is observed that it plays a key role in the deregulated environment.
This study has been simulated with 10% to 20% load changes and different contract scenarios. As regards the other extreme events, cyber-attack is one of the major consid-erations for future power system designs, as it is becoming increasingly frequent across the globe. In addition, electric vehicles are also an emerging area of research that could be the solution for enhancing the dynamic response and stability of interconnected microgrids. With these concerns in mind, the authors will extend this work by considering the cyber-attack model and electric vehicle in the proposed system to offer better frequency regulation characteristics.

Acknowledgments:
The article was created thanks to participation in the program PROM of the Polish National Agency for Academic Exchange. The program is co-financed from the European Social Fund within the Operational Program Knowledge Education Development, non-competitive project entitled "International scholarship exchange of PhD students and academic staff" executed under Activity 3.3 specified in the application for funding of project No. POWR.03.03.00-00-PN13/18.

Conflicts of Interest:
The authors declare no conflict of interest.  The authors have tested five benchmark functions to show the effectiveness of the algorithm compared to four other optimization algorithms, such as Particle Swarm Optimization (PSO), Independent Component Analysis (ICA), Differential Evolution (DE), and Gravitational Search Algorithm (GSA). The results of the benchmarking test functions are presented in Table A1.