You are on page 1of 17

Energy Reports 8 (2022) 5603–5619

Contents lists available at ScienceDirect

Energy Reports
journal homepage: www.elsevier.com/locate/egyr

Research paper

A new implementation of the MPPT based raspberry Pi embedded


board for partially shaded photovoltaic system
Ahmed Fathy a,b , Ahmed Ben Atitallah a,c , Dalia Yousri d , Hegazy Rezk e ,

Mujahed Al-Dhaifallah f,g ,
a
Electrical Engineering Department, Faculty of Engineering, Jouf University, Saudi Arabia
b
Electric Power and Machines Department, Faculty of Engineering, Zagazig University, Zagazig, Egypt
c
LETI, ENIS, University of Sfax, Sfax, Tunisia
d
Electrical Engineering Department, Faculty of Engineering, Fayoum University, Fayoum, Egypt
e
College of Engineering at Wadi Addawaser, Prince Sattam Bin Abdulaziz University, Saudi Arabia
f
Control and Instrumentation Engineering Department, King Fahd University of Petroleum & Minerals, Dhahran 31261, Saudi Arabia
g
Interdisciplinary Research Center (IRC) for Renewable Energy and Power Systems, King Fahd University of Petroleum &
Minerals, Dhahran 31261, Saudi Arabia

article info a b s t r a c t

Article history: The operation of photovoltaic (PV) module under partial shadow conditions considers a big challenge
Received 7 December 2021 for most researchers due to power loss and hot spots that reduce the amount of extracted power. In
Received in revised form 20 February 2022 such an operation, the panel voltage–power curve has a unique global maximum power (GMP) to be
Accepted 10 April 2022
tracked. Therefore, this paper proposes a new maximum power point tracker (MPPT) implemented
Available online xxxx
by Raspberry Pi 4-based embedded board programmed via two metaheuristic approaches of cuckoo
Keywords: search (CS) and particle swarm optimizer (PSO). The approaches are developed using python software
Raspberry Pi board programming language to adapt the duty cycle fed to the MOSFET of DC/DC boost converter connected
MPPT to the panel terminals. The panel is simulated in Simulink/Matlab library to identify the GMP in each
Photovoltaic studied case. An experimental setup is conducted in the lab room of the college of Engineering, Jouf
Shaded PV
University, Saudi Arabia to assess the proposed tracker. Moreover, eight shade patterns are considered
via covering 10% to 80% with step 10% of panel with shadow. Furthermore, statistical tests of the
Wilcoxson sign rank test and ANOVA are conducted to assess the validity of the proposed tracker. The
obtained results are compared to perturb and observe (P&O) and gray wolf optimizer (GWO). The PSO-
based tracker achieved the best efficiency of 96.92%, the CS achieved 93.62%, and GWO get an efficiency
of 93.15%. Additionally, on the side of Wilcoxson sign rank and ANOVA tests, the PSO outperformed CS
and GWO. The results confirmed the superiority of the proposed Raspberry Pi system programmed via
PSO over that of CS and GWO in enhancing the power generated from the panel operated at different
partial shades.
© 2022 The Author(s). Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND
license (http://creativecommons.org/licenses/by-nc-nd/4.0/).

1. Introduction parallel to improve the generated current. The performance of the


PV-based system is affected by the surrounding environmental
The increasing demands for energy worldwide and the ex- conditions like irradiance and the ambient temperature. When
pected end of fossil energy resources have emphasized the need the surface of the panel is fully illuminated, the voltage–power
for alternative resources namely renewable energy sources curve of the panel has unique global maximum power (GMP)
(RESs). The photovoltaic (PV)-based system gained great attention which is required to be tracked. One of the negative phenomena
and became one of the most important sources among RESs. This affected by the PV panel is operating under partial shade (PS) con-
is due to its friendliness to the environment, maintenance free, dition as it greatly reduces the output power due to the existence
and long-term. The PV systems comprise multiple panels that of hot spots on the panel surface. The shade may be placed due to
are connected in series to enhance the terminal voltage and in clouds, neighboring buildings, trees, and adjacent utilities. In such
a case, the panel voltage–power curve has multiple local maxi-
∗ Corresponding author at: Control and Instrumentation Engineering Depart- mum power and unique GMP. Therefore, it is essential to install a
ment, King Fahd University of Petroleum & Minerals, Dhahran 31261, Saudi maximum power point tracker (MPPT) with the PV-based system
Arabia. to monitor and extract the global GMP for enhancing the system
E-mail address: mujahed@kfupm.edu.sa (M. Al-Dhaifallah). performance. Many works have been conducting in designing the

https://doi.org/10.1016/j.egyr.2022.04.035
2352-4847/© 2022 The Author(s). Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-
nc-nd/4.0/).
A. Fathy, A.B. Atitallah, D. Yousri et al. Energy Reports 8 (2022) 5603–5619

MPPT with PV system. Motahhir et al. (2020b) reviewed many A FOPID controller optimized via Yin–Yang-Pair optimizer (YYPO)
algorithms used to simulate the MPPT for shaded PV array, the has been introduced in Yang et al. (2018b) as a MPPT with
authors classified the algorithms to hill climbing (HC), indirect the PV system. Hong et al. (2018) designed the PV system
approaches, and soft computing techniques. However, the merits MPPT using Fuzzy logic adapted via chaos PSO. Nevertheless,
and limitations of each method have been clarified. An artificial the validity of this method was confirmed experimentally using
bee colony (ABC) based approach was presented to design the OP5600 digital simulator. Atmega16 microcontroller-based MPPT
MPPT with shaded PV array (Motahhir et al., 2020a; González- was programmed using constant voltage and P&O approaches to
Castaño et al., 2021). Two sensors are required for current and catch the PV system maximum power (Megantoro et al., 2019).
voltage in this approach. The Pspice and Matlab were employed to An approach based on reducing the length of traversing the
construct the presented approach. Tey et al. (2018) recommended operating point on voltage-axis was introduced as tracker for PV
an improved differential evolution (DE) approach to monitor the system maximum power (Kermadi et al., 2020). Pradhan et al.
global maximum power extracted from the PV system, moreover (2020) presented a hybrid technique of modified invasive weed
PSIM has been used to conduct such simulation. Cheddadi et al. optimizer and P&O based MPPT installed with PV system to track
(2018) designed MPPT controller installed in either PV charging its global maximum power. ANFIS-based tracker to adapt the
station or in electric vehicles (EVs) on-board charger. The pre- switching process of boost converter MOSFET was introduced in
sented controller is based on a modified perturb and observe Moyo et al. (2021) to enhance the PV system performance. Fathy
(P&O) algorithm programmed via C-code. Restrepo et al. (2021) and Rezk (2016) presented two metaheuristic optimizers of mine
designed the MPPT for PV system using hybrid approach combin- blast algorithm (MBA) and teaching learning-based optimizer
ing ABC and P&O. This approach was named ABC-P&O. Besides, (TLBO) to simulate the MPPT in PV array operated at partial shade,
a hardware circuit has been presented. Hanzaei et al. (2020) different shadow patterns have been analyzed. Two approaches
classified the works conducted in simulating the MPPT for PV sys- of PSO and CS were introduced in Rezk et al. (2017) to simulate
tem to conventional, new, and hybrid approaches, moreover the the MPPT for PV array operated under different shadow patterns,
merits and shortages of each approach was clarified. Rizzo and the authors concluded that the CS-MPPT is superior than PSO
Scelba (2021) employed two stages approach for simulating the one. TLBO-based MPPT was also presented by Rezk and Fathy
MPPT in PV system, the first stage used artificial neural network (2017) to enhance the performance of PV array under partial
and segmentation-based approach (ANN-SBA), while the second shade operation. An excessive review on the state-of-the-art of
one used HC method. Diab et al. (2021) introduced a hybrid many approaches conducted in simulating the MPPT with PV
approach of whale optimizer and salp swarm algorithm named system was introduced in Rezk et al. (2019), moreover twenty
(WOA-SSA) to monitor the global maximum power generated optimizers were implemented and compared under operating the
from PV system operated at partial shade. An extensive review array at different shade patterns. Fathy et al. (2018) introduced an
of many works conducted in designing the MPPT with PV system improved TLBO-based MPPT installed with PV panel operated at
has been conducted and given in Bollipo et al. (2020), Villegas- partial shadow condition. Furthermore, experimental setup was
Mier et al. (2021b) and Villegas-Mier et al. (2021a), the authors constructed using Arduino Uno microcontroller.
classified the methodologies employed in that field to classical, An excessive review on the state-of-the-art MPPT for par-
optimization, and intelligent. In fact, the authors in Villegas- tially shaded PV-based system has been introduced in Yang et al.
Mier et al. (2021b) reviewed many works used neural network (2020). A dynamic leader-based collective intelligent tracker for
and Fuzzy logic-based controller to extract the maximum power PV system operated at partial shade was presented by Yang et al.
from the PV system. Yang et al. (2018a) used passive fractional (2019a). A memetic salp swarm algorithm has been employed for
order proportional integral derivative (FOPID) controller as MPPT simulating MPPT with PV system operated at PSC (Yang et al.,
installed with PV grid connected system. The employed approach 2019b).
was P&O. Additionally, a hardware circuit based on dSpace was Many conventional and metaheuristic approaches were con-
constructed to validate the presented approach. Tsai et al. (2021) ducted in simulating the MPPT installed with PV array operated
introduced a neural network-based tracker to enhance the gen- under shade condition. However, there are some remarks about
erated power from the PV system. Indeed, the authors used most of them, the conventional approaches like P&O and incre-
TI TMS320F28335 chip of digital signal processing to validate mental conductance have some shortages in extracting the global
the proposed technique experimentally. Sampaio et al. (2019) maximum power from the PV panel especially during shadow
introduced MPPT with the aid of four approaches of gray wolf op- conditions as they stuck in local MP. Regarding to the conducted
timizer (GWO), GWO-incremental conductance, GWO-Beta, and metaheuristic approaches, some methods relied on optimizers
P&O to improve the PV system output power. Furthermore, a like PSO, TLBO, GWO, DE, ABC, MBA, and FFA, some of these
feed-forward control loop was implemented to enhance the DC approaches lacks the accuracy due to the existence of parameters
voltage regulation. A dSpace DS1104 board-based tracker was that should be tuned via the user. Besides, the others have slow
conducted to track the peak position of the PV system output convergence rate in the search space, and consume large time
power (Ahmed et al., 2021). Abo-Khalil et al. (2021) presented and effort during implementation. Additionally, most of reported
an opposition-based learning firefly approach (OFA)-based con- approach lack the implementation of hardware. Further, some
troller to monitor the global maximum power of PV system other methodologies performed experimental setup with the aid
operated in partial shade. Kermadi et al. (2018) used a hybrid of simulator that represents the PV system, this lacks the accuracy
approach with adaptive P&O and particle swarm optimizer (PSO) and far away from the reality. Table 1 gives the details of the
as MPPT for PV system. In addition, experimental setup was reported methods conducted in designing the MPPT with par-
constructed with the aid of TMS320F240 DSP on the dSPACE- tially shaded PV system, the information includes the PV system,
DS1104 platform to validate the presented technique. A hybrid converter type, controller type, the used algorithm and its type,
adaptive neuro Fuzzy inference system (ANFIS) and ABC were and the controller type. In this regard, the authors considered
introduced to track the PV system maximum power. The ABC was most of the previous works’ shortages via conducting very simple,
employed to optimize the Fuzzy logic membership function such costless, reliable, and real experimental setup for the PV system
that the root mean square error is minimized (Padmanaban et al., with MPPT with the aid of Raspberry Pi 4 embedded board. Two
2019). Additionally, experimental setup with the aid of dSPACE- metaheuristic optimizers are selected to program the Raspberry
DS1104 has been constructed to assess the presented approach. pi which are particle swarm optimizer (PSO) and cuckoo search
5604
A. Fathy, A.B. Atitallah, D. Yousri et al. Energy Reports 8 (2022) 5603–5619

(CS). The results re compared to perturb and observe (P&O) and


gray wolf optimizer (GWO). The authors selected the Raspberry Pi
4 for its competence, high accuracy, and simplicity. The following
points summarize the contribution of this work.

• A new low-cost Raspberry Pi 4-based tracker is proposed to


track the GMP of the PV panel operated at shade pattern.
• Two metaheuristic approaches of cuckoo search (CS) and
particle swarm optimizer (PSO) are developed using python
software programming language, compiled for Cortex-A72
Fig. 1. Electric scheme SDM for PV panel.
ARM processor and executed on the Raspberry Pi 4 board
through the Raspberry Pi operating system.
• An experimental setup is conducted in the lab room of col-
lege of Engineering, Jouf University, Saudi Arabia to assess 3. The proposed MPPT embedded system
the proposed tracker.
• Eight shade patterns are analyzed, and the results obtained The direct coupling of the PV panel to the load implies the loss
via both approaches are compared. of the big amount of power. Thus, usually, we are looking to de-
• Comparison to perturb and observe (P&O) and gray wolf sign an efficient hardware system to extract the maximum power
optimizer (GWO) is conducted. from PV panel. In this context, Fig. 3 illustrates the proposed
• Statistical tests of Wilcoxson sign rank test and ANOVA are MPPT embedded system based Raspberry Pi 4 board. This system
conducted to confirm the validity of the proposed tracker. contains PV panel, current sensor, voltage divider, DC/DC boost
• The robustness of the PSO-based tracker is confirmed via the converter, high-precision AD/DA board, Raspberry Pi 4 board and
presented analyzes. screen to monitor the system. However, the Raspberry Pi 4 board
is the heart of our designed system. It is selected for a high
The paper is outlined as follows: Section 2 introduces the mathe- accuracy tracking of the maximum power through the Raspberry
matical model of the PV system; Section 3 presents the proposed Pi operating system (OS) and python software programming lan-
MPPT embedded system while the metaheuristic optimization guage which presents the most suitable programming language to
based MPPT is explained in Section 4. Section 5 presents the develop a high performant MPPT algorithm such as the PSO and
proposed Setup of the MPPT embedded system while the results cuckoo with Raspberry Pi board. Nevertheless, the work purpose
and analysis are given in Section 6 and conclusions are given in is to compare these two algorithms and to select the suitable al-
Section 7. gorithm for the proposed system to extract the maximum power
for shaded PV panel. Table 2 presents the electrical specifications
2. Mathematical representation of PV system of the PV panel (solar module) used by the considered designed
system.
In this section, the mathematical formula of the PV panel is
introduced, it can be modeled by single diode model (SDM) given 3.1. DC/DC boost converter
in Fig. 1. This is the most popular one that represents the PV panel
physical behavior due to better straightforward. One can apply The DC/DC boost converter is inserted between the PV module
the Kirchhoff current law to get the output current from the panel and the load to extract the maximum power through controlling
as follows: the MOSFET transistor. According to Fig. 4, the converter consists
of input voltage (Vin ), input capacitor (C1), inductor (L), MOSFET
q. (Vm + Rs I )
[ ( ) ] [ ]
Vm + Rs I transistor, diode, output capacitor (C2), load (R), and output volt-
I = Ig − Io exp −1 − (1)
aKT Rsh age (Vout ). However, the functioning principle of the converter is
where Ig and Io denote the photon-generated current and the to accept the Vin and control periodically the switching of the
reverse saturation current, respectively, q is the electron charge, MOSFET transistor through the pulse width modulation (PWM)
a diodes ideality, Vm denotes the module terminal voltage, K signal generated by the MPPT controller in order to provide the
maximum value of Vout . The PWM has a variable duty (D) cycle
represents the Boltzmann constant, Rs and Rsh denote the panel
as presented by Eq. (3).
series and shunt resistances, respectively.
The value of Ig depends on the level of irradiance that strikes ton
D= (3)
the PV panel surface; accordingly, it changes according to the T
following formula: where T is the periodic time of the pulse train and ton presents
the period at which MOSFET is turned on.
( ) ( )
G Rs + sh
Ig = Isc0 (1 + βi (T − T0 )) (2) The diode in boost converter is used to minimize loss power
G0 Rsh
in the converter. The relationship between the Vin and Vout is
where Isc0 represents the PV panel short circuit current at G0 = illustrated by Eq. (4), as well as for the current is presented
1000 W/m2 and T0 = 25 ◦ C, G is the actual incident irradiance, by Eq. (5). Besides, the inductor and the capacitor values are
βi is the temperature coefficient of current. In case of partial determined by Eqs. (5) and (6), respectively. Nevertheless, Table 3
shade, the value of radiation becomes less than G0 , this results in reports the reference and the values of all components used to
many global maximum powers and one global point, moreover establish the DC/DC boost converter.
hot spots are generated on the panel surface that increase the Vin
power loss. Vout = (4)
(1 − D)
Fig. 2 shows different power–voltage curves of PV panel oper-
ated at fully illumination and various partial shadow conditions. It Iout
Iin = (5)
is mandatory to operate the panel at its global maximum power, (1 − D)
this can be achieved via installing MPPT with the PV generation D(1 − D)2 R
system. L= (6)
∆ IL F
5605
A. Fathy, A.B. Atitallah, D. Yousri et al. Energy Reports 8 (2022) 5603–5619

Table 1
Details of reported approaches conducted in simulating the MPPT with shaded PV system.
Author Year PV Converter Controller type Algorithm Meta- Hard- Remarks
system type heuristic ware
Motahhir et al. 2020 PV array Boost NA ABC ✓ NA ABC has slow convergence rate,
(2020a) it may be fall in local optima
Tey et al. 2018 PV array SEPIC NA DE ✓ NA DE is time consuming due to
(2018) parameter tuning by the user
Cheddadi et al. 2018 PV panel Boost STM32F429 P&O × ✓ P&O has low efficiency under
(2018) shadow operation and may
stuck in local MP
Restrepo et al. 2021 PV string Boost hardware-in-the- ABC-P&O ✓ ✓ ABC has slow convergence rate,
(2021) loop it may be fall in local optima
(HIL)
Rizzo and 2021 PV string Full-bridge NA ANN-SBA × NA Large number of current values
Scelba (2021) is required to get the best
operating condition
Diab et al. 2021 PV string Boost NA WOA-SSA ✓ NA Excessive procedures are
(2021) required, this makes hard
implementation in practical.
Yang et al. 2018 PV string NA dSpace based HIL P&O ✓ ✓ P&O has low efficiency under
(2018a) shadow operation and may
stuck in local MP
Tsai et al. 2021 PV array Buck TI ANN × ✓ Excessive data are required to
(2021) TMS320F28335 train the ANN
González- 2021 PV panel Boost TI 28069M ABC ✓ ✓ Shaded operation has not been
Castaño et al. considered
(2021)
Sampaio et al. 2019 PV array Boost TMS320F28335 GWO ✓ ✓ GWO has low solving accuracy,
(2019) slow convergence, and bad
search ability
Ahmed et al. 2021 PV array Buck– dSpace DS1104 Modified IC × ✓ The method requires tuning of
(2021) boost controlling parameters that
may increase the divergence
rate
Abo-Khalil 2021 PV panel Boost dSpace OFA ✓ ✓ The OFA did not investigated
et al. (2021) (Microlabbox) for fast variable solar
radiations.
Kermadi et al. 2018 PV string Buck– dSpace DS1104 P&O-PSO ✓ ✓ The control structure is
(2018) boost complex and costly hardware
implementation
Padmanaban 2019 PV panel SEPIC dSpace DS1104 ANFIS-ABC ✓ ✓ ANFIS is computationally heavy
et al. (2019) and time consuming due to
learning phase
Yang et al. 2018 PV array NA dSpace based HIL YYPO ✓ ✓ In experimental set-up, virtual
(2018b) PV inverter and panels are
considered which is far from
reality
Hong et al. 2018 PV array Boost OP5600 DS FL-PSO ✓ ✓ FL is based on linguistic
(2018) variables which lead to
inaccurate results
Megantoro 2019 Solar Buck Atmega16 CV-P&O × ✓ CV has low efficiency especially
et al. (2019) panel for shaded operation
P&O has low efficiency under
shadow operation and may
stuck in local MP

Kermadi et al. 2020 PV array Buck– dSpace DS1104 MP ✓ ✓ In experimental set-up, virtual
(2020) boost trapezium-FP PV panels are considered
which is far from reality
Pradhan et al. 2020 PV array Buck– OPAL-RT MIWO-P&O ✓ ✓ In hardware implementation,
(2020) boost the authors used simulator to
represent bot PV and controller
Moyo et al. 2021 PV panel Boost NA ANFIS × NA ANFIS is computationally heavy
(2021) and time consuming due to
learning phase
Fathy and Rezk 2016 PV array Boost NA MBA and ✓ NA The presented approaches
(2016) TLBO were not supported with
Rezk et al. 2017 PV string Boost NA PSO-CS ✓ NA practical results
(2017)
Rezk and Fathy 2017 PV string Boost NA TLBO ✓ NA TLBO lacks the local and global
(2017) searches tradeoff, this may
cause falling in local optima
(continued on next page)

5606
A. Fathy, A.B. Atitallah, D. Yousri et al. Energy Reports 8 (2022) 5603–5619

Table 1 (continued).
Author Year PV Converter Controller type Algorithm Meta- Hard- Remarks
system type heuristic ware
Fathy et al. 2018 PV panel Boost Arduino Uno Improved ✓ ✓ Ripple levels in the generated
(2018) TLBO power are high
Yang et al. 2019 Buck– Dynamic ✓ ✓ Dynamic patterns of shadow
PV array dSpace based HIL
(2019a) boost leader-based have been analyzed
collective
intelligent
Yang et al. 2019 Boost Memetic salp ✓ ✓
(2019b) swarm
algorithm

Fig. 2. The PV array characteristics under fully illuminated and partially shaded conditions.

Fig. 3. The MPPT embedded system based Raspberry Pi 4.

Table 2
Specifications of the PV module.
Parameter Value
Ncell 72
Voltage at MPP 18 V
Current at MPP 1.6 A
Maximum power 30 W
Open circuit voltage 21 V
Short circuit current 1.8 A
Fig. 4. DC/DC boost converter.

D.Ioutmax
C = (7) The Raspberry Pi can support several OS. But the common OS
∆Vout F used with Raspberry Pi is Raspberry Pi OS (Youssfi, 2017) which
provides a good and flexible environment to develop any appli-
3.2. Raspberry Pi 4 board cation through numerous software programming language such
as C/C++, Python, Java, etc. The first Raspberry Pi is released
The Raspberry Pi is a small computer system built onto a in 2012 with a 700 MHz processor and 512 MB of RAM. Over
tiny circuit board. It needs an operating system (OS) to work. the years, these specifications are improved which are allowed
5607
A. Fathy, A.B. Atitallah, D. Yousri et al. Energy Reports 8 (2022) 5603–5619

Fig. 5. Raspberry Pi 4 and GPIO pins.

Table 3
Electrical specifications of the DC/DC boost
converter.
Component Value
MOSFET IRF1407PbF
Diode 1N4007
Inductor L 66 µH
Input capacitor (C1) 470 µF
Output capacitor (C2) 100 µF
Output resistance (R) 150 

the apparition of the Raspberry Pi 4 (Helbet et al., 2020). The


Raspberry Pi 4 shown in Fig. 5 is based on the Broadcom BCM2711
chip which contains a Harvard Quad-core Cortex-A72 (ARM v8) Fig. 6. AD/DA GPIO interface.
64-bit system-on-chip (SoC) operating at 1.5 GHz, 32 KB data and
48 KB instruction L1 cache memory per core and 1 MB L2 cache.
Furthermore, the Raspberry Pi 4 comes with 1 GB, 2 GB, 4 GB,
problem, the high-precision AD/DA board (Garg et al., 2020) can
and 8 GB Low-Power Double Data Rate SDRAM (LPDDR4) which
be mounted on Raspberry Pi board to extend the GPIO interface
depends on different versions. Besides, it contains 2×USB 3.0 and
as depicted in Fig. 6. According to Fig. 9, 8 GPIOs (9, 10, 11, 17,
2×USB 2.0 ports which are used to connect the mouse, keyboard
18, 22, 23 and 24) are used to connect the high-precision AD/DA
and any USB devices, 2 micro-HDMI ports capable of supporting
board with the Raspberry Pi.
up to 4k@60HZ resolution, ethernet port to send ethernet frames
at a rate of one gigabit per second and a micro-SD card slot which The high-precision AD/DA board allows to add a high-
is used for booting up the Raspberry Pi OS and storing data. In precision AD and DA functions to the Raspberry Pi through the
addition, according to Fig. 5, the Raspberry Pi 4 contains 28 ADS1256 and DAC8532 circuits, respectively. Nevertheless, the
general purpose input/output (GPIO) pins, 2 × 3V3 pins, 2 × 5V ADS1256 is a 24-bit analog-to-digital converter (ADC). It provides
pins and 8 ground (0V) pins. The GPIOs allow to connect the ex- a high-resolution measurement solution for the most demanding
ternal input/output devices with Raspberry Pi board. Apart from applications. It contains 8 × 24-bit high-precision ADC channels
input/output, the GPIO pins can perform a variety of functions and provides up to 30k samples per second (SPS). According to
such as PWM which is available through GPIOs 12, 13, 18 and 19. Fig. 7, the 8 channels are available through GPIO AD0 to GPIO
In Raspberry Pi 4, the input voltage between 1.8 V and 3.3 V is AD7. On the other hand, the DAC8532 is a 16-bit digital-to-
read as high. But it is read as low if the input voltage is lower analog converter (DAC). It contains 2 × 6-bit high-precision DAC
than 1.8 V. A GPIO pin set as output delivers low for 0 V or high channels. These two channels are available through GPIOs DAC0
for 3.3 V. and DAC1 as presented by Fig. 7.
In this work, the authors used the ADS1256 to get the current
3.3. High-precision AD/DA board and the voltage values provided by the PV panel. Thus, the python
code presented in Fig. 8 permits to read through the Raspberry
The Raspberry Pi GPIO interface does not contain analog-to- Pi board the 8 AD values from the ADS1256 and store it in the
digital (AD) or digital-to-analog (DA) converter. Thus, to solve this ADC_Value table.
5608
A. Fathy, A.B. Atitallah, D. Yousri et al. Energy Reports 8 (2022) 5603–5619

Fig. 7. High-precision AD/DA board and GPIOs connection.

Fig. 8. Python code to get 8 AD values from the ADS1256.

4. Metaheuristic optimization based MPPT where the component vi k+1 denotes the updated velocity that can
be defined as follows.
Recently, metaheuristic optimization approaches penetrated
vi k+1 = wvi k + c1 r1 Pbest − di k + c2 r2 Gbest − di k
( ) ( )
(9)
in many applications from which designing the MPPT installed
with PV system. These approaches proved their abilities to extract where w denotes the inertial weight, c1 and c2 denote the acceler-
the GMP in different shade operation (Fathy and Rezk, 2016; ation coefficients, r1 and r2 denote random numbers, Pbest denotes
Rezk et al., 2017; Rezk and Fathy, 2017; Rezk et al., 2019; Fathy the local best, and Gbest denotes the global best.
et al., 2018). They outperformed the conventional approaches like Fig. 9 presents the optimization procedure by PSO. First,
hill climbing, hill climbing (HC), indirect approaches, and soft proper variables must be chosen for the search. The created sam-
computing techniques. In Rezk et al. (2017), the authors applied ples are implemented with the PVs and the resultant photovoltaic
two metaheuristic approaches of cuckoo search (CS) and particle voltage and current are recorded to estimate the total power. In
swarm optimizer (PSO) for simulating the MPPT with PV panel case of the current power of particle i is greater than the best
without conducting experimental analysis, they concluded that fitness value in history (local best), put current power as the new
the CS-based tracker is superior than the other designed via PSO. local best. Next, select the particle with the maximum power
In this work, the authors used both algorithms for simulation and at all as the global best. Following assessment of all particles,
experimental setup to investigate the previous conclusion in Rezk the velocity and location of every particle can be modified con-
et al. (2017). Moreover, comparison to perturb and observe (P&O) sidering Eqs. (8) and (9). Ultimately, when the end criterion is
and gray wolf optimizer (GWO) is performed. The main aspects achieved, the PSO end the optimization process and provides the
of both approaches are explained as follows: optimal duty cycle related to the global maximum power (Liu
et al., 2012b,a).
4.1. Particle swarm optimizer (PSO)-based MPPT
4.2. Cuckoo search (CS)-based MPPT
PSO is an optimization algorithm, which is commonly em-
ployed to track the global MPP of PV system with shading (Sarvi Cuckoo search (CS) algorithm has been proposed by Yang
et al., 2015). The idea of PSO is extracted from the behavior of and Deb (2009). The idea of CS is extracted from brood para-
birds. It comprises a swarm of particles. Every particle proposes sitism of cuckoos including intraspecific, cooperative and nest
a solution by exchange the attained data in their search process takeover (Payne et al., 2005). When host bird realizes the cuckoo
to discover the optimal solution (Boutasseta, 2012). All parti- egg in the nest, it might damage the egg or leave the nest and cre-
cles change their locations in the search-space corresponding to ate another nest. To raise the chance of getting a new cuckoo and
Eqs. (8) and (9). The location of the particle is updated based decrease of deserting eggs, cuckoos utilize various approaches for
on the local best along with the best solution proposed over the example mimicking the colors to imitate the call of host bird to
whole population. In the current work, during the optimization get access to more feeding chance. The mathematical model can
process, the converter duty cycle is used as decision variable be found in Yang and Deb (2013). The effective feature of CS is
whereas the objective function that required to be maximum is using the Lévy flights. It is an arbitrary move, described by a series
the PV power. The location of the particle (di ) can be modified of instant jumps created by a probability density function. The
according to the following relation. Lévy flight can be defined as follows.

di k+1 = di k + vi k+1 (8) Lév y (β) = l−β (10)


5609
A. Fathy, A.B. Atitallah, D. Yousri et al. Energy Reports 8 (2022) 5603–5619

Fig. 10. The optimization process based on CS.


Fig. 9. Optimization procedure of PSO-based tracker.

power (cost function). The duty cycle related to the largest power
where l denotes the length of flight and 1 < β < 3. New eggs are
is selected to be best nest (dbest ). Next, Lévy flight is staged, and
given by executing a Lévy flight from an arbitrarily chosen egg.
new nests are produced as explained in Eq. (11). The produced
A coefficient α is applied for controlling the Lévy flight. There
duty cycles are applied and evaluated over the PV system. Next,
is a vital adjusting parameter to be tuned (pa ). It is the part of
the worst nest is arbitrarily damaged based on the probability Pa .
eggs to be abandoned in every generation. In the current research,
Such procedure matches the actions of the host bird discovering
pa = 0.25 is adopted based on the suggestion by Yang and Deb
the cuckoo’s eggs and destroying them. The new nest is replaced
(2009). The main target is to find the optimal duty cycle related
the destroyed one via Lévy flight. Again, the power is recorded,
to global power. Consequently, during the optimization process,
and best nest is chosen. The optimization procedure is repeated
the duty cycle is selected to design variable. Whereas the cost
till the end criterion is met. Finally, the best duty cycle related to
function to be maximum is photovoltaic power.
Corresponding to the Lévy flight, the duty cycle is modified as global power is obtained.
follows (Yang and Deb, 2013).
( ) 5. The proposed setup of the MPPT embedded system
u
k+1
= di +α⊕Lév y (β) ≈ di +kLévy ×
k k k k
( )
d 1
dbest − di (11) Fig. 11 illustrates the prototype of the MPPT embedded sys-
|v| β tem, the goal of the proposed system is to extract the maximum
where β = 1.5, kLév y denotes the Lévy coefficient, u and v are power from the shaded PV panel. For that, the presented system
defined from the normal distribution curves. The optimization is continuously monitoring and recording the output current and
process based on CS is presented in Fig. 10. At first, numbers of voltage of the PV panel and generates the appropriate duty cycle
the host nests (n) are created and assigned as a duty cycle values. through the MPPT algorithm to control the switching frequency
These values are implemented with the PV system. The related of the MOSFET. However, according to Fig. 11, to measure the
photovoltaic voltage and current are recorded to estimate the current value provided by the PV panel, the ACS712 current
5610
A. Fathy, A.B. Atitallah, D. Yousri et al. Energy Reports 8 (2022) 5603–5619

Fig. 11. Prototype of the MPPT embedded system.

Fig. 12. ACS712 current sensor.

Fig. 13. Python code to read the current value provided by the PV panel.

sensor (Fathy et al., 2018) is used. This sensor operates at 5 V and voltage from the voltage divider circuit through the GPIO AD6 of
produces an analog voltage output relative to the measured cur- the high-precision AD/DA board and store it in the voltage_value
rent. Fig. 12 presents the current sensor board and its equivalent table.
electronic circuit. When, the MPPT python code receives the current and the
However, the used sensor has an output voltage of 2.5 V at the voltage values provided by the PV panel, it generates the duty
input current 0 A and his output sensitivity is equal to 66 mV/A. cycle based on the MPPT algorithm through the Raspberry Pi
The Raspberry Pi 4 reads the value from the sensor through PWM GPIO12 pin to control the MOSFET transistor. However,
GPIO AD7 of the high-precision AD/DA board. Fig. 13 presents the Raspberry Pi GPIO pins are designed for use with 3.3 V
inputs/outputs. Thus, the level of the output is very low to control
the python code used to read the voltage outputs of the sensor
the switching of the MOSFET transistor. Therefore, the logic level
through the GPIO AD7 and converts it to the proportional current
converter circuit (Yang et al., 2012) is used to increase the level
value which is stored in the current_value table.
of the voltage provided by the Raspberry Pi GPIO pins. Fig. 15
On the other hand, the measurement of the PV panel output
presents the logic level converter board and its equivalent elec-
voltage is conducted by the voltage divider circuit. In fact, the tronic circuit. The HV and LV pins provide the high and low
high-precision AD/DA board GPIO pins work with 5 V logic levels voltage references to this board, respectively. From 4 channels, it
and are not tolerate more than this value. The voltage at MPP is possible to shift up or down the voltage by sending the signal
provided by the PV panel is 18 V, thus a ratio 0.3 is computed be- through LV1 to HV1 or HV2 to LV2, respectively (Fig. 15). In our
tween the Vin and Vout of the voltage divider circuit. Consequently, case, the PWM signal is shifted up from 3.3 V to 5 V to control
as depicted in Fig. 11, the resistor R1 and R2 of the voltage properly the MOSFET transistor. Fig. 16 illustrates the python
divider is selected equal to 15 k and 10 k, respectively. Fig. 14 code used to generate the PWM signal through the GPIO12 pin
presents the python code used to read the PV panel outputs at 20 kHz.
5611
A. Fathy, A.B. Atitallah, D. Yousri et al. Energy Reports 8 (2022) 5603–5619

Fig. 14. Python code to read the voltage value provided by the PV panel.

Fig. 15. Logic level converter board.

Fig. 16. Python code to generate duty cycle from GPIO12 of the Raspberry Pi 4.

Fig. 17. Experimental setup of the MPPT embedded system.

Then, the switching of the MOSFET transistor controls the PV system is constructed in Simulink/Matlab as shown in Fig. 18.
extraction of the power from the PV panel through the boost con- The panel is divided into eight rows, each one has 9 cells, this
verter. The MPPT controller continuously controls the switching is to facilitate the presentation of shadow pattern. Perturb and
frequency of the MOSFET transistor based on the PV panel voltage Observe (P&O), CS, GWO, and PSO-based MPPTs are programmed
and current outputs until extraction the maximum power. and implemented in Matlab, they are employed to tune the duty
Fig. 17 shows the experimental setup and the assembly of cycle of the converter MOSFET. The considered population size
the different blocks in the MPPT embedded system. To prove for the considered metaheuristic optimizers is 4, the initial pop-
the effectiveness of the proposed system, several experiments ulation is selected as 0.08, 0.3, 0.5, and 0.7, and the maximum
are realized using the PSO and Cuckoo based MPPT algorithm for iteration is 100. Moreover, the sampling frequency used in the
different shaded levels of PV panel. The results provided by these experimental setup is fc = 30 kHz, while the employed solver is
two algorithms are recorded and stored in the SD card through ode 23tb (stiff/TR-BDF2)) with auto variable-step size. The con-
the Raspberry Pi OS which are discussed and analyzed in the next structed system is investigated on different operating conditions
section. of fully illumination, 10% (8 shaded cells), 20% (16 shaded cells),
30% (24 shaded cells), 40% (32 shaded cells), and 50% (40 shaded
6. Results and analysis cells). The GMPs and corresponding voltages and currents in all
studied cases are tabulated in Table 4.
The analysis is performed in two phases, the first one is Regarding to the fully illuminated case study, the PSO-based
simulation while the other phase is practical setup, both are tracker outperformed the others achieving the best GMP of
explained in the following subsections. The analysis is conducted 18.1598 W, then CS comes in the second rank with 18.1439 W
on a PV panel with specifications given in Table 2, the proposed while the GWO-based tracker is the worst one with GMP of
5612
A. Fathy, A.B. Atitallah, D. Yousri et al. Energy Reports 8 (2022) 5603–5619

Fig. 18. Simulink model of the proposed PV system with MPPT.

Fig. 19. The time-responses of power, current, and voltage obtained via the considered approaches in all studied cases during simulation.

17.3030 W. When eight cells are fully shaded (10% shade pattern), Raspberry Pi 4-based tracker programmed via metaheuristic ap-
the PSO-based tracker extracted GMP of 15.0828 W from the proaches to simulate the tracker for partially shaded PV system.
panel while the GWO extracts 14.2889 W, on the other hand the Python software is employed to program the considered ap-
P&O generated GMP of 15.0546 W from the panel in this case. proaches, moreover the TENMARS (TM-750) Pyranometer is used
The PSO-based tracker outperformed all considered approaches to measure the irradiance. Furthermore, a thermometer is used to
in simulation results. The time-responses of power, voltage, and measure the ambient temperature. The experiment setup shown
current obtained via the considered approaches in all studied in Fig. 17 is conducted under the irradiance of a lab room in
cases are given in Fig. 19. The curves confirmed the superiority of the college of Engineering, Jouf University, Saudi Arabia. The
the PSO-based tracker as it has less oscillation around the GMP. recorded irradiance and temperature are 380 W/m2 and 23.8 ◦ C,
The obtained results confirmed the success of PSO-based respectively. At the beginning, the mathematical model of the
tracker in achieving the best GMP for all studied cases followed panel is constructed using Simulink library in Matlab, the surface
in simulation phase. of the panel is fully illuminated and the GMP in this case is
It is important to investigate the PSO-based tracker via con- 18.9050 W, after that eight shade patterns are considered via
ducting experimental setup, it is the first time to propose a covering 10% to 80% with step 10% of panel with shadow. The
5613
A. Fathy, A.B. Atitallah, D. Yousri et al. Energy Reports 8 (2022) 5603–5619

Table 4
Simulink model GMP , duty cycle, VMP , and IMP obtained via different MPPT-based approaches.
P&O CS PSO GWO
Case #
%Shade GMP (W) VMP (V) IMP (A) GMP (W) VMP (V) IMP (A) GMP (W) VMP (V) IMP (A) GMP (W) VMP (V) IMP (A)
1 0% (Fully illuminated) 18.1216 15.9003 1.1397 18.1439 14.735 1.2116 18.1598 16.545 1.0794 17.3030 19.2636 0.4608
2 10% (8 shaded cells) 15.0546 13.1854 1.1418 15.0798 13.0296 1.1573 15.0828 13.1262 1.1491 14.2889 11.5309 1.2392
3 20% (16 shaded cells) 11.9891 10.5160 1.1401 12.0143 11.4244 1.0075 12.0173 10.5374 1.1404 12.0034 11.4351 1.00577
4 30% (24 shaded cells) 8.9384 7.9304 1.1271 8.95214 8.00696 1.1178 8.95232 7.94767 1.1264 8.80332 10.4643 0.09097
5 40% (32 shaded cells) 5.6644 4.8355 1.1714 5.61317 5.9598 0.9378 5.78855 5.7533 1.0061 5.67125 5.8861 0.9635
6 50% (40 shaded cells) 2.9028 2.9529 0.9923 2.37113 1.5179 1.2534 2.9303 2.4648 1.1380 2.80510 3.6355 0.5463

Fig. 20. The curves of (a) voltage–power, (b) voltage current of fully illuminated
and partial shaded panel.

voltage–power and voltage–current curves for all studied cases


via the Simulink model are shown in Fig. 20. The GMPs of all
these cases are noticed and tabulated in Table 5 known by GMP_S.
On the other side, different shades are implemented and the
corresponding GMPs are measured and tabulated in Table 5. The
experimental setup given in Fig. 17 is conducted in both fully
illuminated and partial shade operations, CS, GWO, and PSO based
trackers are implemented and the values of duty, GMP, voltage
at maximum power (VMP ), current at maximum power (IMP ) for
all studied cases are measured and tabulated in Table 5. For Fig. 21. The time responses of (a) duty cycle and output (b) power, (c) voltage
fully illuminated surface, the CS-MPPT extracts 17.5922 W, at and (d) current for fully illuminated PV panel.

duty cycle of 4.830e−4 while the PSO-MPPT generates maximum


power of 17.9057 W at duty cycle of 2.939e−4. On the other
hand, the GWO extracts the PV panel GMP of 17.6104 W at duty one in all studied cases achieving best GMPs that convergence to
0.0577, it comes in the last rank for this case. There is a great the modeled ones. Figs. 21–25 show the time responses of duty
improvement of the GMP extracted via the PSO more than CS cycle and GMP for fully illuminated, 20% shade, 40% shade, 60%
and GWO. In experimental setup, the shade is represented via shade, and 80% shade cases, respectively. The curves confirmed
covering portion of the panel. Regarding to 10% shade (8 shaded the superiority of PSO-based tracker compared to CS and GWO.
cells), the model GMP is 16.5028 W, the CS-MPPT succeeded in It is important to measure the level of convergence between
extracting 12.4561 W at duty cycle of 0.0023, the GWO-based the GMP obtained from the designed tracker and the other ob-
tracker generates 12.7916 W at duty cycle of 0.0366 while the tained via Simulink model. This is done by calculating the per-
PSO-MPPT outperformed the CS achieving GMP of 13.9807 W at centage of power error (PE) with respect to the GMP obtained
1.372e−4 duty cycle. via the Simulink model, it calculated via subtracting the GMP
When 16 cells are covered, the model GMP is 14.0958 W, obtained via the considered approach from that obtained via
the CS-based tracker extracts 9.2058 W, the GWO-based tracker constructed model. The values of PEs are tabulated in Table 6. It is
generates 8.0496 W, and the PSO one provides 9.5294 W. Re- clear the minimum power error obtained via the CS is 6.374% in
garding to Table 5, the PSO-based tracker outperformed the CS case of fully illuminated operation while the GWO gives 6.847%
5614
A. Fathy, A.B. Atitallah, D. Yousri et al. Energy Reports 8 (2022) 5603–5619

Table 5
The optimal values of GMP , duty, VMP , and IMP for all studied shadow patterns in experimental setup.
CS-MPPT PSO-MPPT GWO-MPPT
Case #
%Shade GMP_S (W) Duty GMP (W) VMP (V) IMP (A) Duty GMP (W) VMP (V) IMP (A) Duty GMP (W) VMP (V) IMP (A)
1 0% (Fully illuminated) 18.9050 4.830e−4 17.5922 16.2235 1.0602 2.939e−4 17.9057 16.4899 1.0569 0.0577 17.6104 16.2818 1.0119
2 10% (8 shaded cells) 16.5028 0.0023 12.4561 10.5987 1.1022 1.372e−4 13.9807 12.9631 1.0524 0.0366 12.7916 12.0436 1.0621
3 20% (16 shaded cells) 14.0958 3.270e−4 9.2058 8.5468 1.0697 2.748e−4 9.5294 8.8576 1.0706 0.0441 8.0496 7.6046 1.0585
4 30% (24 shaded cells) 11.6927 3.450e−4 6.0883 5.4121 1.1036 5.269e−4 8.1261 7.2029 1.1098 0.0645 4.9841 4.5082 1.1056
5 40% (32 shaded cells) 9.2927 1.130e−4 4.7966 4.2525 1.0902 4.538e−4 6.4543 5.9527 1.0902 0.0240 4.1890 3.9631 1.0570
6 50% (40 shaded cells) 6.8974 9.500e−4 2.6089 2.3288 1.0395 6.590e−4 3.1719 2.9245 1.0140 0.0080 2.6591 2.4859 1.0697
7 60% (48 shaded cells) 6.4028 3.480e−4 1.4422 1.2580 1.0563 1.000e−4 2.3858 2.1006 1.0674 0.0238 1.5892 1.4520 1.0682
8 70% (56 shaded cells) 6.0590 3.840e−4 1.1651 1.0103 1.1047 1.816e−4 1.8233 1.6774 1.0146 0.0206 1.4857 1.2865 1.0751
9 80% (64 shaded cells) 5.7386 1.000e−4 1.6239 1.5010 1.0629 1.118e−4 1.7437 1.5862 1.0830 0.0413 1.1701 0.9775 1.0105

Fig. 22. The time responses of (a) duty cycle and output (b) power, (c) voltage
and (d) current for 20% shade. Fig. 23. The time responses of (a) duty cycle and output (b) power, (c) voltage
and (d) current for 40% shade.

in that case, and the PSO-based tracker achieved lower PE of


the GWO achieved efficiency of 93.15% for first case. The worst
3.082% in the same case. The reader can conclude that, the PSO
outperforms the CS-based tracker and GWO-based tracker in term efficiencies are 13.80%, 20.39%, and 18.19% obtained via CS, GWO,
of PE for all studied cases. and PSO, respectively. The results confirmed the superiority of the
It is important to calculate the algorithm efficiency to assess PSO-MPPT compared to CS and GWO for practical setup.
the performances of the considered approaches. The efficiency It is important to investigate the performance of the presented
(ζ) is calculated via dividing the GMP obtained via the proposed Raspberry Pi 4-based PSO tracker during operation at dynamic
tracker by that of the constructed model. The efficiencies in all irradiance. The irradiance shown in Fig. 26 is applied on the
cases for both CS and PSO are tabulated in Table 6. The best panel, four intervals are considered, the first one has irradiance
efficiency obtained via the PSO tracker is 96.92% in the first of 95 W/m2 during the first 200 s, the second one is 190 W/m2
case while the CS tracker achieved 93.62%. On the other hand, during interval [200, 400] s, in the third interval the panel is fully
5615
A. Fathy, A.B. Atitallah, D. Yousri et al. Energy Reports 8 (2022) 5603–5619

Table 6
Power errors and efficiencies of CS-MPPT and PSO-MPPT for all studied cases.
%PE %ζ
%Shade
CS PSO GWO CS PSO GWO
0% (fully illuminated) 6.374% 3.082% 6.847% 93.62% 96.92% 93.15%
10% (8 shaded cells) 32.79% 12.09% 22.49% 67.21% 87.90% 77.51%
20% (16 shaded cells) 44.59% 19.61% 42.89% 55.40% 80.39% 57.11%
30% (24 shaded cells) 42.42% 39.69% 57.37% 57.58% 60.31% 42.63%
40% (32 shaded cells) 65.66% 29.24% 54.92% 34.34% 70.76% 45.08%
50% (40 shaded cells) 62.55% 57.72% 61.44% 37.45% 42.28% 38.55%
60% (48 shaded cells) 77.29% 70.65% 75.18% 22.71% 29.35% 24.82%
70% (56 shaded cells) 82.04% 81.80% 75.48% 17.96% 18.19% 24.52%
80% (64 shaded cells) 86.19% 80.31% 79.61% 13.80% 19.69% 20.39%

Fig. 25. The time responses of (a) duty cycle and output (b) power, (c) voltage
Fig. 24. The time responses of (a) duty cycle and output (b) power, (c) voltage
and (d) current for 80% shade.
and (d) current for 60% shade.

implemented, and the curves of power and voltage are shown in


illuminated at room irradiance of 380 W/m2 , and the fourth in-
terval is the same of the second one with irradiance of 190 W/m2 . Fig. 28. It is clear that, the time-responses of voltage and power
In experimental setup, these intervals are represented as shown obtained via the PSO-based tracker are superior to the others.
in Fig. 27. In the first interval, the authors covered the first four The obtained GMPs and the corresponding voltages and cur-
columns with keeping only two fully illuminated cells, while the rents during the time intervals of irradiance obtained via the
rest of panel is kept in light. In the second- and fourth-time
PSO, CS, and GWO are given in Table 7. During the first interval,
intervals (G = 190 W/m2 ), only 16 cells are covered (i.e., oper-
ated at full shade) (Fig. 27(b) and Fig. 27(d)), while the third the PSO extracted GMP of 7.383 W from the panel, for CS-based
interval the panel is fully illuminated. In this case, the presented tracker the GMP is 2.374 W, and the GWO-based tracker gener-
PSO-based tracker, CO-based tracker, and GWO-based tracker are ated 4.07 W from the panel. The reader can see that, the PSO
5616
A. Fathy, A.B. Atitallah, D. Yousri et al. Energy Reports 8 (2022) 5603–5619

Table 7
The optimal values of GMP , VMP , and IMP for dynamic irradiance.
GMP (W) VMP (V) IMP (A)
Time interval
CS PSO GWO CS PSO GWO CS PSO GWO
0 < = T < 200 s 2.374 7.383 4.07 2.168 6.622 3.916 1.095 1.115 1.039
200 < = T < 400 s 5.187 11.94 8.337 4.838 10.07 7.89 1.072 1.1857 1.056
400 < = T < 600 s 19.14 21.10 18.99 17.88 18.07 18.07 1.070 1.167 1.051
600 < = T < 800 s 5.613 8.82 7.003 4.35 8.07 7.287 1.290 1.092 0.961

4-based embedded board programmed via two approaches of


cuckoo search (CS) and particle swarm optimizer (PSO). Python
programming language is used to develop both approaches, the
presented tracker is responsible for adapting the duty cycle of
DC/DC boost converter connected to the PV panel terminals. This
aims at catching the GMP of the panel voltage–power curve. The
analysis is simulated using Simulink/Matlab under different shade
patterns, moreover an experimental setup is conducted in the lab
room of the college of Engineering, Jouf University, Saudi Arabia
to assess the proposed tracker at an irradiance of 380 W/m2 and
temperature of 23.8 ◦ C. Different shade patterns are considered
in the analysis via covering 10% to 80% in step 10% of the panel.
Fig. 26. The dynamic pattern of solar irradiance.
Moreover, the panel at full light is also investigated when eight
cells are covered. Comparison to perturb and observe (P&O) and
Table 8 gray wolf optimizer (GWO) is conducted, in case of 10% shade
Non-parametric Wilcoxson sign rank analysis.
pattern, the model GMP is 16.5028 W, the CS-MPPT succeeded in
CS GWO PSO
extracting 11.09194 W while the PSO-MPPT outperformed both
p-value 2.603323e−06 1.7343976e−06 –
CS and GWO achieving GMP of 12.7916 W at 0.0366 duty cycle.
R+ 461 465 –
R- 4 0 – Furthermore, both the Wilcoxson sign rank test and ANOVA table
H Reject Reject – are implemented to assess the two presented approaches. The
best obtained efficiency is 96.92% via the proposed Raspberry Pi
Table 9
4-based PSO while the CS best efficiency is 93.62%, on the other
Friedman ANOVA table. hand, the GWO best efficiency is 93.15%. The results confirmed
Source SS df MS F Prob > F that, the PSO-based tracker is performed well rather than CS,
Columns 21.204 2 10.602 41.6 2.09948e−1 GWO, and P&O for all studied cases. The authors recommended
Error 22.1718 87 0.2548 the Raspberry Pi 4-based PSO as an efficient tool to extract the
Total 43.3755 89 GMP from the shaded panel and this is proved experimentally.
Recent metaheuristic optimization approaches are recommended
for programming the Raspberry Pi 4-based tracker for the large-
outperformed the CS and GWO in all time intervals of dynamic scale PV systems. The authors recommended the application of
irradiance. recent metaheuristic optimization approaches with Raspberry Pi
To statistically evaluate the results by the implemented op- 4-based MPPT installed with PV system in the future works.
timizers (PSO, CS, and GWO), a boxplot is depicted in Fig. 29
to represent the distribution of the fitness function. The figure CRediT authorship contribution statement
proves the efficiency of the PSO in reaching for the higher values
compared to CS. A pairwise comparison test is depicted using the
Ahmed Fathy: Conception and design of study, Writing – orig-
information contained in the stats-based ANOVA test to analyze
inal draft. Ahmed Ben Atitallah: Conception and design of study,
the results statistically, as shown in Fig. 30. The figure affirms
Writing – original draft. Dalia Yousri: Acquisition of data, Writing
an existence of significant difference between the optimizers.
– review & editing. Hegazy Rezk: Analysis and/or interpretation
The data of Table 8 of the non-parametric Wilcoxson sign rank
of data, Writing – review & editing. Mujahed Al-Dhaifallah:
test confirm the superiority of the PSO where the number of
Analysis and/or interpretation of data, Writing – original draft.
ranks where PSO outperforms CS and GWO (R+) are 461 and 465,
respectively, meanwhile, the R- are 4 and 0 accordingly, the null-
hypothesis test is rejected. ANOVA table is reported in Table 9 to Declaration of competing interest
assure the previous observation. The p-values based on the test
is the indicator for an existing significant difference. Based on the The authors declare that they have no known competing finan-
aforementioned statistical analysis, the PSO proves its efficiency cial interests or personal relationships that could have appeared
and superiority. to influence the work reported in this paper.
The results confirmed the superiority of the Raspberry Pi 4-
based PSO tracker in achieving the best GMP from the PV panel
operated at either fixed or dynamic shadow patterns.

7. Conclusions Funding

New construction of a maximum power point tracker (MPPT) The authors acknowledge the support of King Fahd University
for partially shaded PV panel is proposed using Raspberry Pi of Petroleum & Minerals, Saudi Arabia.
5617
A. Fathy, A.B. Atitallah, D. Yousri et al. Energy Reports 8 (2022) 5603–5619

Fig. 27. The PV panel under dynamic solar irradiance (a) first, (b) second, (c) third, and (d) fourth intervals.

Fig. 30. Multiple comparison test between the implemented algorithms.


Fig. 28. The time responses of power and voltage of the panel operated at
dynamic irradiance.
Cheddadi, Youssef, Errahimi, Fatima, Es-sbai, Najia, 2018. Design and verification
of photovoltaic MPPT algorithm as an automotive-based embedded software.
Sol. Energy 171, 414–425.
Diab, Ahmed A. Zaki, Mohamed, Mohamed A., Al-Sumaiti, Ameena, Sul-
tan, Hamdy, Mossa, Mahmoud, 2021. A novel hybrid optimization algorithm
for maximum power point tracking of partially shaded photovoltaic systems.
In: Advanced Technologies for Solar Photovoltaics Energy Systems. Springer,
Cham, pp. 201–230.
Fathy, Ahmed, Rezk, Hegazy, 2016. A novel methodology for simulating max-
imum power point trackers using mine blast optimization and teaching
learning based optimization algorithms for partially shaded photovoltaic
system. J. Renew. Sustain. Energy 8 (2), 023503.
Fathy, Ahmed, Ziedan, Ibrahim, Amer, Dina, 2018. Improved teaching–learning-
based optimization algorithm-based maximum power point trackers for
photovoltaic system. Electr. Eng. 100 (3), 1773–1784.
Garg, Peeyush, Shankar, Ajay, Bhukya, Mahipal, Gupta, Vinay, 2020. A novel
interfacing scheme for analog sensors with AMLCD using Raspberry Pi. In: In-
ternational Conference on Intelligent Computing and Smart Communication
2019. Springer, Singapore, pp. 1673–1683.
González-Castaño, Catalina, Restrepo, Carlos, Kouro, Samir, Rodriguez, Jose, 2021.
Fig. 29. Distribution of the fitness function by the implemented algorithms. MPPT Algorithm based on artificial bee colony for PV system. IEEE Access 9,
43121–43133.
Hanzaei, Saeed H., Gorji, Saman A., Ektesabi, Mehran, 2020. A scheme-based
review of MPPT techniques with respect to input variables including solar
References irradiance and PV arrays’ temperature. IEEE Access 8, 182229-182239.
Helbet, Robert, Monda, Vasile, Bechet, Andrei Cristian, Bechet, Paul, 2020.
Low cost system for terrestrial trunked radio signals monitoring based on
Abo-Khalil, Ahmed G., Alharbi, Walied, Al-Qawasmi, Abdel-Rahman, Alobaid, Mo- software defined radio technology and Raspberry Pi 4. In: 2020 International
hammad, Alarifi, Ibrahim M., 2021. Maximum power point tracking of PV Conference and Exposition on Electrical and Power Engineering, EPE. IEEE,
systems under partial shading conditions based on opposition-based learning pp. 438–441.
firefly algorithm. Sustainability 13 (5), 2656. Hong, Ying-Yi, Jr, Angelo A. Beltran, Paglinawan, Arnold C., 2018. A robust design
Ahmed, Jubaer, Salam, Zainal, Kermadi, Mostefa, Afrouzi, Hadi N., of maximum power point tracking using taguchi method for stand-alone PV
Ashique, Ratil H., 2021. A skipping adaptive P&O MPPT for fast and system. Appl. Energy 211, 50–63.
efficient tracking under partial shading in PV arrays. Int. Trans. Electr. Kermadi, Mostefa, Salam, Zainal, Ahmed, Jubaer, Berkouk, El Madjid, 2018.
Energy Syst. 31 (9), e13017. An effective hybrid maximum power point tracker of photovoltaic arrays
for complex partial shading conditions. IEEE Trans. Ind. Electron. 66 (9),
Bollipo, Ratnakar Babu, Mikkili, Suresh, Bonthagorla, Praveen Kumar, 2020. Crit-
6990–7000.
ical review on PV MPPT techniques: Classical, intelligent and optimisation.
Kermadi, Mostefa, Salam, Zainal, Ahmed, Jubaer, Berkouk, El Madjid, 2020. A
IET Renew. Power Gener. 14 (9), 1433–1452.
high-performance global maximum power point tracker of PV system for
Boutasseta, N., 2012. PSO-PI Based control of photovoltaic arrays. Int. J. Comput. rapidly changing partial shading conditions. IEEE Trans. Ind. Electron. 68 (3),
Appl. 48 (17), 36–40. 2236–2245.

5618
A. Fathy, A.B. Atitallah, D. Yousri et al. Energy Reports 8 (2022) 5603–5619

Liu, Yi-Hwa, Huang, Shyh-Ching, Huang, Jia-Wei, Liang, Wen-Cheng, 2012a. A Sampaio, Leonardo Poltronieri, Rocha, Maykon Vichoski da, da Silva, Sérgio
particle swarm optimization-based maximum power point tracking algo- Augusto Oliveira, de Freitas, Marcelo Hideo Takami, 2019. Comparative
rithm for PV systems operating under partially shaded conditions. IEEE Trans. analysis of MPPT algorithms bio-inspired by grey wolves employing a feed-
Energy Convers. 27 (4), 1027–1035. forward control loop in a three-phase grid-connected photovoltaic system.
Liu, Chun-Liang, Luo, Yi-Feng, Huang, Jia-Wei, Liu, Yi-Hua, 2012b. A PSO- IET Renew. Power Gener. 13 (8), 1379–1390.
based MPPT algorithm for photovoltaic systems subject to inhomogeneous Sarvi, Mohammad, Ahmadi, Saeedeh, Abdi, Shirzad, 2015. A PSO-based maximum
insolation. In: The 6th International Conference on Soft Computing and power point tracking for photovoltaic systems under environmental and
Intelligent Systems and the 13th International Symposium on Advanced partially shaded conditions. Prog. Photovolt., Res. Appl. 23 (2), 201–214.
Intelligence Systems. IEEE, pp. 721–726. Tey, Kok Soon, Mekhilef, Saad, Seyedmahmoudian, Mehdi, Horan, Ben, Oo, Aman-
Megantoro, Prisma, Anggara, Fajar, Prabowo, Irawan Eko, Shomad, Muhamad Ab- ullah Than, Stojcevski, Alex, 2018. Improved differential evolution-based
dus, 2019. MPPT Technique based-on microcontroller using combination of MPPT algorithm using SEPIC for PV systems under partial shading conditions
perturb observe and constant voltage algorithm. J. Adv. Res. Dyn. Control and load variation. IEEE Trans. Ind. Inf. 14 (10), 4322–4333.
Syst. 11 (8), 3268–3277, Special Issue. Tsai, Ming-Fa, Tseng, Chung-Shi, Hung, Kuo-Tung, Lin, Shih-Hua, 2021. A novel
Motahhir, Saad, Chouder, Aissa, Hammoumi, Aboubakr El, Benyoucef, Abou Soufi- DSP-based MPPT control design for photovoltaic systems using neural
ane, Ghzizal, Abdelaziz El, Kichou, Sofiane, Kara, Kamel, Sanjeevikumar, Pad- network compensator. Energies 14 (11), 3260.
manaban, Silvestre, Santiago, 2020a. Optimal energy harvesting from a Villegas-Mier, C.G., Rodriguez-Resendiz, J., lvarez Alvarado, J.M., Rodriguez-
multistrings PV generator based on artificial bee colony algorithm. IEEE Syst. Resendiz, H., Herrera-Navarro, A.M., guez Abreo, O. Rodr, 2021a. Artificial
neural networks in MPPT algorithms for optimization of photovoltaic power
J..
systems: A review. Micromachines 12, 1260.
Motahhir, Saad, Hammoumi, Aboubakr El, Ghzizal, Abdelaziz El, 2020b. The most
Villegas-Mier, César G., Rodriguez-Resendiz, Juvenal, Álvarez-Alvarado, José M.,
used MPPT algorithms: Review and the suitable low-cost embedded board
Rodriguez-Resendiz, Hugo, Herrera-Navarro, Ana Marcela, Rodríguez-
for each algorithm. J. Cleaner Prod. 246, 118983.
Abreo, Omar, 2021b. Artificial neural networks in MPPT algorithms for
Moyo, Ranganai T., Tabakov, Pavel Y., Moyo, Sibusiso, 2021. Design and modeling
optimization of photovoltaic power systems: A review. Micromachines 12
of the ANFIS-based MPPT controller for a solar photovoltaic system. J. Sol.
(10), 1260.
Energy Eng. 143 (4), 041002.
Yang, Xin-She, Deb, Suash, 2009. Cuckoo search via Lévy flights. In: 2009 World
Padmanaban, Sanjeevikumar, Priyadarshi, Neeraj, Bhaskar, Mahajan Sagar, Holm-
Congress on Nature & Biologically Inspired Computing, NaBIC. IEEE, pp.
Nielsen, Jens Bo, Ramachandaramurthy, Vigna K., Hossain, Eklas, 2019. A
210–214.
hybrid ANFIS-ABC based MPPT controller for PV system with anti-islanding Yang, Xin-She, Deb, Suash, 2013. Multiobjective cuckoo search for design
grid protection: Experimental realization. IEEE Access 7, 103377-103389. optimization. Comput. Oper. Res. 40 (6), 1616–1624.
Payne, Robert B., Sorensen, Michael D., Klitz, Karen, 2005. The Cuckoos, vol. 15. Yang, Baosheng, Lu, Hongmei, Yang, Xiaoying, 2012. Logic level conversion
Oxford University Press. method in serial data system. Procedia Eng. 29, 1539–1543.
Pradhan, Chittaranjan, Senapati, Manoj Kumar, Malla, Siva Ganesh, Yang, Bo, Yu, Tao, Shu, Hongchun, Zhu, Dena, An, Na, Sang, Yiyan, Jiang, Lin,
Nayak, Paresh Kumar, Gjengedal, Terje, 2020. Coordinated power 2018a. Energy reshaping based passive fractional-order PID control design
management and control of standalone PV-hybrid system with modified and implementation of a grid-connected PV inverter for MPPT using grouped
IWO-based MPPT. IEEE Syst. J.. grey wolf optimizer. Sol. Energy 170, 31–46.
Restrepo, Carlos, Yanẽz Monsalvez, Nicolas, González-Castaño, Catalina, Yang, Bo, Yu, Tao, Shu, Hongchun, Zhu, Dena, Zeng, Fang, Sang, Yiyan, Jiang, Lin,
Kouro, Samir, Rodriguez, Jose, 2021. A fast converging hybrid mppt 2018b. Perturbation observer based fractional-order PID control of photo-
algorithm based on abc and P&O techniques for a partially shaded Pv voltaics inverters for solar energy harvesting via Yin-Yang-Pair optimization.
system. Mathematics 9 (18), 2228. Energy Convers. Manage. 171, 170–187.
Rezk, Hegazy, Fathy, Ahmed, 2017. Simulation of global MPPT based on teaching– Yang, Bo, Yu, Tao, Zhang, Xiaoshun, Li, Haofei, Shu, Hongchun, Sang, Yiyan,
learning-based optimization technique for partially shaded PV system. Electr. Jiang, Lin, 2019a. Dynamic leader based collective intelligence for maximum
Eng. 99 (3), 847–859. power point tracking of PV systems affected by partial shading condition.
Rezk, Hegazy, Fathy, Ahmed, Abdelaziz, Almoataz Y., 2017. A comparison of Energy Convers. Manage. 179, 286–303.
different global MPPT techniques based on meta-heuristic algorithms for Yang, Bo, Zhong, Linen, Zhang, Xiaoshun, Shu, Hongchun, Yu, Tao, Li, Haofei,
photovoltaic system subjected to partial shading conditions. Renew. Sustain. Jiang, Lin, Sun, Liming, 2019b. Novel bio-inspired memetic salp swarm
Energy Rev. 74, 377–386. algorithm and application to MPPT for PV systems considering partial
Rezk, Hegazy, Mazen, AL-Oran, Gomaa, Mohamed R., Tolba, Mohamed A., shading condition. J. Cleaner Prod. 215, 1203–1222.
Fathy, Ahmed, Abdelkareem, Mohammad Ali, Olabi, A.G., Hashema, M. Abou, Yang, Bo, Zhu, Tianjiao, Wang, Jingbo, Shu, Hongchun, Yu, Tao, Zhang, Xiaoshun,
2019. A novel statistical performance evaluation of most modern Yao, Wei, Sun, Liming, 2020. Comprehensive overview of maximum power
optimization-based global MPPT techniques for partially shaded PV system. point tracking algorithms of PV systems under partial shading condition. J.
Renew. Sustain. Energy Rev. 115, 109372. Cleaner Prod. 268, 121983.
Rizzo, Santi Agatino, Scelba, Giacomo, 2021. A hybrid global MPPT searching Youssfi, Ziad, 2017. Making operating systems more appetizing with the Rasp-
method for fast variable shading conditions. J. Cleaner Prod. 298, 126775. berry Pi. In: 2017 IEEE Frontiers in Education Conference, FIE. IEEE, pp.
1–4.

5619

You might also like