Maximum Power Point Tracking Implementation under Partial Shading Conditions Using Low-Cost Photovoltaic Emulator

: Maximum power point tracking (MPPT) is a pivotal objective for photovoltaic (PV) systems. To test various MPPT techniques, a reliable and effective PV emulator is required. Therefore, this article proposes a low-cost PV emulator for partial shading conditions, in which a cascaded structure of a DC power source with a resistor is constructed to generate the multiple peaks of the power-voltage (P-V) curve. The proposed structure is simple and modular. Consequently, it can be extended to obtain several peaks in the P-V characteristics to emulate more complex partial shading conditions. The partial shading occurrence over the PV source (PV array) causes a signiﬁcant power loss production from the PV system. To increase the PV system’s efﬁciency, optimization techniques are employed to harness the global power. Accordingly, the particle swarm optimization (PSO) technique is used to track the global peak. Furthermore, the conventional perturb and observe (P&O) method is applied for comparison and investigation. The proposed PV emulation system is validated under different operating conditions using simulation and experimental hardware-in-the-loop (HIL) results.


Introduction
Renewable energy sources are becoming perfect alternatives for traditional fossil fuelbased ones. Currently, the policy of different countries is to minimize CO 2 emissions for a clean and sustainable environment [1,2]. Among renewable energy sources, photovoltaic (PV) energy is an interesting surrogate due to its numerous merits, which include silent operation, less maintenance, abundance, and approximately no emissions [3][4][5]. Therefore, the research in this area is an essential issue to develop and maintain the PV generation systems [6]. The PV source has a nonlinear characteristic, and therefore different models were employed in the literature for PV characterization [7,8]. Simplified, single-diode, and double-diode models are used to describe and characterize the behavior of the PV source [3]. The aforementioned models differ according to their accuracy, complexity of implementation, computational burden, and number of employed parameters [9,10].
The non-linearity of the PV source model necessitates the utilization of a maximum power point tracker (MPPT) to harness the maximum power [11,12]. The operation of the PV system in MPPT mode can be divided into two main methods, namely operation under uniform solar irradiation and partial shading conditions. The uniform solar radiation operation is well-known in the literature, where the power-voltage (P-V) characteristic exhibit only one peak, and therefore the function of the MPPT technique is to operate the system at this peak [13,14]. However, in practice, partial shading occurs over the widespread modules due to clouds or nearby buildings [4]. This, in turn, causes hotspots, which deteriorate the performance and power production [6,15]. To solve such an issue, Eng 2022, 3 bypass diodes are connected across the PV modules or panels [15,16]. Consequently, the P-V curve reveals multiple peaks, where one of them is global (the highest power) and others are local (small power in comparison with the global).
Considering the above, MPPT methods can be sorted into two groups or two main categories, where some methods are intended for uniform solar radiation, and other methods can track the global peak (under partial shading conditions) [14]. On one side, and popularly, the perturb-and-observe (P&O) and incremental conductance (INC) methods are implemented to extract the maximum power under uniform operating conditions [17]. These methods depend on the fact that the slope of the P-V curve is positive on the left side of the maximum power point (MPP) and negative on the right one. Therefore, they are easy to implement, where no parameters are needed for calibration [18]. On the other side, optimization techniques are used to search for the global power in case of partial shading occurrence. Various algorithms have been utilized to tackle this problem, where particle swarm optimization (PSO), simulated annealing, gray wolf optimizer, bat algorithm, etc. are employed for such purpose [17,19]. Such algorithms depend on the searching nature of the technique used, making them complex compared to P&O or INC. Furthermore, they require a powerful controller for implementation [20]. However, global power extraction is guaranteed in comparison with the traditional schemes. This maximizes the PV efficiency and power production.
Recently, PV emulators are gaining considerable attention. They are of great benefit when testing and evaluating the efficiency of the PV system. In addition, PV emulators help to simplify the test environment compared to on-site installations [21]. Different classifications were provided in the literature for PV emulators [3,6]. However, the most common type is the DC-DC converter-based emulator. According to this type, the emulation process consists of three parts [3,22]. Firstly, the utilized model of the PV source receives the feedback signals (measurements) and accordingly provides the reference value (voltage or current). Secondly, the control technique, where the control objectives (producing nonlinear I-V relations) are executed based on the reference. At last, the control actions are sent to the converter, where different converters are employed including buck and buck-boost converters [3,23]. The converter-based emulation system provides accurate characterization of the PV source [23]. However, its implementation cost is high. Other PV emulators are also used, including battery-based and analog PV emulators [6]. Such emulators are simple in structure and control principle. Furthermore, their execution cost is low [24]. However, the replicated characteristics are not accurate when compared to the converter-based schemes.
To this end, the authors are motivated to propose a battery-based emulator for partial shading conditions, using two or more cascaded units to emulate the occurrence of multiple peaks. The proposed emulator is simple, cost-effective, and can be extended to emulate complex partial shading conditions. For better evaluation, two MPPT techniques are used to test the PV emulator and extract the maximum power from it, namely P&O and PSO. The P&O method is notorious for not being able to track the global maximum and being easily trapped at a local maximum. However, the PSO algorithm is able to harness the global maximum power. The validity of the suggested PV emulator is proven using experimental hardware-in-the-loop (HIL) results under different PV system configurations. Furthermore, analysis and investigation of the P&O and PSO MPPT techniques are provided. In brief, the main contributions of the present work are summarized as follows: • A cascaded structure of a battery-based PV emulation system is suggested for the partial shading conditions. Therefore, complex partial shading conditions can be easily represented. The rest of this article is arranged as follows: The model of the PV system and the proposed PV emulator are described in Section 2. The maximum power point tracking process is discussed in Section 3, where the P&O and PSO algorithms are considered for implementation. Section 4 provides the simulation results for characterizing the PV source. Additionally, the MPPT is involved in the same section. Experimental assessment is given in Section 5. More complex partial shading conditions are presented in Section 6. Comments on the failure of the P&O technique are also included in this part. Finally, the conclusion is presented in Section 7.

PV System Model
Different models are available in the literature to describe and characterize the behavior of the PV source. However, the PV source model is not used in this study. It is important to introduce it to know the main differences and analogies between this model and the PV emulator. The single-diode model gives a good compromise between accuracy and complexity. Therefore, it is used to describe the PV source's performance. The I-V characteristics of this model are given by [6,25] where i ph is the photovoltaic current, i o is the saturation current of the diode, n is the ideality factor, R s is the series resistance, v t is the thermal voltage, R sh is the shunt resistance, N s is the number of cells in the module, i pv is the output current, and v pv is the output voltage. The P-V characteristics of the PV source according to this model are shown in Figure 1. These characteristics are drawn under uniform solar radiation conditions, where one can notice that the P-V curve at certain solar radiation has only one peak. However, under partial shading conditions, the solar radiation distribution becomes nonuniform, which means multiple peak occurrences in the P-V characteristics. An example of the characteristic of two series-connected modules is clarified in Figure 2, where two cases are shown. The first case indicates that the utmost peak is on the left side (or the first one from the left), while the second case shows that the global peak occurs on the right side.

The Proposed PV Emulator
The suggested PV emulator is a battery-based type, in which a DC source is connected in series with a resistor as clarified in Figure 3. The behavior of this circuit is simply formulated as The characteristics of this emulation system can be represented at different power levels by changing the value of the series resistance, which is considered a simple analogy for the solar radiation variation in the real PV source. The PV current variation is proportional to the solar radiation change. Thus, by varying the emulator resistance, the current is shifted, giving similar behavior to solar radiation variation. Hence, the characteristics of the emulator at different power levels are shown in Figure 4.
Similar to the real PV installation, the authors propose a cascaded structure with bypass diodes of the battery type emulator to imitate the case of partial shading conditions. Figure 5 shows two cases of partial shading using the cascaded structure of the emulator, where the location of the global peaks is on the left and the right sides.  Further investigation is given to the characteristics of the emulator in comparison with the real PV source. From Figure 1, the slope of the P-V curve is steeper on the right side of the MPP. However, for the emulator (Figure 4), the P-V curve slope is similar on both sides of the MPP. The voltage of the maximum power points (MPPs) is limited to a narrow range in the case of the PV generator. However, the MPPs' voltage is constant in the proposed emulator. The open-circuit voltage changes when the solar radiation changes. Specifically, a logarithmic relation describes the variation of the open-circuit voltage with the solar radiation [26,27]. The open-circuit voltage of the PV emulator is constant.
Despite the dissimilarities of the characteristics between the emulator and the PV source, the battery-based emulator provides sufficient characteristics to test the MPPT, especially for partial shading conditions, where the produced characteristics are not so different from the real PV system. Furthermore, more complex configurations can be achieved by rearranging the emulator units in series and parallel, which makes it flexible and effective to test the algorithm in a simple manner. Moreover, the optimization algorithm, which is intended for global power tracking, is more concerned with the global peak location rather than the shape of the characteristics.

The Perturb-and-Observe Method
The P&O method is well-documented and known in the literature. It has a very satisfactory performance under uniform solar radiation conditions. However, under partial shading conditions, the P&O is easily trapped at a local maximum. It is included here for the purpose of validation and comparison. The performance of the P&O technique depends mainly on the P-V characteristics. The slope of these characteristics is positive on the left side of MPP and negative on the right side. According to the literature [28,29], the optimum performance of the P&O occurs when three steps operation is achieved at steady-state. Therefore, the P-V curve at such condition is shown in Figure 6. To understand the three steps operation shown in Figure 6, suppose that the initial operating point is point 1. The operating principle of the P&O depends on perturbing the voltage in one direction and inspecting the behavior of the power. Therefore, assume that the voltage is increased. Thus, the operating point is directed to point 2. It can be noted that the PV power is increased as a result of the voltage increase. Therefore, the voltage will be increased again to track the ultimate maximum. Currently, the operating point is 3. However, it is obvious that the power is decreased after this perturbation (this increase of the voltage). Consequently, the perturbation direction will be reversed and the operating point is directed back to point 2. Following this manner, the operating voltage will oscillate in a three-level operation. To be specific, the working path is from point 1 to point 2 and then point 3, and the reverse direction from point 3 to point 2 to point 1.

The Particle Swarm Optimization Algorithm
Particle swarm optimization is a meta-heuristic algorithm which is inspired by the movement of the bird flocks during the search for food. The PSO technique incorporates a group or swarm of individuals (called particles), where each particle is considered a potential solution for the optimization problem (global maximum extraction in our case) [30,31]. Therefore, the particles are initiated randomly in the search space and the particle that get the highest amount of food will provide other particles with information about the location of the food. Consequently, and based on the new information, the particles change their movement to allocate the best or optimum place for feeding [32]. This mechanism can be used to harness the global power from the PV system under partial shading conditions. The optimization problem can be simply clarified following these steps [32,33]: The duty cycle is chosen to represent the particles in this formulation, and therefore, they get random values in the beginning. It is worth mentioning that the duty cycle value is bounded between 0 and 1.

2.
The values of output power corresponding to the duty cycles are collected and compared together. Thus, the one (duty cycle) with the highest power will attract other particles to its position. Therefore, the position of the particle is influenced by the best particle in the neighborhood.

3.
During its journey, the particle will save the best value obtained. This value (power) is called the best private or p best . Furthermore, the best solution obtained from all particles in the entire population is called the global solution (g best ). 4.
Mathematically, the path (v i ) or movement speed of each particle (represent the step size) to its new position is updated from v k+1 where w is the inertia weight, c 1 and c 2 are the acceleration factors, p best,i is the personal best solution of particle i, g best is the global best position of the particles, r 1 and r 2 are random numbers, and k is the iteration number.

5.
The new position or duty cycle (d i ) is simply the addition of the velocity to the current position as d k+1

Simulation Results
The considered system for MPPT implementation is composed of a PV emulator, boost converter, and resistive load. Figure 7 shows the configuration of the studied system. The boost converter interfaces the load with the emulator such that the maximum power can be tracked. At steady-state, the behavior of the boost converter is described by where v pve is the emulator output voltage, v c is the capacitor output voltage, and d is the duty cycle of the boost converter. Furthermore, Table 1 gives the parameters of the system. Table 1. The parameters of the PV emulation system.

Parameter Value
Boost inductance (L) 1 mH Input capacitor (c pve ) 500 µF Output capacitor (C)   Figure 5a). The emulator resistances to achieve this condition are 20 Ω and 5 Ω. The parameters of the PSO method used during the validation are w = 0.4, c 1 = 1.025, and c 2 = 1.025. From Figure 8, it is obvious that the P&O technique is trapped at a local maximum. Furthermore, it is working according to the three-level operation. However, the PSO succeeded to harness the global maximum, thanks to the searching nature of this technique. Therefore, the duty cycle of the PSO method is approximately constant, which reflects on the power oscillations. Regardless of the failure of the P&O technique to track the global maximum, its power oscillation is higher when compared to the PSO method. Moreover, and due to the searching mechanism, the PSO algorithm has a slower starting transient behavior compared to the P&O method. It is worth mentioning that the P&O method may track the global maximum accidentally. However, this is more dependent on the global peak location [34]. Furthermore, the initial condition contributes to the failure rate of the P&O scheme. Table 2 summarizes the average efficiency of the two techniques under such partial shading condition. The average efficiency is calculated according to [35] η pv,avg = P mppt (t)dt P r (t)dt × 100, (6) where P mppt is the extracted maximum power using a specific MPPT method, and P r is the reference power (from the data-sheet).

Set-Up Description
The considered PV system is built within the HIL set-up for the power circuit. The utilized controller is a dSPACE MicroLabBox. The controller is established using Matlab program and then built into the MicroLabBox, which provides the switching signals to the digital inputs of the HIL system (RT Box CE). Hence, the measurements (the emulator voltage and current) are fed back to the analog inputs of the controller. The parameters of the experimental system are the same as used in the simulation case ( Table 1). The configuration of the experimental HIL set-up is shown in Figure 9.

Experimental Results
For the experimental evaluation, two cases are used to assess the performance of MPPT techniques with the PV emulator. A resistive load similar to the simulation case, and a battery load to represent the constant DC-link voltage of the micro-grid or grid-connected applications, are considered. The partial shading condition considered here is when the global peak occurs on the right side (see Figure 5b). To establish such a condition, the resistors used in the emulation system are 25 Ω and 10 Ω, respectively.
The first case with resistive load is illustrated in Figure 10. The results show the waveforms of the power and duty cycle with the P&O and PSO methods. The P&O technique fails to capture the global peak. However, the PSO algorithm extracts the global power efficiently. The duty cycle for the P&O technique oscillates among three levels as specified in the simulation case. However, an occasional fourth level happens, which has no significant effect on the power oscillation. Therefore, even with a four-level operation, the MPPT performance is very satisfactory [28]. The duty cycle with the PSO algorithm is constant without any oscillation as clarified in the simulation case.
The second case with a battery is given in Figure 11. Similarly, the P&O is trapped at the local peak and the PSO succeeded to harness it. Furthermore, the duty cycle has a four-level behavior with the P&O and is constant in the case of PSO. Table 3 summarizes the efficiencies of the MPPT techniques for the two previously mentioned cases. It should be mentioned that the efficiency of the P&O technique is dependent on the extracted local peak. Therefore, it may vary in a wide range in comparison with the PSO algorithm.

Comparison with Other PV Emulators
The behavior of the proposed PV emulator is compared with the built-in Matlab/ Simulink PV emulator. Figure 12 provides the characteristics of KC200GT PV module at different atmospheric conditions of solar radiation and temperature. The PV power is proportional to the amount of solar radiation. Furthermore, the temperature effect on the PV power is smaller when compared to the solar radiation impact. However, the variation range of the MPP voltages is wider when the temperature changes. In comparison with the characteristics shown in Figure 4, the MPP voltage is fixed for the proposed PV emulator. However, it sustains the proportionality between the solar radiation and power, which is represented here by resistor change. The performance of the proposed PV emulator under temperature variation is shown in Figure 13. The characteristics are quite similar to the waveforms provided in Figure 12b, where the MPP voltages vary significantly with temperature change. The same applies to the open-circuit voltages. However, the slope of the left-handed side of the curves in Figure 13 is steeper, which is a bit different from the real PV characteristics. The temperature change is mimicked here by supply voltage variation, which is considered a simple approach for implementation. The behavior of the Matlab/Simulink PV emulator under non-uniform insolation is presented in Figure 14, where two cases are shown. In one case, the global maximum occurs in accordance with the second peak, while the other global peak is aligned with the first peak. The relocation of the global peak is dependent on the amount of incident solar radiation (shading pattern) and the configuration of the PV array. The characteristics are similar to the proposed PV emulator shown in Figure 5. However, the slope of the curves is different to some extent, especially in the left part.  Figure 15 shows another case of partial shading to represent complex shading issues, where three modules are used to obtain multiple peak occurrences. One case shows the global occurrence at the first peak, the second case is in the middle, and the last one happens at the third peak. The relocation of the global peak provides more complex partial shading conditions, which in turn makes it hard for MPPT techniques to harness the maximum power in different situations. Therefore, the continuous development of MPPT algorithms is still ongoing to address such an issue.

More Complex Partial Shading Conditions
The proposed PV emulator can be extended to obtain more complex and challenging partial shading conditions by connecting the PV emulators units in a cascaded structure. Two additional case studies are included to give more complex characteristics of the output of the PV emulator. Figure 16 shows the PV emulator characteristics, where the global peak occurs at the middle of the P-V curve. In another case, the global peak happens at the first peak. The changing position of the global peak from first to middle provides more realistic emulation for the variety of partial shading techniques. Therefore, to validate an optimization method for MPPT, it is mandatory to test it under complex partial shading conditions and variable peak occurrence at the output characteristics. In this regard, the suggested PV emulator provides a simple procedure for obtaining such conditions. The utilized resistors for the middle peak are 5 Ω, 30 Ω, and 15 Ω. Furthermore, the employed resistors for the first peak are 5 Ω, 30 Ω, and 20 Ω. One can observe that modifying only one resistor changes the location of the global peak. Therefore, a parallel branch can be used to transfer the condition from the first peak to the middle one, which further simplifies the implementation of the proposed PV emulator and decreases the number of required resistors.
In comparison with the characteristics shown in Figure 15, the proposed PV emulator gives the possibility to relocate the global peak position in a simple manner. The non-uniformity of the incident solar radiation is represented here by resistor change. Similarly, the characteristics are very sufficient to represent complex partial shading condition. However, the slopes of the curves are different when compared to the real PV system. Nevertheless, this will not affect the effectiveness of the tested global peak tracker.

On the Failure of P&O Method
As discussed earlier, the P&O technique is easily trapped at the local peak due to the dependency on the hill-climbing principle. The location of the global peak plays an important role in the failure of the P&O method [34]. However, the initialization of the P&O also contributes to its failure rate. Therefore, we study here the effect of the initial value of the duty cycle on the maximum power extraction. Figure 17 shows two cases, where the P&O is firstly trapped at a local peak. In the other case, the P&O method can successfully obtain the global one. The case under study is when the global peak occurs in the middle (Figure 16a).
The P&O method fails to track the global peak when the duty cycle initial value is 0.7. However, it gets the global power when the initial duty is 0.4. It is worth mentioning that the three-step operation is guaranteed as shown in the duty waveform in both cases. Furthermore, the power oscillations clearly show a three-level operation, where the power swings among the points 1, 2, and 3, which is in agreement with the operation explained in Figure 6.

Conclusions
A cascaded structure of a battery-based PV emulator is proposed in this paper. The suggested emulator is designed for partial shading conditions. Furthermore, it has a simple structure with low-cost implementation. Therefore, several partial shading conditions can be easily constructed using this emulator, which simplifies the testing of the optimization techniques for MPPT. The PV emulator is validated using simulation and experimental results under different operating conditions. The suggested PV emulator provides a similar characterization to a real PV module, even under complex partial shading conditions. Moreover, two MPPT techniques are implemented to harness the maximum power from the emulator. Firstly, the P&O method fails to extract the global maximum and is easily trapped at a local one. In this regard, the P&O algorithm may track the global peak. However, this is mainly dependent on the location of the global peak. Secondly, the designed PSO technique succeeded to get the optimal maximum (global one) due to the searching nature of this scheme. The efficiency of the PSO method is higher than 99% under different studied conditions. However, the P&O efficiency is dependent on the extracted local peak.