1. Introduction
In the current context, the optimization methods used to determine the point of maximum power transfer (MPPT) in photovoltaic systems have evolved significantly in recent years. This evolution has been driven by the need to maximize energy efficiency and reduce costs of electricity generation through solar energy [
1,
2]. Given the variability in the output power of photovoltaic solar panel arrays due to environmental conditions, various methods have been proposed to achieve the maximum power point (MPP) based on current and voltage measurements. These methods, known as maximum-power-point tracking (MPPT) techniques, use the panels’ current and voltage output data to determine a duty cycle for the inverters, maximizing the power output available at the connection to the inverter loads. These algorithms are based on the principle that the circuit’s output power is maximized when the source impedance matches the load impedance. The duty cycle D of the DC-DC booster is adjusted by the algorithm, using a mathematical expression that relates both impedances and the D cycle [
3]. Among the most prominent methods are the perturbation and observation algorithm (P&O), the incremental conductance algorithm (InCond), and techniques based on artificial intelligence, such as genetic algorithms and neural networks. The first method, P&O, is widely used due to its ease of implementation and simplicity, but its performance is affected by irradiance conditions and changes in the ambient temperature [
4]. The method InCond offers better accuracy in the detection of the point of maximum power under variable conditions, but it requires more computational resources. These limitations underscore the urgency for further research and development in the field of photovoltaic system optimization. However, recent advances in artificial intelligence have allowed the development of hybrid methods that combine traditional techniques with machine learning algorithms, achieving significant improvements in the efficiency and stability of the tracking [
5]. Despite the advances above, MPPT optimization methods face several limitations. Traditional algorithms such as P&O and InCond can present stability and efficiency problems in partial irradiance conditions, known as partial shading. Based on these limitations, artificial intelligence, and heuristic optimization methods have shown great potential to overcome these limitations because they are better adapted to environmental variations and nonlinear characteristics of PV systems [
6]. However, they require more processing power and are costly to implement. When mentioning the integration of these advanced algorithms in traditional photovoltaic systems, especially on a large scale, additional challenges appear in terms of stability and reliability as the technology advances, so it is essential to continue developing solutions that seek a balance between efficiency, cost, and complexity to optimize photovoltaic systems [
7].
Grid-connected photovoltaic generation systems typically employ a two-stage conversion system to connect the panel to the grid, with both stages operated by power electronics [
8,
9,
10,
11,
12]. The initial stage involves a DC/DC conversion that connects the panels to a coupling element, typically a capacitor; this is followed by a DC/AC inverter stage that delivers power to consumer loads [
13,
14,
15]. Such systems empower users by facilitating the use of grid energy produced by the panels for self-consumption, maintaining a unidirectional power flow, and offering flexibility in energy management. According to [
16], two types of PV systems are connected to the grid, one with battery backup and one without, providing users with options to suit their needs.
Ref. [
14] proposes a source-impedance-type inverter (ZSI) capable of increasing or decreasing voltage based on its configuration for MPPT, operating via pulse width modulation (PWM). This method uses predictive control models (PCMs) for energy harvesting. It requires distinct control techniques, employing a predictive model based on MPPT with adaptive perturbations to maximize energy capture under various weather conditions. Ref. [
17] uses a PSO algorithm for MPPT, first reviewing the model describing the PV array’s behavior based on numerical methods, then establishing generation references and control loops for both DC and AC, including a phase-locking detection algorithm. This approach effectively finds the global maximum power point (GMPP) under various conditions, improving overall system efficiency. Ref. [
3] proposes an MPPT search algorithm based on the P&O algorithm, describing a DC-DC lifting-stage system that operates with PWM and a DC-AC inverter functioning through SPWM, including a phase-locked detection loop. This system models components through simulation, demonstrating adequate MPPT search as a function of climatic changes. Ref. [
18] proposes an algorithm to improve the MPPT’s steady-state response and dynamic behavior using the incremental conductance method combined with PI control. This approach ensures no oscillations around the MPP. It reduces the response time to reach GMPP when operating conditions vary, requiring less computational time and fewer machine resources than traditional MPPT algorithms. For our research, we propose an MPPT scheme using PSO, as shown in
Figure 1. It implements solar panels and PSO controllers in the inverter stage, ensuring maximum power transfer to the DC-DC converter, and then, to the inverter that feeds the load.
While many researchers and applications use the PSO algorithm in photovoltaic systems, this study’s contribution lies in dynamic modeling, which allows for the validation of the behavior of a power extractor circuit in conjunction with the PSO algorithm. However, most studies have focused on static approaches and have not considered the transient dynamics affecting system performance under natural conditions. Dynamic modeling in this context is not just a simulation but a comprehensive exploration of the interactions between the power extractor circuit and the PSO algorithm under various operating conditions. It meticulously considers abrupt changes in irradiance and temperature, which are common in PV applications. This thorough approach allows the stability and responsiveness of the system to be evaluated in real time, providing a more complete and accurate view of its performance. The integration of the PSO algorithm with the dynamic modeling of the circuit ensures that possible inefficiencies and energy losses are identified and mitigated, providing a robust solution applicable in rapidly changing real environments.
5. Analysis of Results
We conducted the first tests with a 275 W test panel under normal operating conditions with a constant irradiance of 1000 W/m
2 and a working temperature of 25 °C. During these tests, we made a significant finding. When we used a 1
capacitor we observed the output voltage signal of the panel oscillated, as shown in
Figure 6. However, by adjusting the value of the output capacitor to 1000
we observed a remarkable change. As shown in
Figure 7, the voltage signal stabilized, significantly improving the system’s performance. This adjustment also helped us avoid start-up oscillations, which is a crucial step toward enhancing the efficiency of the panel system.
It is well known that oscillations occur in the first milliseconds of simulation due to the change in irradiance values to which the panel is exposed. When the panel’s output voltage is stabilized, the voltage recorded at the output of the extractor circuit is more stable and has a higher peak. It is worth mentioning that in the iterative process the voltage usually stabilizes after a while.
When the voltage reaches its stable voltage under the conditions studied, there is a peak in the output voltage much higher than that recorded at the solar panel terminals; this validates the model’s functionality against changes in the irradiance value. Analyzing the panel’s output power, which was recorded at the output of the extractor circuit, as shown in
Figure 8, also verified the existence of a higher peak power delivered to the change in the initial irradiance.
The peak power output, initially 150 W, soared to a remarkable 250 W with the introduction of our proposed algorithm. This substantial increase of 100 W, representing a variation in generation from 54.5% to 90.9% of nominal power at nominal operating conditions, clearly demonstrates the impressive impact of the algorithm and the power extractor circuit. In the specific case, the duty cycle was close to 0.9, corresponding to an impressive 90.9%. To meticulously study the initial performance of the algorithm, we proceeded to thoroughly examine the system with the inclusion of one single panel under working conditions with a constant irradiance of 1000 W/m
2, a working temperature of 25 °C, a continuous load of 100 ohms, the signal for pulse width modulation works at a frequency of 5 kHz, and the algorithm in charge of working with PSO starts from initial conditions with four particles. The simulation progressed during the iterative calculation process of the operating conditions of the panel where, once again, it could be verified that although, indeed, the output voltages of the panel and the extractor circuit do not show a considerable variation, the power is improved at all times due to the effect of the power extraction circuit, as shown in
Figure 9.
The duty cycle for the specific case was stabilized during the process since the circuit’s operating conditions did not change at any time; at the beginning, with the initial conditions, the algorithm suffered oscillations typical of the method but soon stabilized to stable operating values, as shown in
Figure 10.
The exact configuration was tested with an irradiance of 200 W/m2, with which, consequently, we expect lower performance, as calculating the panel parameters involves an iterative process. Given the complexity of the equations, the variables related to the model will show a specific oscillatory behavior since the panel searches for an operating point before stabilizing its signal; even so, it is possible to note the validity of the model by checking that the power does not fluctuate with each iterative step of searching for the operating point but, on the contrary, remains relatively stable.
Figure 11 shows an increase in the performance of the energy generated during the short time of analysis since the existing valleys in the power output of the panel are reduced, the pulsating behavior in the power of the panel responds to the closing and opening of the switch that composes the power extractor circuit and the behavior of the existing inductor. As far as the voltage is concerned, the oscillatory behavior also demonstrates the search performed by the algorithm for a maximum transfer point since the output voltage behaves differently from that generated by the panel due to the search of the particles; the above is shown in
Figure 12. It is worth mentioning that
Figure 12 is displayed in seconds to show the detail of the response of the system; as has been explained, the calculations are iterative. This behavior is noticeable in the first 50 ms.
Once we validated the optimization method proposed in this research, we implemented a balance model using Vensim. This model ensured a balance between the power generated and the power demand.
Figure 13 shows the implemented model.
Irradiance, temperature, and demand directly relate to the analysis time, allowing us to perform an hourly analysis. In contrast, Python (version 3.9) executes the algorithm to control the power extractor circuit and obtains the maximized PowerPoint, enabling us to achieve a balance and determine an economic benefit or detriment depending on the given conditions. We developed the described variables as lookup variables related to curves dependent on one variable. We designed the user interface with user friendliness, presenting these variables clearly and intuitively, as shown in
Figure 14.
With the above, operating pairs for temperature and irradiance are found for each hour of the day. These pairs are inserted into the model generated in Python to obtain system operating points and the power to be generated to create the expected power balance.
Figure 15 shows the environmental data used for 24 h.
As previously mentioned, there are time slots in which the irradiance values are zero so that the system will consistently not be able to generate power; these conditions were not tested to reduce the amount of processing time.
Figure 16 shows the results obtained for the energy generated in each hour, taking into consideration the inverter data, since, for example, in hour 6 the irradiance level takes a value of 6.07
, which is an insufficient value to produce the necessary starting voltage, that for the inverter under study corresponds to 200 V. Hence, the inverter delivers power for 8 h. During this time, the operational needs are met until 16 h since the voltage is insufficient at 17 h.
We use the current year’s tariff schedule and collect the data for a cost analysis. We assume each user is responsible for paying the demand. We take the design value of the transformer, 14.53 kVA, divide it by the total number of users, eight, and determine the consumption range, with the price set at USD 0.1285/kWH.
Figure 17 shows the balance obtained for each hour, indicating that the benefit or detriment for the day in question amounts to USD
to be paid to the distribution company for the total number of users. Without the photovoltaic system, the actual cost would have been USD
, saving USD
for the analyzed day, that translates to a 55.2% saving with the installation of the photovoltaic system.
Negative values correspond to power deficits from the solar system, which users must pay to the distribution company, while positive values represent generation surpluses. We consider the surpluses to be paid to the user at the same cost as the demand.
Figure 18 illustrates the economic benefit or detriment at each hour of the day.
To study the performance of the implemented model, the solar field is placed under the same environmental conditions as those tested with the power extraction algorithm.
Figure 19 shows the results obtained without the power extraction circuit.
The results show that without using the extraction circuit, an average of 85% of the power obtained with the inclusion of the extractor circuit and the use of the PSO algorithm for the search for the maximum power transfer can be obtained.
Figure 20 shows the surpluses or deficits presented for the first case using the extractor circuit and PSO.
Figure 21 shows the same balance, but for the second case neither the extractor circuit nor the PSO algorithm is considered, although the curve’s trend is similar to that obtained for the first case.
Figure 22 illustrates a comparison between both cases. It is possible to notice that during production hours, the deficit is more pronounced when the demand cannot be covered, and the surplus is lower when the generation exceeds the demand for the building; this will, therefore, alter the economic benefit or detriment.
Finally,
Figure 23 compares the economic benefit or detriment with both cases studied; as with the power curves and their balances, the trend is similar, and only the values are altered since the economic benefit or detriment has a flat rate or constant value.
The sum of the values plotted above shows that the value to be paid to the distribution company for the total day in the second case is USD 10.97, which is slightly higher than the value obtained in the first case. From an economic perspective,
Figure 24 illustrates the accumulated sum in each hour.
In the
Figure 24 the accumulated sum always shows negative values; however, in the hours corresponding to those of higher generation, the decrease is more pronounced when the algorithm and circuit proposed in this research work are implemented.
5.1. Performance and Convergence Time
Finally, to compare the implemented model with other methods in the literature, the average performance obtained from the method in question is considered with values obtained for normal conditions and two additional methods: P&O (perturb and observe) and InCond (incremental conductance).
Table 10 shows the performance comparison, where it can be seen that although the variation is not significant, there is an improvement in performance without taking into account that PSO is a method with less variation in the operating point since it finds a single maximum point, while the additional methods base their performance on the constant variation of the duty cycle until it is oscillating near the operating point; the operating parameters of the methods mentioned above were obtained in [
26], where a study of both methods was carried out.
Significantly, the data show an average improvement of 1% when implementing the control method under PSO, a notable advancement compared to the improvement that can be obtained by means of P&O and InCond, whose performances are similar. This underscores the progress in the field of algorithm performance. To determine the algorithm’s performance and the time required to find an optimal point, we conducted experiments, and the proposed system was tested under similar operating conditions in three different runs.
Figure 25 shows that the algorithm consistently achieves a stable operating point around 0.35 s of simulation for the three tests performed. This stability, even with slight endpoint variations, is a reassuring aspect of the algorithm’s performance.
5.2. Implementation in an Experimental System
When implementing a PSO algorithm with a power extraction circuit in a PV system, it is observed that the results differ significantly, between 10% and 40%, from the global optimum when implemented in a real test system. This is due to several factors, such as changing environmental conditions, nonlinear characteristics of the solar panels, and inherent losses in the circuit hardware. In addition, in a real environment, variations in temperature, partial shading, and other external influences affect system performance, which is not always accurately reflected in simulations or theoretical models. These discrepancies between the ideal model and the practical implementation result in a noticeable difference in the efficiency and effectiveness of the PSO algorithm in maximizing the power extracted from the PV system. In the scheme shown in
Figure 26, without considering the characteristics of the panels and load in the final implementation, as mentioned in previous sections, we implement the proposed algorithm on the test system and obtain the voltage characteristic curve, which we analyze with and without the algorithm.
The experimental system is located on the Universidad Politecnica Salesiana campus, which has an installed capacity of 1.2 kWH. We measured the generation conditions on a schedule of 7:00 h am to 19:00 h at standard conditions, then with the implementation of a PSO algorithm, and finally, implementing the extraction circuit and the PSO, giving the results shown in
Figure 27.
As we can see in the graph focused on the use of the PSO algorithm, the extractor circuit starts with a slight energy using the PSO algorithm. However, as the hours of the day increase, the chosen sensor heats up due to the Joule effect, and the delivered energy becomes similar to the one obtained when only the PSO algorithm is implemented, without using an extractor circuit, with a slight increase, which shows that our proposal has a slight advantage.
However, we still need to improve on the technology regarding hardware limitations.
Implementation Process
Implementing the proposed PSO algorithm requires a clear understanding of how the method works and how to integrate it into the inverter hardware and software; the general steps to implement this algorithm are described below:
- i.
Understanding the algorithm: We must understand that the development of this MPPT algorithm works by perturbing the operating voltage of the solar panel and observing the change in the output power. If the power increases, the perturbation continues in the same direction; if it decreases, it decreases.
- ii.
Data collection: The inverter, with its microcontroller, plays a pivotal role in the MPPT algorithm. It measures the solar panel’s voltage and current to calculate the output power. This measurement is achieved through voltage and current sensors connected to the inverter microcontroller.
- iii.
Initialization of the swarm: A set of particles with random positions (solar panel operating voltages) and velocities is initialized. Each particle must have an initial position and store its best-known and global best positions.
- iv.
Implementation of the algorithm: The algorithm is implemented in the firmware of the inverter microcontroller; this is achieved as long as the inverter allows it. Since we use experimental equipment, the firing code of the IGBT is open for modification.
- v.
Hardware control: The microcontroller must be able to adjust the solar panel’s operating point. This involves controlling a DC-DC converter, such as a buck and boost converter, to change the input voltage to the inverter.
- vi.
Optimization and testing: The PSO parameters, such as the wire size, inertia constants, and cognitive and social constants, are adjusted to improve the algorithm’s efficiency. Testing: Testing the algorithm under various lighting and temperature conditions is crucial. This ensures the algorithm can effectively find and track the maximum power point.
- vii.
Implementation of protection: Protection mechanisms must be implemented to prevent damage to the inverter and solar panels, including protection against voltage, overcurrent, and overheating; usually, these systems already have these protections, for which we must only make adjustments to the system conditions.
- viii.
Monitoring and updating: Monitoring and updating functions are integral to the system’s adaptability and performance maintenance. Monitoring functions are designed to oversee system performance and identify potential issues, while updating functions enable the microcontroller firmware to be enhanced, thereby improving the algorithm and introducing new features in the future.
6. Conclusions
The algorithm that searches for the maximum power transfer point can modify its results according to the system’s different operating conditions, climate, or related to the attached circuits.
The PSO optimization algorithm developed by Python is shown to be capable of performing under different operating conditions and sensitive to changes relative to the usual operation of a solar panel.
A sensitivity analysis of the PSO algorithm can be complicated due to the stochastic nature of the algorithm and the inherent variability of environmental conditions affecting PV systems. PSO parameters, such as particle number, acceleration coefficients, and inertia, can have nonlinear and complex impacts on the algorithm’s performance. In addition, changes in solar irradiance and temperature add another layer of uncertainty, making it difficult to isolate and measure the individual effect of each PSO parameter. For these reasons, obtaining conclusive and reproducible results is not an easy task.
Our findings show a stark contrast between the situation when the algorithm is implemented compared to when it is not. In the face of irradiance and load variations, the algorithm proves its worth by enabling the extraction of a staggering 85% more power than without its use.
The use of Vensim is justified, given its potential in causal analysis in conversion processes. Its versatility allows it to be interpreted in Python so that the parameters can be modified, read, and simulated from Python. For the present case, it has been possible to parameterize temporal variables with around 700 values, in addition to the facility to manipulate the iteration intervals by seconds, minutes, hours, days, and even years.
In conclusion, implementing an extraction circuit in a PV system using a particle swarm optimization (PSO) algorithm for maximum-power-point tracking (MPPT) can slightly increase the system’s energy delivery. However, its performance is limited by the Joule effect, which generates heating losses, and its constructional form, which can add complexity and cost to the system design.
Methods based on artificial intelligence and heuristic optimization should be further developed to improve and overcome the limitations of traditional techniques because they are better adapted to the changing environmental and nonlinear characteristics of PV systems. On the other hand, these new trends require greater data processing capacity, and their implementation costs are excessive. When integrating these advanced algorithms in traditional photovoltaic systems and, above all, on a large scale, there are limitations in efficiency and cost parameters, which must be overcome as technology advances.
Future Work
In the current context of MPPT optimization methods in PV systems, future work can focus on several areas to overcome existing limitations and improve overall performance. These include the development of hybrid algorithms that integrate artificial intelligence techniques with traditional methods, optimizing tracking efficiency and stability under varying environmental conditions. In addition, research could focus on reducing the cost and computational complexity of these advanced methods, facilitating their implementation in large-scale systems. Another field of interest is the improvement of the robustness and reliability of MPPT algorithms in partial shading situations through the use of distributed optimization techniques and collaborative algorithms among multiple PV modules. Also, the integration of IoT technologies and real-time machine learning could offer new opportunities for dynamic monitoring and adjustment of systems, further improving their efficiency and responsiveness to changing conditions.