Adaptive frequency control in smart microgrid using controlled loads supported by real-time implementation

The operation of the system’s frequency can be strongly impacted by load change, solar irradiation, wind disturbance, and system parametric uncertainty. In this paper, the application of an adaptive controller based on a hybrid Jaya-Balloon optimizer (JBO) for frequency oscillation mitigation in a single area smart μG system is studied. The proposed adaptive control approach is applied to control the flexible loads such as HPs and EVs by using the JBO which efficiently controls the system frequency. The suggested technique uses the power balance equation to provide a dynamic output feedback controller. The main target is to regulate the frequency and power of an islanded single area μG powered by a PV and a diesel generator with integrations of smart bidirectional loads (HPs and EVs) that are controlled by the proposed adaptive controller in presence of electrical random loads. Moreover, the JBO is designed to minimize the effect of the system load disturbance and parameter variations. For a better assessment, the proposed controller using JBO technique is compared with two other methods which are the coefficient diagram method (CDM) and adaptive one using classical the Jaya technique. In the obtained results, the frequency deviation is found as 0.0015 Hz, which is fully acceptable and in the range of the IEEE standards. The MATLAB simulation results reveal that the suggested technique has a substantial advantage over other techniques in terms of frequency stability in the face of concurrent disturbances and parameter uncertainties. The real-time simulation tests are presented using a dSPACE DS1103 connected to another PC via QUARC pid_e data acquisition card and confirmed the MATLAB simulation results.


Introduction
The primary problems concerning the current climatic conditions are the production of power using conventional methods, particularly from fossil fuels [1,2]. The scholars and researchers are really concerned about paying attention to power generation by clean and management between loads and generators. The measured frequency variation change was 0.016 Hz [32]. In [33], an innovative control method for multi-area linked power systems is the fuzzy-tilt-fractional order integral-filtered derivative controller. The controller settings are optimized using the imperialist competitive method. For the LFC of the μG system while taking into account the state of charge regulation of the battery of the EVs, [34] proposed a unique adaptive MPC technique. On the other hand, one of the algebraic robust control techniques is the coefficient diagram method (CDM) which can be used for robust control design [35,36]. For its simplicity and reliability, CDM is considered one of the important approaches that are still used until this day. In addition, a classic optimizer called 'Jaya' [37][38][39], where it's proposed in this work to determine the optimal value of the integral controller due to its simplicity and speed computational time as introduced in [40,41] to control the flexible loads (i. e. EVs and HPs) according to system dynamics. This work suggests utilizing a Jaya-Balloon optimizer to perform adaptive frequency regulation for controllable loads in an AC smart μG. The considered μG consists of EVs, HPs, diesel generators, electrical load, and PV. The suggested new adaptive controller using hybrid Jaya+balloon optimizer is examined through the effect of frequency fluctuations resulting from both random demand loads and RESs. Furthermore, it is compared with CDM and adaptive one using Jaya techniques to show its robustness and accuracy. As well as, the real-time simulation is implemented to confirm the MATLAB simulation results. A laboratory implementation of the desired controller with the studied system is presented. In this step, the Jaya-Balloon, and Jaya algorithms of EVs and HPs are applied to real-time simulator dSPACE rt1103 and the rest of the system has been designed on PC with QUARC pid_e data acquisition card and MATLAB software with QUARC sub-program. The outputs of algorithms and the system frequency are recorded using a storage oscilloscope.
The main outstanding features of this work can be expressed as follows: • The idea of using the controlled loads (EVs and HPs) is to compensate for the changes in power and frequency due to external disturbances and parameter uncertainties (act as a source), for normal conditions it looks like a load that absorbs power from the μG.
• The effectiveness of an integral controller adjusted by Jaya-Balloon optimizer in regulating frequency is shown in this work.
• The performance of the proposed adaptive technique is compared with that adaptive one based classical Jaya and the conventional CDM.

Microgrid modeling and system dynamics
In this work, an islanded μG that consists of 20MW (1pu) diesel generator, 17MW (0.85pu) load, 6 MW (0.3pu) PVs, 2.38MW (0.12pu) EVs and 1.62MW (0.08pu) HPs has been suggested [19,20]. The block diagram of LFC for the non-reheated turbine μG without a controller is shown in Fig 1. The microgrid can be described by state-space equations as: Where A is the state matrix, B and D are input disturbance matrices, U is the input disturbance vector. Also, :X and Y are state vector and system output, consecutively that they can be given as: where Δf, ΔP g , ΔP d , ΔP L , ΔP solar and ΔP c are the change in frequency, governor, diesel power, load power, solar power and supplementary control respectively. D, H, and R are damping coefficient, inertia constant, and droop characteristics respectively. Also, T t , T g , T PV are time constants of turbine, governor and photovoltaic respectively.

Classical Jaya algorithm
In [15], Rao introduced the standard Jaya technique. It has been classified as parameterless. Therefore, no tuning is required during computations. Jaya has additional advantages such as solving constrained and unconstrained optimization problems, being suitable for fewer design variables, and being victorious by achieving the optimal solution, which makes it more powerful. It only needs mutual control parameters such as (population size, number of design variables, and maximum number of generations). At i t h iteration, if the best candidate gives an optimal value of f(x) in population, this means that it has become the closest to the candidate solutions and the opposite for the worst solution. The value of any j th variable for the k th candidate is X j,k,i , which is updated based on the following equation: where � X j;k;i the updated value of X j,k,i ; X j,best,i is the best value of X j,k,i ;X j,worst,i is the worst value of X j,k,i , and r 1,k,i &r 2,k,i are random numbers between [0, 1]. � X j;k;i will be accepted as the required optimal solution when it gives the best function value. All accepted optimal values will be available as income to the next iteration and continue until the maximum allowable iterations are completed.

Adaptive frequency control based classical Jaya
The unbalance between the demand for real power and its generation at an acceptable nominal frequency causes a problem in controlling the load frequency. Therefore, the proposed adaptive Jaya algorithm has been introduced into the μG to know its effect and activity in solving these issues within LFC. For the proposed μG system,PEV and HP are modeled as a first-order lag system [25,26] as shown in Fig 2, and have been installed in residential areas for frequency regulation in the smart μG system. L represents the total loads and can be expressed as: where ΔP cL is the participation of controlled HP and EV units, and ΔP PV is the participation of photo-voltaic (PV) source. The purpose of the system planning model is to minimize the overall cost of power genera-tedΔP d . For this reason, by considering (DP 0 L ¼ 0), it is better to convert the system into 2 nd order one for getting an objective function (J) with standard parameters. So, the block of (2Hs + D) has been added inside the proposed controller to get the standard parameter η and ω n as follows: ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi M p , t r , t s , ω n , and η are the maximum overshoot, rise time, settling time, natural frequency, and damping coefficient respectively. While c is a constant value that equals 10 for HP and 3.57 for PEV. Finally, the objective function has been chosen to be: J ¼ min P ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi Hybrid JBO method. JBO is a modified Jaya supported by Balloon Effect (BE) identifier, the Idea of BE is to avoid the negative effect of system variations on the Jaya objective function.
Also, G i (S) can be expressed as: where, AL i is a parameter coefficient such that: where, Adaptive frequency control based on JBO. The simplified block diagram of the power system using the proposed JBO for adaptive EVs and HPs control systems is shown in Fig 6. According to the simplified model of the proposed System with JBO shown in Fig 5. It can be noted that at any iteration i.
where, Therefore, the closed loop transfer function at any iteration (i) can be calculated as: Then o n;i ¼ ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi The objective function at any iteration i can be represented as: It is clear now that the objective function at any iteration (i) is a function in k i , AL i (Obj = f (k i , AL i )). This means that the system variations will affect immediately the value AL i and objective function and this will increase the ability of JBO to deal with the system difficulties. The flow chart of the Jaya algorithm is shown in Fig 7. On the other hand, for the proposed islanded μG, many sources have been used as additional power sources besides diesel generators such as PV and power of smart flexible loads which are represented in HPs and EVs as shown in Fig 4. The dynamic relationship of generator-load between the supply error (DP d À DP 00 L ) and frequency deviation (Δ � f) is expressed as follows: where DP 00 and (�) denotes differential operator.

Results and discussions
The suggested adaptive approach is linked within the system to demonstrate the performance of LFC as shown in Fig 9. In order to approve the proposed scheme validation, digital simulations have been performed using MATLAB/Simulink software. System nominal parameters and hybrid JBO selection parameters have been proposed in this study to get the optimal value of the integral controller of flexible loads and are consecutively listed below in Tables 1 and 2. For validation of the JBO role, contrasting three different control approaches, simulation experiments are used to examine the performance of the proposed controller under various cases. In these cases, the stability and frequency variation responses of the proposed control technique are compared to those of a designed controller built on CDM and Jaya techniques. Performance assessment of the islanded μG under the effects of RESs uncertainties and random demand loads is analyzed for clarifying the role of the JBO method. The studied μG system is validated in case of random load variation and fluctuation resulting from the PV source. The simulated PV power disturbances response is shown in Fig 10(a) for 24 hr., and this PV power pattern is attained based on the incoming irradiance profile. Fig 10(b) shows a random load for 24 hr. These severe variations reflect the robustness and efficacity of the proposed adaptive controller.
The effectiveness of the investigated controllers is contrasted in Fig 11(a) in terms of frequency deviation. In terms of maximal overshoot, settling time, and steady-state error, the hybrid JBO approach outperforms Jaya and CDM methods [42]. As shown in Fig 11(a), it is noteworthy that the Jaya technique performs better and offers greater relative stability than the CDM method. Fig 11(a) indicates that the deviation of the frequency with the suggested controller is less than ± 0.0005 Hz, while this deviation arrives at ± 0.0015 Hz, and ± 0.00097 Hz in the case of CDM, and Jaya, respectively. The frequency augmentation utilizing the suggested control strategy is supported by these data . Fig 11(b) shows the deviation of diesel generator power change with the three investigated controllers. According to Fig 11(b) this deviation with the proposed controller is less than 0.00183 pu, while this deviation attains at ± 0.00432 pu, and 0.00383 pu in the case of CDM, and Jaya, respectively. The required diesel generation power using the proposed adaptive JBO is smaller than with the CDM and Jaya methods and that indicates the role of the proposed hybrid JBO . Fig 11(c) shows the deviation of EVs and HPs power change with the three studied techniques. It is clarified that; a large and fast discharging is taking place in the power of EVs and HPs with the proposed adaptive JBO compared with the other techniques. With the JBO the changes from (-0.008 to 0.0074), with Jaya from (-0.006 to 0.0074), and with CDM from (-0.004 to 0.002). Fig 12, shows the implementation block diagram of the proposed system using a real-time simulator. The studied islanded μG is divided into a control setup (Jaya algorithms of HPs and EVs installed in the dSPACE rt1103 real-time simulator) and the rest of the system installed on a PC with QUARC pid_e data acquisition card (physical system). Fig 13 illustrates the physical setup of the proposed real-time simulation system. A real-time simulation test has been made at the same random load and PV source used in the previous scenario. Fig 14 shows the frequency response of the system with the CDM controller and with the proposed adaptive one. It can be noted from Fig 14, that the hybrid JBO technique can be implemented successfully to tune the controllers of the bidirectional loads such HPs and PEVs to regulate the total system frequency. This study aims to alleviate the impact of a mismatch in demand and generation on frequency, besides diminishing the variation in frequency deviation. To show and prove the  Table 3 is provided. This table compares the current work with previously published papers in this field in terms of simplicity, applied controller, studied cases, and μG components.

Conclusion
μG components such as (EVs/HPs/PV/diesel generator/loads) are constantly changing in addition to other intermittent disturbances, which may substantially impair closed-loop performance. An adaptive controller based on hybrid JBO approach is provided for frequency  regulation in the presence of various disturbances, in contrast to the overwhelming majority of classic, which are not guaranteed to deliver an acceptable performance over a wide range of running conditions. A mathematical hybrid JBO model is extracted based on μG parameters and the state-space representation of the whole system is derived. The JBO synthesis algorithm is exploited to eliminate frequency fluctuations for different uncertain conditions. The responses of frequency deviation are used to evaluate the suggested controller's performance.
The simulated results show that the suggested controller performance enhancement is superior in all cases that have been considered. Digital simulation has been presented to test the system with the proposed control method under the effect of full injection of random demand loads and integration of PV sources. A comparative performance study between the proposed controller adjusted by the JBO and CDM controller has been carried out and a close analysis of the final results is obtained. It is observed that the proposed approach can effectively make online tuning of the controller gains to damp out the oscillations and provides a significant improvement within the proposed μG. Therefore, a controller with gains tuned by JBO is recommended to help in solving LFC problems and reducing oscillations inside the area. Finally, a laboratory implementation of the desired controller with the studied system was presented using dSPACE rt1103 along with QUARC pid_e data acquisition card to confirm the robustness and effectiveness of the proposed adaptive controller for PEVs and HPs on islanded μG.