Implementation of Particle Swarm Optimization For Tuning of PID Controller in Arduino Nano For Solar MPPT System
Implementation of Particle Swarm Optimization For Tuning of PID Controller in Arduino Nano For Solar MPPT System
I. INTRODUCTION
corresponding power-to-voltage (P-V) curve as shown in Fig. for real-time application by comparing the performance of the
2. A PV system that directly connected to the electrical load external hardware-embedded PSO-PID tuning with the
will operate at non-optimum parameters because the operating internal MATLAB PID tuner. Both tuning method are applied
points of PV cells are impedance-dependent. Moreover, the on the PV-MPPT system model in the Simulink. The
optimum operating parameters, or the maximum power point performance of these tuning method are compared in terms of
(MPP) changes dynamically with insolation, and heat acts on accumulative mean error squared (MSE).
the solar cell. Hence, the PV system requires devices to
optimize the operating parameters to the MPP by employs III. PID TUNING METHODS
MPPT system. It is worth to mention that Simulink is used as an intrinsic
control plant for performance analysis of the PID tuning as a
method to eliminate influence of external disturbances as
founded in the real hardware environment. This evaluation
approach is carried out so that the C++ coding of embedded
PSO-PID algorithm can be tested, debugged, and verified. On
the other hand, a fair comparison of performance with the
MATLAB PID tuner can be made via Simulink environment.
Shown in Fig. 4 is comprehensive Simulink blocks of PV
system comprise of PV module block model, MPPT, MPPT
control system, voltage and current sensors, and the buck-
boost converter. The system plant consist of PV panel, MPPT
controlled DC-DC converter, and load.
According to [11], PSO uses less effort in computation to where f ( s ik ) is the fitness of the current particle, and T is the
achieve the same high quality solutions compared to GA. The total simulation data point.
study present that PSO is proven its advantage with 99% The comparison to determine the pbest, and gbest depends on
statistical confidence. Therefore, the PSO was likely more the “objective function” of the optimization process. In the
efficient to be employed into low-cost hardware systems for case of PID tuning, it is necessary for the control system to
online system application such as PV-MPPT system as this have the lowest error as possible, thus, the resultant “objective
study. For that reason, PSO was implemented as PID tuner in function” is to determine pbest, and gbest of the lowest MSE as
this study. shown in Fig. 8.
INTERNATIONAL JOURNAL OF ELECTRICAL AND ELECTRONIC SYSTEMS RESEARCH, VOL. 13 DEC 2018
2) Hardware Implementations
The PSO-PID tuning was carried out using hardware as
shown in Fig. 10. This tuning procedure employs master/slave
programming; hardware embedded program (master), and
MATLAB m-file (slave). The PSO-PID tuning program is
embedded in microcontroller, while the m-file program in
MATLAB is used to parse parameters between hardware, and
Simulink, back and forth. The device for hardware-to-software
interfacing is shown in Fig. 11.
Fig. 15. PSO position update function The iteration of the PSO stopped after the fitness between
particles in the swarm converges with the standard deviation
The Fig. 16 shows the running process of PSO-PID tuning lower than 0.1. The optimized PID parameters were returned
in the MATLAB command window, while Fig. 17 shows the by the gbest position as follows;
simulation run to find the particle fitness. The fitness of the • Proportional gain, Kp = 6.4391
particle is determined by the mean sum of squared error • Integral gain, Ki = 9.9361
between the reference signal Vref and the instantaneous PV • Derivative gain, Kd = 8.6265
voltage, VPV. • Derivative filter, N = 100
2) Plant Identification
After the data sample is obtained, the model is then
estimated via system identification approach by using
structures by either of one-pole, two real-poles, underdamped
pair, and underdamped with real-pole transfer function, and
state-space. All of the mentioned structures are tested while
their fitness was compared to each other. In conclusion,
underdamped pair have the highest fitness value besides
having the simpler form of equation compared to state-space.
Exhibited in Fig. 20 is the linear plant modelling using
underdamped pair transfer function. The angular frequency,
Tω, and damping ratio, ζ are manually adjusted so that the
identified data intersect as close as possible on the
identification data obtained from the I/O sampling.
Fig. 18. Process flows for PID tuning using MATLAB PID tuner toolbox
1) Input-Output Sampling
To begin with, the I/O data of the system was sampled by
repeatedly inject the step input directly into the input of the
PID controller, while bypassing the input from MPPT and the
feedback loop. Thus, the control system operates as open-loop
control. The PID controller is set to P-only mode with
proportional gain, Kp = 1 for linear modelling purpose.
Fig. 19 shows present I/O sampling result using step input
with rise time at 0.0005s, until 0.01s. The sample time Ts for
I/O data sample is 1x10-6s per iteration.
Fig. 24. Step response of closed loop PID control by MATLAB PID Tuner
Fig. 22. MATLAB PID tuner tool
INTERNATIONAL JOURNAL OF ELECTRICAL AND ELECTRONIC SYSTEMS RESEARCH, VOL. 13 DEC 2018
VI. REFERENCES
[1] M. Amirinejad, M. Eslami, and A. Noori, “Automatic PID
Controller Parameter Tuning Using Bees Algorithm,” vol. 5, no. 8,
pp. 24–28, 2014.
[2] N. Femia, G. Petrone, G. Spagnuolo, and M. Vitelli, Power
electronics and control techniques for maximum energy harvesting
in photovoltaic systems. 2013.
[3] M. H. (Muhammad H. Rashid, Power electronics handbook :
devices, circuits, and applications. Butterworth-Heinemann, 2011.
[4] Y. Wang, L. Ding, and N. Li, “The application of fuzzy parameters
self-tuning PID controller in MPPT of photovoltaic power system,”
Proc. 2011 Int. Conf. Transp. Mech. Electr. Eng. TMEE 2011, no.
Figure 2, pp. 1129–1132, 2011.
[5] A. El Khateb, N. A. Rahim, and J. Selvaraj, “Optimized PID
controller for both single phase inverter and MPPT SEPIC DC/DC
converter of PV module,” 2011 IEEE Int. Electr. Mach. Drives
Conf. IEMDC 2011, pp. 1036–1041, 2011.