IET Renewable Power Gen - 2018 - Fannakh - Hardware Implementation of The Fuzzy Logic MPPT in An Arduino Card Using A
IET Renewable Power Gen - 2018 - Fannakh - Hardware Implementation of The Fuzzy Logic MPPT in An Arduino Card Using A
Case Study
Abstract: The work presented in this study aims to develop an intelligent algorithm, based on fuzzy logic, to track the maximum
power point (MPP) of a photovoltaic (PV) panel. Modelling and simulation steps of the PV panel are made by using the
MATLAB/Simulink environment, before passing to the description of fuzzy logic MPP tracking (MPPT) algorithm. On an Arduino
Mega 2560 controller board, a real-time implementation of the MPPT algorithm by using Simulink Support Package for Arduino
Hardware in MATLAB/Simulink was conducted to experimentally validate the preliminary results of simulations. The proposed
work outlines also the solution to modify pulse-width modulation frequency of Arduino when it is used with Simulink.
IET Renew. Power Gener., 2019, Vol. 13 Iss. 3, pp. 510-518 510
© The Institution of Engineering and Technology 2018
17521424, 2019, 3, Downloaded from https://ietresearch.onlinelibrary.wiley.com/doi/10.1049/iet-rpg.2018.5667 by Bangladesh Hinari NPL, Wiley Online Library on [05/01/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
Table 1 Parameters of the PV panel under STC
Parameters Value
maximum power rating 30 Wp
open-circuit voltage (Voc) 21.52 V
short-circuit current (Isc) 1.80 A
maximum power voltage (Vmp) 17.72 V
maximum power current (Imp) 1.69 A
number of cells 36
Ropt
RL = 2 (6)
1−α
Ropt Ropt
Fig. 3 Boost as resistance emulator ≤ RL ≤ (7)
1 − αmin 2 1 − αmax 2
IET Renew. Power Gener., 2019, Vol. 13 Iss. 3, pp. 510-518 511
© The Institution of Engineering and Technology 2018
17521424, 2019, 3, Downloaded from https://ietresearch.onlinelibrary.wiley.com/doi/10.1049/iet-rpg.2018.5667 by Bangladesh Hinari NPL, Wiley Online Library on [05/01/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
Fig. 6 MPPT principle
Ppv k − Ppv k − 1
Ek = (9)
V pv k − V pv k − 1
Fig. 5 Flow diagram of the fuzzy controller
dE k = E k − E k − 1 (10)
process would be slowed. If the step size is too large, then the
system may fluctuate about the MPP. To solve this problem, we where Ppv and Vpv are, respectively, the power and voltage of the
suggest using a technique found on artificial intelligence for PV panel. Related to Fig. 6, in case of MPP, E(k) should be zero.
adapting the step variation. The proposed method is the fuzzy logic While dE(k) expresses the moving direction of this operation point.
controller. In each iteration kth, we compare the actual position E(k) with the
previous position E(k − 1). If it increases
3.2 Fuzzy logic approach
E k > E k − 1 ↔ E k − E(k − 1) > 0 ↔ dE k > 0
Fuzzy logic is a set of multiple-valued logic, as compared with
binary set, where the variable has only two states true andr false The MPP is located on the left-hand side of the actual position
values. Fuzzy logic variable has ranged between zero and one, and if it decreases
which introduces the concept of partial truth, where the variable
value may range between complete true and complete false [16]. E k < E k − 1 ↔ E k − E k − 1 < 0 ↔ dE k < 0
Fuzzy MPPT controller would generate fuzzy input variables
needed by reading voltage and current signals from the PV panel. The MPP is located on the right-hand side of the actual position.
The fuzzy input variables would then be used to calculate the duty To determine the error variation range and change in error
ratio command for adjusting the operating point of the PV panel in variation range, we have carried out simulation tests on the studied
order to maximise the power output. Fig. 5 shows the calculation system for several irradiations and temperatures. The results
process flowchart of the FLC. obtained imply that the error interval is about [−10; 10] and the
The MPPT using the Mamdani's FLC approach [17]. The change in error interval is about [−20; 20].
Mamdani method can be formed in four steps: The choice of the membership function form depends mainly on
the experience and expertise. Triangular and trapezoidal are the
• Fuzzification. most forms used because they can provide the best results.
• Aggregation of the rule outputs. The inputs memberships functions used are given by Fig. 7. A
• Rule evaluation. five-term fuzzy set, positive big (PB), positive small (PS), zero
• Defuzzification. (ZE), negative small (NS) and negative big (NB) is defined to
describe inputs variables.
In the application of FLC for MPPT error (E) and change in Once the fuzzification is done, it is possible to define the fuzzy
error (dE) at the kth iteration is: rule-based system. Otherwise, the fuzzy MPPT algorithm must be
provided with a rule base expressed in natural language to reason
and draw conclusions. The conditions of these rules are logical
512 IET Renew. Power Gener., 2019, Vol. 13 Iss. 3, pp. 510-518
© The Institution of Engineering and Technology 2018
17521424, 2019, 3, Downloaded from https://ietresearch.onlinelibrary.wiley.com/doi/10.1049/iet-rpg.2018.5667 by Bangladesh Hinari NPL, Wiley Online Library on [05/01/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
Fig. 8 Principle of fuzzy MPPT algorithm
expressions ‘if ... then ...’. The method used for formulating the In this section, we present simulation results on the MATLAB/
fuzzy rules is the experience and the expertise. Simulink environment of the system proposed (PV panel, DC–DC
The analysis of the curve P = f(V) will lead to establish the converter, MPPT controller and load).
fuzzy rules table. According to the desired performances, we divide The system will be tested for different variations in irradiation
the characteristic P = f(V) into five zones as illustrated in Fig. 8. and temperature. Fig. 11 shows the various irradiances and
For each of these zones, the expertise is stated in the following temperatures selected in this application.
form: To demonstrate the validity and competitiveness of the
developed MPP tracker, a comparison between the designed
• In zone 1: The slope is positive. The operating point is located controller and the classical P&O [13] has been made for positive or
on the left-hand side and it is far from the MPP. At this time, the negative steps as detailed in Fig. 11. As shown in Fig. 12, the fuzzy
duty ratio should be increased largely in order to quickly achieve logic algorithm minimises ripples around the MPP compared with
the MPP. the P&O algorithm. The sudden change in temperature or
irradiation results in difficulties of rapid tracking of the maximum
• In zone 2: The slope is still positive and the operating point is
point in the P&O tracker case. In this case, the fuzzy logic
located on the left-hand side but close to the MPP. In this case,
algorithm appears more adapted because it has a short response
the output would be increased slightly in order to decrease the
time: 0.035 s (0.09 s for the P&O tracker) and low peaks. The
system oscillation.
slope at the beginning of the curve results from the fact that the
• In zone 3: The operating point is around the MPP. The objective capacitors are previously discharged.
is to maintain the same duty ratio under these conditions.
IET Renew. Power Gener., 2019, Vol. 13 Iss. 3, pp. 510-518 513
© The Institution of Engineering and Technology 2018
17521424, 2019, 3, Downloaded from https://ietresearch.onlinelibrary.wiley.com/doi/10.1049/iet-rpg.2018.5667 by Bangladesh Hinari NPL, Wiley Online Library on [05/01/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
Fig. 11 Different temperatures and irradiations tested
514 IET Renew. Power Gener., 2019, Vol. 13 Iss. 3, pp. 510-518
© The Institution of Engineering and Technology 2018
17521424, 2019, 3, Downloaded from https://ietresearch.onlinelibrary.wiley.com/doi/10.1049/iet-rpg.2018.5667 by Bangladesh Hinari NPL, Wiley Online Library on [05/01/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
Fig. 15 Block diagram of the proposed hardware
IET Renew. Power Gener., 2019, Vol. 13 Iss. 3, pp. 510-518 515
© The Institution of Engineering and Technology 2018
17521424, 2019, 3, Downloaded from https://ietresearch.onlinelibrary.wiley.com/doi/10.1049/iet-rpg.2018.5667 by Bangladesh Hinari NPL, Wiley Online Library on [05/01/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
Fig. 18 Simulink model for implementing the MPPT FLC
IET Renew. Power Gener., 2019, Vol. 13 Iss. 3, pp. 510-518 517
© The Institution of Engineering and Technology 2018
17521424, 2019, 3, Downloaded from https://ietresearch.onlinelibrary.wiley.com/doi/10.1049/iet-rpg.2018.5667 by Bangladesh Hinari NPL, Wiley Online Library on [05/01/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
[9] Khaehintung, N., Wiangtong, T., Sirisuk, P.: ‘FPGA implementation of MPPT [16] Allataifeh, A.A., Bataineh, K., Al-Khedher, M.: ‘Maximum power point
using variable step-size P&O algorithm for PV applications’. 2006 Int. Symp. tracking using fuzzy logic controller under partial conditions’, Smart Grid
Communications and Information Technologies ISCIT'06, Bangkok, Renew. Energy, 2015, 6, (1), p. 1
Thailand, 2006 [17] Mamdani, E.H., Assilian, S.: ‘An experiment in linguistic synthesis with a
[10] Villalva, M.G., Gazoli, J.R., Filho, E.R.: ‘Comprehensive approach to fuzzy logic controller’, Int. J. Man-Mach. Stud., 1975, 7, (1), pp. 1–13
modeling and simulation of photovoltaic arrays’, IEEE Trans. Power [18] Leedy, A.W., Guo, L., Aganah, K.A.: ‘A constant voltage MPPT method for a
Electron., 2009, 24, (5), pp. 1198–1208 solar powered boost converter with DC motor load’. 2012 Proc. IEEE
[11] Sera, D., Teodorescu, R., Rodriguez, P.: ‘PV panel model based on datasheet Southeastcon, Orlando, FL, USA, 2012
values’. 2007 IEEE Int. Symp. Industrial Electronics ISIE 2007, Vigo, Spain, [19] ‘LEM LA-55P datasheet’. Available at https://pdf1.alldatasheet.com/
2007 datasheet-pdf/view/114818/LEM/LA55-P.html, accessed 25 August 2018
[12] Hasaneen, B.M., Elbaset Mohammed, A.A.: ‘Design and simulation of [20] Panov, Y., Jovanovic, M.M.: ‘Design and performance evaluation of low-
DC/DC boost converter’. 2008 12th Int. Middle-East Power System Conf. voltage/high-current DC/DC on-board modules’. 1999 14th Annual Applied
MEPCON 2008, Aswan, Egypt, 2008 Power Electronics Conf. Exposition APEC'99, Dallas, TX, USA, 1999, vol. 1
[13] Enrique, J.M., Duran, E., Sidrach de Cardona, M., et al.: ‘Theoretical [21] ‘Simulink Support Package for Arduino Hardware’. Available at https://
assessment of the maximum power point tracking efficiency of photovoltaic ch.mathworks.com/help/supportpkg/arduino/examples/getting-started-with-
facilities with different converter topologies’, Sol. Energy, 2007, 81, (1), pp. arduino-hardware.html?s_eid=PSM_arlm, accessed 05 October 2018
31–38 [22] ‘ATmega2560 datasheet’. Available at http://ww1.microchip.com/
[14] Santos, J.L., Antunes, F., Chehab, A., et al.: ‘A maximum power point tracker downloads/en/DeviceDoc/Atmel-2549-8-bit-AVR-Microcontroller-
for PV systems using a high performance boost converter’, Sol. Energy, 2006, ATmega640-1280-1281-2560-2561_datasheet.pdf, accessed 05 October 2018
80, (7), pp. 772–778
[15] Nedumgatt, J.J., Jayakrishnan, K.B., Umashankar, S., et al.: ‘Perturb and
observe MPPT algorithm for solar PV systems-modeling and simulation’.
2011 Annual IEEE India Conf. (INDICON), Hyderabad, India, 2011
518 IET Renew. Power Gener., 2019, Vol. 13 Iss. 3, pp. 510-518
© The Institution of Engineering and Technology 2018