#### Abstract

This research investigated the performance of a 5 MW PV grid-connected plant in Al Fashir City, Sudan. The research aims to improve the performance and increase the efficiency of the Al Fashir plant by identifying the maximum power point and increasing the tracking efficiency based on the algorithms developed. The PV systems benefit from MPPT approaches because they improve power output and energy delivery to the load while also extending the useful life of the PV system. The P&O algorithm performance is compared to the ANN trained by the PSO method by a set of solar radiation values. However, time response, oscillation, and stability are the three most important factors to consider when evaluating the effectiveness of any MPPT algorithm. The results show that the ANN trained by the performance of the PSO algorithm was better in time response, tracking speed, and oscillation than the P&O algorithm and could identify the new power point quickly. The results of this study will assist in resizing the PV plant and improve the operation performance and efficiency to provide affordable and reliable power accessible to the people in Al Fashir city.

#### 1. Introduction

One of the most recent innovations among the various forms of renewable energy used today is solar energy. Moreover, it is anticipated that renewable energy sources such as solar energy will soon replace traditional energy sources for many reasons, such as depletion, rising costs, and health and environmental concerns. However, increasing renewable energy sources has many benefits, including reducing greenhouse gas emissions and air pollution. Furthermore, renewable energy provides more than half of the world’s electrical needs, reducing fossil fuel dependency by more than one-third. Solar System prices have started to decrease due to advancements in manufacturing, performance, and quality of devices. With the advancement of solar technology and the widespread adoption of solar systems, the cost of solar energy is expected to fall significantly.

The photovoltaic system is one of the most widely used solar energy sources. The popularity of photovoltaics has increased rapidly over the past decade due to the rising demand for environmentally friendly sources. Despite the delay caused by the COVID-19 epidemic in many supply chains, according to the International Renewable Energy Agency (IRENA), renewable energy capacity increased globally to at least 2537 GW at the beginning of 2020, representing a 50% increase over 2019. However, solar energy increased by 24% to 94 GW during the same year, while wind energy increased by 18% to 111 GW [1].

As the capacity of photovoltaic systems increases substantially, the influence of PV modules on the electricity grid cannot be overlooked. It could produce obstacles to the grid, such as flickering, harmonics, and deterioration of the grid’s stability. In order to enhance photovoltaic system performance and maintain power stability, it is crucial to meet the technical requirements of the photovoltaic system, such as fault-ride-through capabilities and harmonic distortion control. However, the stability during normal and fault situations should be investigated when photovoltaic modules interlink the network. However, the author [2] has studied the penetration of different renewable energy sources to determine how to evaluate their operational characteristics and efficiency. Consequently, the effectiveness of the systems was evaluated using technical, economic, and environmental restrictions and comparative cost analysis of various operational scenarios. Additionally, the sensitivity analysis for fuel, PV, battery pricing, and load profile was investigated to depict the impacts of altering significant parameters on system performance.

Generally, the performance of solar cells is affected by climatic variables (sunlight and temperature) and load impedance. The fundamental drawback of photovoltaic systems is the poor energy conversion performance (in low radiation and temperature conditions). Maximum power point tracker (MPPT) is used for optimal efficiency to improve systems performance. Nevertheless, the PV system uses MPPT approaches to improve power output and extend the whole Solar System lifespan.

There was a focus on photovoltaic modules as a source of losses caused by low irradiance or high temperature. However, it is recommended to use the MPPT algorithm by keeping the output voltage for the module constant at a DC level and mitigating harmonics signals as a solution. Meanwhile, researchers often divide these methods into two broad categories, namely, traditional techniques, such as perturbation and observation (PO) and hill-climbing (HC). Additionally, there are modern techniques such as fuzzy logic, metaheuristic techniques (genetic algorithms, particle swarm optimization, and ant colony), and artificial neural networks [3, 4]. Compared to modern techniques, traditional algorithms have limitations such as a delay in reaching the maximum power point (MPP), oscillations, getting trapped at the local MPP, and the inability to identify global MPP. In recent years, approaches have been increasing that make metaheuristic MPPT algorithms better than the traditional algorithm [5]. For example, the author [6] developed an algorithm to calculate the voltage reference, which generates constant power from the PVPP. However, the desirable power is greater than the present power, and the algorithm also demonstrates that the desired power reference is more than the maximum available power of the PVPP. On the other hand, the study in [7] proposed a new method for the photovoltaic system that depends on an adaptive prediction algorithm to regulate the output power of panels and eliminate the total harmonics distortion.

HOMER Pro and RETScreen simulators have been used in [8] as the performance predictors for large-scale solar power plants of 20 MW in a hot environment using real operating data. Hence, the findings revealed that the performance of photovoltaic power plants is affected by cell technology, insolation, and environmental factors, particularly temperature.

Meanwhile, the author [9] examined the performance of improved PSO compared to conventional PSO and MPPT algorithms under partly shade circumstances using MATLAB/Simulink. The simulation outcome indicated improved PSO’s quick tracking speed, exceptional consistency, and ability to distinguish between global and local maximum power points. The author [10] proposed two very efficient MPPT controllers using innovative slime mould optimization (SMO) and an improved salp swarm optimization technique (ISSA) to change temperature and irradiance. The suggested controllers are compared to conventional and recent algorithms. The results demonstrated that the suggested controllers had the best transient and steady-state performances. Also, the author [11] presented the MPPT approach based on the dragonfly optimization algorithm (DOA) for optimizing the photovoltaic system. The overall performance of the suggested approach was examined and compared to rigorous techniques such as IPSO, PSO, PO, and other algorithms. The simulation results showed that the proposed DOA approach beats other techniques in terms of response time, oscillations reduction, resilience, speed of convergence of accuracy, and power efficiency.

Another study [4] introduced three metaheuristic optimization approaches to tune the fractional-order incremental conductance FO parameters to control the output voltage of the Solar System, which are PSO, ant colony optimization, and AntLion Optimizer. Furthermore, the author [12] designed the MPPT method that drives a mix of the ANN and PSO to locate the global peak point. The study used MATLAB and hardware simulations to compare the ANN with the performance of the traditional swarm algorithm, producing comparable results. The author of [13] presents a comparative study for monitoring the highest power point of a neural network using the ANN-MPPT technique, PO, and incremental conductance MPPT. The simulation results in MATLAB show that the suggested ANN method improves efficiency and reduces oscillations compared to the PO and IC techniques. In addition, to increase the performance of the PV system and stabilize the MPPT, the author [14] presented a hybrid adaptive controller based on the sine-cosine algorithm (SCA) and its excess efficiency over the invasive weed optimization approach.

After a comprehensive analysis, it was observed that most of the research used MPPT approaches to combat the inefficiency of solar power facilities. However, no authors compare the daily performance of real data with the PSO- and PO-trained ANN algorithm. The comprehensive analysis was presented based on the proposed techniques to investigate the performance of a 5 MW PV grid-connected plant in Al Fashir, Sudan. By comparing the plant’s precise operation to the results of suggested algorithms, a neural network was trained by PSO and PO on the MATLAB platform. The objective of the research is to enhance the efficiency of the solar Al Fashir plant by increasing the tracking response and consequently increasing the tracking efficiency by using developed algorithms for identifying the MPP. This study used ANN-PSO for a sizeable single-stage plant and compared it to the PO algorithm. The strategies offered aim to improve the plant’s performance, which can be considered innovative for this geographic region. The following are the major contribution of the study:(i)Two efficient and improved algorithms have been investigated in the MATLAB environment(ii)The recommended methodologies are implemented successfully in the PV system and compared to the actual output(iii)A comparison was made between the proposed PSO-trained ANN and the P&O algorithm

#### 2. Grid-Connected Components

Grid-connected systems are designed to convert as much irradiant energy as feasible into actual energy. Research studies have faced challenges in single-phase and three-phase systems such as maximum power consumption, rapid and regular power fluctuations, effects on network quality, current return, and mismatch between PV output and network demand [15]. The GCVS system consists of a matrix of series/parallel photovoltaic modules, which turn the light from the sun to the current and a power conditioning device that transforms DC into AC, as shown in Figure 1. The power generated is delivered to the network and used by the load demand. In certain circumstances, storage devices are employed to increase the availability of the power produced by the photovoltaic system. Here, we are trying to simulate the Al Fashir station exclusively, so in the following sections, additional specific information regarding the various components of the PV system is provided.

##### 2.1. PV Modules

A photovoltaic module is a collection of cells coupled in series and parallel to generate the required capacity, and a photovoltaic array is a collection of modules connected in parallel or series to provide the required power [16]. Generally, the series combination of solar cells forms a PV module consisting of a single diode with series resistance and shunt resistance. The current source is the photon-generated current (*I*_{ph}) produced by photovoltaic (PV) proportional to sun irradiation. Resistance (*R*_{s}) indicates contacts and connection-related losses, while parallel resistance represents the diode leakage currents (*R*_{sh}) Figure 2. Also, the mathematical equation used to calculate the I–V of a solar cell quantitatively is given in equation (1) [17]. A proper solar cell device must account for the effects of the series and parallel resistances to function correctly. The electrical properties of a photovoltaic module are often represented as the relationship between the cell voltage and current and the relationship between the cell voltage and the output power, among other things.

The circuit gives the following relationship and the characteristic equation:

##### 2.2. Inverters

Grid-connected photovoltaic systems connect the photovoltaic array to the power grid through a power electronic inverter, which converts the DC electricity generated by the photovoltaic array to alternating current electricity. Over the previous several decades, various alternative topologies have been created and deployed [18, 25]. As mentioned previously, the multistring architecture was perhaps the most prevalent form of a photovoltaic system. The real benefits of this topology are that it is self-contained, provides better protection for power sources, is more secure during installation and maintenance, and is inexpensive. Figure 3 shows how PV modules are tied to the inverter as a multistrand topology for only one inverter. The power plant has 84 and 60 kW DC/AC converters. The input range of 570–800 VDC assures the steadiness of AC output voltage. However, there are 20 strings, and every row has 20 modules () to generate 1500 Mw; every 25 inverters are coupled to a 1500 KVA transformer (0.4/33 KV) and then connected to the grid.

#### 3. Maximum Power Point Tracking (MPPT)

It is important to note that solar panels are nonlinear, and the characteristics of these devices are highly dependent on the amount of light and temperature available [21]. Meanwhile, the technical efficiency factor of an accessible photovoltaic panel is approximately 20%. A real-time MPPT is critical to maximizing the energy harvested by photovoltaic panels; researchers have developed different MPPT techniques. The most prevalent strategies are PO and the IC algorithm. However, choosing the optimal MPPT approach to utilize remains a challenge. As a result, more research is being conducted on MPPT approaches to develop a system with good performance in cost savings, simplicity of installation, sensing accuracy, and adaptation to diverse photovoltaics [22]. Partial shadowing of PV arrays is one of the critical issues faced by MPPT. MPPT is used in DC/AC inverters to maximize the efficiency of PV modules and to determine the MPP for various characteristics under any environmental circumstance. We used two algorithms, namely, PO and ANN, trained by the PSO. Those algorithms provide the reference voltage to the DC link controller under different conditions.

##### 3.1. PO Algorithm

Because of its simplicity, the PO approach is the most utilized MPPT technique in photovoltaic systems. This approach ensures consistent accuracy, doubles tracking speed, and transforms significant energy into power. PO is utilized as the maximum power tracking approach to manage voltage, current, and power across the solar module, significantly lowering the THD of the grid-connected photovoltaic system [3]. Using the PO method to detect power fluctuations is possible by creating a perturbation, adjusting the voltage, and detecting the resulting power fluctuation. First and foremost, to achieve this goal, it is necessary to measure the voltage (*V*_{pv}) and current (*I*_{pv}) of the solar module under constant temperature and irradiance conditions. These measurements are taken at time *t*_{k} and compared to the previously recorded amounts taken at time *t*_{k1} to determine if any differences exist. At *t*_{k}, it is possible to estimate the power (*P*_{pv}), which can then be compared to the power calculated at *t*_{k1}. A positive change in power leads the system’s operational voltage to shift in the same direction as the increase, and when the change is negative, the operational voltage shift in Figure 4 shows the flow chart.

##### 3.2. ANN Algorithm

Since the 1970s, the ANN has been regarded as one of the most extraordinary possibilities for computing systems. New neural network-based controllers are ideal for this purpose for complex and inadequate issues where traditional approaches have not attained the requisite quickness, precision, or efficiency. Although modeling an application system using the ANN does not require much expertise, precise data is needed to forecast output functions as closely as possible to reality [22]. There are two kinds of ANN architecture feedback networks and feedforward, which are often used since they consume lower capacity during the execution stage and are very effective when used in conjunction with nonlinear systems, like photovoltaic panels. Like the central nervous system, it comprises essential and highly linked artificial neurons; we can distinguish between single-layer networks of a single layer of neurons, and the information can flow in any direction. Also, a multilayer is unidirectional in which information only flows in one way and is made up of many nodes in more than three layers, namely, input, hidden, and output, as can be seen in Figure 5 [23]. However, thousands of weighted links link these neurons, allowing messages to travel between them easily. Countless messages arrive at each neuron, but only one leaf. Additionally, the neurons in each layer are linked by their weights and bias terms in the preceding levels (Figure 5). Equation (3) shows the weights computation calculation [22].

The backpropagation (BP) technique is often used to improve ANN performance by altering node weights and bias terms, and the cost function calculation is generally selected as MSE and given by

Generating an ANN block is the first process in generation of training patterns, which entails assembling a collection of training patterns that encompasses all potential operational scenarios. Second, input selection for ANN inputs should be independent variables that have a meaningful effect on the ANN response. Third, the architectural choice, one of the most common forms of ANN, is the multilayered feedforward backpropagation, which is utilized in a wide variety of applications and divided into input layers, a hidden layer containing neurons, and an output layer. Then, training and testing ANN is finding the weights that comprise the ANN critical components. The training procedure determines which weights minimize some measure of overall error, such as the sum of squared errors (SSE) or mean squared errors (MSE). Accounting for the optimal number of hidden layers and units inside each is critical for feedforward ANN construction and addressing the trade-off between computing time and best-fitting regression of the ANN node. When an ANN has excessive units in the hidden layers, the computing time comes to be excessive due to an overfitting regression.

##### 3.3. PSO Algorithm

PSO is a specialist field of machine learning for solving large amounts of data and finding suitable solutions quickly. The PSO algorithm’s movement is inspired by birds’ flocking behavior, which depends on the PSO optimizer’s individual and neighboring experiences at each particle step. The basic concept behind this approach is to identify an optimized region where each space has the probability of containing a potential solution. The PSO algorithm comprises four stages [22]. The PSO optimizer begins by searching by a random particle value. This particle value is chosen according to the degree of the potential of solution spaces for various optimizations. The previous and next best fitness values are compared, and optimal solutions in the same space in the second phase are searched. The best global positions are compared in the third stage to obtain the global fitness value. These locations are computationally modified and maintained for the following step in this phase, as stated by [23]

The fourth step determines and saves the optimal particle in fitness evaluation to improve the particle movement steps in each iteration. These steps are repeated until a stopping criterion is met or the specified number of repetitions has been reached, as can be seen in Figure 6, which shows the PSO procedure of PSO [24]. The system’s required accuracy and processing time suggest the stopping condition and number of iterations. The primary disadvantages of PSO and other metaheuristic optimizers are a lack of a robust mathematical foundation and an inability to guarantee global optimum solutions [23] theoretically. The predictive function of the ANN model is optimized using the PSO method. The optimization process has two stages, namely, determining the optimal feedforward topology and selecting the initial weights for the ANN model.

#### 4. Methodology

##### 4.1. Main Block Diagram

The grid systems’ essential components are a photovoltaic array, DC link, MPPT, inverter, filter, and transformer coupling to a utility, as can be seen in Figure 7. The capacitor in the DC connection is charged by the direct current electricity supplied by the photovoltaic array. The inverter converts DC to AC at a sinusoidal voltage and frequency comparable to the power grid. The transformer raises the inverter voltage to the nominal value of the grid while also providing electrical isolation between the photovoltaic system and the power distribution network. The harmonic filter cancels all harmonic components except for the fundamental electrical frequency. Meanwhile, the control circuit acts as the brain for the whole system [25, 26].

##### 4.2. Implementation of Control Circuits

The MATLAB design approach that developed and modulated the proposed grid-connected photovoltaic system is shown in Figure 8. Photovoltaic arrays are coupled to the inverter through the DC link, measurement circuits, and the inverter control circuit. The control system consists of five primary Simulink-based subsystems. Figures 9 and 10 demonstrate the MPPT here, and we used PO or ANN trained by the PSO algorithm in this study. Since the current reference value changes according to the MPPT techniques, the inverter’s output current fluctuates in response to the light intensity trajectory. When the MPPT system is activated, the VDC reference signal of the inverter VDC regulator is automatically adjusted to get a DC voltage that will extract the most significant amount of power from the PV array. Also, other VDC regulator circuits determine the *I*_{d} reference current for the current regulator using the voltage-dependent current regulator. Current regulator circuit determines the reference voltages *V*_{d} for the inverter based on the current references *I*_{d} and *I*_{q}. A phase lock loop (PLL) control circuit is required for synchronization and adjusts the internal frequency oscillator and tracks the frequency and phase of a sinusoidal signal [21]. However, the inverter’s output currents IABC are acquired. After applying Park’s transformation through PI controllers, *I*_{d} and *I*_{q} are generated and utilized for the system’s active and reactive power regulation. Then, PWM block serves as the switching pulses and generates signals for the inverter depending on the reference voltages. The grid voltages establish the phase angle for a three-phase proportional-integral (PI) regulated PLL. Meanwhile, the inverter output will be frequency and phase angle synchronized with the grid voltage.

##### 4.3. Photovoltaic Array Modeling

The system essentially consists a matrix of series/parallel photovoltaic modules from the block diagrams, which convert light from the sun into current (*dc*) electricity. The number of modules used for that plant design is 16220 with 325 W from solar in the PV system. The number of strings is 811, each consisting of 20 series modules. The type of module used is polycrystalline from JA Solar manufacturer 325 W, and the efficiency for each module is 16.73%. Table 1 shows all the PV module I–V specifications under different weather conditions.

##### 4.4. MPPT Proposed Algorithms

As explained previously, photovoltaics is characterized by poor efficiency and nonlinear PV system properties with a single MPP. Thus, monitoring the solar array’s maximum power point is a critical component of a photovoltaic system. The MPPT technique is based on a control system that keeps the PV system module operating at its maximum power point throughout the day. Here, we would compare the result of two algorithms, namely, PO and ANN, trained by PSO.

###### 4.4.1. P&O Algorithm

In the PO algorithm, the current and voltage of a photovoltaic module are monitored at any given time and then the operating point of the photovoltaic module changes with the change in direction and reaches the MPP when *dp*/*dv* = 0. We can then figure out the operating point corresponding to the maximum power by observing the voltage increments and decrements. The rise or fall in power figure below depicts the operation. Due to its ease of execution and cheap cost, PO control is a popular methodology. Unfortunately, it is inefficient in precision since it increases and decreases the MPP [26]. Figure 9 shows the proposed PO circuit.

###### 4.4.2. ANN Trained by PSO

In this study, PSO is used to improve the training strategy of the ANN model by finding the suitable topology for the feedforward ANN model and then finding the best way to set the initial weights. Specifically, *G* and *T* of the atmospheric conditions are employed as inputs to the ANN block, with a voltage reference output resulting from the model, as can be seen in Figure 10. Then, the voltage goes to the VDC regulator to determine the *I*_{d} reference current. The process begins with selecting ANN topology and optimizing the model’s initial weight values. Running this hybrid algorithm yields the optimal starting weights, which are then used to optimize the rest of the procedure. Then, the command “nntool” used in the program to optimize starting weights is utilized for training the ANN model. When we executed the collected *M* file, the input data (irradiation, temperature), and the output voltage for different conditions, we obtained Figure 11. For ANN training, there are many tools; one of the selected is the input-output and curve fitting toolbox. However, the number of hidden neurons was ten as can be seen in Figure 5. Moreover, the Levenberg–Marquardt algorithm has been chosen, and the output is matched with trained data (as can be seen in Figure 12 plot regression and best cost function for the iteration.

##### 4.5. Three-Level NPC

PV inverter is a mature technology consisting of electronic power switches operated by the control strategy. The circuit used in the research was NPC switching devices with a sinusoidal PWM-controlled inverter (Figure 13). The three-phase PV inverter’s voltage and current-controlled techniques are generally used in applications. A voltage source inverter control capability has key advantages, namely, lower switch voltage ratings, a broad harmonic spectrum, and fast dynamic response. In this design, the neutral-point voltage must be controlled to avoid increasing the device voltage stress and output voltage. Because there are more devices in series with the current channel and losses might increase if the current levels are the same, the 3-level inverter is more efficient than the standard 2-level inverter. Therefore, when a considerable DC-bus voltage increase is conceivable, 3-level (or multilayer) topologies are intriguing. The benefits of multilayer inverters in harmonic reduction apply, and the cost decrease in the output filter partly offsets the cost increase due to the increased device count [26]. A DC-link voltage controller maintains a consistent voltage across the capacitor by modulating the active current supplied into the inverter. The minimum DC-Link voltage for the inverter can be computed with equation (7) [27]. Two filter types are utilized to smooth harmonics before coupling the inverter to the 260 V/25 KV transformer and then to the grid. A series RL choke and a C-filter are parallel configurations used to reduce harmonics, simultaneously increasing reactive power. The RL choke, sometimes referred to as a line reactor, reduces harmonics generated by the inverter and protects the equipment from transient overshoots [28]. The choke circuit is dominated by inductance, as shown by

##### 4.6. Grid Circuit

Figure 14 shows the system implemented in MATLAB software; three feeders and 1 MW DC represent the local load, and a transmission line sets up the transformer-coupled DC system for the utility.

#### 5. Simulation Results

The research implemented using two cases to assess resilience of the proposed system built-in MATLAB, as shown in Figure 14, under rapidly changing atmospheric circumstances. First, we consider the following scenario: the temperature is constant (*T* = 25°C) while varying the irradiation as a simple case. Second, we adjust the temperature and irradiance simultaneously to simulate the real performance of the Al Fashir station as a complex case. The performance of the PO algorithm is compared to the ANN trained by the PSO method by a set of solar radiation values. However, time response, oscillation, and stability are the three most important factors to consider when evaluating the effectiveness of any MPPT algorithm. Initially, we considered only two irradiation conditions (1000 and 500 W/m^{2}) as simple cases. We kept the temperature constant at 250 C. Solar radiation starts at 1000 W/m^{2}. It rapidly drops to 500 W/m^{2} at 0.5 seconds to simulate the transitory condition to determine how any methods respond to the transient state. As we see in Figure 15(a), the ANN trained by the PSO method has stable tracking for power. In the case of 1000 W/m^{2}, the output power is greater than 5 MW compared to the output power, which has not kept stable at a specific value and during the same condition has less value (<5 MW), as seen in Figure 15(b).

Meanwhile, when the radiation changes from 1000 W/m^{2} to 500 W/m^{2}, we can observe that the time response is less for the ANN trained by PSO than for the PO algorithm. However, ANN-PSO slightly fluctuated before returning to a steady-state point, and PO fluctuated much more at this state. This approach requires less time than PO to achieve tracking power from the transient to steady state. In all cases, the power and efficiency are close to the precise theoretical values corresponding to the irradiation levels.

Even for voltage and current curves for the same case, in Figure 16(a), we observed that the voltage curve for ANN-PSO has stable performance and recorded a constant value and current. On the other hand, the photovoltaic array’s voltage for the PO algorithm from time zero to time equal one is not like the ANN since the value fluctuates between 510 at the beginning and then increases until 750 at the endpoint. For the ANN, the photovoltaic voltage is stable, and the output is changed between 600 at the beginning and 840 V. Nevertheless, in the current curve, a fluctuation at the beginning for ANN-PSO compared to the PO algorithm is less. Despite the PO algorithm’s current values being more than ANN-PSO, the PO current curve is not like the ANN current curve, which is generally stable at a constant value.

**(a)**

**(b)**

Figure 17 shows the voltage and current output of the three-phase inverters. Because voltage is one of the synchronization criteria that connect any power source to the grid, it must be more stable over time, even when the irradiance fluctuates. However, a three-phase current is depicted as *I*_{a}, *I*_{b}, and *I*_{c} from time *T* = 0, to time *T* = 1 second. Because of the characteristic equation of the photovoltaic cell, the current varies as irradiance changes over time. On the other side, Figure 18(a) shows the voltage THD content for the ANN compared to the PO THD content in Figure 18(b).

**(a)**

**(b)**

The data were collected randomly for two days (11 April 2021 and 8 November 2021). The plant was simulated with nonuniform irradiance and temperature patterns on all solar arrays. Radiation started rising from zero to a specific value (more than 1000 W/m^{2}) and then reduced to zero (Figures 19(a) and 19(b)). The waveforms of PV power against simulation time were shown for all scenarios based on solar irradiance patterns. The program’s execution time was 15 seconds, but the number of hours from 6 am to 6 pm is thirteen hours, each hour by one second with irradiation and temperature on a given day. For example, the first second is six o’clock in the morning, and the radiation value is zero. The gradient continues until it reaches its maximum value in the middle of the day and then decreases to zero at six o’clock in the evening. Actual power production for those two days in Figure 20 was compared with the findings of the two suggested algorithms using the weather data for the days determined. However, the following two graphs represent the *G* and *T* of those days; with different atmospheric conditions applied to the PO and ANN algorithms, it is more robust in delivering the optimal MPP under increasing and decreasing radiation, as shown in Figure 19. The sun’s irradiance begins to fluctuate from time zero (6 MA) and progressively grows to a maximum at noon; then, it begins to drop in the evening and ultimately to zero at (6 pm).

**(a)**

**(b)**

**(a)**

**(b)**

With increasing solar irradiation and duration, the acquired power rises and decreases with decreasing power. Figures 21 and 22 depict the PV system characteristics and the MPP tracking by the ANN, trained using the PSO and PO algorithms to determine day data. Figures 21(a) and 21(b) show the proposed system’s power output and tracking performance using the two techniques to track the MPP for 11 April. The maximum power obtained by the PV system when using the ANN trained by PSO is more remarkable than when using the PO approach. The ANN algorithm produced higher-quality output power than the P&O MPPT method. The suggested ANN using the PSO algorithm responds faster to changes in irradiation, and the PO algorithm takes more time to respond. For example, the power curve is depicted by a red line; in 5 seconds, the ANN has achieved 5000 KW, which is lower than 5000 KW. The system’s dynamic responsiveness and steady-state power are satisfactory, regardless of whether the irradiation is raised or lowered. Compared to the PO algorithms, the ANN using the PSO algorithm has a better tracking speed, particularly near the MPP. In contrast, the power output and the tracking performance for the proposed system using the two techniques to track the MPP for November 8 are depicted in Figures 22(a) and 22(b).

**(a)**

**(b)**

**(a)**

**(b)**

Figures 23 and 24 show how the photovoltaic system responds to two, an algorithm for changes in climatic conditions. However, for the ANN trained by PSO, the voltage value ranges between 700 Volts and more (as can be seen in Figure 23(a)), which is supposed not to exceed 570 and 900 Volts to achieve the inverter condition. In contrast, the current values changed from zero to the highest value, around 8000 amps, depending on the radiation value on that day and the temperature, as shown in Figure 23(b). On the other hand, the voltage for the PO method is slightly different; as shown in Figure 24(a), it is less reliable and effective tracking than the ANN voltage curve; however, the voltage value ranges from 550 volts to 750 volts compared it to the ANN approach; the PO algorithm causes overshoot and oscillation in the output voltage from the photovoltaic system. The current curve reflects the change in climatic conditions and has the current curve of the same characteristics as the previous algorithm [29]. Finally, all figures demonstrated that the PO algorithm oscillates around the MPP, resulting in power loss that can be avoided using the ANN algorithm, which exhibits good stability, as summarized in Table 2.

**(a)**

**(b)**

**(a)**

**(b)**

To sum up, it can be observed from the foregoing that Al Fashir station’s performance is low on the randomly selected days compared to the performance of the simulated two algorithms under the appropriate weather conditions, which is supposed to be high output. The output capacity in the two days did not exceed 4 MW during the specific days, while the output of the two algorithms exceeded 5 MW, especially during the afternoon. Therefore, it is necessary to review the performance of the inverters and controllers. In contrast, the ANN trained by the PSO algorithm’s performance was better in time response and tracking speed and oscillation than the PO algorithm. It may be more effective to examine, test, and design a prototype model for this task in order to accelerate the growth of renewable energy research and development.

#### 6. Conclusion

In this study, the effectiveness and performance of the Al Fashir photovoltaic system were examined. The simulation is implemented using two cases to assess resilience of the proposed system built-in MATLAB under rapidly changing atmospheric circumstances. The actual parameters for two days were thoroughly investigated to increase the station’s efficiency and accuracy while reducing the complexity of PV MPPT management. The output of the ANN trained by the PSO and the PO algorithms are compared to the plant’s actual performance. However, the two suggested methods have proved their resistance to irradiance changing, even when the irradiance drops suddenly.

The ANN trained by the PSO algorithm’s performance was better in time response, tracking speed, and oscillation than the PO algorithm and could identify the most power point. Although the MPP detected values range from maximum powers, the tracking effectiveness of ANN algorithms is excellent, indicating that the suggested approach may work well for the photovoltaic array in various climatic situations. During the two days, the output capacity did not exceed 4 MW, although the output of the two algorithms was more than 5 MW, particularly in the afternoon. Moreover, the MATLAB simulation demonstrated that the PO algorithm oscillates around the MPP, resulting in power loss that may avoid by utilizing the ANN algorithm, which exhibits good stability. We recommend in advance during the test commission to check all control parts functions and seek to improve the accuracy of the plant. The findings will raise green power consciousness and provide a significant resource for effectively using photovoltaic plants in the power industry. Finally, the system was examined and constructed, and the performance may be investigated utilizing an experimental system in future work. Furthermore, the shadow impact is another difficulty that influences the efficiency of a photovoltaic system and will be studied in future articles. This approach can be implemented for any PV system.

#### Data Availability

The data that support the findings of this study are available from the corresponding author upon reasonable request.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.