# A New Type-3 Fuzzy PID for Energy Management in Microgrids

Authors: Weiping Fan; Ardashir Mohammadzadeh; Nasreen Kausar; Dragan Pamucar; Nasr Al Din Ide
Journal: Advances in Mathematical Physics
 (2022)

---

## Abstract

More recently, type-3 (T3) fuzzy logic systems (FLSs) with better learning ability and uncertainty modeling have been presented. On other hand, the proportional-integral-derivative (PID) is commonly employed in most industrial control systems, because of its simplicity and efficiency. The measurement errors, nonlinearities, and uncertainties degrade the performance of conventional PIDs. In this study, for the first time, a new T3-FLS-based PID scheme with deep learning approach is introduced. In addition to rules, the parameters of fuzzy sets are also tuned such that a fast regulation efficiency is obtained. Unlike the most conventional approaches, the suggested tuning approach is done in an online scheme. Also, a nonsingleton fuzzification is suggested to reduce the effect of sensor errors. The proposed scheme is examined on a case-study microgrid (MG), and its good frequency stabilization performance is demonstrated in various hard conditions such as variable load, unknown dynamics, and variation in renewable energy (RE) sources.


---

## Body

## 1. Introduction

Today, as technology advances and the consumerist population grows, providing sustainable, safe, and clean energy is one of the human’s core concerns. Regarding limitation of non-RE resources and the environmental problems caused by their consumption, different countries have decided to choose other energy sources, including renewable sources, as a future and sustainable energy source. Although RE sources are available worldwide, many of these sources are not available seven days a week, 24 hours a day. Some days may be windier than others, the sun does not shine at night, and droughts may occur for a period of time. It can be unpredictable weather events that disrupt these technologies. To improve the sustainability, some energy storage systems and modern controllers should be used to make a balance between consumption and germination [1, 2].Because of its simplicity and capacity, PID control systems are extensively employed in most industrial problems such as mechanical engineering, chaotic systems, and electrical engineering [3]. In proportional control mode of PID, the output is proportional to the amount of error (hence, it is called proportional). If the error is large, the controller output is large, and if the error is small, the controller output is small. The adjustable parameter of proportional control is called controller gain. The higher the controller gain leads to the higher the proportional error. If the gain is adjusted too high, the control loop will start to oscillate and become unstable [4]. On the other hand, if the gain is too low, responding to disturbances or changes in the setpoint will not be effective enough. There is one major drawback to using a proportional controller alone, and that is offset. Offset is a persistent error that cannot be eliminated by proportional control alone. The integrated control mode continuously increases or decreases the controller output to minimize error. By the larger error, the integral mode increases or decreases the output rapidly, and by the smaller error, changes will be occur more slowly. The output of the derivative controller is directly related to the error rate over time. Derivative controllers are generally used when process variables start to fluctuate or change at very high speeds. Derivative controllers are also used to predict the future performance of the error by means of an error curve. In this mode, when the error changes are large, the derivative mode will produce more control action. When the error does not change, the derivative operation will be zero. When the derivative time is too long, fluctuations occur in this mode and the closed loop becomes unstable. Then, in real-world applications, the PID parameters should be carefully tuned [5–7].


## 2. Literature Review

The main approach that has been frequently used for PID tuning is the use of evolutionary based methods. For example, the fractional PID is investigated in [8], and by the use of grasshopper optimization algorithm, the parameters of PID are tuned. In [9], a predictive controller is used to improve the performance of PI controller. In [10], a regulator is constructed using a reinforcement method, and it is evaluated on an isolated MG. The developed genetic algorithm (GA) by the use of nondominated sorting approach is suggested in [11], to design a frequency regulator. The application of FLSs in designing of voltage controller is studied in [12]. The particle swarm optimization (PSO) is used in [13] for optimization, and it is examined on an inverter-based MG. In [14], the various approaches are reviewed.One of main approaches to tune the PIDs is the use of FLSs and neural networks [15, 16]. The FLSs are widely used for approximation problems [17, 18]. For example, in [19], a PID is designed using type-1 FLSs, and it is applied for temperature control. In [20], a defuzzification is suggested for FLSs to decrease the computations, and then, a PID is designed based on the simplified FLS. The backstepping PID is studied in [21], and a FLS is formulated to estimate the uncertainties. Similar to classical PIDs that are reviewed in the above paragraph, some evolutionary-based algorithms have also been developed for tuning of FLS-PIDs. In these methods, the evolutionary-based techniques are used to tune FLS rules, and the output of FLSs determines the gains of PID [22]. In [23], a fractional-order version of PID is designed, and one FLS is used to optimize all gains. In [24], the frequency control in MG is studied, and a FLS-based PID is schemed. In [25], the efficiency of FLS-PID is examined on a power system, and the accuracy improvement by FLSs is shown. A comparative study in [26] shows that FLSs well amend the accuracy of PIDs in versus of disturbances and uncertainties.The type-2 FLSs have been rarely used in MG. For example, in [27], a deep-learned T2-FLS-based control technique is developed, and the good efficiency of T2-FLSs is verified. In [28], a T2-FLS is formulated for optimizing a PID, and its performance is examined by a stabilization problem in MGs. In [29], the membership functions of a generalized IT2FS are optimized, and a controller is designed for both frequency and voltage management. The equilibrium optimization scheme is used in [30] for tuning the parameters of PID controller on the basis of T2-FLSs. In [31], a type-2 PID is developed, and its efficiency is compared by applying on MG. In [32], the efficiency of the T2-FLS-based control systems is evaluated on the basis of Harris approach. A PID is developed in [33] using T2-FLSs, and it is demonstrated that high-order FLSs enhance the accuracy.More recently, it has been shown that high-order FLSs such as type-3 FLSs and generalized FLSs give better efficiency in real-world engineering problems. For example, in [34], a T3-FLS is used for energy management, and by various comparisons, the superiority of T3-FLSs is shown. In [35], a T3-FLS-based controller is designed for MGs and the fluctuation of solar energies is tackled by the use of T3-FLSs. The capability of T3-FLSs in a real-world 5G telecom application is tested in [36], and it is verified that T3-FLSs result in better stabilization efficiency. Similarly, in [37], the better estimation efficiency and stabilization performance of T3-FLSs are examined in an experimental DC power system.


## 3. Motivations

The literature review shows that in most of PID tuning approaches, trial-and-error methods and some evolutionary algorithms are commonly used. However, the uncertainties, nonlinearities, and changes in dynamic parameters decrease the performance of conventional approaches. Also, the evolutionary-based approaches are not suitable for practical systems, due to the high computational process of these algorithms. Furthermore, in most of investigated methods, the tuning is done in an off-line schedule, and then, the unpredictable online disturbances are not supported. Although some FLS-based PIDs have been presented, most of the conventional FLSs are vulnerable to the plant’s uncertainties, sensor errors, and nonlinearities.


## 4. Novelettes

The basic advantages of the designed regulator are as follows:(i)
A type-3 FLS-based PID with higher capability and using fractional-order calculus is introduced(ii)
There is no need for MG dynamics(iii)
Unlike most FLS-based PIDs, the structure of the suggested approach is nonlinear(iv)
In addition to rules, the MFs are also tuned to speed up the learning(v)
The tuning is done in an online approach, and the suggested PID is updated, at each sample time(vi)
All gains are tuned simultaneously(vii)
Nonsingleton fuzzification decreases the effect of sensor error(viii)
In various hard conditions, such as considering load changes, variation of wind/solar powers, and dynamic disturbances, the better efficiency of the suggested approach is demonstrated


## 5. Problem Formulation

Power imbalance is felt by its effect on the speed or frequency of the generator. If the load is reduced and the output is increased, the generator tends to enhance its speed/frequency. By increasing load and production shortage, the speed/frequency of the generator decreases. The variation of frequency from its nominal value is chosen as a signal to excite the automatic controller. Then, a power balance at a constant frequency is an important problem [38, 39].The load frequency control (LFC) loop responds only to small amplitude and slow load and frequency changes and is unable to control in emergencies and the resulting power imbalance. System control in emergencies and sudden changes is examined by studying the transient stability and protection of systems.A general view is shown in Figure1. The designed control scheme does not use the mathematical models. The suggested control technique is well optimized and tackles the effect of perturbations such as variation of weather conditions and output lead.Figure 1
General diagram.The main purposes of LFC are as follows: maintaining the frequency uniformly, dividing the system load between the generators optimally and preferably economically, and regulating the power exchanged from the communication lines in the planned values. In fact, the change in the frequency of the system and the actual power of the communication lines must be eliminated by changing the output.


## 6. Fuzzy PID Controller

PIDs are commonly employed in most industrial control systems because of their simplicity and capacity. The control performance of conventional PIDs degrades under nonlinearities, uncertainties, and parameter changes. In the conventional FLS-based PIDs, FLSs are used to alter the PID gains. The closed-loop error and its derivative are commonly used as inputs of FLSs. The output of FLS determines the gains of PIDs. In the suggested approach, the output of designed type-3 FLS directly determines the output. The input variables are error and its fractional derivative and integral. Rules of FLS are tuned such that an error-based cost function is minimized. The general scheme is shown in Figure2.Figure 2
General view.


## 7. Type-3 FLS

The type-3 FLS [40] is a more capable version of the type-2 FLS. Figure 3 depicts a broad overview of the hypothesized T3-FLS. In T3-FLSs, secondary membership function (MF) is likewise a type-2 MF, as illustrated in Figure 4. In contrast to conventional MFs, the top/lower boundaries of memberships are not constant. Because of these characteristics, type-3 MFs can manage a higher amount of uncertainty. The computations are discussed in this section:
(1)
The input variables aree, Itqe, and Dtqe, where
(1)Dtqet=∫0tex/t−xqdxΓ1−q,Itqet=∫0tt−xq−1exdxΓq(2)
For inputse, Itqe, and Dtqe, MFs are considered as M~e1−M~e2, MItqe1−M~Itqe2, and MDtqe1−M~Dtqe2, respectively. As illustrated in Figure 4, each MF is horizontally split into n levels. The memberships for horizontal slice level βh are calculated for each input, as illustrated in Figure 4. A Gaussian MF is considered for inputs to handle the sensor errors. The upper/lower memberships at level βh for input e are calculated as follows:
(2)υ¯M~ejβ¯h=exp−e¯β¯h−cM~ejβ¯h2ϑ¯M~ejβ¯h2,υ¯M~ejβ¯h=exp−e¯β¯h−cM~ejβ¯h2ϑ¯M~ejβ¯h2,υ¯M~ejβ¯h=exp−e¯β¯h−cM~ejβ¯h2ϑ¯M~ejβ¯h2,υ¯M~ejβ¯h=exp−e¯β¯h−cM~ejβ¯h2ϑ¯M~ejβ¯h2,where
(3)e¯β¯h=eϑ¯M~ejβ¯h2+σs2cM~ejβ¯hϑ¯M~ejβ¯h2+σs2,e¯β¯h=eϑ¯M~ejβ¯h2+σs2cM~ejβ¯hϑ¯M~ejβ¯h2+σs2,e¯β¯h=eϑ¯M~ejβ¯h2+σs2cM~ejβ¯hϑ¯M~ejβ¯h2+σs2,e¯β¯h=eϑ¯M~ejβ¯h2+σs2cM~ejβ¯hϑ¯M~ejβ¯h2+σs2,where, h=1,⋯,n, j=1,2, cM~ejβ¯h is the center of MF M~ejβ¯h, and ϑ¯M~ejβ¯h and ϑ¯M~ejβ¯h are the upper/lower standard-divisions (SD) for M~ejβ¯h. For input Itqe, we have
(4)υ¯M~Itqejβ¯h=exp−Itqe¯β¯h−cM~Itqejβ¯h2ϑ¯M~Itqejβ¯h2,υ¯M~Itqejβ¯h=exp−Itqe¯β¯h−cM~Itqejβ¯h2ϑ¯M~Itqejβ¯h2,υ¯M~Itqejβ¯h=exp−Itqe¯β¯h−cM~Itqejβ¯h2ϑ¯M~Itqejβ¯h2,υ¯M~Itqejβ¯h=exp−Itqe¯β¯h−cM~Itqejβ¯h2ϑ¯M~Itqejβ¯h2,where
(5)Itqe¯β¯h=Itqeϑ¯M~ejβ¯h2+σs2cM~ejβ¯hϑ¯M~ejβ¯h2+σs2,Itqe¯β¯h=Itqeϑ¯M~ejβ¯h2+σs2cM~ejβ¯hϑ¯M~ejβ¯h2+σs2,Itqe¯β¯h=Itqeϑ¯M~ejβ¯h2+σs2cM~ejβ¯hϑ¯M~ejβ¯h2+σs2,Itqe¯β¯h=Itqeϑ¯M~ejβ¯h2+σs2cM~ejβ¯hϑ¯M~ejβ¯h2+σs2,where h=1,⋯,n, j=1,2, cM~Itqejβ¯h denotes center of M~Itqejβ¯h, and ϑ¯M~Itqejβ¯h and ϑ¯M~Itqejβ¯h are the upper/lower SD for M~Itqejβ¯h. Similarly, for Dtqe, we have
(6)υ¯M~Dtqejβ¯h=exp−Dtqe¯β¯h−cM~Dtqejβ¯h2ϑ¯M~Dtqejβ¯h2,υ¯M~Dtqejβ¯h=exp−Dtqe¯β¯h−cM~Dtqejβ¯h2ϑ¯M~Dtqejβ¯h2,υ¯M~Dtqejβ¯h=exp−Dtqe¯β¯h−cM~Dtqejβ¯h2ϑ¯M~Dtqejβ¯h2,υ¯M~Dtqejβ¯h=exp−Dtqe¯β¯h−cM~Dtqejβ¯h2ϑ¯M~Dtqejβ¯h2,where
(7)Dtqe¯β¯h=Itqeϑ¯M~ejβ¯h2+σs2cM~ejβ¯hϑ¯M~ejβ¯h2+σs2,Dtqe¯β¯h=Dtqeϑ¯M~ejβ¯h2+σs2cM~ejβ¯hϑ¯M~ejβ¯h2+σs2,Dtqe¯β¯h=Dtqeϑ¯M~ejβ¯h2+σs2cM~ejβ¯hϑ¯M~ejβ¯h2+σs2,Dtqe¯β¯h=Dtqeϑ¯M~ejβ¯h2+σs2cM~ejβ¯hϑ¯M~ejβ¯h2+σs2,where h=1,⋯,n, j=1,2, cM~Dtqejβ¯h denotes the center of M~Dtqejβ¯h, and ϑ¯M~Dtqejβ¯h and ϑ¯M~Dtqejβ¯h are the upper/lower SD for M~Dtqejβ¯h.
(3)
The rule firing atβ¯h is obtained as(8)η¯β¯h1=υ¯M~e1β¯hυ¯M~Itqe1β¯hυ¯M~Dtqe1β¯h,η¯β¯h2=υ¯M~e1β¯hυ¯M~Itqe1β¯hυ¯M~Dtqe2β¯h,η¯β¯h3=υ¯M~e1β¯hυ¯M~Itqe2β¯hυ¯M~Dtqe1β¯h,η¯β¯h4=υ¯M~e1β¯hυ¯M~Itqe2β¯hυ¯M~Dtqe2β¯h,η¯β¯h5=υ¯M~e2β¯hυ¯M~Itqe1β¯hυ¯M~Dtqe1β¯h,η¯β¯h6=υ¯M~e2β¯hυ¯M~Itqe1β¯hυ¯M~Dtqe2β¯h,η¯β¯h7=υ¯M~e2β¯hυ¯M~Itqe2β¯hυ¯M~Dtqe1β¯h,η¯β¯h8=υ¯M~e2β¯hυ¯M~Itqe2β¯hυ¯M~Dtqe2β¯hFigure 3
A general view on T3-FLS.Figure 4
Type-3 MF.Forβ¯h, we have
(9)η¯β¯h1=υ¯M~e1β¯hυ¯M~Itqe1β¯hυ¯M~Dtqe1β¯h,η¯β¯h2=υ¯M~e1β¯hυ¯M~Itqe1β¯hυ¯M~Dtqe2β¯h,η¯β¯h3=υ¯M~e1β¯hυ¯M~Itqe2β¯hυ¯M~Dtqe1β¯h,η¯β¯h4=υ¯M~e1β¯hυ¯M~Itqe2β¯hυ¯M~Dtqe2β¯h,η¯β¯h5=υ¯M~e2β¯hυ¯M~Itqe1β¯hυ¯M~Dtqe1β¯h,η¯β¯h6=υ¯M~e2β¯hυ¯M~Itqe1β¯hυ¯M~Dtqe2β¯h,η¯β¯h7=υ¯M~e2β¯hυ¯M~Itqe2β¯hυ¯M~Dtqe1β¯h,η¯β¯h8=υ¯M~e2β¯hυ¯M~Itqe2β¯hυ¯M~Dtqe2β¯h.The lower firing degree of rules at upper/lower slice levels is obtained as(10)η¯β¯h1=υ¯M~e1β¯hυ¯M~Itqe1β¯hυ¯M~Dtqe1β¯h,η¯β¯h2=υ¯M~e1β¯hυ¯M~Itqe1β¯hυ¯M~Dtqe2β¯h,η¯β¯h3=υ¯M~e1β¯hυ¯M~Itqe2β¯hυ¯M~Dtqe1β¯h,η¯β¯h4=υ¯M~e1β¯hυ¯M~Itqe2β¯hυ¯M~Dtqe2β¯h,η¯β¯h5=υ¯M~e2β¯hυ¯M~Itqe1β¯hυ¯M~Dtqe1β¯h,η¯β¯h6=υ¯M~e2β¯hυ¯M~Itqe1β¯hυ¯M~Dtqe2β¯h,η¯β¯h7=υ¯M~e2β¯hυ¯M~Itqe2β¯hυ¯M~Dtqe1β¯h,η¯β¯h8=υ¯M~e2β¯hυ¯M~Itqe2β¯hυ¯M~Dtqe2β¯h,η¯β¯h1=υ¯M~e1β¯hυ¯M~Itqe1β¯hυ¯M~Dtqe1β¯h,η¯β¯h2=υ¯M~e1β¯hυ¯M~Itqe1β¯hυ¯M~Dtqe2β¯h,η¯β¯h3=υ¯M~e1β¯hυ¯M~Itqe2β¯hυ¯M~Dtqe1β¯h,η¯β¯h4=υ¯M~e1β¯hυ¯M~Itqe2β¯hυ¯M~Dtqe2β¯h,η¯β¯h5=υ¯M~e2β¯hυ¯M~Itqe1β¯hυ¯M~Dtqe1β¯h,η¯β¯h6=υ¯M~e2β¯hυ¯M~Itqe1β¯hυ¯M~Dtqe2β¯h,η¯β¯h7=υ¯M~e2β¯hυ¯M~Itqe2β¯hυ¯M~Dtqe1β¯h,η¯β¯h8=υ¯M~e2β¯hυ¯M~Itqe2β¯hυ¯M~Dtqe2β¯h.Considering the type reduction, the upper/lower bounds of control signal is computed as(11)y^¯β¯h=∑l=1nrη¯β¯hlρ¯l∑l=1nrη¯β¯hl+η¯β¯hl,y^¯β¯h=∑l=1nrη¯β¯hlρ¯l∑l=1nrη¯β¯hl+η¯β¯hl,y^¯β¯h=∑l=1nrη¯β¯hlρ¯l∑l=1nrη¯β¯hl+η¯β¯hl,y^¯β¯h=∑l=1nrη¯β¯hlρ¯l∑l=1nrη¯β¯hl+η¯β¯hl,where nr denotes the number of rules and ρ¯l and ρ¯l are the lower/upper of lth rule parameters.The second type reduction is computed as(12)y^¯=∑h=1nβ¯hy^¯β¯h∑h=1nβ¯h+β¯h+∑h=1nβ¯hy^¯β¯h∑h=1nβ¯h+β¯h,y^¯=∑h=1nβ¯hy^¯β¯h∑h=1nβ¯h+β¯h+∑h=1nβ¯hy^¯β¯h∑h=1nβ¯h+β¯h.The outputy^ (control signal) is computed as
(13)y^=y^¯+y^¯2.


## 8. Learning Algorithm

The rule and MFs are tuned in this part.


### 8.1. Tuning of Rule Parameters

The EKF method tunes the rule parameters such that (14) is minimized:
(14)J=12y∧2,where y^ is the output T3-FLS that denotes control signal. The adjusting laws for ρ¯ and ρ¯ are computed as
(15)ρ¯t=ρ¯t−1+ξ¯tχ¯t−y^,ρ¯t=ρ¯t−1+ξ¯tχ¯t−y^,where ξ¯ and ξ¯t are covariance matrices for ρ¯ and ρ¯, respectively. χ¯t and χ¯t are
(16)χ¯=χ¯1,⋯,χ¯l,⋯,χ¯nrT,χ¯=χ¯1,⋯,χ¯l,⋯,χ¯nrT,where χ¯l and χ¯l are
(17)χ¯l=∂y^∂ρ¯l=∂y^∂y^¯∂y^¯∂ρ¯l=∂y^∂y^¯∂y^¯∂y^¯β¯h∂y^¯β¯h∂ρ¯l+∂y^∂y^¯∂y^¯∂y^¯β¯h∂y^¯β¯h∂ρ¯l=0.51∑h=1nβ¯h+β¯h∑h=1nβ¯hη¯β¯hl∑l=1nrη¯β¯hl+η¯β¯hl+=0.51∑h=1nβ¯h+β¯h∑h=1nβ¯hη¯β¯hl∑l=1nrη¯β¯hl+η¯β¯hl,χ¯l=∂y^∂ρ¯l=∂y^∂y^¯∂y^¯∂ρ¯l=∂y^∂y^¯∂y^¯∂y^¯β¯h∂y^¯β¯h∂ρ¯l+∂y^∂y^¯∂y^¯∂y^¯β¯h∂y^¯β¯h∂ρ¯l=0.51∑h=1nβ¯h+β¯h∑h=1nβ¯hη¯β¯hl∑l=1nrη¯β¯hl+η¯β¯hl+=0.51∑h=1nβ¯h+β¯h∑h=1nβ¯hη¯β¯hl∑l=1nrη¯β¯hl+η¯β¯hl.


### 8.2. Tuning of MF Parameters

The centers of MFs are adjusted using the gradient descent. The tuning laws are therefore written as follows:(18)cM~ejt=cM~ejt−1−γ∂J∂cM~ej,j=1,2,cM~Itqejt=cM~Itqejt−1−γ∂J∂cM~Itqej,j=1,2,cM~Dtqejt=cM~Dtqejt−1−γ∂J∂cM~Dtqej,j=1,2,where γ is a constant rate. ∂J/∂cM~e1 is
(19)∂J∂cM~e1=∂J∂y^∂y^∂y^¯∂y^¯∂y^¯β¯h∑l=1nrς¯el∂y^¯β¯h∂η¯β¯hl∂η¯β¯hl∂cM~e1+∑l=1nrς¯el∂y^¯β¯h∂η¯β¯hl∂η¯β¯hl∂cM~e1+=∂J∂y^∂y^∂y^¯∂y^¯∂y^¯β¯h∑l=1nrς¯el∂y^¯β¯h∂η¯β¯hl∂η¯β¯hl∂cM~e1+∑l=1nrς¯el∂y^¯β¯h∂η¯β¯hl∂η¯β¯hl∂cM~e1+=∂J∂y^∂y^∂y^¯∂y^¯∂y^¯β¯h∑l=1nrς¯el∂y^¯β¯h∂η¯β¯hl∂η¯β¯hl∂cM~e1+∑l=1nrς¯el∂y^¯β¯h∂η¯β¯hl∂η¯β¯hl∂cM~e1+=∂J∂y^∂y^∂y^¯∂y^¯∂y^¯β¯h∑l=1nrς¯el∂y^¯β¯h∂η¯β¯hl∂η¯β¯hl∂cM~e1+∑l=1nrς¯el∂y^¯β¯h∂η¯β¯hl∂η¯β¯hl∂cM~e1,where ς¯el denotes the lth element of ς¯e. ς¯e is written as
(20)ς¯e=1,1,1,1,0,0,0,0,where the components of ς¯e in rules that contain cM~e1 are one. ∂y^¯β¯h/∂η¯β¯hl, ∂y^¯β¯h/∂η¯β¯hl, ∂y^¯β¯h/∂η¯β¯hl, ∂y^¯β¯h/∂η¯β¯hl, ∂y^¯β¯h/∂η¯β¯hl, ∂y^¯β¯h/∂η¯β¯hl, ∂y^¯β¯h/∂η¯β¯hl, and ∂y^¯β¯h/∂η¯β¯hl are written as
(21)∂y^¯β¯h∂η¯β¯hl=ρ¯l∑l=1nrη¯β¯hl+η¯β¯hl−η¯β¯hl∑l=1nrη¯β¯hl+η¯β¯hl2,∂y^¯β¯h∂η¯β¯hl=ρ¯l−1∑l=1nrη¯β¯hl+η¯β¯hl2,∂y^¯β¯h∂η¯β¯hl=ρ¯l∑l=1nrη¯β¯hl+η¯β¯hl−η¯β¯hl∑l=1nrη¯β¯hl+η¯β¯hl2,∂y^¯β¯h∂η¯β¯hl=ρ¯l−1∑l=1nrη¯β¯hl+η¯β¯hl2,∂y^¯β¯h∂η¯β¯hl=ρ¯l∑l=1nrη¯β¯hl+η¯β¯hl−η¯β¯hl∑l=1nrη¯β¯hl+η¯β¯hl2,∂y^¯β¯h∂η¯β¯hl=ρ¯l−1∑l=1nrη¯β¯hl+η¯β¯hl2,∂y^¯β¯h∂η¯β¯hl=ρ¯l∑l=1nrη¯β¯hl+η¯β¯hl−η¯β¯hl∑l=1nrη¯β¯hl+η¯β¯hl2,∂y^¯β¯h∂η¯β¯hl=ρ¯l−1∑l=1nrη¯β¯hl+η¯β¯hl2.For∂η¯β¯hl/∂cM~e1, ∂η¯β¯hl/∂cM~e1, ∂η¯β¯hl/∂cM~e1, and ∂η¯β¯hl/∂cM~e1, one has
(22)∂η¯β¯hl∂cM~e1=2e−cM~e1β¯hϑ¯M~e1β¯h2η¯β¯hl,∂η¯β¯hl∂cM~e1=2e−cM~e1β¯hϑ¯M~e1β¯h2η¯β¯hl,∂η¯β¯hl∂cM~e1=2e−cM~e1β¯hϑ¯M~e1β¯h2η¯β¯hl,∂η¯β¯hl∂cM~e1=2e−cM~e1β¯hϑ¯M~e1β¯h2η¯β¯hl.The computation of∂J/∂cM~e2, ∂J/∂cM~Dtqe1, ∂J/∂cM~Dtqe2, ∂J/∂cM~Itqe1, and ∂J/∂cM~Itqe2 are the same as ∂J/∂cM~e1, with just difference that ς¯e is replaced with ς¯e, ς¯Dtqe, ς¯Dtqe, ς¯Itqe, and ς¯Itqe, respectively. Also, cM~e1β¯h, cM~e1β¯h, ϑ¯M~e1β¯h, and ϑ¯M~e1β¯h2 must be replaced with the corresponding terms. The vectors ς¯e, ς¯Dtqe, ς¯Dtqe, ς¯Itqe, and ς¯Itqe are as
(23)ς¯e=0,0,0,0,1,1,1,1,ς¯Dtqe=1,0,1,0,1,0,1,0,ς¯Dtqe=0,1,0,1,0,1,0,1,ς¯Itqe=1,1,0,0,1,1,0,0,ς¯Itqe=0,0,1,1,0,0,1,1.


## 8.1. Tuning of Rule Parameters

The EKF method tunes the rule parameters such that (14) is minimized:
(14)J=12y∧2,where y^ is the output T3-FLS that denotes control signal. The adjusting laws for ρ¯ and ρ¯ are computed as
(15)ρ¯t=ρ¯t−1+ξ¯tχ¯t−y^,ρ¯t=ρ¯t−1+ξ¯tχ¯t−y^,where ξ¯ and ξ¯t are covariance matrices for ρ¯ and ρ¯, respectively. χ¯t and χ¯t are
(16)χ¯=χ¯1,⋯,χ¯l,⋯,χ¯nrT,χ¯=χ¯1,⋯,χ¯l,⋯,χ¯nrT,where χ¯l and χ¯l are
(17)χ¯l=∂y^∂ρ¯l=∂y^∂y^¯∂y^¯∂ρ¯l=∂y^∂y^¯∂y^¯∂y^¯β¯h∂y^¯β¯h∂ρ¯l+∂y^∂y^¯∂y^¯∂y^¯β¯h∂y^¯β¯h∂ρ¯l=0.51∑h=1nβ¯h+β¯h∑h=1nβ¯hη¯β¯hl∑l=1nrη¯β¯hl+η¯β¯hl+=0.51∑h=1nβ¯h+β¯h∑h=1nβ¯hη¯β¯hl∑l=1nrη¯β¯hl+η¯β¯hl,χ¯l=∂y^∂ρ¯l=∂y^∂y^¯∂y^¯∂ρ¯l=∂y^∂y^¯∂y^¯∂y^¯β¯h∂y^¯β¯h∂ρ¯l+∂y^∂y^¯∂y^¯∂y^¯β¯h∂y^¯β¯h∂ρ¯l=0.51∑h=1nβ¯h+β¯h∑h=1nβ¯hη¯β¯hl∑l=1nrη¯β¯hl+η¯β¯hl+=0.51∑h=1nβ¯h+β¯h∑h=1nβ¯hη¯β¯hl∑l=1nrη¯β¯hl+η¯β¯hl.


## 8.2. Tuning of MF Parameters

The centers of MFs are adjusted using the gradient descent. The tuning laws are therefore written as follows:(18)cM~ejt=cM~ejt−1−γ∂J∂cM~ej,j=1,2,cM~Itqejt=cM~Itqejt−1−γ∂J∂cM~Itqej,j=1,2,cM~Dtqejt=cM~Dtqejt−1−γ∂J∂cM~Dtqej,j=1,2,where γ is a constant rate. ∂J/∂cM~e1 is
(19)∂J∂cM~e1=∂J∂y^∂y^∂y^¯∂y^¯∂y^¯β¯h∑l=1nrς¯el∂y^¯β¯h∂η¯β¯hl∂η¯β¯hl∂cM~e1+∑l=1nrς¯el∂y^¯β¯h∂η¯β¯hl∂η¯β¯hl∂cM~e1+=∂J∂y^∂y^∂y^¯∂y^¯∂y^¯β¯h∑l=1nrς¯el∂y^¯β¯h∂η¯β¯hl∂η¯β¯hl∂cM~e1+∑l=1nrς¯el∂y^¯β¯h∂η¯β¯hl∂η¯β¯hl∂cM~e1+=∂J∂y^∂y^∂y^¯∂y^¯∂y^¯β¯h∑l=1nrς¯el∂y^¯β¯h∂η¯β¯hl∂η¯β¯hl∂cM~e1+∑l=1nrς¯el∂y^¯β¯h∂η¯β¯hl∂η¯β¯hl∂cM~e1+=∂J∂y^∂y^∂y^¯∂y^¯∂y^¯β¯h∑l=1nrς¯el∂y^¯β¯h∂η¯β¯hl∂η¯β¯hl∂cM~e1+∑l=1nrς¯el∂y^¯β¯h∂η¯β¯hl∂η¯β¯hl∂cM~e1,where ς¯el denotes the lth element of ς¯e. ς¯e is written as
(20)ς¯e=1,1,1,1,0,0,0,0,where the components of ς¯e in rules that contain cM~e1 are one. ∂y^¯β¯h/∂η¯β¯hl, ∂y^¯β¯h/∂η¯β¯hl, ∂y^¯β¯h/∂η¯β¯hl, ∂y^¯β¯h/∂η¯β¯hl, ∂y^¯β¯h/∂η¯β¯hl, ∂y^¯β¯h/∂η¯β¯hl, ∂y^¯β¯h/∂η¯β¯hl, and ∂y^¯β¯h/∂η¯β¯hl are written as
(21)∂y^¯β¯h∂η¯β¯hl=ρ¯l∑l=1nrη¯β¯hl+η¯β¯hl−η¯β¯hl∑l=1nrη¯β¯hl+η¯β¯hl2,∂y^¯β¯h∂η¯β¯hl=ρ¯l−1∑l=1nrη¯β¯hl+η¯β¯hl2,∂y^¯β¯h∂η¯β¯hl=ρ¯l∑l=1nrη¯β¯hl+η¯β¯hl−η¯β¯hl∑l=1nrη¯β¯hl+η¯β¯hl2,∂y^¯β¯h∂η¯β¯hl=ρ¯l−1∑l=1nrη¯β¯hl+η¯β¯hl2,∂y^¯β¯h∂η¯β¯hl=ρ¯l∑l=1nrη¯β¯hl+η¯β¯hl−η¯β¯hl∑l=1nrη¯β¯hl+η¯β¯hl2,∂y^¯β¯h∂η¯β¯hl=ρ¯l−1∑l=1nrη¯β¯hl+η¯β¯hl2,∂y^¯β¯h∂η¯β¯hl=ρ¯l∑l=1nrη¯β¯hl+η¯β¯hl−η¯β¯hl∑l=1nrη¯β¯hl+η¯β¯hl2,∂y^¯β¯h∂η¯β¯hl=ρ¯l−1∑l=1nrη¯β¯hl+η¯β¯hl2.For∂η¯β¯hl/∂cM~e1, ∂η¯β¯hl/∂cM~e1, ∂η¯β¯hl/∂cM~e1, and ∂η¯β¯hl/∂cM~e1, one has
(22)∂η¯β¯hl∂cM~e1=2e−cM~e1β¯hϑ¯M~e1β¯h2η¯β¯hl,∂η¯β¯hl∂cM~e1=2e−cM~e1β¯hϑ¯M~e1β¯h2η¯β¯hl,∂η¯β¯hl∂cM~e1=2e−cM~e1β¯hϑ¯M~e1β¯h2η¯β¯hl,∂η¯β¯hl∂cM~e1=2e−cM~e1β¯hϑ¯M~e1β¯h2η¯β¯hl.The computation of∂J/∂cM~e2, ∂J/∂cM~Dtqe1, ∂J/∂cM~Dtqe2, ∂J/∂cM~Itqe1, and ∂J/∂cM~Itqe2 are the same as ∂J/∂cM~e1, with just difference that ς¯e is replaced with ς¯e, ς¯Dtqe, ς¯Dtqe, ς¯Itqe, and ς¯Itqe, respectively. Also, cM~e1β¯h, cM~e1β¯h, ϑ¯M~e1β¯h, and ϑ¯M~e1β¯h2 must be replaced with the corresponding terms. The vectors ς¯e, ς¯Dtqe, ς¯Dtqe, ς¯Itqe, and ς¯Itqe are as
(23)ς¯e=0,0,0,0,1,1,1,1,ς¯Dtqe=1,0,1,0,1,0,1,0,ς¯Dtqe=0,1,0,1,0,1,0,1,ς¯Itqe=1,1,0,0,1,1,0,0,ς¯Itqe=0,0,1,1,0,0,1,1.


## 9. Simulations

The designed controller is applied on a case-study MG that is shown in Figure5 [29] and is described in Table 1 [29]. Time-varying dynamics, rapid power changes and solar irradiation, multiple load changes, and so on are all considered in the evaluation of the LFC’s regulatory performance.Figure 5
Case-study MG.Table 1
System parameter description (powers are in (KW)).
eBESS0.20 (s)eg0.10 (s)DEG161ItqeL2=ItqeL1=ePV1.84 (s)eWTG1.44 (s)PV32H0.18 (pu)eFESS0.20 (s)FC71et0.41 (s)eI/c0.0035 (s)FESS47220eIN0.050 (s)nr0.320 (pu/Hz)BESS45Scenario 1: a single load perturbation is taken into account in the initial set of parameters. Also, the model information of all units is unknown. Figure 6 shows the regulation performance. Figure 7 shows the controller signal. Comparison with type-1 fuzzy controller (PI-T1-FLC) [41] and type-2 FLC (PI-T2-FLC) [42] shows that the suggested approach is superior in terms of overall performance and accuracy. An observer can clearly tell that the designed control system is able to outperform.Figure 6
Scenario 1: load changes.Figure 7
Scenario 1: control signals.Scenario 2: in addition to the perturbation of previous scenario, in the second case, the values of all unit parameters are considered to be time-varying as p=1+costp. Figure 8 depicts the system’s regulation outcome. Figure 9 show the controller signal. It is clear from Figure 8 that the proposed FLC performs exceptionally well.Figure 8
Scenario 2: multiple load changes.Figure 9
Scenario 2: control signals.Scenario 3: the solar/wind powers are also time-varying in the third scenario, in addition to the numerous fluctuations in the load. Also, a sensor error is added to output signals as a Gaussian noise with variance 0.01. Figure 10 shows the frequency’s performance in this situation. Figure 11 shows the controller signal. One can see that the proposed technique holds up well in the face of solar variation, wind turbine mechanical power disturbance, and various load variations. In comparison to the other controllers, the suggested method’s frequency trajectory shows less variance. Table 2 contains the RMSE values for each of the various cases. The performance is compared with PI-T1-FLC [41], PI-T2-FLC [42], and general type-2 FLC (GT2-FLC) [29]. The suggested method’s RMSE in all circumstances appear to be significantly lower than those of the other techniques.Figure 10
Scenario 3: multiple changes in load and irradiation wind power.Figure 11
Scenario 3: control signals.Table 2
RMSE comparison.
ScenariosDesigned controllerPI-T1-FLC [41]PI-T2-FLC [42]GT2-FLC [29]0.00120.01240.01060.00520.00140.00650.00620.00350.00160.00790.00740.0018


## 10. Conclusion

The applications of renewable energies (REs) in meeting the energy needs of human societies are extended, because the use of RE sources can prevent the emission of greenhouse gases and pollutants, reduce water consumption, and ultimately help sustainable security. One of the main drawbacks is the natural fluctuation of voltage/frequency in microgrids (MGs) that include RE sources. In this paper, a new scheme is developed for frequency management in MGs. A new T3-FLS-based controller is designed, and an online optimization scheme is proposed. The designed controller is applied for an MG, and its performance is evaluated under various practical conditions. In the first scenario, in addition to unknown dynamics, an abrupt change is considered in the output load. It is shown that the suggested controller well handles the disturbances, and the output is stabilized in a finite time. For the second examination, another is added to the previous one, and the parameters of the MG dynamics are considered to be time-varying. The simulation results are verified that the suggested approach well resists against dynamic perturbations. Finally, for the last examination, beside the dynamic uncertainties and load perturbations, the solar/wind powers are also changed, and a sensor error is added to signals as a Gaussian noise with variance 0.01. The results and comparisons with other approaches demonstrate that the suggested controller has a good regulation outcome with the least steady-state error and good transient performance.



---

*Source: 8737448-2022-07-29.xml*