You are on page 1of 9

Available online at www.sciencedirect.

com
ScienceDirect

Energy Reports 8 (2022) 1003–1011


www.elsevier.com/locate/egyr

2021 8th International Conference on Power and Energy Systems Engineering (CPESE 2021),
10–12 September 2021, Fukuoka, Japan

Optimal PI controller based PSO optimization for PV inverter using


SPWM techniques
Maher G.M. Abdolrasola ,∗, M.A. Hannanb , S.M. Suhail Hussainc , Taha Selim Ustunc
a Institute of Sustainable Energy, Universiti Tenaga Nasional, 43000 Kajang, Selangor, Malaysia
b Department of Electrical Power Engineering, Universiti Tenaga Nasional, Kajang, 43000, Selangor, Malaysia
c Fukushima Renewable Energy Institute, AIST (FREA), Koriyama 963-0298, Japan

Received 26 October 2021; accepted 8 November 2021


Available online 27 November 2021

Abstract
This paper deals with the inverter controller utilizing Sinusoidal Pulse Width Modulation (SPWM) to control the three-phase
off-grid system’s modulation index. Particle Swarm Optimization (PSO) algorithm has been used to improve the controller
performance by automatically finding its parameters in order to reduce the error in the proportional Integral (PI) controller.
The system is included with photovoltaic and battery storage to supply power to a local load of 3 kW. Control was on voltage
by measuring load voltage to be feedback to the controller to evaluate the best modulation index value needed for SPWM pulse.
Therefore, the inverter is based on load change to adjust the system to be stable at any time because of the proportional and
integral controller (PI). The PI Controller provides better results than a system without a controller, especially when applying
faults in phase. This shows how the robustness of the controller is. This model is explained in detail. All simulation results show
that the modulation index controller acts so that total harmonic distortion (THD) is less after using the optimal PI controller
parameters.
© 2021 The Author(s). Published by Elsevier Ltd. This is an open access article under the CC BY license
(http://creativecommons.org/licenses/by/4.0/).
Peer-review under responsibility of the scientific committee of the 2021 8th International Conference on Power and Energy Systems Engineering,
CPESE, 2021.

Keywords: Particle Swarm Optimization; PV system; Modulation index; SPWM; PI controller; Distributed generation; THD

1. Introduction
Remote communities need electrification where supplying to those areas is extremely expensive to be imple-
mented for any government or unreasonable [1]. Under such situations, a nearby small-scale off-grid distributed
generation system can be the best alternative to supply power [2,3]. Recently, the world witnesses huge research
on different types of distributed generations, especially on the stand-alone solar system, which is considered the
best way to supply power for remote areas regardless of its high initial cost [4,5]. Now, it is being deployed for
rural electrification of remote regions in many countries across the world [6]. The photovoltaic (PV) system output
∗ Corresponding author.
E-mail address: maher.abdolrasol@gmail.com (M.G.M. Abdolrasol).

https://doi.org/10.1016/j.egyr.2021.11.180
2352-4847/© 2021 The Author(s). Published by Elsevier Ltd. This is an open access article under the CC BY license (http://creativecommons.
org/licenses/by/4.0/).
Peer-review under responsibility of the scientific committee of the 2021 8th International Conference on Power and Energy Systems
Engineering, CPESE, 2021.
M.G.M. Abdolrasol, M.A. Hannan, S.M.S. Hussain et al. Energy Reports 8 (2022) 1003–1011

is always a direct current (DC), so it needs such a means to convert it to alternating current (AC), which is called
an inverter. That inverter also needs a controller to control its gate switching signals to allow a proper amount of
power to be passed through to give the required AC power, e.g. using Pulse Width Modulation (PWM) [7]. The
proposed technique for controlling SPWM by controlling the value of the modulation index to drive the system to
a stable state when the system goes unbalanced or in a transient state or during system faults. A number of authors
have proposed similar ways either by controlling (Va, Vb, Vc) [8,9] or by controlling on dq0 as in [10,11] both
can come up with the same consequences almost. But, then again, the first has a better advantage when it comes to
unbalanced load conditions. This experiment’s extensive simulation was done using MATLAB/Simulink R2021a,
especially focusing on the Simpowersystems library. However, this library was the main one for accomplishing this
system. Designing this system further explained in the next section, including system design and configuration,
controller design, discussion and simulation result, and conclusion.

2. System design and configuration


The system contains a solar system linked to battery storage feeding an IGBT inverter and providing three-phase
electricity to a local load nearby, as shown in Fig. 1. The inverter output was not suitable for feeding the local load
before passing through a low pass filter to clarify the signal to be a pure sinusoidal waveform [12]. The waveform
amplitude was approximate 339 V phase to the ground with a fixed frequency of 50 Hz. The RMS voltage of this
waveform is approximately 240 V. This signal specification is quite perfect for supplying electrical equipment in
Malaysia. However, using MATLAB to build this system and running this simulation by utilizing Powergui in a
discrete simulation type of 2 µs.

Fig. 1. Solar system with battery storage linked to a local load.

The solar PV module is obtained from associating photovoltaic cells in series and parallel. In this simulation,
two arrays are connected in parallel. Each array consists of 22 modules connected in series. Each module has an
open-circuit voltage of 36.90 V, and the short circuit current is 8.01 A, voltage at maximum power is 30.3 V, and
current at maximum power is 7.10 A [13,14]. They are connected to a backup battery as a storage system to be
exploited when there is no sunlight, such as during the night or when there is a lack of sun radiation. Lead-Acid
Battery has been used with a normal voltage of 760 V and rated 8 Ah and 95% initial state of charge.
Insulated gate bipolar transistor or IGBT inverter has been selected to be utilized; it is a switch that is used
permitted to let the power flow in the ON condition and to stop power flow its voltage to a semiconductor component,
therefore changing Properties to block or create an electrical path [15,16]. In short, it is to convert the Direct
Current (DC) to Alternating Current (AC). Fig. 2 shows six IGBTs diodes building an inverter of three bridge arms
to produce power of three phases. IGBT inverter receives the SPWM signals to drive inverter gates to switch the
inverter On and Off with the amount of power needed. The power supplied from DC voltage is from photovoltaic
with 760 V DC voltage; this value is needed to make the 240 V RMS alternating AC with its amplitude of 339 V
when the measurement device is set to be phase to ground.
The inverter supplies power in the required amplitude and frequency. But yet the signal has a noise need such
a way to filter that noise away, a parallel inductive (L) capacitive (C) compilation can accomplish this. By trying
different values until L and C to get the required filtering of a pure sinusoidal signal of the current–voltage and
1004
M.G.M. Abdolrasol, M.A. Hannan, S.M.S. Hussain et al. Energy Reports 8 (2022) 1003–1011

Fig. 2. Three phase inverter connected to LC filter.

current–voltage. This filter is known as an LC filter or a low pass filter. However, this system has an inductive value
of 7.6 mH while the capacitive of 0.0008 µf. The load has been used as a purely resistive load in this system, a
three-phase load block of frequency 50 Hz, normal voltage 415 Vrms, and active power of 3 kW.

3. Controller design
The controller is the most crucial part of any system; this controller is designed to give a better output waveform
depends on the modulation index control signal. However, the control signal is subjected to the output voltage of a
point just before the load, as shown in Fig. 3. The three phases Vabc has been read by a block called Three-phase
VI-measurement; this block can output the voltages and currents in volts and amperes. In this simulation, the voltage
was only measured for controlling purposes, then Vabc three-phase signal has to be converted into per unit. It goes
through a Gain block by multiplying it by 1/339 to get the per-unit value. Then the same signal goes to rms Block
with 50 Hz frequency to change this signal to read the rms value. The same signal goes through the Sum block to
be compared to a constant, which is 1, to subtract from 1 to catch the error signal; subsequently, the error signal
will be fed into the PI controller [17]. PID controller block implements continuous- and discrete-time PID control
algorithms and includes advanced features such as anti-windup, external reset, and signal tracking. PID can tune
the gains automatically using the ‘Tune’ button (requires Simulink Control Design). However, In this stud, the PI
was optimized using PSO optimization and get a better waveform signal, and these PI controller functions rely on
compensator formula (1).

Kp e(t) + Ki e(t)dt (1)

where, Kp and Ki are the PI controller values, e an error signal. The controller’s duty is to narrows down the
error to be so close to zero for a better output signal. After that, the output control signal passes through a limiter
block with limits of less than one. To make it not exceeds that limits simply because it represents the modulation
index value, which is always less than one. Then this output control signal participates in SPWM generation as a
modulation index. It is well known that SPWM normally uses a fixed modulation index, but in this simulation, it
needs to be regulated automatically as the system needs. However, SPWM utilizes a sin wave signal. That wave
has been generated via a Sin wave block in the simulation to generate a sine wave output for each phase, as shown
in Fig. 3. The control signal for each phase will be multiplied by sin wave by using a product block. Subsequently
same output signal goes through the relational operator, which applies the selected relational operator to the inputs
and outputs result. The used operation was greater than or equal after the signal compared to the triangle signal
generated by the repeating table block. However, the output will be an SPWM, but before that, each output control
signal for each phase will pass through NOT logic gate block to get six pulses signals to drive 6 IGBTs by fed it
into its gate drive.
1005
M.G.M. Abdolrasol, M.A. Hannan, S.M.S. Hussain et al. Energy Reports 8 (2022) 1003–1011

Fig. 3. Full controller for SPWM generation based on modulation index.

Normally traditional distribution system loads are commonly single phase, so the current is different in each
phase. Because of unbalanced load associated with the inverter leading to unbalanced voltage drop on LC filters
used in each phase. This unbalanced voltage drop will cause the line voltages at inverter output to become unstable.
The voltage unbalance factor, for example, the ratio of a negative sequence to a positive sequence of the fundamental
component. Therefore, it is essential to compensate for the unbalance voltage. To perform this error between the
rms value of the phase voltages at inverter output and the reference phase voltage is given to proportional plus
integral controller. The output of the PI controller is multiplied with a unit sine wave generator to get the PWM
pulses are generated to switch on/off the load side inverter. The goal is to get, unlike modulation indexes for three
phases to balance out the unbalanced voltages. Another author uses a mixture of dq0 transformation and symmetrical
component analysis to balance the inverter voltages for the unbalanced load scenario [17]. Since dq0 transformation
is based on immediate values, its detection time is faster than rms, measurement method. Besides, the voltage is
sinusoidal and measured after the LC filter required abc to dq0 transformation compared to rms based approach.

4. PSO algorithm for PI controller optimization


PSO algorithm is one of the most excellent optimization methods, which is has advantages over the other
optimization methods in its easy implementation, robustness, and globe convergence capability [18]. For these
reasons, the PSO algorithm has been selected in this paper for tuning Kp and Ki parameters by searching for the
best values to make the error as small as possible or zero. By doing that, algorithm convergence can be controlled,
and the best value of the objective function can be found.
PSO algorithm principles are depending on two factors velocity and position. The member represents updates
these factors by using Eqs. (2) (3). Fig. 4shows the proposed PSO algorithm flow chart of the PI controller.
Vid (t + 1) = wVid (t) + c1r1 Pid (t) − X id (t) + c2r2 Pid (t) − X id (t)
( ) ( )
(2)
X id (t + 1) = X id (t) + Vid (t + 1) (3)
where, c1 is a social rate and c2 is cognitive rate. r1 and r2 is the random interval (0,1). V is the velocity, w is
the inertia factor. X is the Position factor. The algorithm searches for the optimal values for Kp and Ki to improve
the PI controller switching for the inverter performance by reducing the Mean Square Error (MSE) to the transient
response of the inverter. The objective function is MES which is determined by Eq. (3).
n
1∑ 2
MSE = e (4)
n i=1
where, e is an error, n is samples number, i is iteration number.
The nature of the loads is commonly single phase so, every phase should have been a different current. This
may cause an unbalanced load linked to inverters. So, the unequal current in each phase may lead to an unequal
voltage drop across LC filters. However, the different drop in voltage may lead to unequal line voltages. The voltage
unbalance factor, e.g., the ratio of a negative sequence to a positive sequence of a fundamental component, will
1006
M.G.M. Abdolrasol, M.A. Hannan, S.M.S. Hussain et al. Energy Reports 8 (2022) 1003–1011

Fig. 4. Flow chart of PSO optimization algorithm for optimal PI controller parameter.

Fig. 5. Iterations against the MSE error.

go out of its allowable boundary (less 1%). Therefore, it is very important to recompense the unbalance voltage in
the system. To perform this error between the RMS value of the phase voltages and the reference phase voltage is
given to the proportional plus integral (PI) controller. The output of the PI controller is multiplied with the unit sine
wave generator to get the reference phase voltages (Va ref, Vb ref, Vc ref). Using Va ref, Vb ref, and Vc ref,
SPWM pulses are generated to switch on/off with a cutoff frequency 25 kHz. The six pulses are collecting from
the SPWM generator to switch the IGBT gate drives.

5. Results and discussion


PSO algorithm has run for 100 iterations to find IP controller parameters of Kp and Ki, the main target minimize
MES error. The PSO iterations against the MSE reduced suddenly in earlier iterations after that decreased again
after 50 iterations, as shown in Fig. 5.
The system has been tested for several seconds to ensure that the system is stable. The measuring point was after
the LC filter so, three-phase voltage and current have been measured even though the current is not involved in
the controller because the control was on voltage. However, Fig. 6(a) shows the three-phase current, and Fig. 6(b)
shows three-phase voltage Va, Vb, and Vc running smoothly for 0.1 s. Each of the three-phase waveforms is in
phase difference of 120◦ , which is the healthy condition of a normal waveform, neither lead nor lag, because of
the purity of the resistive load. From the voltage, waveforms can also notice, the system has settled in a very short
time. This translates to time to show a good impact on the output waveforms because of the feedback signal from
1007
M.G.M. Abdolrasol, M.A. Hannan, S.M.S. Hussain et al. Energy Reports 8 (2022) 1003–1011

Fig. 6. (a) Three-phase current and (b) three-phase voltage running for 0.2 s.

the system. The voltage signal was running on amplitude approximately 339 V phase to ground, which is at the
same time equal to RMS voltage of approximately 240 V phase to the ground. While the phase to phase, voltage is
fixed to 415 V RMS, which is suitable for heavy machines and industry use purposes as general. Total Harmonic
Distortion (THD) of voltage waveform is 3.94%. THD is less than 5%, as recommended in IEEE slandered with
the fundamental frequency of 50 Hz and an exact voltage peak of 329.3 V. The THD of the current appears to be
3.94% with an amplitude of 5.736 A and a fundamental frequency of 50 Hz. The voltage has risen to approximately
236.5 V at the begging with a small overshoot. It takes more than 0.2 s to settle continuously on that level and to
supply fixed power to the load.
The three-phase current waveform measured after the LC filter, and the current amplitude was approximately
5.7 A, which is approximately equal to 4 A RMS current. The three-phase current waveform signal is clearly shown
and similar to the voltage waveform signal without any lead or lag because the load is a resistive load with a power
of 3 kW. The THD of the current value is supposed to be similar or higher to the THD of voltage. In Fig. 7(a), the
modulation index values settled to a fixed value after a small drop at the begging of the simulation until it reaches
below 0.9. However, the graph also shows a zoomed figure for the modulation index signal running for 0.4 s as can
be seen, the value of the modulation index sure has to be less than the one. Hence, the modulation index in this
simulation stetted after 0.25 s at a fixed value of approximately 0.97. The PSO algorithm assists the PI controller in
getting the best modulation index value needs. As a result, the modulation index is directly involved in generating
the SPWM pulses. If faulty in any phase, the modulation index value will be adjusted to settled the system again.
This is based on the PI controller commands to keep the system steady on a fixed modulation index by PI controller
optimal Kp = 2.9 and Ki = 1.2. Without this controller, the system will not be stable, leading to an unbalanced
system, and the waveform of voltage and current will take a different shape. The second part of this simulation
discusses the system when an unsymmetrical fault occurs. One of the three phases shows the voltage, current, and
modulation index response. The simulation truly applies a fault on phase b by using fault block as a short circuit
phase to ground fault. This fault is 0.03 s to test the system robustness and unbalance condition and its effect on the
controller for a short period. From the previous simulation, the normal system settled at time 0.25 s; consequently,
fault has been applied after that time at 0.27 s.
The second part of this simulation discusses the system when an unsymmetrical fault occurs. One of the three
phases shows the voltage, current, and modulation index response. The simulation truly applies a fault on phase b
by using fault block as a short circuit phase to ground fault. This fault is 0.03 s to test the system robustness and
unbalance condition and its effect on the controller for a short period. From the previous simulation, the normal
system settled at time 0.25 s; consequently, fault has been applied after that time at 0.27 s. The system will go fault
condition for a short time equal to 0.03 s. Fig. 8 shows the modulation index for three phases, and it is the response
when the fault occurs on phase-b. According to the graph phase, the b modulation index keeps it as the modulation
index’s normal value. While phase-a and phase-c unbalance and drop until phase a reaches approximately 0.4,
phase c reaches approximately 0.7 of the modulation index. This is because the modulation index depends on the
PI controller’s output and not depending on the real waveform after that, both phase-a and phase-c back to their
normal condition after the fault stop. But with a delay time and adjustment directed by the controller.
1008
M.G.M. Abdolrasol, M.A. Hannan, S.M.S. Hussain et al. Energy Reports 8 (2022) 1003–1011

Fig. 7. (a) Modulation index signal running for 0.4 s (b) RMS voltage measured after LC filter.

Fig. 8. Three-phase modulation index signal when the fault at phase B.

Fig. 9(a) shows three phases of the current waveform when the fault occurs on phase-b; however, the current
amplitude increases greatly on the faulty phase, which is normal during any fault. Fig. 9(b) shows three-phase
voltage when fault takes place on phase-b. The system becomes unbalanced; however, phase-b dies to zero, and the
effect was on the other two phases, which both of them. Increase in amplitude, but the great impact was on phase-a.
The amplitude reaches approximately 460 V, while phase-c reaches the amplitude of approximately 342 V only.
Generally, the load is not contained in the zero-sequence circuit of a faulted phase [19]. Whether phase to ground
fault or phase to phase fault, which is phase-b represented by blue line because of drawing more current in that
phase because of the fault effect until it reaches almost double its normal amplitude reach approximately 12.5 A.
However, phase-a is also affected by the phase-b fault and increased amplitude, but it is slightly lower off course
compared to phase-b, and phase-c also affected and increased in amplitude but very small phase-b and phase-a.

6. Conclusions
The SPWM Technique for Off-grid PV Inverter based Modulation Index Controller has been described as a stand-
alone photovoltaic inverter connected utilizing an effective controller for producing three-phase power waveforms.
The system has been simulated and tested in MATLAB/Simulink environment. PSO optimization is called by
Simulink to pick the best parameters for the PI controller of the optimum values of Kp and Ki to show the best
results. The simulation result for output waveform voltage and current are stable with a reasonable amount of THD
of 3.94% on voltage as well as current. On the other hand, the controller shows a great response when phase fault
occurs in the system. However, Using the PI controller to controlling the overmodulation index for this simulation
1009
M.G.M. Abdolrasol, M.A. Hannan, S.M.S. Hussain et al. Energy Reports 8 (2022) 1003–1011

Fig. 9. (a) Three-phase current and (b) Three-phase voltage during the fault at phase B.. (For interpretation of the references to color in
this figure legend, the reader is referred to the web version of this article.)

has brought up a great advantage special for different currents in each phase. This work also included useful details
of the system set up using the Simpowersystems library. The results represent the three-phase voltage and current
waveforms, RMS voltage, THD for voltage and current, and modulation index.

Declaration of competing interest


The authors declare that they have no known competing financial interests or personal relationships that could
have appeared to influence the work reported in this paper.

References
[1] Nkiriki J, Ustun TS. Mini-grid policy directions for decentralized smart energy models in sub-saharan africa. In: 2017 IEEE PES
innovative smart grid technologies conference europe (ISGT-Europe). 2017, p. 1–6. http://dx.doi.org/10.1109/ISGTEurope.2017.8260217.
[2] Odara S, Khan Z, Ustun TS. Integration of precision agriculture and SmartGrid technologies for sustainable development. In: 2015
IEEE technological innovation in ict for agriculture and rural development (TIAR). 2015, p. 84–9.
[3] Hubble AH, Ustun TS. Feasibility of microgrid optimization and grid extension for rural electrification. In: 2016 IEEE region 10
conference (TENCON). 2016, p. 1266–9.
[4] dos Santos FC, Thornburg J, Ustun TS. Automated planning of rooftop PV systems with aerial image processing. In: 2018 IEEE PES
asia-pacific power and energy engineering conference (APPEEC). 2018, p. 736–40.
[5] Kagimu V, Ustun TS. Novel business models and policy directions based on SE4all global framework for minigrids. In: 2016 IEEE
international conference on emerging technologies and innovative business practices for the transformation of societies (EmergiTech).
2016, p. 251–6.
[6] Ustun TS, Hussain SMS, Kirchhoff H, Ghaddar B, Strunz K, Lestas I. Data standardization for smart infrastructure in first-access
electricity systems. Proc IEEE 2019;107(9):1790–802.
[7] Xu Y, Zhang W, Huang Y, Zou J. Reduction method of high-frequency audible PWM noise for three-phase permanent magnet
synchronous motors. Energy Rep 2020;6:1123–9.
[8] Huang J, Shi H. Reducing the common-mode voltage through carrier peak position modulation in an SPWM three-phase inverter. IEEE
Trans Power Electron 2014;29(9):4490–5.
[9] Zhang K, Kang Y, Xiong J, Chen J. Direct repetitive control of SPWM inverter for UPS purpose. IEEE Trans Power Electron
2003;18(3):784–92.
[10] Aftab MA, Suhail Hussain SM, Kumar V, Ustun TS, Ali I. Iec 61850 communication assisted synchronization strategy for microgrids.
In: 2018 IEEE 13th international conference on industrial and information systems (ICIIS). 2018, p. 401–6.
[11] Althobaiti AO. Proportional resonant control of three-phase grid-connected inverter during abnormal grid conditions (Ph.D. thesis),
Newcastle, UK: Newcastle University; 2017.
[12] Hu H, Feng F, Wang T. Open-circuit fault diagnosis of NPC inverter IGBT based on independent component analysis and neural
network. Energy Rep 2020;6:134–43.
[13] Yan W, Liu W, Kong W. Reliability evaluation of PV modules based on exponential dispersion process. Energy Rep 2021;7:3023–32.
[14] Liu C, Liu L. The global peak forecasting method for PV array based on the conservation of energy at uniform and partial shading.
Energy Rep 2020;6:113–22.
[15] Chen D, Lin Y, Xiao L, Xu Z, Lian H. A harmonics detection method based on improved comb filter of sliding discrete Fourier for
grid-tied inverter. Energy Rep 2020;6:1303–11.
1010
M.G.M. Abdolrasol, M.A. Hannan, S.M.S. Hussain et al. Energy Reports 8 (2022) 1003–1011

[16] Zhao Z, Leidhold R. Investigation of current-ripple for three-phase four-wire inverter-fed motors. Energy Rep 2020;6:330–7.
[17] Latif A, Hussain SMS, Das DC, Ustun TS. Optimum synthesis of a BOA optimized novel dual-stage PI - (1 + ID) controller for
frequency response of a microgrid. Energies 2020;13(13):3446.
[18] Javed Kashif, et al. Design and performance analysis of a stand-alone pv system with hybrid energy storage for rural india. Electronics
2019;8(9):952. http://dx.doi.org/10.3390/electronics8090952.
[19] Zhao Z, Leidhold R. Investigation of current-ripple for three-phase four-wire inverter-fed motors. Energy Rep 2020;6:330–7.

1011

You might also like