A New Immersion and Invariance Control and Stable Deep Learning Fuzzy Approach for Power/Voltage Control Problem

Background: The use of renewable energies is extended due to their valuable features such as abundant and clarity. The microgrids that include the renewable energies are widely used in various applications such as power supplying of remote areas, increasing the network reliability, reducing the greenhouse gas emission, reducing the consumption demand, eliminating the consumption peaks, and so on. But, energy management in the these systems in an challenging problem. Because, there are some natural perturbations such as variation output load, grid-side faults and changes of irradiation and temperature. Aim and Objective: The problem is to design a controller to regulate the output voltage/energy under aforementioned disturbances. Methods: The paper presents a new approach for energy management in Photovoltaic (PV)/Battery/Fuel Cells (FC) systems. The uncertainties are compensated by the new optimization rules based on Immersion and Invariance (I&I) theorem and proposed deep learning type-2 fuzzy logic compensator (T2FLC). The objective function of T2FLC is to minimize the tracking error in presence of perturbations. The adaptation rules are derived such that the I&I stabilization criterions are satisfied. Both rules and fuzzy sets (FSs) of T2FLCs are optimized by guaranteed stability rules to tackle the effect of perturbations and estimation errors. Results and Discussion: It is shown that a well voltage/energy regulation performance is achieved under variation of temperature, suddenly changes of load and variation of irradiation. A comparison with similar controllers demonstrates the superiority of the suggested approach. Conclusion: The suggested regulator do not depend on the mathematical models, and results in good accuracy under difficult conditions, then it can be used in various applications.


I. INTRODUCTION
The energy management in microgrids including renewable energies has became one of the interesting topics in past decade. The dynamics of the hybrid systems that contains The associate editor coordinating the review of this manuscript and approving it for publication was Behnam Mohammadi-Ivatloo .
PVs, FCs and batteries are always disturbed by nature factors such as variation output load, grid-side faults and changes of irradiation and temperature. The designing of strong control systems to kept output voltage and power in a desired level is one of the challenging problems [1]- [4].
Many control systems have been presented for power and voltage regulation. For example, the power fluctuation is studied in [5], and a balancing controller is proposed. In [6], a predictive controller is presented to cope with the effect of variation of electricity tariff and irradiation. In [7], an energy management technique is designed by battery charging control scheme to reduce the operating cost. In [8], the dynamics of PV panels and batteries are modeled and then a control system is suggested for stabilizing output voltage. In [9], a multi-objective controller is developed to regulate output voltage under nonlinear output load. The mode-triggered droop controller is designed in [10] for energy management, and its energy distribution capability is examined in various conditions. In [11], a multifunctional controller is developed, the problem of harmonics mitigation is investigated, and improvement of the power quality is shown. In [12], a distributed control method is suggested for power regulation, and robustness against time delays is studied. The coordinated control scheme is developed in [13], to improve the battery life.
To tackle the effect of perturbations and dynamic uncertainties, some fuzzy and neural controllers have been developed [14]. For example, a fuzzy logic controller (FLC) is introduced in [15], and the superiority of FLC is shown under fluctuation of PV power. In [16], the fluctuation of the output load is taken to account, and the efficiency improvement by FLC is shown. In [17], a FLC is designed to make an energy balance between PV and FC, and the parameters of FLC are optimized by genetic algorithm. The energy management is studied by cuckoo algorithm in [18], to compensate PV power shortage in necessary times. In [19], a FLC is proposed to handle the uncertain dynamics of PV and FCs, and by comparison with conventional controllers the good proficiency of FLCs is demonstrated. The effect of fast load variation is studied in [20] by designing an FLC, and it is shown that energy consumption is decreased about 19.6%. In [19], the dynamic perturbation by variation of temperature is studied and an FLC is designed. The PV and FC dynamic modeling is studied in [21], and a simple FLC is suggested for application in electric vehicles. The optimization of hydrogen production is investigated in [22] by FLC, and the superiority of FLCs in term of less required expertise is discussed. Compassion of various approaches in reviewed in [23].
Recently, the better capability of type-2 FLCs and deep learning algorithms have been shown in various problems such as internet of things [24], wireless sensor networks [25], robotics [26], clustering problems [27], power systems [28], electrical vehicles [29], control systems [30], and so on. However, this type of FLCs with guaranteed stability have been rarely studied. In [31], a high-order FLC is presented for estimation of uncertainties in PV and battery dynamics. In [32], a T2FLC is developed to cope with irradiation fluctuations. The main drawback of aforementioned studies is that, only rule parameters are optimized, and the antecedent parameters are neglected. Also, the online stability guarantee in the most of presented controllers needs more investigation. In current paper, we present the novel adaptation laws for uncertain parameters based on I&I theorem. The effect of disturbances such as variation of temperature, fluctuation of irradiation and changes of output load are compensated by the suggested deep learning T2FLC by guaranteed stability. The main contributions and the advantages of the suggested method are: • The novel adaptation laws are presented for uncertain parameters based on I&I theorem.
• The effect of disturbances such as variation of temperature, fluctuation of irradiation and changes of output load are compensated.
• A deep learning T2FLC by guaranteed stability is presented.
• Both rules and FS parameters are optimized.
• The superiority of the designed method is examined under various conditions and comparison with other conventional approaches.

II. PROBLEM FORMULATION A. GENERAL VIEW
The designed control scheme is depicted in Fig. 1. The dynamics are considered to be uncertain. The adaptation rules are derived by the I&I stabilization approach. The perturbations are compensated by the suggested T2FLC. As shown in Fig. 1, unlike the conventional studies [33]- [35], the adaptation laws are derived form I&I stabilization approach. The main uncertain parameters are estimated by the extracted adaptation laws. Then, the estimation error is taken into account, and a T2FLC is designed. The rules of T2FLC are optimized such that the effect of estimation error is eliminated.

B. FUEL CELL
Today, the role of new and renewable energy sources in the production of electricity is not hidden from anyone. In addition to solar, wind, geothermal and biomass energy, fuel cell energy has also become very important. A fuel cell (FC) is a device that generates electricity through a chemical reaction. All fuel cells have two electrical poles (electrodes) called anodes and cathodes. In fact, chemical reactions take place VOLUME 10, 2022   in these electrodes, leading to the generation of electricity. In addition, each FC has an electrolyte and a catalyst; The role of the electrolyte is to move charged particles between the electrodes, while the catalyst speeds up the reactions at the electrodes. Although hydrogen is the main fuel, oxygen is also needed to form the reaction. One of the biggest superiorities of an FC is that it generates electricity with the least amount of pollution. In fact, most of the oxygen and hydrogen entering the cell is eventually released as a harmless by-product, water. An FC generates a very small amount of direct current, which is why a large number of cells are used to generate electricity in large batches called stacks. The dynamics of FC are given as: where, the parameters and variables are described Tables 3-4, in Appendix.

C. CONVERTERS
The switching mechanism between units is constructed by the use of Boost converters. As shown in Figs. 2-5, we have four switching modes. By averaging the four state space models, we obtain:μ where, I p /I b denotes PV/battery currents and V c represents the load voltage.

D. PV MODELING
By the use of single-diode method [36], the dynamics of PV are given as: where, all parameters descriptions are given in Table 5 in Appendix.

E. BATTERY MODELING
The dynamics of battery are written as [36]: The parameter descriptions are given in Table 6, in Appendix.

III. TYP-2 FLC
The type-2 FLSs are the generalization of type-1 counterparts which can support more level of uncertainties. A type-2 fuzzy set has three dimensions, which its third dimension represents the secondary membership. In other words, in type-2 fuzzy sets, the memberships are not crisp values but they are fuzzy numbers. As mentioned earlier, in the power/voltage control problem of microgrids, we face a large number of perturbations, and we need a strong tool to tackle the effect of various disturbances such as dynamic uncertainties, estimation errors of adaptation rules, variation of output load, grid-side faults and changes of irradiation and temperature. Then we formulate a type-2 fuzzy compensator. The structure is given in Fig. 6. The computations are as: 1) The inputs are tracking error (χ (t)), derivative of tracking error dχ(t) dt and integral of tracking error t 0 χ (y) dy.
2) The memberships for are obtained as: where, Mθ χ and M ϑ χ are the centers of MFsθ χ and ϑ χ , respectively.σθ χ /σθ χ is the upper/lower width ofθ χ . σ ϑ χ /σ ϑ χ is the upper/lower width of ϑ χ . Similarly for the input dχ dt we have: 3) The rules firing are obtained as: 4) The output is computed as: where, N represents number of rules and:

IV. I&I ADAPTATION LAWS
In this section the main tuning rules are presented and the stability is investigated. Unlike the most conventional studies, the tuning rules are extracted from I&I stability analysis. The tuning rules for uncertain parameters are considered such that all criteria of I&I theorem are satisfied. Following, the details are given in Theorem 1. Before, the presenting the Theorem 1, the main I&I Lemma is given as: Lemma 1 (I&I Stabilization [37]): Consider the dynamics of under control plant as: where, F (µ) and H (µ) are nonlinear functions with unknown parameters w and equilibrium point µ * . The system (26) is I&I stabilizable, if there is α 1 and α 2 such that all trajectories of (27): are staying on: Our results are given in the Theorem 1. Theorem 1: By the controllers (29)(30) and adaptation rules (31)(32)(33) the stability is ensured.

V. DEEP LEARNED TYPE-2 FUZZY COMPENSATOR
To ensure the stability in versus of I&I approximation error an AT2FLC is presented. The outcomes are given in Theorem 2.
Theorem 2: The stability of the tracking error dynamics (61-62) is ensued in versus of I&I approximation error and dynamic perturbation by the following modified controllers and tuning rules of AT2FLCs: where, u cp z p |X p and u cb (z b |X b ) are AT2FLCs. γ is a constant. Proof: To deeply train the fuzzy compensator by Lyapunov approach, the outputs u cp z p |X p and u cb (z b |X b ) (see (23)) are written as: where, z T p and z T b are vector of tuneable parameters which include both rule (consequent) parameters (z T pc , z T bc ) and centers of FSs (antecedent parameters: z T pa , z T ba ): π T p and π T b are written as: where, where,θ pi andθ bi are upper rule firing and θ pi and θ bi are lower rule firings. The other terms π T pa and π T ba are derivative of u cp z p |X p and u cb (z b |X b ) with respect to the centers of FSs. For instance, the derivatives for Mθ χ can be obtained as: By applying controllers (91-92), the error dynamics become: By adding and subtracting optimal AT2FLCs u cp z * p |X p and u cb z * b |X b , the dynamics (100-101) are rewritten as: From (23), we have: From (104-105), the equations (102-103), are written as: Consider the following definitions: Considering definitions (110-111), equations (108-109), become:χ To investigate the stability, the following Lyapunov is taken to account: From (114),V is obtained as: By substituting (112-113),V becomes: Equation (116), can be written as: The equation (117) is simplified as: From tuning rules of AT2FLCs (93-94),V is written as: From (119), we have: Theε * p andε * b are the upper bounds of ε * p and ε * b . Then if: The asymptotically stability is ensured.

VI. SIMULATION STUDIES
Several examinations are presented in this section. Simulation condition is described in Table 1.

A. SCENARIO 1
For first evaluation, the irradiation is considered to be varied from 250 to 650 (w/m 2 ) at time t = 50s. Fig. 7, shows that the PV current is well converged to its target level. Fig. 8 demonstrates that the voltage V c is kept fixed at its desired level under irradiation disturbances. Fig. 9 shows the well power regulation and finally Figs. 10-11 show the control signals with good shapes and lack of fluctuations.

B. SCENARIO 2
For second evaluation, the irradiation is fixed at 400 (w/m 2 ) and the temperature disturbances is changed from T = 15 into T = 38 ( • C) at time t = 65s. Fig. 12 shows that the PV current well tracks the reference trajectory. Fig. 13 shows a well resistance in versus of temperature variation. Fig. 14 shows the power regulation, and Figs. 15-16 show the control trajectories.

C. SCENARIO 3
For scenario 3, in the difficult examination situation, the temperature, load and irradiation are changed from T = 13 to     T = 48 ( • C), 60 into 40 ( ) from 450 into 150 (w/m 2 ), respectively. The disturbances are depicted in Fig. 17. Fig. 18 shows that PV current tracks its optimal trajectory in versus of different perturbations. Fig. 19 reveals that the output vorlage strongly tackles the effect of disturbances. Fig. 20 shows a desired power regulation, and finally Figs. 21-22 show the control signal with implementable shapes.

D. COMPARISON
In this section, a comparison is presented with Fractionalorder-PID (FO-PID) [38], integral sliding mode controller (SMC) [39], fuzzy PID [40] and intelligent controller by Levy     Whale Optimization (ILWO) [41]. The values of root-meansquare-errors (RMSEs) are depicted in Table 2. We see that, the presented I&I method outperforms than other conventional approaches. Remark 1: The main properties of the designed control technique are that: (1) there is no strong dependency on the mathematical models of units, (2) the new adaptation rules which are extracted form I&I stability theorem, well ensure the stability, (3) the designed T2FLC well compensate the approximation error and perturbations, (4) the designed controller shows a good robust efficiency. To examine the  robustness, in various scenarios, the irradiation is considered to be varied from 250 to 650 (w/m 2 ), the temperature disturbances is changed from T = 15 into T = 38 ( • C), the output load is changed from 60 into 40 ( ), and output power/voltage regulation is evaluated. Simulations show that a good regulation is achieved under aforementioned disturbances and unknown dynamics. Furthermore, a comparison with other conventional approaches such as FO-PID [38], Integral SMC [39], Fuzzy PID [40], and ILWO [41], better reveals the superiority of the suggested I&I-based controller.
Remark 2: It should be noted that, in the most of previous conventional learning approaches, it is needed that the learning algorithms to be repeated in some epochs. However, in the suggested approach, T2FLCs are online updated based on the learning laws that are extracted from I&I theorem, and there is no need to any iterations. In other words, at each sample time, both rules and FS parameters are updated at once. At each sample time, the parameters of rules and FSs are obtained by taking the integral form adaptation rules (93-94). Then, there is no huge computations and its implementation is quite feasible.

VII. CONCLUSION
In this paper a new strategy is developed based on I&I approach for voltage regulation in PV/FC/Battery systems. Some tuning rules are presented for uncertain parameters such that the I&I stabilization criterions are satisfied. The perturbations are compensated by the a suggested deep learning T2FLC. In three faulty conditions the performance is evaluated. For first one, irradiation is suddenly changed from its nominal level, it is shown the PV power well tracks its optimal target, and the output voltage is also well regulated on its reference set point. For the second examination, the effect of variation of temperature is taken to account, and temperature is considered to be time-varying. The simulations show a good resistance against temperature disturbance. Finally, for the last examination, beside variation of temperature and irradiation, the output load is also considered to be time-varying. Simulation results and comparison with other new controllers demonstrates that the suggested control scenario results in better regulation proficiency under uncertain dynamics and difficult faulty conditions.     15 Projects funded from Al-Taif, AlQassiem, Umm Al-Querra and Al-Baha Universities. She shared in the evaluation of many projects for many universities and she is a reviewer of many international scientific journals.

APPENDIX PARAMETERS DESCRIPTIONS
ARDASHIR MOHAMMADZADEH is currenty an Assistant Professor of Control Engineering with the Department of Electrical Engineering, University of Bonab. He also collaborates with Duy Tan University, Da Nang, Vietnam. He has published many papers in most reputed journals. His research interests include control theory, fuzzy logic systems, machine learning, neural networks, intelligent control, electrical vehicles, power systems control, chaotic systems, and medical systems. He is an Academic Editor of Plos One and a Reviewer of several journals, such as IEEE TRANSACTIONS ON FUZZY SYSTEMS, Applied Soft Computing, Nonlinear Dynamics, and many others. AFEF FEKIH (Senior Member, IEEE) received the B.Sc., M.Sc., and Ph.D. degrees in electrical engineering from the National Engineering School of Tunis, Tunisia, in 1995, 1998, and 2002, respectively. She is currently a Full Professor with the Department of Electrical and Computer Engineering and a Chevron/BORSF Professor in engineering with the University of Louisiana at Lafayette, Lafayette, USA. She has authored or coauthored more than 200 publications in international journals, chapters, and conference proceedings. Her research interests include control theory and applications, including nonlinear and robust control, optimal control, fault tolerant control with applications to power systems, wind turbines, and unmanned vehicles and automotive engines. She is a member of the Editorial Board of IEEE Conference on Control Technology and Applications, IEEE TRANSACTIONS ON EDUCATION, and IFAC TC on Power and Energy Systems. VOLUME 10, 2022