Hedge-Algebra-Based Phase-Locked Loop for Distorted Utility Conditions

1Faculty of Electrical Engineering, Mechanical Engineering and Naval Architecture, University of Split, Ruđera Boškovića 32, 21000 Split, Croatia 2Faculty of Electronics Engineering, Thai Nguyen University of Technology, 666, 3/2 street, Tich Luong ward, Thai Nguyen, Vietnam 3Institute of Theoretical and Applied Research, Duy Tan University, Quang Trung 03, Da Nang, Vietnam 4Faculty of Mathematics and Informatics, Thang Long University, Nghiem Xuan Yem Street, Hoang Mai District, Hanoi, Vietnam


Introduction
The synchronization of power electronics converters with a distributive electric grid presents an intensive research area in the world.In three-phase systems, phase-locked loops (PLLs) present one of the most used synchronization methods.The conventional synchronous reference frame PLL (SRF-PLL) is shown in Figure 1.
The main parts of the conventional SRF-PLL are as follows: the phase detector, the low-pass filter, and the voltage controlled oscillator.The phase detector transforms the phase voltages u a , u b , u c to synchronous direct and quadrature voltage components u d and u q , respectively.The direct voltage component u d is equal to the phase voltages amplitude U for nondistorted phase voltages.Usually, the filter in Figure 1 is realized as the PI or PID controller, with the zero-voltage reference.Hence, the term controller is used below.The SRF-PLL outputs the estimated phase angle of the threephase system θ.This type of PLL shows its disadvantages in the case of an unbalanced phase voltage system, i.e., when there are negative-and zero-sequence components along with a positive-sequence component.In this case, a disturbance component whose frequency is equal to twice the fundamental grid frequency (e.g., 100 Hz when the nominal value is 50 Hz) appears in the direct and quadrature voltage components u d and u q .Consequently, a power electronics inverter, which performs DC to AC inversion, is not properly synchronized with the electric grid.To deal with unbalanced phase voltage systems, many PLLs with added filters have been proposed [1].The PLLs with filters in the phase loop can be classified as follows: moving average filter-based PLL (MAF-PLL) [2][3][4], cascaded delayed signal-cancellation (CDSC) operator [5], notch filterbased PLL [2,6], variable sampling period filter-based PLL [7], multiple reference frame-based PLL [8], and in-loop complex-coefficient filter-based PLL [9].
On the other hand, the PLLs with filters outside of the phase loop are often called PLLs with a prefiltering stage.This prefiltering stage significantly attenuates disturbance components before the phase loop input.Some of the PLLs with the prefiltering stage are the PLL with a multiple complex-coefficient filter [10], the PLL with the recursive discrete Fourier transform [11], the PLL with the sliding Goertzel discrete Fourier transform [12], the PLL with the moving average filter-based (MAF) prefiltering [13], the PLL with the dual second-order generalized integrators [14], and the delay signal cancelation-based PLL [5,15].
Scientific papers dealing with the PLLs in which artificial intelligence is applied are extremely rare.In review paper [1], there is no single example of artificial intelligence use in PLLs.In [16][17][18] the fuzzy logic theory is applied in the PLL.In [16], the particle swarm optimization algorithm is used to tune values of the fuzzy controller (FC) membership functions.In [17], the authors propose application of the same algorithm for both tuning of the FC membership functions and finding the optimal values of the low-pass filter.It is very important to point out that, in these papers, there is a nonzero phase error when unbalanced grid conditions appear.In [18], a FC in the three-phase PLL is applied, but only with the phase voltages containing harmonics or a DC component.The phase error is not shown in this paper.
Generally, advantages that FCs have in nonlinear control systems over the classical PI/PID controller are numerous.For example, FCs do not require knowledge of a detailed mathematical model of the control system and also they are expressed in linguistic terms used in natural language.In addition, FCs have the capability of handling noisy signals and usually lead to better results compared to the classical PI/PID controller in terms of the control system performance [19].
Hedge-algebra theory was first developed in 1990 [20] to model the order-based semantics of the terms in termdomains of linguistic variables.Hedge algebras form a formalism to immediately handle linguistic words and linguistic rule bases (LRBs) and their computational (compt.-)semantics instead of their fuzzy sets or fuzzy set expressions representing their inherent semantics.So, this theory is based on mapping of a few fuzziness parameters of each linguistic variable instead of using fuzzy sets.In [21], the authors point out that the structure of the hedge-algebra-based controller (HAC) is like the conventional FC, but it is simpler and more convenient.As a result, the HAC was applied in optimal fuzzy control of an inverted pendulum [22], in active vibration control of building structures subjected to seismic excitations [23][24][25][26], and in voltage control of a self-excited induction generator [27].However, it was not yet applied in the field of grid synchronization.
This paper introduces three-phase PLLs with the MAF inside the phase loop and the HAC used as a controller.The first proposed PLL is based on the MAF-PLL reported in [3], but with the PI/PID controller replaced by the HAC.For this purpose, the MAF with no order adjustment (nonadaptive MAF) is proposed.This PLL is suitable for all analyzed disturbance types, expect for step-changes in the grid frequency.The second PLL structure introduces the adaptive MAF (i.e., MAF with order adjustment) and a new feedback signal in the output stage of the controller to achieve zero steadystate error in the component u q , in the case of step-changes in the grid frequency.For this PLL type, an application of the MAF is proposed with its order adjusted according to the linear interpolation method [4].Both types of the PLLs are briefly named HAC-PLL.In addition, it is proposed that both the structure and parameters of the HAC-PLL are determined depending on the most frequently occurring disturbance in the electric grid.This approach requires that the power quality monitoring is carried out over one week [28].Optimized fuzziness parameters and linguistic rule base of the HAC are obtained for each considered disturbance by means of a genetic algorithm.The integral of absolute error (IAE) is used as a performance index for finding these parameters and rules.
In this paper, the following disturbances are considered: unbalanced voltage sag with/without harmonics distortion of the phase voltages, unbalanced low-frequency transients in the phase voltages, and step-changes in the grid frequency.It is important to point out that the HAC-PLL with parameters and linguistic rules optimized for a specific disturbance works stable with other analyzed disturbances as well.Finally, a comparison is shown between the HAC-PLL and two other MAF-PLLs: with the PID controller and with the FC.

Phase-Locked Loops with the Moving Average Filter
A MAF belongs to the group of finite impulse response filters which eliminate all harmonics whose frequency is multiplier of the reciprocal value of its window width.The MAFs are suitable for embedded computer systems because of their Figure 2: PLL with the nonadaptive MAF and a controller.low computational requirements.On the other hand, their filtering capability decreases when the ratio of the window width and the sampling period is not an integer.In that case, the window width needs to be varied and adapted to the circumstances.Such MAFs are called hereinafter the adaptive MAFs, whereas MAF only refers to the nonadaptive type, unless otherwise indicated.
Figure 2 shows the PLL with the nonadaptive MAF and a controller inside the phase loop [3].The controller can be of a PID, fuzzy or HAC type, as described later.
The MAF with the input signal x and the output signal  can be described by the following equations in the continuous-time and discrete-time domain, respectively: where T w = NT s is the MAF window width, T s is the sampling time, and N is the number of samples within the window width.
Using (1) and ( 2), the transfer functions in the s-domain and z-domain, respectively, are defined as By replacing s with  in (3), the magnitude and phase characteristics in the s-domain are given as Similarly, by replacing z with    in (5), the magnitude and phase characteristics in the z-domain are given as Equation (5) shows that the MAF input signals whose angular frequency is a multiple of the reciprocal window width 1/T w ( = /  , n = 1, 2, 3,. ..) will be completely blocked.So, it is often said that the MAF acts as an ideal low-pass filter.In addition, (6) takes on the form of ( 5) if the sampling time T s → 0.
As mentioned before, the analyzed disturbances in the phase voltage quadrature component u q include a harmonic component whose frequency is 100 Hz when the grid frequency is 50 Hz.So, it is chosen T w = 0.01 s to completely remove the 100 Hz harmonic and all its multiples from u q .This selection for the MAF window width is recommended when the grid harmonic content is unknown and the DCoffset may be present in the phase voltages.To determine the sampling time T s , the fastest time-varying disturbance needs to be considered.In this paper, low-frequency transients in the phase voltages are considered, with an oscillation frequency less than 5 kHz, as the fastest time-varying disturbance [29].The sampling time of 100 s is, in this sense, sufficient, whereas the number of samples within the window width N is equal to 100.
Figure 3 shows the Bode plots of the MAF obtained using (5) and with T w = 0.01 s and N = 100.
Equation (4) presents the nonadaptive MAF because its parameter N is constant.Such MAF is suitable when no significant frequency variation of the electric grid is expected.However, the problem arises when the grid frequency varies.In such cases, the nonadaptive MAF does not completely block the harmonic whose frequency is equal to twice the changed grid frequency.Therefore, some of the MAF variants with the variable parameter N should be applied [3].The best filtering capabilities are achieved by using MAFs with the linear interpolation method [3,4].Using this approach, the output signal of the MAF in the  th sample instant () is defined as  where N f is the greatest integer less than or equal to T w /T s and  = T w /T s -N f .
The parameter N f is calculated using the floor function as follows: where ω is the estimated angular grid frequency, filtered by a low-pass filter described in Section 2.2.By using (7), the MAF becomes adaptive with regard to the grid frequency (i.e., the window width is variable).In this way, better filtering performance is achieved, especially for low-frequency components.

MAF-Based PLL with the PID Controller.
The first considered PLL is the one with the nonadaptive MAF and PID controller inside the phase loop shown in Figure 2. In this paper, this PLL is used for performance evaluation of the developed PLL, which is described in Section 3.
The PID controller is written in the following form [3]: where k p is the proportional gain,   is the integral time constant, and  d is the derivative time constant.
The parameter  = 0.1 prevents the derivation action for the frequencies higher than 1/( d ).The PID parameters which ensure the phase margin of 45 ∘ , the damping factor  = 0.707, and the natural frequency   = 220 rad/s can be obtained as where  + 1 is the amplitude of the positive-sequence component of the phase voltage.
More details about the described MAF-based PLL with the PID controller can be found in [3].

MAF-Based PLL for Rapid Changes in Grid
Frequency.In the case of rapid changes in grid frequency, the FC within the PLL structure as in Figure 2 is unable to achieve zero steadystate error in the component u q .To deal with this problem, the new adaptive-MAF-based PLL structure with the FC or the HAC is proposed, as shown in Figure 4.In comparison with Figure 2, here it was necessary to add a new feedback signal in the output stage of the controller in order to obtain stable operation.Also, by using the adaptive MAF instead of the nonadaptive MAF it is possible to obtain lower IAE values.First, the FC is considered for the PLL in Figure 4, whereas the HAC is dealt with in more detail in Section 3.
In this study, the Mamdani fuzzy inference system is selected for the FC because it is more widely accepted and allows a more intuitive approach to design in comparison to the Sugeno type.Figure 5 shows the membership functions of the Mamdani-type FC.These functions were obtained by the trial-and-error, whereas the IAE was used as a performance index.In Figure 5, N, P, and ZE stand for negative, positive, and zero, respectively, whereas L, V, and VV stand for little, very, and very very, respectively.Hence, for example, LN is interpreted as little negative.In addition, e is the error signal calculated as the difference between the voltage u q and its zero reference, ce is the change in error calculated as the difference between two consecutive values of the error signal e, and Δ  is the adjustment signal for the change in the estimated grid frequency.Variables e and ce represent the inputs to the FC, whereas Δ  represents the output variable in per unit notation.Such notation, however, requires scaling of the input and output signals.The scaling factors were selected according to the analyzed disturbance.For voltage sags (with and without harmonics) the scaling factors equal to 0.1, 3.5, and 85 were chosen for e, ce, and Δ  , respectively, again using the IAE as the performance index.These factors are equal to 0.25, 2.8, and 0.1 for an unbalanced low-frequency transient, and, finally, they are equal to 0.093, 4, and 105 for rapid changes in grid frequency.
The FC has 25 fuzzy rules, shown in Table 1, whereas the centroid method was selected for defuzzification.
The low-pass filter in Figure 4 outputs the feedback signal ω , which presents the estimated grid frequency passed through the second-order filter.This filter has the damping factor  = 0.9 and the natural frequency   = 235 rad/s.The signal ω , in comparison with the estimated grid  frequency ω , has slower dynamics and it helps the FC to reach its steady-state setpoint.In addition, the parameter N f , which is the input parameter of the adaptive MAF, is calculated according to (8), whereby the estimated angular grid frequency is replaced by its filtered value.
The rule base summarized in Table 1 and the membership functions shown in Figure 5 also apply to the FC in Figure 4.

Hedge-Algebra-Based Phase-Locked Loop with Genetic Optimized LRBs
In this study, the LRBs are converted from the respective fuzzy (linguistic label) rule bases (FRBs) established by the experience of human domain experts.Though these domain-experts' FRBs are very important, they are not always appropriate for specific application problems, particularly for complex problems.The construction of the FC component of the MAF-based PLL shown in Figures 2 and 4 is considered as such a problem.A genetic method to design an optimized HAC is developed in order to replace the FC in the MAF-based PLL shown in Figures 2 and 4.This one is called the optimized HAC (opHAC) developed based on the hedge-algebra-formalism (HA-formalism).It is important and novel that the main component of the HAC, its LRB, is also to be optimized.However, as an LRB is genetically established by computer instead of human experts, this problem must only be solved in a formalism that is able to immediately handle linguistic words with their own real-world-semantics. Another distinguished advantage of the HA-formalism is its ability to ensure the real-world-semantics (RWS-) interpretability of the designed HACs, which means that the expected behaviors of the designed HACs are actually the same as described by their designers in terms of their LRBs [29].It is also required that its approximate reasoning method must be RWS-interpretable as well.So, it can be seen that the RWSinterpretability of a designed HAC is very essential and important to ensure the high performance of not only the designed HACs but also the designed fuzzy systems.Also, it is for the first time applied to design RWS-interpretable HACs to solve application problems.Finally, their LRBs, with their own semantics, are for the first time genetically constructed.

The Role of Human Language in Designing RWS-Interpretable Fuzzy Systems.
In the fuzzy set framework, words assigned to the fuzzy sets are considered as linguistic labels and there is no formal basis to use words and linguistic sentences of human natural language with their own inherent semantics.So, there exists a gap between the fuzzy representations representing the inherent semantics of their respective words and of their respective LRBs.The main aim of the fuzzy control is to utilize human capability in handling words of the natural language.If there was no formal bridge established across the gap, one would not be able to indeed make use of human expert linguistic knowledge.The paper [30] introduces an RWS-approach to the interpretability of fuzzy systems in which the RWS-interpretability of the human language is utilized to design RWS-interpretable fuzzy systems.Assuming the RWS-interpretability of the natural language, it implies that the LRB equipped for a fuzzy system is able to properly describe the reality with which the system interfaces.Based on this feature, the ultimate goal of the RWS-approach is to establish a methodology to design RWS-interpretable fuzzy systems, whose RWSinterpretability means that their behavior is ensured to be compatible with the expected one described by the given LRB.
The main specific features of the RWS-approach examined in [30] are the following: (i) It is able to utilize the RWS-interpretability of the human language.In the fuzzy control, they usually describe monotonic dependences between two RWvariables.(ii) Its formalism is able to immediately handle words and sentences of human expert languages with their own RW-semantics as well as their compt.-semantics.
These features are very crucial for any method to design a fuzzy (linguistic) controller to ensure its expected behavior when it interacts with its RW-counterpart.

Hedge Algebras of Variables, Their Quantification, and
Their RWS-Interpretability.In order to ensure the RWSinterpretability of the designed HAC-PLLs, it is required to utilize the RWS-interpretability of human language to establish a mathematical formalization of word-domains for developing the HAC-PLLs.To do this, it is observed that the word-domain of every (linguistic) variable possesses the following two specific features: (i) The word-domain can be generated from its atomic words, e.g., 'small' and 'large' of the current intensity variable, using linguistic hedges, e.g., 'very' or 'extremely' .Then, every word x is of the form h n . ..h 1 c, where c ∈ {, } and ℎ  's are (linguistic) hedges and, hence, they can be considered as operations of an algebra.(ii) There exists a linear or partial semantic order relation on this word-domain induced by the inherent semantics of its words.
Thus, hedges with their own order-based semantics defined in their word-domain play an essential role in discovering order-based structures of the word-domains of variables.However, a large number of studies consider words only as linguistic labels of the constructed fuzzy sets, whereas there are relatively few studies that immediately deal with linguistic hedges with their own modification functionality, called hedge operators.For instance, such hedge operators are examined and applied in fuzzy logic and approximate reasoning [31,32], in contrast intensification [33], and in fuzzy control [34].In particular, it is actively examined in formal concept analysis of a dataset based on studying formal concept lattice with hedges, called truth-stressing hedges [35][36][37][38].In these studies, hedges are utilized to modify conceptforming operators to control the number of conceptual clusters extracted from a given dataset represented by formal concepts of a concept lattice of the dataset.However, the inherent semantics of words, which may contain hedge occurrences, is still not taken into consideration and, therefore, 'hedge operators' were developed in these studies independently from the semantics of words and hedges, which in practice must be determined in the context of other words of their variable.
Starting from the two aforementioned specific features of word-domains, HAs were proposed and developed in turn in [20,30,39,40].As argued in [30], all theories developed in an axiomatic way, whose axioms actually represent structural semantics of their respective RW-counterparts (e.g., maththeories or theoretical physics theories), are shown to be RWS-interpretable; in this section, we briefly explain that the theories of HAs and their quantification, which form the above formalism, are also RWS-interpretable.[20,30,39,40] establish an algebraic approach based on a formalization of their word-domains of variables in an axiomatic way to immediately handle the inherent order-based semantics of the words.It is natural that there are comparability elements in the human language, the presence of which is required by the human decision-making activities in which the comparability of decision criteria values is crucial.So, there exists a semantic order relation on every variable worddomain.For instance, considering the RW-variable I  of the current intensity, this RW-variable may be examined on the standpoint either of a numeric formalism, in which its respective numeric variable is denoted by I  , or of a linguistic formalism, in which its respective linguistic variable is denoted by I  .For every hedge h of I  , say 'very' (V), the pair of the words 'very large' and 'large' or the pair of the words 'very small' and 'small' of I  are always comparable.It is essential that the order of these words is compatible with the order of the numeric values of the current intensity assigned to their respective words and, hence, the word-domain of I  must also be linearly ordered.

A Description of an Axiomatization of Word-Domains and Their Quantification. HAs introduced in
For general case, let us consider an arbitrary linguistic variable denoted by X without its subscript L, for simplicity.As analyzed above, the word-domain of X becomes an orderbased structure, denoted by AX = (Dom(X), G, C, H, ≤), where G = { c − , c + } -considered as the generators of AX, where c − < c + , c + is called the positive atomic word and c − -the negative one; C is the set of constants C = { 0, W, 1 }, which are, respectively, the least, neutral, and greatest words of Dom(X); H = H − ∪ H + is the set of the hedges of X, where H − (or H + ) is the set of the negative (or positive) hedges; e.g., H − = { R (Rather), L (Little) }, and H + = { M (More), V (Very) }; and ≤ is the semantic order relation.Syntactically, Dom(X) is the set of all the words of X of the form x = h n . . .h 1 c, c ∈ G, whose length is denoted by ||; i.e., || = n + 1.Many properties of the inherent semantics of the words of X can be modeled in the order-based structure of Dom(X) and, more importantly, as the human language is RWS-interpretable, they are RWS-interpretable as well.To formalize the worddomains in an axiomatic way, it is necessary to discover few properties of the order-based semantics of words and hedges that can easily be verified based on their natural meaning so that they can be taken as axioms and their math-models and the remaining properties can be derived from them.Restricted to the purpose of the study, a very short description of this formalization is given, including the necessary knowledge for the study.More details can be found in [20,30,39,40].
(i) Words and hedges of X have their own "algebraic" signs determined in this order-based structure as follows.
(a) For atom words, sign (c -) = -1 and sign(c + ) = +1; for any hedge h, sign (h) = +1 (or, sign (h (b) The relative sign of h with respect to k, denoted by sign (h, k), is computed by sign (h, For illustration, the validity of Table 2 can be checked. There is an important fact that sign (hx) =-1 (or, +1) ⇐⇒ hx ≤ x (or, x ≤ hx).For example, for L, R, M, and V stand for little, rather, more, and very, respectively, it may be verified, for instance, that sign (VR small) = sign (V,R)sign (R) × sign (small) = -1, which results in VR small ≤ R small.
(ii) By the aforementioned functionality of the hedges of X, for every hedge h ∈ H and every word x ∈ Dom(X), the word hx inherits the semantics of his parent x, called hedgeinheritance, that can be formalized as follows: It states that any strings of hedges  and   applying to hx and kx cannot change their inherent semantics defined by the inequality direction of hx ≤ kx; i.e., hx ≤   kx holds or, equivalently, H(hx) ≤ H(kx).By this, H(x) can be considered in [39] as the fuzziness model of x.The set of the fuzziness models, { H(x): x ∈ Dom(X) }, has many properties representing the RW-semantics of the words which can be proved from the axioms of the HA of X [20]:  [39].

Quantification of the Words of Variable-Domains
In nature, the compt.-semantics,including numeric semantics, interval semantics, and fuzziness measure, of the words of Dom(X) must be determined from their inherent orderbased semantics presented above.Hence, they are closely defined.The axiomatic way to quantify the words is described as follows: (1) Numeric Semantics of the Words.A mapping f : X→ [0, 1], where [0, 1] is the normalized universe of X, is said to be a numeric semantics interpretation if it is an orderisomorphism, whose image f (X) is dense in [0, 1].It is called a Semantically Quantifying Mapping (SQM) and its values can be interpreted as the numeric word semantics.
(2) Interval Semantics and Fuzziness Measure of the Words.An SQM f maps each H(x) to a subinterval of [0, 1], which is the smallest subinterval including the image of H(x), f (H(x)).It is called the fuzziness interval or an interval semantics of x and is denoted by I(x) = [f (H(x))] and its length is called fuzziness measure of x, denoted by fm(x), i.e., fm : X → [0, 1].
(3) Strict Relationships of the Compt.-Semantics of the Words.It can be seen that, given an SQM f, as f preserves the order of the words, by ( 11) and ( 12), it follows by induction that (i) for x ∈ { 0, c - , W, c + , 1 }, their numeric semantics, i.e., their f -values, and the related fuzziness intervals are exactly located in [0, 1] as represented in Figure 6 From ( 13) it follows that the fuzziness measure fm of X has the following properties:  Assume that the fraction fm(hx)/fm(x) does not depend on particular x; it can be considered as the fuzziness measure of h, denoted by (h), h ∈ H. Thus, it holds where  = (L) + (R) and  = (M) + (V), which are the sums of the fuzziness measure of, respectively, the negative hedges and the positive ones.
It is important that when the values of fm(c − ), (R), (M), and (V) are given, fm(x) can be calculated, for any word x.These values are called independent fuzziness parameters.Now, interpreting (fm1) -(fm3) as axioms, a quantification theory is founded, in which the numeric semantics and the interval semantics of the words are easily computed [30,39,41], referring to Figure 6.This illustrates that the quantification of HAs can also developed in an axiomatic way and, hence, the quantification theory of HAs is RWSinterpretable.

Genetic Design of HAC-PLL.
Two of the main components of HAC are its control LRB and approximate reasoning method (ARM) running on the graphical representation of its LRB.The HAC-PLL designed in this study has two new features: it is RWS-interpretable and its LRB is genetically constructed.Usually, the LRBs of FCs are formulated by human experts and, in general, they are very difficult to optimize.In this study, the LRBs of the designed HAC-PLLs are for the first time genetically optimally constructed, including the fuzziness parameters of their variables, while the RWSinterpretability of the designed HAC-PLLs is guaranteed.So, first, a method is examined to construct RWS-interpretable compt.-representations of LRBs and an RWS-interpretable ARM working on their compt.-representationsconstructed by this method.These concepts are first examined in [30] and improved in [40].

A Method to Construct RWS-Interpretable Graphical
Representations of LRBs.Consider an LRB B consisting of n rules of m input variables and one output variable where  , 's denote the linguistic variables of the respective RW-variables   's; similarly,  , 's denote the numeric variables of the respective RW-variables   's and their universes are denoted, respectively, by U( , )'s.
As this LRB is generally assumed to be consistent, it describes a linguistic functional dependence of X m+1,L on the remaining ones  , 's defined in the Cartesian product Dom( 1 ) × . . .× Dom( +1, ).Methodologically, the method to construct compt.-representations of LRBs, written shortly as RMd, is crucial because of the technical requirement for studying the RWS-interpretability not only of the LRBs but also of the ARMs working on them.In addition, when methods to genetically design LRBs are examined, they must deal not only with the individual compt.-representationsbut also with the method itself.Thus, the functionality of an RMd is able to construct from any given LRB B a compt.-representation,denoted by R RMd (B), defined in U(X 1,N ) × . . .× U(X m+1,N ).At the same time, as human language is RWS-interpretable, the linguistic function defined by B does describe an RW-function f RW of X m+1 on the remaining   's.Denote by f N the numeric function modeling the same f RW ; the both functions must be compatible with each other.This leads to the following constraint on RMd's interpreted as a test condition whether an RMd is RWS-interpretable.
Constraint on RMd: the output R RMd (B) of RMd must be a numeric function defined in the Euclid space U(X 1,N ) × . . .× U(X m+1,N ), denoted by  ,RMd (B), and if the linguistic function B is increasingly or decreasingly monotonic function, then so is the  ,RMd (B).
This compt.-representation ,RMd (B) of the LRB B is called graphic representation of B. It can be seen that it is an aggregation of the elementary linguistic predicates given in B. It should be emphasized that, in accordance with our knowledge, no aggregation operators aggregating these (fuzzy) linguistic predicates can preserve such an RW-semantics represented by the LRB B like this graphic representation.In relation to this, it is observed that practical applications of the math-theories and the theoretical physics theories show that the graphic representations of functions in Euclid space applied in these theories are RWS-interpretable.
In this section, an RMd developed in the HA-formalism to construct graphic representation of LRBs, called graphical RMd and denoted by M, is shortly described as follows: (i) Determine HAs of Dom(X j,L ), j = 1 to m+1, by selecting their negative and positive hedges and determining their relative signs and their fuzziness parameter values.
(ii) With these, the SQMs  , 's are defined and map the n linguistic points determined by the LRB of B in Dom(X (ii) For B being an increasingly (or decreasingly) monotonic function and its i-th rule r i is denoted by For the RMd M, as the determined SQMs are isomorphisms, it can easily be verified that the monotonicity of a given B is preserved by M; i.e., the G M (B) has the same monotonicity property as B. So, the following proposition holds: Proposition 2. The RMd M proposed as above is RWSinterpretable.

The RWS-Interpretability of Approximate Reasoning
Method.Each ARM should be developed accompanied with a given RMd to solve an application problem and it also plays a key role to construct an RWS-interpretable fuzzy system.It strongly depends on a given LRB B as well as on a given RMd.Therefore, to define the RWS-interpretability of a given ARM, R, it is assumed that the given RMd accompanied with R is RWS-interpretable.Let B be an LRB of the form (14).For any input vector a = (a 1 , . ..,a m ) in X 1,N × . . .× X m,N , denote by R( RMd (B))(a) the output value of a in Dom(X m+1,N ) produced by R working on  RMd (B).Then, the following definition may be introduced which is a modified version of the respective one examined in [30].
Definition 3. Let be given an RMd to produce compt.representations of any given LRBs and let an ARM R be developed to work on the compt.-representationsproduced by the RMd.R is said to be RWS-interpretable provided that for any LRB B, which is increasingly (or decreasingly) monotonic, R should satisfy the following condition: The conditions in this definition are natural but very strong for the ARMs developed in the fuzzy set framework.In this study, the so-called semantically weighted interpolationextrapolation reasoning method proposed in [40] is applied and described as follows.
(A) Interpolation: consider a graphic representation  RMd (B) of B.
(1) Define semantic weight of the closeness of a given input vector falling in a grid-mesh of  RMd (B) to each grid-mesh point: a restriction is applied to the case of two input variables which is compatible to the HAC-PLL examined in this study.Assume that a mesh of the 2D-grid graphically representing B is exhibited in Figure 7, in which four points of the mesh are calculated from four respective linguistic points (x 1i , x 2j ), (x 1(i+1) , x 2j ), (x 1i , x 2(j+1) ), and (x 1(i+1) , x 2(j+1) ) and denoted by (a 1i , a 2j ), (a 1(i+1) , a 2j ), (a 1i , a 2(j+1) ), and (a The   +1 -values at these points are denoted by u 11 , u 12 , u 21, and u 22 .To simplify the presentation, these values are used to name the respective points (a 1i , a 2j ), (a 1(i+1) , a 2j ), (a 1i , a 2(j+1) ), and (a 1(i+1) , a 2(i+1) ) and they indicate the rectangle represented in Figure 7.It is denoted by (u 11 , u 12 , u 21 , u 22 ) and its area being denoted by S ij .Consider an input vector a = (a 1 , a 2 ), whose components fall, respectively, into [a 1i , a 1(i+1) ] and [a 2j , a 2(j+1) ].The expected value u of the input vector is computed by the weighted average of u 11 , u 12 , u 21, and u 22 whose semantic weights are defined based on how close to each mesh point it is: the closer to a point, the larger its semantic weight.The point (a 1 , a 2 ) decomposes the mesh (u 11 , u 12 , u 21 , u 22 ) into four rectangles.The area of any of the rectangles determined by any point c = (c 1 , c 2 ) is denoted by the following rule: if it is located opposite to the position of  the value u kl , it is denoted by    .In Figure 7,   11 is opposite to u 11 ,    21 is opposite to u 21 ,    12 and    12 are opposite to u 12 , and so on.
The semantic weight of the closeness of a to a mesh point (a 1k , a 2l ), whose   +1 -value is u kl , denoted by   (  ) =   ( 1 ,  2 ), is defined by the following product: The product in the numerator of ( 16) is just the area of the rectangle    opposite to the position of u kl , where no confusion occurs if the area of a rectangle S ij is denoted also by S ij .
(2) Compute the control value using the semantically weighted average: for the given input vector a, u is computed as the semantically weighted average as follows: (B) Extrapolation: assume that   falls outside of the 2Dgrid  RMd (B).There are two cases.The first one is that   falls into a rectangle which have exactly two vertices belonging to  RMd (B), say the rectangle (u 01 , u 02 , u 11 , u 12 ) in Figure 7. Similar as above, u is computed by (i) the positive and negative hedges, their relative signs, fuzziness parameter values and the positive variable range values; (ii) an LRB B given in the form of Table 3; (iii) an ARM-a selected interpolative method working on the surface in [0, 1] 3 , which is computed using the SQMs   ,   , and   ; (iv) input vector of the control problem.
These input values are needed in each iteration, noting that the values listed in (i) and (ii) are provided by an individual under consideration of a population generated by the HAC-GA.
(2) Construct components of a HAC of the HAC-PLL Its main components are shown in Figure 8 which comprises the following: (i) the normalization to convert the universes of e, ce, and u to their respective unit intervals  (i) Population of solutions: GA(opHAC) will initialize an initial population.Every individual of a population consists of 16 genes, 3 genes for the fuzziness parameters, 3 genes for positive variable ranges values, and 10 genes for the words to determine LRB of the form in Table 3. Genetic operations like crossovers and mutation will be applied to generate the next population of the same size, in which only individuals with better fitness values are retained.(ii) Method to compute the Prf-index J 1 of an individual of a given population: the procedure of GA(opHAC) to compute J 1 of each individual of the population in question, denoted by -Loop HAC , is described by the scheme given in Figure 9.

Results and Discussion
In this section, the performance of the proposed HAC-PLL is validated through experimental studies with dSpace DS1103 R&D board.For this purpose, all the PLLs considered in this study were programmed in the MATLAB/Simulink environment.The comparison of the results obtained by the developed HAC-PLL with those obtained by both the PIDbased MAF-PLL and the FC-based MAF-PLL is also shown.In addition to real-time execution of the analyzed PLL algorithms, the R&D board was used for grid emulation as well.In this regard, the D/A converters of the R&D board were utilized for generation of the phase voltages, but with reduced amplitude.The amplitude of the nondistorted phase voltages has been selected to cover ±10 V output range of the D/A converters when disturbances occur.The phase voltages were then sampled at 40 kHz sampling frequency by using the A/D converters of the same board.The sampling frequency of the analyzed PLLs was set to 10 kHz taking into consideration that the fastest time-varying disturbance analyzed in this paper has an oscillation frequency less than 5 kHz.
Performance of the analyzed MAF-based PLL was tested under the following four conditions: (1) Unbalanced voltage sag (2) Unbalanced voltage sag with harmonics distortion (i.e., positive 5th and 7th order harmonics have been added with the amplitudes equal to 8% of the 1st phase voltage harmonic) (3) Unbalanced transient in the phase voltages with the oscillation frequency of 500 Hz (4) Step change of the grid frequency of +5 Hz and back again For the disturbances (1), (2), and (4), the amplitude of the nondistorted phase voltages has been selected 8.6 V, whereas for the disturbance (3), it has been selected 1.7 V.
Parameters of the FC and the HAC are obtained in simulations as mentioned in Sections 2.2 and 3.3.Parameters of the analyzed disturbances are in accordance with the IEC classification of electromagnetic phenomena [42].Distorted phase voltages and responses of the analyzed PLLs are shown in Figures 10-13.In this paper, it is selected that each disturbance lasts 200 ms exactly.
Figure 10 shows the recorded responses under the unbalanced voltage sag in phases a and c.The amplitudes of the faulted phases a and c are 80% and 92% of the nondistorted phase voltages, respectively.Figures 10(b), 10(c), and 10(d) show traces of the phase error, the filtered quadrature voltage component u q , and the IAE of the controllers, respectively.The HAC controller ensures the lowest IAE value -4% lower compared to the FC and 44% lower compared to the PID.
The phase voltages with harmonics under the unbalanced voltage sag in phases a and c are considered in Figure 11.
The traces of the phase error (Figure 11     harmonics is negligible.Again, the HAC controller ensures the lowest IAE value.
The PLL response to the unbalanced transient in phase voltages with the oscillation frequency of 500 Hz is considered in Figure 12.In this case, and in this case only, the HAC does not ensure the lowest IAE value-it is about 12% higher in comparison with the one obtained by the FC, but it is still lower compared to the PID controller.
Figure 13 shows the PLL response to step-changes in the grid frequency.Figure 13(a) shows the estimated grid frequency obtained by the nonadaptive MAF-PLL (Figure 2) with the PID controller and the estimated grid frequency obtained with the proposed PLL configuration (Figure 4) and with the HAC and FCs.Note that the nonadaptive MAF was here used in combination with the PID controller instead of the adaptive MAF because it was observed that the latter results in slightly higher IAE value.
Choosing the settling time with a 2% criterion (i.e., the time after which the estimated frequency reaches and remains within the limits 49.9 Hz-50.1 Hz), 2.1 times shorter settling time is obtained in the PLL with the PID controller in comparison with the HAC-based PLL (Figure 13(a)).However, the maximum phase error obtained by the HAC is 5.4 times lower than the one obtained by the PID controller (Figure 13(b)).On the other hand, when compared with the FC-based MAF-PLL, the HAC-based PLL has approximately the same settling time (Figure 13(a)) but 1.9 times lower maximum phase error (Figure 13(b)).Once more, the lowest IAE value is achieved by using the HAC-based PLL.
For all analyzed PLLs, the possible occurrence of a DC-offset in phase voltages causes fundamental frequency oscillations in steady state in all estimated variables, causing incorrect operation of the proposed PLL.This effect will be the subject of a future research.On the other hand, a small DC component (up to 50 mV) caused by the A/D conversion process was present in the experiments, but its influence on the PLL performance was shown to be negligible.

Conclusion
In this paper, the new MAF-based PLLs with the HAC are successfully applied for the three-phase distorted signals.They can handle different types of disturbances and ensure zero steady-state error.Optimized fuzziness parameters and linguistic rule base of the HAC are successfully obtained by means of the genetic algorithm for each analyzed disturbance.The HAC with its parameters optimized for a certain disturbance can handle other analyzed disturbances as well, although with somewhat slower dynamic responses.
The experimental comparison of the developed HAC-PLLs with both the PID-based MAF-PLL and the FC-based MAF-PLL has been carried out.It is shown that the HAC and the FC provide better dynamic performance in comparison to the PID controller, for all analyzed disturbance types.In addition, the HAC ensures the lowest IAE value for all of the analyzed disturbance types except for the unbalanced low-frequency transients, when the FC achieves the lowest IAE value (12% lower than the HAC).However, in this case, the maximum difference between the phase errors obtained by the HAC and FCs is less than 3 ∘ , which is considered negligible.
The proposed PLLs do not work properly when there is a DC-offset present in phase voltages and this will be the subject of a future research.On the other hand, the influence of a small DC component (up to 50 mV) caused by the A/D conversion process is shown to be negligible.

Figure 4 :
Figure 4: PLL for rapid changes in grid frequency with the fuzzy controller or the HAC and the adaptive MAF.

Figure 5 :
Figure 5: Membership functions of the developed Mamdani-type FC.

Figure 6 :
Figure 6: The structure of SQM-values and their related fuzziness intervals of the words of C ∪{ c − , c + } that is given in (a) and of the word x that is given in (b).
superscript a or a  Rectangulars with the superscript b or b 

Figure 10 :
Figure 10: Phase voltages (a), phase error (b), filtered quadrature voltage component   (c), and integral of absolute error (d) for the unbalanced voltage sag in phases a and c.

Figure 11 :
Figure 11: Phase voltages (a), phase error (b), filtered quadrature voltage component   (c), and integral of absolute error (d) for the unbalanced voltage sag in phases a and c with harmonics distortion.

Figure 12 :
Figure 12: Phase voltages (a), phase error (b), filtered quadrature voltage component   (c), and integral of absolute error (d) for the unbalanced low-frequency transient in phase voltages.

Figure 13 :
Figure 13: Estimated grid frequency (a), phase error (b), filtered quadrature voltage component   (c), and integral of absolute error (d) for the step-changes in frequency of ±5 Hz.

Table 1 :
Rule base for FC.

Table 2 :
The relative sign of a hedge in a row with respect to a hedge in a column.
M (B).To examine the RWS-interpretability of  RMd (B) some notations are needed.Let a = (a 1 , . .., a m , a m+1 ) be a point in [0, 1] +1 .The project of a on the Cartesian space indicated by X i1,N × . . .× X ik,N ; i.e., |  1 ×...×  = (a i1 , . .., a ik ) is denoted by |  1 ×...×  .For any RMd, a point of  RMd (B) corresponding to a rule r i is denoted by  RMd (r i ).By the constraint above, the RWS-interpretability of an RMd can be defined as follows, noting that the LRBs in many control applications are monotonic.Definition 1.A given method RMd to produce a compt.representation in a Cartesian product S m+1 from a given LRB is said to be RWS-interpretable provided that if B is increasingly (decreasingly) monotonic, then (i)  RMd (B) ⊆ U(X 1,N ) × . . .× U(X m+1,N ) must define a function.That is, for every rule r i of B,  RMd (r i ) is of the form a i = (a i,1 , . .., a i,m , a i,+1 ), for i = 1, . .., n, and for any such two vectors a j = (a j,1 , . .., a j,m , a j,m+1 ) and    = (   ,1 , . ..,    , , 11  11 +    12  12    11 +    right diagonal of the table which are arranged from left to right and from top to bottom.For example, the LRB B given in Table 3 is represented by a chromosome of ten genes: (P P VP P VP VVP P VP VVP VVP).Each solution is encoded by an individual of 16 genes: the first three genes represent the values  e (L),   (L), and   (L), the next ten genes represent the ten above-mentioned words of u uniquely determining B, and the three remaining genes represent three positive variable range values.Assume that the words of Dom(u) = {VVN, VN, LVN, N, LLN, LN, VLN, ZE, VLP, LP, LLP, P, LVP, VP, VVP} are increasingly arranged and encoded by their positions, i.e., by the integers 0, 1, 2, . .., 14.For example, three values   (L),   (L), and   (L), three positive variable ranges, g  's, and the B given in Table 3 are represented by the solution individual: (  (L),   (L),   (L), 11, 11, 13, 11, 13, 14, 11, 13, 14, 14, rg e , rg ce , rg u ).
(18)8)For   falling into a rectangle outside of  RMd (B) having exactly one common vertex with  RMd (B), e.g., the vertex u 11 of the rectangle domain of the product e × ce, similar as above, Construct a GA, Denoted by GA(opHAC), to Produce the Optimized LRB   , the Optimized Fuzziness Parameters, and the Optimized Variable Ranges of the Desired opHAC.The HAC developed in Task 1 is a kernel-component of the desired GA(opHAC).