# An Improved Fuzzy Logic Controller Design for PV Inverters Utilizing Differential Search Optimization

Authors: Ammar Hussein Mutlag; Hussain Shareef; Azah Mohamed; M. A. Hannan; Jamal Abd Ali
Journal: International Journal of Photoenergy
 (2014)

---

## Abstract

This paper presents an adaptive fuzzy logic controller (FLC) design technique for photovoltaic (PV) inverters using differential search algorithm (DSA). This technique avoids the exhaustive traditional trial and error procedure in obtaining membership functions (MFs) used in conventional FLCs. This technique is implemented during the inverter design phase by generating adaptive MFs based on the evaluation results of the objective function formulated by the DSA. In this work, the mean square error (MSE) of the inverter output voltage is used as an objective function. The DSA optimizes the MFs such that the inverter provides the lowest MSE for output voltage and improves the performance of the PV inverter output in terms of amplitude and frequency. The design procedure and accuracy of the optimum FLC are illustrated and investigated using simulations conducted for a 3 kW three-phase inverter in a MATLAB/Simulink environment. Results show that the proposed controller can successfully obtain the desired output when different linear and nonlinear loads are connected to the system. Furthermore, the inverter has reasonably low steady state error and fast response to reference variation.


---

## Body

## 1. Introduction

The increasing global need for renewable energy has become the main impetus of the energy sector, primarily because of the negative impact of fossil fuels on the environment [1]. Photovoltaic (PV) power generation is one of the most promising renewable energy technologies that can be utilized in industrial power systems and rural electrification [2]. However, PV generators can only produce DC power. Thus, an electronic interface system known as a power inverter is required to link the PV generator and AC loads [3]. In the context of a standalone PV generator, the power inverter provides clean and high quality power to the connected loads. The output voltage and current waveforms under the standalone mode of operation of the inverter should be controlled based on the reference values. Thus, a voltage source inverter (VSI) and an appropriate voltage control technique are required [4]. The main feature of a good power inverter is its ability to provide constant amplitude sinusoidal voltage and frequency regardless of the type of load it is connected to. The power inverter must also have the capability to quickly recover from transients caused by external disturbances without causing power quality problems. However, the large-scale use of PV generators raises many challenges, such as harmonic pollutions, low efficiency of energy conversion, fluctuation of output power, and reliability of power electronic converters [5].Various inverter control techniques have been suggested by many researchers to solve these problems. The proportional integral (PI) controller is a widely accepted technique in inverter controls. Selvaraj and Rahim implemented a digital PI current control algorithm in a PV inverter using DSP TMS320F2812 to keep the current injected into the grid sinusoidal. However, this PI controller requires trapezoidal sum approximation to transform the integral term into the discrete-time domain [6]. Similarly, Sanchis et al. proposed a traditional PI controller to control a DC-to-AC boost converter. However, their controller requires the differential equations of the system to obtain good performance [7]. In a related work, PI controllers were implemented for a three-phase inverter utilizing the dSPACE DS1104 control hardware [8]. However, the method of tuning the gains of PI controllers has not been elaborated. Recently, researchers have focused on the utilization of optimization techniques in PI controller tuning to achieve improved performance. An optimal DC bus voltage regulation strategy with PI controllers for a grid-connected PV system was suggested in [9]. In this work, the PI control parameters were optimized using the simplex optimization technique. Other various optimization methods, such as particle swarm optimization (PSO), have also been used in PI controller parameter tuning for different applications [10–13]. The performance of the PI controller is limited to small load disturbances, its design is based on a precise mathematical model of the actual system under consideration, and it requires proper tuning of its control parameters.Artificial intelligence- (AI-) based controllers have been used in inverters with high efficiency and great dynamics. Various methods, such as artificial neural network (ANN), fuzzy logic, and adaptive neurofuzzy inference system- (ANFIS-) based controllers, have been reported in the literature.ANN-based maximum power point tracking controller in a PV inverter power conditioning unit was proposed in [14]. In this work, the ANN module was used to estimate the voltages and currents corresponding to a maximum power delivered by PV panels. The module was then utilized to obtain the desirable duty cycle of the converter. Nonetheless, this proposed controller requires large training data before it can be trained and implemented in the controller.Fuzzy logic controllers (FLCs) have become increasingly popular in designing inverter controls because of their simplicity and adaptability to complex systems without a mathematical model. Some of the good examples of FLCs for inverter control can be found in [15, 16]. In these studies, two individual FLCs were used to control both the DC-DC and DC-AC converters in a fuel cell grid-connected inverter and standalone PV inverter, respectively. The authors claimed that acceptable results can be achieved with seven membership functions (MFs) and that the proposed technique can be easily implemented. Nonetheless, the performance of FLCs depends on the rule basis, number of rules, and MFs. These variables are determined by a trial and error procedure, which is time consuming [17].Therefore, to overcome these limitations in FLC design, various techniques, such as ANFIS and other optimization techniques, have been proposed in the literature. In [17], Altin and Sefa designed a dSPACE-based grid interactive VSI using ANFIS-based controllers. This inverter uses an ANN to estimate MFs and the rule base of the controller. However, ANFIS-based methods also require training data similar to ANN controllers. Training data are difficult to obtain in many cases. Thus, the implementation of a particle swarm optimization (PSO) algorithm was suggested in [18] to optimize a nine-rule FLC for maximum power point tracking in a grid-connected PV inverter. However, the selection of a proper optimization technique is important because PSO is prone to premature convergence. Furthermore, such adaptive MF tuning method in an FLC for PV inverter control has not been applied to date.In the current study, an FLC optimization approach for standalone PV inverters using the differential search algorithm (DSA) is proposed. The DSA is a new computational intelligence-based technique formulated to solve both single and multimodal optimization problems. This algorithm is specially recommended to solve multimodal problems such as tuning the MFs of FLCs [19]. Therefore, the utilization of the DSA is expected to improve the performance of FLCs for PV inverters. The DSA optimizes the MFs of a three-phase inverter with the mean square error (MSE) of output voltage as the objective function. The system is modeled in the MATLAB environment to demonstrate the performance of the proposed controller under varying load conditions and different types of loads.


## 2. Inverter Control Concept

Inverter control is aimed at regulating the AC output voltage at a desired magnitude and frequency with low harmonic distortion. This regulation is carried out by the controller by implementing a proper control strategy to maintain the voltage at a set reference. The structure of the standalone PV inverter used in this study is shown in Figure1 to illustrate the main control loops for achieving the above control objective. This inverter consists of a DC input from the PV source, a DC-DC converter, a DC-AC inverter, and the load. This type of inverter with a DC input source is known as a VSI.Figure 1
Structure circuit of the three-phase inverter system.To apply the control strategy in the inverter system, three-phase output voltages in the synchronous reference frame must be sensed at the load terminals using appropriate voltage sensors. The three-phase output voltages of the load terminal (V
a, V
b, and V
c) can be represented as
(1)
V
a
=
V
sin
⁡
ω
t
,
V
b
=
V
sin
⁡
(
ω
t
-
2
3
π
)
,
V
c
=
V
sin
⁡
(
ω
t
+
2
3
π
)
,
where V is the voltage magnitude and ω is the output frequency. These voltages (V
a, V
b, and V
c) are then scaled and transformed into a d-q reference frame to simplify the calculations for controlling the three-phase inverter [20, 21]. The two DC quantities, namely, V
d and V
q, can be obtained by applying Park’s transformation, as shown in (2). This transformation employs a 50 Hz synchronization signal from a phase-locked loop block:
(2)
[
V
d
V
q
V
o
]
=
2
3
[
cos
⁡
⁡
(
w
t
)
cos
⁡
⁡
(
w
t
-
2
π
3
)
cos
⁡
⁡
(
w
t
+
2
π
3
)
-
sin
⁡
(
w
t
)
sin
(
w
t
-
2
π
3
)
sin
(
w
t
+
2
π
3
)
1
2
1
2
1
2
]
×
(
V
a
V
b
V
c
)
.
The error E between the measured voltages V
d and V
q and reference voltages V
d
ref and V
q
ref per unit can then be computed. Similarly, the change in error CE can be determined by taking the derivative of E. These signals (i.e., E and CE) are then sent to the controller at each sampling time T
s to compute the missing components in V
d and V
q and to generate the new V
d and V
q signals. The new V
d and V
q are again converted into the synchronous reference frame voltages V
a,V
b, and V
c using the following equation:
(3)
[
V
a
V
b
V
c
]

=
2
3
[
cos
⁡
⁡
(
w
t
)
-
sin
⁡
(
w
t
)
1
cos
⁡
⁡
(
w
t
-
2
π
3
)
-
sin
(
w
t
-
2
π
3
)
1
cos
⁡
⁡
(
w
t
+
2
π
3
)
-
sin
(
w
t
+
2
π
3
)
1
]

×
(
V
d
V
q
V
o
)
.
These voltages can be used to generate the pulse width modulation (PWM) for driving the IGBT switches in the inverter block in Figure 1. As a result of inverter switching, a series of pulsating DC input voltage V
dc from the DC-DC converter block appears at the output terminals of the inverter. Given that the output voltages of the inverter are pulsating DC voltages, an appropriate low pass filter must be used (Figure 1) before importing PV-generated electrical energy to the load. The design procedure of the filter circuits can be found in [22]. The inverter control concept with FLC as a control strategy is shown in Figure 2. Figure 3 depicts the aforementioned control algorithm.Figure 2
Architecture of the voltage control strategy.Figure 3
Flowchart of the control algorithm.


## 3. Standard FLC Design Procedure

Considering the nonlinearity of the power conversion process of PV inverters, fuzzy logic is a convenient method to adopt in a PV inverter control system. The FLC represents the human expert decision in the problem solving mechanism. The FLC design must pass through the following four steps [23, 24].(a) Definition of the Module Characteristics. This step is necessary to determine the fuzzy location and to select the number of inputs and outputs. In this work where FLC serves as a PV inverter controller, E and CE are used as inputs, whereas the missing component of V
d (or V
q) defined as O is used as the output of the FLC. For example, the two inputs for the FLC depicted in Figure 2, namely, E and CE, at the tth sampling step corresponding to V
d can be represented as follows:
(4)
E
(
t
)
=
V
d
ref
-
V
d
(
t
)
,
CE
(
t
)
=
E
(
t
)
-
E
(
t
-
1
)
.
The output O for this case can be obtained at the last stage of the FLC design, which is explained in the next section. After the inputs and output are defined, the next stage involves the fuzzification of inputs.(b) Fuzzifier Design. This step represents the inputs with suitable linguistic value by decomposing every input into a set and defining a unique MF label, such as “big” or “small.” Thus, the number of MFs used in the FLC depends on the linguistic label. The MFs of E and CE for the FLC depicted in Figure 2 can be defined as trapezoidal and triangular MFs. This process translates the crisp values of “E” and “CE” as the fuzzy set “e” and “ce,” respectively, through the MF degrees μ
e
(
E
) and μ
ce
(
CE
), which range from 0 to 1, as shown in Figure 4 for triangular MFs. In Figure 4(a), the membership function of error (MFE) is defined by three elements, namely, X
1, X
2, and X
3, whereas the membership function of change of error (MFCE) in Figure 4(b) is defined by another three elements represented as X
4, X
5, and X
6.Encoding of an MF.
(a)
(b)After defining the MFs,μ
e
(
E
) and μ
ce
(
CE
) can be calculated by using basic straight line equation consisting of two points. For example, μ
e
(
E
) and μ
ce
(
CE
) for the MFs in Figure 4 can be expressed, respectively, as follows:
(5)
μ
e
(
E
)
=
{
E
-
X
1
X
2
-
X
1
X
1
≤
E
<
X
2
1
+
X
2
-
E
X
3
-
X
2
X
2
≤
E
<
X
3
,
(6)
μ
ce
(
CE
)
=
{
CE
-
X
4
X
5
-
X
4
X
4
≤
CE
<
X
5
1
+
X
5
-
CE
X
6
-
X
5
X
5
≤
CE
<
X
6
.
In a standard FLC design, the selection of the number of MFs and boundary values of each MF must be adjusted by the designer using the trial and error method until the FLC provides a satisfactory result. However, this process is time consuming and laborious. After the inputs are fuzzified, the fuzzy inputs are subjected to an inference engine to generate a fuzzy output.(c) Inference Engine Design. This stage represents the decision-making process based on the information from a knowledge base, which contains linguistic labels and control rules. Although there are mainly two types of inferencing systems, namely the Mamdani type and Sugeno type, the Mamdani type inferencing system is adopted in this study due to its simple implementation steps. The rules with two inputs for the Mamdani type can be written as follows:R:
IFE is “label” AND CE is “label,” THEN u is “label.”The quantity of rules depends on the number of inputs and MFs used in the FLC [23, 24]. An FLC with large rule base demands a greater computational effort in terms of memory and computation time.(d) Defuzzifier Design. The final step in the FLC is the selection of the defuzzification method. This process generates a fuzzy control action as a crisp value. Several methods can be used to generate the crisp value. The most common methods are the center of area (COA) and the mean of maximum (MOM). The widely used COA method generates the center of gravity of the MFs. In this study, the COA method given in (7) is used to generate the crisp value because it is more accurate compared to MOM method [23]:
(7)
O
=
∑
i
=
1
n
w
i
·
u
i
∑
i
=
1
n
w
i
,
where n is the number of rules and w
i is the weighted factor that can be calculated using the Mamdani-MIN between μ
e
(
E
) and μ
ce
(
CE
) as expressed in
(8)
w
i
=
MIN
[
μ
e
(
E
)
,
μ
ce
(
CE
)
]
.
The structure of each FLC depicted in Figure 2 is detailed in Figure 5. Meanwhile, the steps to implement the standard FLC are illustrated in Figure 6.Figure 5
FLC architecture.Figure 6
Encoding of the FLC.


## 4. Proposed Optimum FLC Design Procedure

As noted in the standard FLC design procedure, the main drawback of FLC design is the time-consuming trial and error process used to adjust the boundary values of MFs in the fuzzification process. An improper selection of MF boundaries may lead to the poor performance of the overall system. Therefore, this paper presents a methodology to optimize MFs using a heuristic optimization algorithm. The heuristic optimization algorithm is used for solving complex and intricate problems which are otherwise difficult to solve by classical methods. They are population based methods designed to solve a problem more quickly or to find an approximate solution when classic methods fail to find the solution especially with multimodal optimization problems. The differential search algorithm (DSA) has been suggested as a heuristic optimization tool for adjusting the boundary values of MFs adaptively because of its suitability for multimodal problems, such as the FLC design for PV inverter control.


### 4.1. Overview of Differential Search Algorithm

The DSA is a nature-inspired metaheuristic optimization algorithm that is especially effective for multimodal optimization solution [19]. The concept behind its development is the seasonal migration of different species of nature in search of fruitful living. In the DSA, all the organisms are assumed to form a superorganism that starts moving to discover efficient habitats. During its movement for discovery, the superorganism checks whether some randomly chosen locations meet its transitory criteria. If any location is appropriate for their temporary layovers during the journey, the individuals of the superorganism that revealed the stopover immediately settle in the said location and carry on their journey from that location.The successful migration of the superorganism depends on the mechanism of the stopover site discovery. The superorganism tries to explore stopover sites in the area left between the organisms. An exploration of the stopover sites is determined using a fully random process similar to the Brownian-like random walk. Donors are made up by reshuffling all the individuals of the superorganism and are considered to be highly fertile in discovering the stopover site. Randomly selected members of the superorganism move toward the target of donors to discover the stopover site successfully. The details of the DSA, including its basic concepts and algorithms, can be found in [19].


### 4.2. Optimal FLC Problem Formulation

The three basic components that are vital to any optimization method are input vectors, objective function formulation, and optimization limitations. Each component is developed and clarified to obtain optimal MFs. The optimization technique searches the optimal solution as formulated in the objective function through manipulation of the input vector subject to the constraints in each generation of the iterative process.


#### 4.2.1. Input Vector

As a first step in FLC design, the number of MFs must be defined to provide the solution from the optimization technique. Depending on the number of MFs, the input vectorZ can be expressed as
(9)
Z
i
,
j
=
[
X
i
,
j
1
X
i
,
j
2
⋯
X
i
,
j
n
]
,
where Z
i
,
j represents the jth solution in the population during the ith iteration, X
i
,
j
k is the kth element of Z
i
,
j, and n is the total number of parameters. For example, the input vector Z
i
,
j should contain six parameters that indicate the boundaries of MFs to be optimized to represent the MFs in Figure 4.


#### 4.2.2. Objective Function

An objective function is required to determine and evaluate the performance ofZ
i
,
j for the MFs. Thus, the objective function for finding the optimal values is formulated in such a way that Z
i
,
j generates the best fuzzy control action as a crisp value according to (7) described in the defuzzification process. In the FLC design for PV inverter control, E and CE at the tth sampling step corresponding to V
d (which is the transformed inverter output voltage) indicate the goodness of the crisp value of the fuzzy control action. Therefore, the mean square error (MSE) (10) obtained from the reference values V
d
ref and the measured values V
d is used as the objective function:
(10)
MSE
=
∑
i
=
1
l
(
V
d
ref
-
V
d
)
2
l
,
where V
d
ref is the reference value that is equal to (1 p.u.), V
d is the measured value, and l is the number of the samples used to evaluate MSE. In the optimization process, (10) needs to be minimized.


#### 4.2.3. Optimization Constraints

The optimization algorithm must be implemented while satisfying all constraints used to determine the optimal values of the MF parameters. The boundaries of these parameters should not overlap. In other words, the elementX
i
,
j
k should be between X
i
,
j
k
-
1 and X
i
,
j
k
+
1. If the element X
i
,
j
k is greater than X
i
,
j
k
+
1 or less than X
i
,
j
k
-
1, this element should be regenerated within its boundaries. Therefore, the following restriction must be fulfilled to ensure that each MF parameter is within the prescribed boundaries:
(11)
X
i
,
j
k
-
1
<
X
i
,
j
k
<
X
i
,
j
k
+
1
.


#### 4.2.4. Implementation Steps of DSA to Obtain the Optimal FLC Design

The implementation starts by resetting the DSA parameters, namely, number of iterations (G), population size (N), problem dimension (D), and control parameters (P
1 and P
2). The initial populations for the MFs are then generated and encoded according to (9). The next step involves the evaluation of the objective function using (10). Note that a suitable running time T
r is required to populate the FLC output for the evaluation of MSE in population N. After the initial population is evaluated, the new position of each FLC parameter in Z
i
,
j is obtained by using the following expression:
(12)
X
new
i
,
j
k
=
X
i
,
j
k
+
R
·
(
X
d
k
-
X
i
,
j
k
)
.
In (12), the scale factor R is calculated as
(13)
R
=
randg
·
[
2
·
rand
]
·
[
rand
-
rand
]
,
and the donor X
d
k is generated by reshuffling the original populations as
(14)
X
d
k
=
(
X
i
,
j
k
)
random
_
reshuffling
,
where randg is the gamma random generator and rand is the random number generator. After all values of Z
i
,
j in the population are updated, the procedure reevaluates the objective function, and the process continues to the next iteration. This position updating and objective function reevaluation process is repeated until the maximum iteration count is reached (Figure 7).Figure 7
Proposed DSA based optimum FLC design procedure.


## 4.1. Overview of Differential Search Algorithm

The DSA is a nature-inspired metaheuristic optimization algorithm that is especially effective for multimodal optimization solution [19]. The concept behind its development is the seasonal migration of different species of nature in search of fruitful living. In the DSA, all the organisms are assumed to form a superorganism that starts moving to discover efficient habitats. During its movement for discovery, the superorganism checks whether some randomly chosen locations meet its transitory criteria. If any location is appropriate for their temporary layovers during the journey, the individuals of the superorganism that revealed the stopover immediately settle in the said location and carry on their journey from that location.The successful migration of the superorganism depends on the mechanism of the stopover site discovery. The superorganism tries to explore stopover sites in the area left between the organisms. An exploration of the stopover sites is determined using a fully random process similar to the Brownian-like random walk. Donors are made up by reshuffling all the individuals of the superorganism and are considered to be highly fertile in discovering the stopover site. Randomly selected members of the superorganism move toward the target of donors to discover the stopover site successfully. The details of the DSA, including its basic concepts and algorithms, can be found in [19].


## 4.2. Optimal FLC Problem Formulation

The three basic components that are vital to any optimization method are input vectors, objective function formulation, and optimization limitations. Each component is developed and clarified to obtain optimal MFs. The optimization technique searches the optimal solution as formulated in the objective function through manipulation of the input vector subject to the constraints in each generation of the iterative process.


### 4.2.1. Input Vector

As a first step in FLC design, the number of MFs must be defined to provide the solution from the optimization technique. Depending on the number of MFs, the input vectorZ can be expressed as
(9)
Z
i
,
j
=
[
X
i
,
j
1
X
i
,
j
2
⋯
X
i
,
j
n
]
,
where Z
i
,
j represents the jth solution in the population during the ith iteration, X
i
,
j
k is the kth element of Z
i
,
j, and n is the total number of parameters. For example, the input vector Z
i
,
j should contain six parameters that indicate the boundaries of MFs to be optimized to represent the MFs in Figure 4.


### 4.2.2. Objective Function

An objective function is required to determine and evaluate the performance ofZ
i
,
j for the MFs. Thus, the objective function for finding the optimal values is formulated in such a way that Z
i
,
j generates the best fuzzy control action as a crisp value according to (7) described in the defuzzification process. In the FLC design for PV inverter control, E and CE at the tth sampling step corresponding to V
d (which is the transformed inverter output voltage) indicate the goodness of the crisp value of the fuzzy control action. Therefore, the mean square error (MSE) (10) obtained from the reference values V
d
ref and the measured values V
d is used as the objective function:
(10)
MSE
=
∑
i
=
1
l
(
V
d
ref
-
V
d
)
2
l
,
where V
d
ref is the reference value that is equal to (1 p.u.), V
d is the measured value, and l is the number of the samples used to evaluate MSE. In the optimization process, (10) needs to be minimized.


### 4.2.3. Optimization Constraints

The optimization algorithm must be implemented while satisfying all constraints used to determine the optimal values of the MF parameters. The boundaries of these parameters should not overlap. In other words, the elementX
i
,
j
k should be between X
i
,
j
k
-
1 and X
i
,
j
k
+
1. If the element X
i
,
j
k is greater than X
i
,
j
k
+
1 or less than X
i
,
j
k
-
1, this element should be regenerated within its boundaries. Therefore, the following restriction must be fulfilled to ensure that each MF parameter is within the prescribed boundaries:
(11)
X
i
,
j
k
-
1
<
X
i
,
j
k
<
X
i
,
j
k
+
1
.


### 4.2.4. Implementation Steps of DSA to Obtain the Optimal FLC Design

The implementation starts by resetting the DSA parameters, namely, number of iterations (G), population size (N), problem dimension (D), and control parameters (P
1 and P
2). The initial populations for the MFs are then generated and encoded according to (9). The next step involves the evaluation of the objective function using (10). Note that a suitable running time T
r is required to populate the FLC output for the evaluation of MSE in population N. After the initial population is evaluated, the new position of each FLC parameter in Z
i
,
j is obtained by using the following expression:
(12)
X
new
i
,
j
k
=
X
i
,
j
k
+
R
·
(
X
d
k
-
X
i
,
j
k
)
.
In (12), the scale factor R is calculated as
(13)
R
=
randg
·
[
2
·
rand
]
·
[
rand
-
rand
]
,
and the donor X
d
k is generated by reshuffling the original populations as
(14)
X
d
k
=
(
X
i
,
j
k
)
random
_
reshuffling
,
where randg is the gamma random generator and rand is the random number generator. After all values of Z
i
,
j in the population are updated, the procedure reevaluates the objective function, and the process continues to the next iteration. This position updating and objective function reevaluation process is repeated until the maximum iteration count is reached (Figure 7).Figure 7
Proposed DSA based optimum FLC design procedure.


## 4.2.1. Input Vector

As a first step in FLC design, the number of MFs must be defined to provide the solution from the optimization technique. Depending on the number of MFs, the input vectorZ can be expressed as
(9)
Z
i
,
j
=
[
X
i
,
j
1
X
i
,
j
2
⋯
X
i
,
j
n
]
,
where Z
i
,
j represents the jth solution in the population during the ith iteration, X
i
,
j
k is the kth element of Z
i
,
j, and n is the total number of parameters. For example, the input vector Z
i
,
j should contain six parameters that indicate the boundaries of MFs to be optimized to represent the MFs in Figure 4.


## 4.2.2. Objective Function

An objective function is required to determine and evaluate the performance ofZ
i
,
j for the MFs. Thus, the objective function for finding the optimal values is formulated in such a way that Z
i
,
j generates the best fuzzy control action as a crisp value according to (7) described in the defuzzification process. In the FLC design for PV inverter control, E and CE at the tth sampling step corresponding to V
d (which is the transformed inverter output voltage) indicate the goodness of the crisp value of the fuzzy control action. Therefore, the mean square error (MSE) (10) obtained from the reference values V
d
ref and the measured values V
d is used as the objective function:
(10)
MSE
=
∑
i
=
1
l
(
V
d
ref
-
V
d
)
2
l
,
where V
d
ref is the reference value that is equal to (1 p.u.), V
d is the measured value, and l is the number of the samples used to evaluate MSE. In the optimization process, (10) needs to be minimized.


## 4.2.3. Optimization Constraints

The optimization algorithm must be implemented while satisfying all constraints used to determine the optimal values of the MF parameters. The boundaries of these parameters should not overlap. In other words, the elementX
i
,
j
k should be between X
i
,
j
k
-
1 and X
i
,
j
k
+
1. If the element X
i
,
j
k is greater than X
i
,
j
k
+
1 or less than X
i
,
j
k
-
1, this element should be regenerated within its boundaries. Therefore, the following restriction must be fulfilled to ensure that each MF parameter is within the prescribed boundaries:
(11)
X
i
,
j
k
-
1
<
X
i
,
j
k
<
X
i
,
j
k
+
1
.


## 4.2.4. Implementation Steps of DSA to Obtain the Optimal FLC Design

The implementation starts by resetting the DSA parameters, namely, number of iterations (G), population size (N), problem dimension (D), and control parameters (P
1 and P
2). The initial populations for the MFs are then generated and encoded according to (9). The next step involves the evaluation of the objective function using (10). Note that a suitable running time T
r is required to populate the FLC output for the evaluation of MSE in population N. After the initial population is evaluated, the new position of each FLC parameter in Z
i
,
j is obtained by using the following expression:
(12)
X
new
i
,
j
k
=
X
i
,
j
k
+
R
·
(
X
d
k
-
X
i
,
j
k
)
.
In (12), the scale factor R is calculated as
(13)
R
=
randg
·
[
2
·
rand
]
·
[
rand
-
rand
]
,
and the donor X
d
k is generated by reshuffling the original populations as
(14)
X
d
k
=
(
X
i
,
j
k
)
random
_
reshuffling
,
where randg is the gamma random generator and rand is the random number generator. After all values of Z
i
,
j in the population are updated, the procedure reevaluates the objective function, and the process continues to the next iteration. This position updating and objective function reevaluation process is repeated until the maximum iteration count is reached (Figure 7).Figure 7
Proposed DSA based optimum FLC design procedure.


## 5. FLC Design for PV Inverter Control Using the Proposed Method

To demonstrate the application of an optimum FLC design, a 3 kW, 240 V, 50 Hz PV inverter system is modeled in the Matlab Simulink environment (Figure8) to supply various types of loads continuously. As shown in Figure 8, the three-phase output voltages (V
a, V
b, and V
c) are measured and converted to V
d and V
q at each sampling time T
s
=
2 μs. The controller block shown in the figure contains two FLCs that correspond to V
d and V
q in the d-q reference frame. The controllers require E and CE to generate new V
d and V
q and to convert to V
a, V
b, and V
c. The converted signals are then used to generate the PWM for driving the IGBT switches of the inverter.Figure 8
Simulation model for the three-phase inverter.As explained previously for each input, seven MFs defined as trapezoidal and triangular MFs are used according to the illustration in Figure9. Seven parameters (i.e., X
i
,
j
1 to X
i
,
j
7) are used to define the first input (E), whereas other seven parameters (i.e., X
i
,
j
8 to X
i
,
j
14
) are used to define the second input (CE). Therefore, each controller input Z in the optimum FLC design contains 14 parameters. Thus, the FLC control rule for the PV inverter control system includes 49 rules (Table 1).Table 1
Fuzzy control rules based on seven MF.
Error (E)
Change of error (CE)
MFCE1
MFCE2
MFCE3
MFCE4
MFCE5
MFCE6
MFCE7
MFE1
NB
NB
NB
NB
NM
NS
ZO
MFE2
NB
NB
NB
NM
NS
ZO
PS
MFE3
NB
NB
NM
NS
ZO
PS
PM
MFE4
NB
NM
NS
ZO
PS
PM
PB
MFE5
NM
NS
ZO
PS
PM
PB
PB
MFE6
NS
ZO
PS
PM
PB
PB
PB
MFE7
ZO
PS
PM
PB
PB
PB
PB
NB = negative Big, NM = negative medium, NS = negative small, ZO = zero, PS = positive small, PM = positive medium, and PB = positive big.FLC with 7 MFs for (a)E and (b) CE.
(a)
(b)The input vector and control rules are then defined. The optimization process described in the previous section can be performed by evaluating the objective function given in (10) using the Simulink model shown in Figure 8 for a suitable running time of T
r
=
0.3 s.In this design illustration, the optimization process based on the DSA is started by initializing the following parameters: the number of iterations (G) as 100, number of populations (N) as 20, dimension of the problem (D) as 14, and the control parameters P
1 and P
2 as 0.3
*
rand. After the creation of the initial population and the calculation of the corresponding objective function for each input vector in the population, the DSA updates the population and initiates a new iteration. If the DSA reaches the maximum iteration, the FLC with the best MFs is obtained (Figure 7). This result indicates that the proposed approach provides a systematic and easy way to design FLCs for PV inverter control systems. The following section describes the results of the optimum FLC design for the proposed PV inverter system and its performance.


## 6. Results and Discussion

The PV inverter system illustrated in Figure8 is used to validate the proposed DSA-based FLC (FL-DSA) optimization method and the performance of the overall system. Figure 10 shows the convergence characteristics of FL-DSA in obtaining the best optimal solution for the test system, along with the results obtained with PSO-based FLC (FL-PSO). For a fair comparison, both optimization methods use the same general parameters, such as the number of the maximum iterations, the number of populations, and the problem dimension, as indicated in the previous section. Figure 10 shows that FL-DSA converges faster than FL-PSO. Furthermore, FL-DSA generates better optimal solution compared with FL-PSO. Note that the above optimum performance of FL-DSA is obtained when both FLCs representing V
d and V
q accomplish the MFs shown in Figure 11. Considering the effectiveness of FL-DSA, only this controller is used to evaluate the performance of the overall PV inverter system when subjected to different types of loads.Figure 10
Performance comparisons based on FL-DSA and FL-PSO.MF of the (a)E, (b) CE, and (c) output.
(a)
(b)
(c)


### 6.1. Performance with Resistive Load

To evaluate the overall performance of the proposed inverter control strategy, a simulation is conducted using the simulation model shown in Figure8 for 0.1 s with a resistive load of R
= 50 Ω. In this case, the AC output voltage waveforms of the three-phase inverter are shown in Figure 12. The waveforms are sinusoidal with 50 Hz and have no negative effect, such as overshoot or oscillation. Moreover, the shift is 120° between each phase. The controller distinctly succeeds in regulating the magnitude of the phase voltage waveform at 339 V and the rms voltage of 240 V. The controller also succeeds in following the exact voltage reference and quickly realizing the steady-state values.Figure 12
Output voltage waveforms (i.e.,V
a, V
b, and V
c) of the three-phase inverter with R load.For high power capacity applications, the magnitude of the line voltage, such asV
a
b, is commonly considered in three-phase systems. It is higher than the phase voltage V
a by a factor of 3. The waveform of the line voltage is illustrated in Figure 13, in which the magnitude of the output waveform is 586 V, whereas the rms voltage is equal to 415 V as required by the system. Similar to the phase voltages, the line voltage is sinusoidal, and the controller succeeds in following the exact voltage reference and quickly realizing the steady-state values.Figure 13
Line voltage (V
a
b) of the three-phase inverter with R load.The three-phase load current waveforms are also important in analysis; hence, Figure14 is plotted. Similar to the output voltage waveform, the phase load current waveform shows a constant magnitude of approximately 6.8 A and an rms current of 4.8 A. This waveform is a balanced sinusoidal waveform of 50 Hz. The phase shift is also 120° between each phase.Figure 14
Output current waveforms (i.e.,I
a, I
b, and I
c) of the three-phase inverter with R load.Figure15 shows the voltage waveform and the load current waveform in which the load current waveform is scaled up by 20 times to clearly show the phase difference between the voltage and current waveforms. The voltage and the current have the same phase angle and therefore follow unity power factor operation as expected.Figure 15
Output voltage(
V
a
) and current load (
I
a
) of the inverter with R load.


### 6.2. Performance with Resistive and Inductive Load

Another type of load is used to test the robustness of the controller. In this case, anR
L load of R
=
50 Ω, L
=
50 mH is connected to the system. The simulation is performed for 0.1 s. The voltage waveforms are not affected by changing the load type (Figure 16). The controller still succeeds in preserving the magnitude of the AC output voltage waveforms for the three-phase inverter at 339 V. The waveforms are stable, clean, and balanced at 50 Hz.Figure 16
Output voltage waveforms (i.e.,V
a, V
b, and V
c) of the three-phase inverter with R
L load.Similar to the case of resistive load, the line voltage (V
a
b) for R
L load is depicted in Figure 17, wherein the amplitude is maintained at approximately 586 V, which is equivalent to 415 V of rms.Figure 17
Line voltage (V
a
b) of the three-phase inverter with R
L load.The three-phase load current waveforms are presented in Figure18 to observe the effect of R
L load on the current waveform. The change in load does not affect the quality of the current waveforms. The waveforms are still stable, and the controller achieves a constant peak level with approximately 6.5 A and approximately 4.5 A rms. Moreover, the waveforms are still balanced at 50 Hz and displaced by 120° between each phase.Figure 18
Output current waveforms (i.e.,I
a, I
b, and I
c) of the three-phase inverter with R
L load.However, the load current now lags the voltage waveform by 17.45°, as shown in Figure19; therefore, the power factor of this load is 95.4%.Figure 19
Output voltage(
V
a
) and current load (
I
a
) of the inverter with R
L load.


### 6.3. Performance with Nonlinear Load

In this case, a nonlinear rectifier load withR
=
100 Ω is connected to the system to validate the controller robustness and to ensure that the controller can deal with different types of loads. The controller again succeeds in stabilizing the three-phase output waveform at 339 V (Figure 20). The controller also maintains the sinusoidal output voltage waveforms with 120° displacements between the phases.Figure 20
Output voltage waveforms (i.e.,V
a, V
b, and V
c) of the three-phase inverter with nonlinear load.The line voltage waveform (V
a
b) depicted in Figure 21 does not affect system performance. The inverter can still maintain the stability of the output line voltage amplitude at 586 V and the rms voltage at approximately 415 V.Figure 21
Line voltage (V
a
b) of the three-phase inverter with nonlinear load.When the nonlinear load is connected to the inverter, the load current is nonsinusoidal, as exhibited in Figure22. However, the amplitude is stable with a peak value of approximately 5.9 A.Figure 22
Output current waveforms (i.e.,I
a, I
b, and I
c) of the three-phase inverter with nonlinear load.Figure23 shows that the output currents (
I
a
) have the same phase and frequency with the output voltage (
V
a
) without any problems, such as lag, lead, and flicker. The load current waveform in Figure 23 is again scaled up to 20 times for a clear illustration.Figure 23
Output voltage(
V
a
) and current load (
I
a
) of the inverter with nonlinear load.In addition to the above analysis on the performance of the inverter with three different loads, fast Fourier transform (FFT) is performed on the inverter output waveforms to verify their quality in terms of the total harmonic distortion (THD). The quality of the waveform is inversely proportional to the THD percentage. The THD percentage for the output waveforms should be less than 5% for the voltage to meet the international IEEE-929-2000 standard [25]. Table 2 shows the THD percentages of the voltages and currents obtained for the three load types analyzed in this paper. The controller maintains the THD of the voltage within a very small value for all load types. This value is less than the 5% requirement of the IEEE-929-2000 standard and more than 5% for the THDi with nonlinear load. This result is attributed to the nonlinear nature of the current waveform drawn by the nonlinear load that cannot be controlled by the inverter.Table 2
THD comparison.
THD
Type of load
R load
RL load
Nonlinear load
THD
v
0.56
0.54
0.91
THD
i
0.57
1.15
30.56


### 6.4. Effect of Load Switching

To illustrate the performance of the inverter during the transition from one load type to another, we perform a simulation for 0.3 s where a resistive load of 50 Ω is connected from 0 s to 0.1 s. Then, theR
L load of R
=
50 Ω, L
=
50 mH is connected from 0.1 s to 0.2 s. Finally, the nonlinear rectifier load with a 100 Ω is connected from 0.2 s to 0.3 s. Figure 24 illustrates the output voltage waveforms with different loads. The figure shows that the waveforms are sinusoidal with 50 Hz and that the displacement between each phase is 120°. The controller manages to precisely stabilize the amplitude at 339 V. However, short transients occur during the transition between one load to another, with the overshoot attributed to the switching effect, especially between the R
L load and nonlinear load.Figure 24
Output voltage waveforms (i.e.,V
a, V
b, and V
c) of the three-phase inverter with three load types.The voltage(
V
a
) and current (
I
a
) are depicted in Figure 25 to exhibit clearly the effect of phase voltage overshoots along with current waveform. The load current waveform is scaled up to 20 times for clarity. The voltage and current waveforms with R and nonlinear load achieve unity power factor, whereas the voltage and current waveform with R
L load achieve a power factor of 95.4%.Figure 25
Output voltage and current load of the inverter with three load types.Figure26 illustrates the line voltage (V
a
b). Notably, the overshoots during the transient periods are minimal when line voltages are considered. Nevertheless, the controller manages to regulate the amplitude at 586 V. The line output voltage acquires a sinusoidal waveform at 50 Hz.Figure 26
Line voltage (V
a
b) of the three-phase inverter with three load types.Figure27 shows the response of V
d and V
q with three load types in a continuous simulation run. The figure clearly shows a fast and good transient response. In Figure 27(a), voltage V
d achieves the settling times in approximately 0.0013 s. In addition, V
d achieves a good steady state error that keeps the error very small. V
d at 0.1 and 0.2 s shows the switching response to different loads. Figure 27(b) shows that V
q also succeeds in achieving a zero value with small oscillation. In addition, the V
q response shows that the frequency of the waveforms is 50 Hz and that the displacement between each two phases is also 120°.Response of the inverter with three load types: (a)V
d (b) V
q.
(a)
(b)


## 6.1. Performance with Resistive Load

To evaluate the overall performance of the proposed inverter control strategy, a simulation is conducted using the simulation model shown in Figure8 for 0.1 s with a resistive load of R
= 50 Ω. In this case, the AC output voltage waveforms of the three-phase inverter are shown in Figure 12. The waveforms are sinusoidal with 50 Hz and have no negative effect, such as overshoot or oscillation. Moreover, the shift is 120° between each phase. The controller distinctly succeeds in regulating the magnitude of the phase voltage waveform at 339 V and the rms voltage of 240 V. The controller also succeeds in following the exact voltage reference and quickly realizing the steady-state values.Figure 12
Output voltage waveforms (i.e.,V
a, V
b, and V
c) of the three-phase inverter with R load.For high power capacity applications, the magnitude of the line voltage, such asV
a
b, is commonly considered in three-phase systems. It is higher than the phase voltage V
a by a factor of 3. The waveform of the line voltage is illustrated in Figure 13, in which the magnitude of the output waveform is 586 V, whereas the rms voltage is equal to 415 V as required by the system. Similar to the phase voltages, the line voltage is sinusoidal, and the controller succeeds in following the exact voltage reference and quickly realizing the steady-state values.Figure 13
Line voltage (V
a
b) of the three-phase inverter with R load.The three-phase load current waveforms are also important in analysis; hence, Figure14 is plotted. Similar to the output voltage waveform, the phase load current waveform shows a constant magnitude of approximately 6.8 A and an rms current of 4.8 A. This waveform is a balanced sinusoidal waveform of 50 Hz. The phase shift is also 120° between each phase.Figure 14
Output current waveforms (i.e.,I
a, I
b, and I
c) of the three-phase inverter with R load.Figure15 shows the voltage waveform and the load current waveform in which the load current waveform is scaled up by 20 times to clearly show the phase difference between the voltage and current waveforms. The voltage and the current have the same phase angle and therefore follow unity power factor operation as expected.Figure 15
Output voltage(
V
a
) and current load (
I
a
) of the inverter with R load.


## 6.2. Performance with Resistive and Inductive Load

Another type of load is used to test the robustness of the controller. In this case, anR
L load of R
=
50 Ω, L
=
50 mH is connected to the system. The simulation is performed for 0.1 s. The voltage waveforms are not affected by changing the load type (Figure 16). The controller still succeeds in preserving the magnitude of the AC output voltage waveforms for the three-phase inverter at 339 V. The waveforms are stable, clean, and balanced at 50 Hz.Figure 16
Output voltage waveforms (i.e.,V
a, V
b, and V
c) of the three-phase inverter with R
L load.Similar to the case of resistive load, the line voltage (V
a
b) for R
L load is depicted in Figure 17, wherein the amplitude is maintained at approximately 586 V, which is equivalent to 415 V of rms.Figure 17
Line voltage (V
a
b) of the three-phase inverter with R
L load.The three-phase load current waveforms are presented in Figure18 to observe the effect of R
L load on the current waveform. The change in load does not affect the quality of the current waveforms. The waveforms are still stable, and the controller achieves a constant peak level with approximately 6.5 A and approximately 4.5 A rms. Moreover, the waveforms are still balanced at 50 Hz and displaced by 120° between each phase.Figure 18
Output current waveforms (i.e.,I
a, I
b, and I
c) of the three-phase inverter with R
L load.However, the load current now lags the voltage waveform by 17.45°, as shown in Figure19; therefore, the power factor of this load is 95.4%.Figure 19
Output voltage(
V
a
) and current load (
I
a
) of the inverter with R
L load.


## 6.3. Performance with Nonlinear Load

In this case, a nonlinear rectifier load withR
=
100 Ω is connected to the system to validate the controller robustness and to ensure that the controller can deal with different types of loads. The controller again succeeds in stabilizing the three-phase output waveform at 339 V (Figure 20). The controller also maintains the sinusoidal output voltage waveforms with 120° displacements between the phases.Figure 20
Output voltage waveforms (i.e.,V
a, V
b, and V
c) of the three-phase inverter with nonlinear load.The line voltage waveform (V
a
b) depicted in Figure 21 does not affect system performance. The inverter can still maintain the stability of the output line voltage amplitude at 586 V and the rms voltage at approximately 415 V.Figure 21
Line voltage (V
a
b) of the three-phase inverter with nonlinear load.When the nonlinear load is connected to the inverter, the load current is nonsinusoidal, as exhibited in Figure22. However, the amplitude is stable with a peak value of approximately 5.9 A.Figure 22
Output current waveforms (i.e.,I
a, I
b, and I
c) of the three-phase inverter with nonlinear load.Figure23 shows that the output currents (
I
a
) have the same phase and frequency with the output voltage (
V
a
) without any problems, such as lag, lead, and flicker. The load current waveform in Figure 23 is again scaled up to 20 times for a clear illustration.Figure 23
Output voltage(
V
a
) and current load (
I
a
) of the inverter with nonlinear load.In addition to the above analysis on the performance of the inverter with three different loads, fast Fourier transform (FFT) is performed on the inverter output waveforms to verify their quality in terms of the total harmonic distortion (THD). The quality of the waveform is inversely proportional to the THD percentage. The THD percentage for the output waveforms should be less than 5% for the voltage to meet the international IEEE-929-2000 standard [25]. Table 2 shows the THD percentages of the voltages and currents obtained for the three load types analyzed in this paper. The controller maintains the THD of the voltage within a very small value for all load types. This value is less than the 5% requirement of the IEEE-929-2000 standard and more than 5% for the THDi with nonlinear load. This result is attributed to the nonlinear nature of the current waveform drawn by the nonlinear load that cannot be controlled by the inverter.Table 2
THD comparison.
THD
Type of load
R load
RL load
Nonlinear load
THD
v
0.56
0.54
0.91
THD
i
0.57
1.15
30.56


## 6.4. Effect of Load Switching

To illustrate the performance of the inverter during the transition from one load type to another, we perform a simulation for 0.3 s where a resistive load of 50 Ω is connected from 0 s to 0.1 s. Then, theR
L load of R
=
50 Ω, L
=
50 mH is connected from 0.1 s to 0.2 s. Finally, the nonlinear rectifier load with a 100 Ω is connected from 0.2 s to 0.3 s. Figure 24 illustrates the output voltage waveforms with different loads. The figure shows that the waveforms are sinusoidal with 50 Hz and that the displacement between each phase is 120°. The controller manages to precisely stabilize the amplitude at 339 V. However, short transients occur during the transition between one load to another, with the overshoot attributed to the switching effect, especially between the R
L load and nonlinear load.Figure 24
Output voltage waveforms (i.e.,V
a, V
b, and V
c) of the three-phase inverter with three load types.The voltage(
V
a
) and current (
I
a
) are depicted in Figure 25 to exhibit clearly the effect of phase voltage overshoots along with current waveform. The load current waveform is scaled up to 20 times for clarity. The voltage and current waveforms with R and nonlinear load achieve unity power factor, whereas the voltage and current waveform with R
L load achieve a power factor of 95.4%.Figure 25
Output voltage and current load of the inverter with three load types.Figure26 illustrates the line voltage (V
a
b). Notably, the overshoots during the transient periods are minimal when line voltages are considered. Nevertheless, the controller manages to regulate the amplitude at 586 V. The line output voltage acquires a sinusoidal waveform at 50 Hz.Figure 26
Line voltage (V
a
b) of the three-phase inverter with three load types.Figure27 shows the response of V
d and V
q with three load types in a continuous simulation run. The figure clearly shows a fast and good transient response. In Figure 27(a), voltage V
d achieves the settling times in approximately 0.0013 s. In addition, V
d achieves a good steady state error that keeps the error very small. V
d at 0.1 and 0.2 s shows the switching response to different loads. Figure 27(b) shows that V
q also succeeds in achieving a zero value with small oscillation. In addition, the V
q response shows that the frequency of the waveforms is 50 Hz and that the displacement between each two phases is also 120°.Response of the inverter with three load types: (a)V
d (b) V
q.
(a)
(b)


## 7. Conclusion

This paper presented an FLC-based optimization approach for PV inverters using the DSA. First, a method was formulated to automatically change the MF of the FLC used in the proposed PV inverter. This method is very useful in obtaining the desired output if the MFs used can be effectively tuned by an appropriate optimization method. Second, to effectively tune the MFs of the proposed FLC used in the PV inverter, a suitable objective function was developed to minimize the MSE of the output voltage at the inverter terminal. Finally, a relatively new optimization method known as the DSA was proposed to tune the MFs of the FLC instead of manual tuning. The proposed method was coded and simulated in Matlab software. The FLC with seven optimally tuned MFs using the DSA achieved good performance. The FLC for the proposed PV inverter performed excellently in tracking the reference value and regulating the output waveforms with the desired amplitude. It also demonstrated a strong performance in terms of its quick response with minimal fluctuation for different load types. A very low THD was also achieved for the voltage with 0.56%, 0.54%, and 0.91% for the resistive, resistive inductive, and nonlinear loads, respectively.



---

*Source: 469313-2014-10-22.xml*