Optimizing Solar Power Using Array Topology Reconfiguration With Regularized Deep Neural Networks

Reconfiguring photovoltaic (PV) array connections among different topologies such as series-parallel, bridge-link, honeycomb, or total-cross-tied is a popular strategy to mitigate impediments in power production caused by partial shading. Conventional approaches rely on either by-passing or replacing shaded modules with auxiliary panels through complex control mechanisms, optimization strategies, or simulator driven approaches to obtain the best topology. However, these solutions are not scalable and incur significant installation costs and computational overhead, motivating the need to develop ‘smart’ methods for topology reconfiguration. To this end, we propose a regularized neural network based algorithm that leverages panel-level sensor data to reconfigure the array to the topology that maximizes power output under arbitrary shading conditions. Based on our simulations that include wiring losses in different configurations, we observe power improvement of up to 11% through reconfiguration. The proposed algorithm can be easily integrated in any cyber-physical PV system with reconfiguration capabilities and is scalable.


I. INTRODUCTION
Photovoltaic (PV) energy systems have played a major part in meeting the renewable energy requirements over the past decade. However, power production from PV systems faces impediments such as partial shading due to environmental and man-made obstructions. Shading causes voltage and current mismatch losses that can significantly reduce the power supplied to the grid [3], [4]. Reconfiguring PV array connections is a powerful strategy to mitigate the impact of shading. The key benefits include: (a) improvement of The associate editor coordinating the review of this manuscript and approving it for publication was Zhehan Yi .  [1] are equipped with servers that can communicate wirelessly with the solar array. Every PV panel is augmented with specialized sensors or smart monitoring devices (SMDs) [2] which can communicate to the central server as well the neighbouring panels. The SMDs also support topology reconfiguration by providing signals to the switch bank which modifies the electrical connections to realize different topologies. In such a pipeline, our proposed approach for reconfiguration can be easily integrated. Since our algorithm has been exposed to different irradiance profiles during training, our model is expected to learn useful heuristics to reliably adapt to new shading conditions or irradiances read from the server. Our algorithm can identify the optimal topology for a given irradiance profile and appropriately send control signals to the SMDs.
irradiance equalization to reconfigure panels in an array such that every row received similar irradiances based upon a mismatch index. Braun et al. [10] proposed a strategy to select the best topology among SP, BL, and TCT by comparing the maximum powers generated using a simulator driven, sequential approach for different shading conditions. However, such approaches are not scalable with the size of the array and can incur significant overheads. This motivates the requirement of a scalable, light and a 'smart' approach to perform reconfiguration based on the extent of shading.
Modern PV arrays [1] are augmented with inexpensive, computer controlled, panel-level sensors and relay actuators [2] to control electrical connections between panels. The usage of such equipment allows the array to be viewed as a cyber-physical system that can be accessed remotely and monitored in real-time with customized algorithms providing scope for PV data analytics. The data collected from the sensors can then be leveraged to control the relays and hence the choice of topology. However, the assimilated data requires post-processing and statistical analysis to understand the shading conditions and guide reconfiguration by identifying the best topology. In this context, there has been interest in PV topology reconfiguration using data analysis and machine learning (ML) methods. The overarching goal of such algorithms is to estimate the optimal topology and provide control signals to the actuators which can electrically rearrange the PV panels.
For instance, Pagliari et al. [12] proposed a graph clustering based reconfiguration strategy to combine different panels and reported performance improvements. The authors of this paper previously presented encouraging preliminary results [13] by formulating PV topology reconfiguration as a supervised classification problem. By using a simple artificial neural network (ANN) that identifies the best among three small size (3×4) topologies for a given shading pattern under lossless conditions, the authors demonstrated the feasibility 7462 VOLUME 11, 2023 FIGURE 2. 5 × 5 PV Topologies (a) Series-Parallel (SP), (b) Bridge Link (BL) (c) Honeycomb (HC) (d) Total-cross-tied (TCT). Depending on the shading condition, reconfiguration between the topologies can improve output power production and maintain energy flow to the utility grid. In our work, the arrays are realized, simulated and analyzed using MATLAB-Simulink. We model wiring losses by including resistors between the panels in every string of each of the topologies. of using such algorithms in solar monitoring applications. While ANNs have demonstrated capabilities to accurately reconfigure PV arrays, they are prone to overfitting and hence can poorly generalize under arbitrary shading scenarios. This motivates the need to utilize novel regularization strategies in neural networks to promote reliability in reconfiguration.

A. CONTRIBUTIONS OF THIS STUDY
In this paper, we present a cyber-physical system approach for topology reconfiguration with deep neural-networks (DNNs). In particular, we present novel results using regularized neural networks with topologies consisting of larger 5 × 5 arrays modeled with wiring losses on simulated data. More specifically, our key contributions can be summarized as follows:-(i) A unique, regularized deep neural network architecture with dropout [14] and batchnorm [15] for PV topology reconfiguration; (ii) Expanding optimization across four PV topologies namely SP, BL, HC and TCT; (iii) Analysis on the merit of topology reconfiguration under modeled wiring losses, (iv) Extensive simulations on a 5 × 5 array to demonstrate more realistic results, (v) Systematic comparison against conventional ML algorithms such as K-Nearest Neighbor, Support Vector Machines, Random Forests [16] and XGBoost [17] for the first time in this application and (vi) Ease of integration to a cyber-physical system pipeline with reduced computational overhead in comparison to existing work. On simulated data, our customized DNN algorithm achieves an average test accuracy of 81.1% and a macro average F1 score of 0.74 indicating the effectiveness of our approach. We emphasize that this unique study that included wiring losses and an optimized DNN architecture guiding the switching across four different topologies resulted in an average power improvement of ≈11% when switching from SP to other topologies. The results naturally motivate the adoption of such algorithms for real time topology reconfiguration and control. Our vision for research in solar array monitoring and optimization is summarized in Figure 1. As shown in Figure 1, the array can be used to collect data in real time. Data collected from the array can be used for statistical analysis and training of ML models. Once trained, the ML model can in turn indirectly control the actuators, thereby enabling reconfiguration.
The rest of the paper is organized as follows. In section II, we describe the four PV topologies considered in this study along with their properties. Section III describes the existing work in this area of research. In section IV, we present our proposed approach beginning with the generation of data and the design of the regularized neural network for topology optimization. Section V presents the results of our approach in comparison with baseline ML algorithms. We also present the merit of topology reconfiguration by identifying the percentage of cases where switching can produce significant power improvements and finally we provide our conclusions and future work in section VI.

II. PRELIMINARIES
In this section, we describe the four topologies considered in our work. Figure 2 provides the circuit level realizations of these topologies.

A. SERIES-PARALLEL
The SP configuration consists of PV panels arranged in both series and parallel. In particular, the panels are connected in series to form strings and the resultant strings are connected in parallel. Such an arrangement has the capability of improving both the voltage and the current simultaneously in-lieu of series or parallel only connection [18].

B. BRIDGE LINK
The BL topology is obtained when connections are introduced between panels of different strings in a manner similar to that of coupling strategy adopted for bridge rectifiers. The BL configuration can be considered similar to the TCT topology with half of the interconnections as the latter.

C. HONEY-COMB
The HC structure is realized by introducing connections between panels of different strings in a 'comb' like structure. Similar to BL, HC can also be considered similar to the TCT topology with half of the interconnections as the latter.

D. TOTAL CROSS TIED
In case of the TCT configuration, the PV panels are first connected in parallel to maintain equal voltage and raise the overall current produced. These rows are then connected in series in order to increase the overall output voltage. In a nutshell, the TCT topology can be realized by introducing shorts between the rows of the SP topology. VOLUME 11, 2023

III. EXISTING WORK
Photovoltaic array reconfiguration introduced in [19] and [20] has remained a popular strategy for extracting maximum power from the array under partial shading. Existing methods can be categorized as (i) static and (ii) dynamic reconfiguration strategies [21]. Static reconfiguration involves the physical rearrangement or replacement of the panels without modifying any existing electrical connections. On the other hand, dynamic reconfiguration or electrical array reconfiguration (EAR) involves altering the wiring within the array by utilizing control switches. Under the context of static reconfiguration, methods based on adopting standard mathematical rules and puzzle based strategies are extensively utilized. For instance, Rani et al. [22] distributed shaded modules across the array using the iterative SuDoKu algorithm to improve power production under partial shading. On similar lines [23] also reported significant improvements. Krishna and Moger [24] developed an improved SuDoKu algorithm that utilizes the backtracking algorithm for reconfiguration ensuring that that the connections remain the same even though the panel locations are physically altered. Anjum et al. [25] developed a hyper SuDoKu based puzzle pattern for reconfiguration and demonstrated performance improvement against the conventional SuDoKu based algorithm with better shadow dispersing effects. Other approaches such as Fixed Electrical [26] and Column Index [27] algorithms perform reconfiguration based on shifting the columns or strings of arrays based on the extent of shading.
Yadav et al. [28] developed hybrid PV topologies with non-symmetrical structures in order to effectively distribute partial shading effects. Examples of such strategies include BL-TCT and SP-TCT. Cheng et al. [29] developed an adaptive reconfiguration approach based on fuzzy logic controllers. The authors of [30] proposed an image processing technique to combine rows of PV panels by comparing different irradiance measurements. In their method, the camera obtains the shadow data falling on PV panels which is then transmitted to a shadow recognition algorithm which controls reconfiguration. The authors of [31] utilized rough set theory which involves obtaining a decision table with rules for topological connections. They demonstrate the effectiveness of their approach for SP topology reconfiguration.
Under dynamic reconfiguration strategies, irradiance equalization [11] is a popular method for connection reconfiguration which ensures that the sum of irradiances falling on every row of the array to be approximately constant, which enforces the array to mitigate power losses. El-Dien et al. [32] optimize TCT arrays by minimizing the irradiance mismatch index (IMI) on an array and report significant improvements in power produced. In [33], dynamic reconfiguration was implemented by dividing the PV system into primary (fixed) and secondary (ad-hoc) arrays both tied together through electrical switches. Under conditions where the panels in the fixed part are shaded, the modules from the secondary array are used for replacement to improve power production. This technique is popularly referred to as adaptive banking, which compensates for the wastage in the power produced. Strategies such as a simple sorting [34] algorithm identify the rows that are severely shaded in the fixed part and incorporates the modules from the secondary array. The authors of [35] propose a dynamic electrical scheme where all the PV modules can be rearranged and reconnected to form a TCT array with unequal number of modules in every row with constraints imposed by the frequency inverters. Storey et al. [36] introduced a Configurations of Interest parameter to avoid the choice of redundant rows in the TCT array while ensuring that every row contains the same number of PV modules. The authors of [10] and [37] propose a reconfiguration algorithm similar to the one proposed in this work. In the paper, the authors first perform panel fault detection [1], [2] to classify the healthy and faulty modules. Reconfiguration is then performed based upon which topology produces the maximum operating power for a given irradiance profile. The optimal topology is chosen after an exhaustive search across different topologies.
While these strategies that aim to improve the power production of arrays by rearranging them have been successful, they face challenges when it comes to scaling up to larger arrays requiring complex computations. However, the emergence of ML, allows this problem to also be viewed from a data-centric perspective. To that end, the authors of [12] propose a partial array reconfiguration strategy using irradiance features and utilize graph clustering to combine different panels and report significant performance gains. The authors [13] utilize a simple ANN based approach that performs topology reconfiguration by directly learning the irradiance features and mapping them to the corresponding topologies. In this paper, we present a dynamic topology reconfiguration strategy using deep neural networks that will ultimately guide the switching operations to reconnect the array into the topologies such as SP, BL, HC, or TCT.

IV. PROPOSED APPROACH
In this section, we describe our methodology for PV topology selection using regularized neural networks. We begin by introducing the synthetic data generation mechanism. We then systematically elucidate the design of the network together with the components (dropout, batchnorm) responsible for regularization.

A. DATA GENERATION
In this work, panel-level irradiances for the 5 × 5 array (Figure 2) are generated using a binary mapping scheme similar to [13] where 0 and 1 are assigned to panels that are unshaded and shaded respectively (Figure 3). As a design choice, the irradiance (irr) associated with either 0 or 1 is independently drawn from one of the following uniform distributions. where α = 586 W /m 2 is the threshold chosen for considering whether a panel is shaded or not [10]. We use the same irradiance realization for the unshaded (0) and shaded (1) panels respectively in the array. As shown in Fig. 3, the set of irradiances assigned to the panels 1, . . . , 25 constitutes an irradiance instance corresponding to a partial shading scenario. In order to determine the validity of the synthetic data in representing actual real-time scenarios, we analyzed the distribution of global horizontal irradiances from the NSRDB [38] database over a specified region for the year 2021. Our analysis showed that the distribution of irradiances was practically uniform for the period under consideration.
We now generate a comprehensive dataset containing 8,000 irradiance instances covering a wide range of partial shading scenarios by sampling these uniform distributions for randomly chosen binary assignments.
In this paper, we pose PV topology reconfiguration as a supervised classification problem. We first construct a dataset where x i ∈ R n denotes the input (irradiance instance) with dimension n = 25 corresponding to the number of panels in the PV array. Here, y i ∈ {1, 2, 3, 4} denotes the label associated with every x i and M denotes the number of instances in the dataset. The label y i is obtained by (i) simulating the 5 × 5 SP, BL, HC, and TCT topologies on Simulink for a given x i at a constant temperature of 25 • C and (ii) determining the topology that produces the maximum power (MPP). Let P i1 = P SP , P i2 = P BL , P i3 = P HC and P i4 = P TCT be the MPPs for the respective topologies for a given x i . Therefore, the estimated best topology label is given by,

B. SIMULATION SETUP
Each panel of the simulated PV array consists of a by-pass diode in parallel. We model wiring losses using resistors placed between each of the wires originating or terminating at the panels. Specifically, we use a resistance of R 1 = 0.01 to model the losses between the panels across adjacent strings and a resistance R 2 = 0.005 for the wires between the panels of a string [39].

C. DESIGN OF THE REGULARIZED NEURAL NETWORK
Neural networks have produced state-of-the-art performance in a variety of applications including PV array fault detection [40], [41], [42]. In this work, we design a six-layered, feed-forward DNN with dropout [14], and batchnorm [15] to perform topology reconfiguration. An overview of our approach is shown in Figure 4. The number of neurons for the layers were chosen to be 64, 64, 128, 256, 64 and 64. The input to the neural network is an n dimensional irradiance instance. Every layer of the neural network performs an affine transformation followed by a non-linear activation (Rectified Linear Unit -ReLU), dropout and batchnorm on the features from the previous layer. The mechanisms of dropout and batchnorm are described as follows.

1) DROPOUT
Dropout [14], [43] is a popular regularization strategy adopted across layers of a DNN to control the problem of overfitting. In particular, the weights of a percentage of neurons (governed by a dropout factor in the interval ∈ [0, 100]) are set to zero during every training iteration. This naturally does not allow the DNN to rely on a particular group of neurons to control feature learning. During inference, the dropout factor is set to zero. In this paper, we use a dropout factor of 20% (after a hyper-parameter search) in layers 2, 3, 4 and 5 respectively.

2) BATCH NORMALIZATION
Batch normalization [15] is a mechanism that standardizes (normalizes) the inputs to a layer l for every batch of data as the training progresses. It effectively tackles internal covariate shifts between every layer and leads to faster convergence. In this paper, we introduce batch norm in layers 2, 3, 4 and 5 respectively. The final categorical labelŷ i is predicted as follows from the output layer consisting of 4 neurons with the softmax activation,ŷ where z i,j represents the j th logit from the output layer for the i th sample and C = 4 represents the number of topologies. For training, we use 90% of the dataset (scaled to have zero mean and unit variance) and use the remaining 10% for evaluation. The DNN is optimized using the categorical cross-entropy loss with the Adam optimizer for 200 epochs with a learning rate of 10 −4 . During inference (Figure 5), the trained model is fed with the unseen irradiance profile to predict the optimal topology which in turn can ideally provide control signals to the switching matrix.

A. BASELINE ALGORITHMS
We compare our proposed approach against the following supervised ML algorithms (i) K-Nearest Neighbours VOLUME 11, 2023 . Dropout and batchnorm regularization is introduced between every layer. The output layer is a softmax activation function which provides the normalized probabilities that will ultimately determine the optimum topology. Broadly, for a given set of panel level irradiances, our algorithm optimally selects one of the four PV topologies that can provide power improvements.
FIGURE 5. During inference, the panel level data is aggregated to form an irradiance profile which forms the input to the deep neural network. The pre-trained neural network operates on the input to predict the topology that maximizes the power output. This prediction can then ultimately provide control signals to the switching mechanism/relay system to perform the reconfiguration.
(KNN) [16] which classifies a test sample based on its similarity to the neighboring data points; (ii) Support Vector Machines (SVM) [16] that utilizes the kernel trick to estimate the maximum margin hyper-plane to separate the different classes of data;(iii) Random Forests (RF) [16] which is an ensemble learning algorithm which trains multiple decision trees in parallel each with different subsets of training data as well as features and (iv) XGBoost [17] which is a gradient boosting algorithm that trains {1, 2, ..i, . . . , M } weak learners (decision trees) sequentially such that the i+1 th learner is trained on a weighted set of training data where the sample weights are determined by the performance of the i th learner. The data samples misclassified by the i th model are provided a larger weight in comparison to the correctly classified examples. Through a simple linear search we determined the hyper-parameters that provide the best performance for each of the algorithms. In particular, we found the number of neighbors to be 5 for KNN, number of estimators (decision trees) and maximum depth of each learner each to be 20 respectively for Random forest. For SVM, we found that the radial basis kernel provides the best test accuracy among other choices of kernels, while for XGBoost we chose the number of estimators and maximum depth for every learner each to be 5 and 10 respectively.

B. PERFORMANCE OF THE NEURAL NETWORK ALGORITHM
We use the confusion matrix (Figure 6), accuracy and macro average F-1 scores (Table 1) to quantify the performance of the proposed algorithm on the held-out test dataset. The confusion matrix provides a measure of class-wise performance. It can be observed that the number of examples   that are correctly classified (main diagonal) outweighs the misclassified examples (off-diagonal) indicating the generalizing capability of our approach in comparison to the baselines. Accuracy is defined as the ratio of the number of correctly predicted observations to the total number of observations while the F-1 score is the harmonic mean of precision and recall [16]. The macro average F-1 score considers both the false negatives and false positives into account and enables a holistic evaluation. Using different train-test splits, we determined the average test accuracy to be ≈81% with an F-1 score of 0.74 which is significantly better when compared to the baselines. Figure 7 provides the convergence curves of the proposed approach. Through the additional regularization introduced for the NN, our approach avoids overfitting and produces generalizable models for PV reconfiguration. Through the use of dropout and batchnorm regularization, our approach combats overfitting and helps produce better generalizable models.
Overall, we observe that the regularized neural network is a suitable algorithm for topology selection.

C. MERIT OF PV TOPOLOGY RECONFIGURATION
In this subsection, we assess the viability of topology reconfiguration for a wide range of partial shading conditions. We determine the number of cases where reconfiguring from one (current) topology to another (switched) topology for that irradiance instance produces a power improvement (P imp ) greater than a specified threshold (γ ). We define power improvement to be P imp = P switched −P current where P switched FIGURE 8. Demonstrative examples that depict power output improvement through PV topology reconfiguration. Through simulation on a variety of shading conditions, we observe an average power improvement of ∼ 11% through reconfiguration. Based on such an observation, our proposed algorithm for topology reconfiguration, which offers low inference times can be directly adopted in cyber-physical systems.
and P current are the pre-computed GMPPs of the switched and current topologies. For quantitative evaluation, we consider SP as the current topology and determine the percentage of cases in the dataset where, P imp > γ when we switch to each of the topology classes (BL, HC, and TCT). Here, we consider an empirical threshold γ = 50W . Table 2 provides the percentage of cases where there are significant power improvements by switching from the standard SP topology to BL, HC and TCT respectively. Moreover, we find that the average power improvement obtained by switching between the topologies to be approximately 11%. Figure 8 provides demonstrative examples with P-V curves where topology reconfiguration can be beneficial to improve power production. These examples illustrate that even under modeled losses, optimizing the topology of the solar array can still lead to significant power improvements. The proposed approach which is scalable can be effectively utilized to perform the reconfiguration.

D. DISCUSSION
Our method adopts a novel strategy that leverages learned patterns of irradiances to guide switching. Our method offers high inference time speeds as evaluating such a DNN with test-time feature vectors is significantly faster [40]. Other existing approaches [3], [25] rely on the use of externally connected unshaded additional panels or sophisticated panel interconnection schemes to perform reconfiguration and mitigate shading. In that context, our approach does not require such additional panels and performs reconfiguration directly on the main PV array while being easily adoptable.

VI. CONCLUSION
In this paper, we proposed a topology reconfiguration algorithm for PV arrays using deep neural networks that are regularized with dropout and batchnorm which provide parameter efficiency, reduced overfitting and faster convergence. The algorithm can optimally select one of four topologies (SP, BL, HC, or TCT) to maximize the power produced under partial shading. Our approach achieved a test accuracy of 81.1% and a macro average F1 score of 0.74 over the test data.
In addition, we analyzed the merit of PV topology reconfiguration by: (a) identifying the percentage of cases that provide significant power improvement and (b) determining the average power improvement of approximately 11% through reconfiguration. We highlight the fact that our modeling and topology optimization were conducted with 5 × 5 arrays that included wiring losses which provided more realistic results on using cyber-physical methods for PV power monitoring and control. DEVARAJAN SRINIVASAN (Member, IEEE) was born in Baroda, India, in 1970. He received the B.Tech. degree from the Regional Engineering College, Calicut, India, in 1992, and the M.S. and Ph.D. degrees from Arizona State University, Tempe, AZ, USA, in 1997 and 2002, respectively. He is currently working as the CTO with POUNDRA, LLC. He oversees all technology engagements of the company encompassing execution to product and services strategy, roadmap definition, system architecture, and design and production. He also drives the research and development efforts at POUNDRA, LLC, besides managing all customer technical engagements. His research interests include dry-band arcing in fiber-optic cables, power systems, HVDC systems and converters, computer-aided geometric design (CAGD), computer graphics, and VLSI design.
ANDREAS SPANIAS (Fellow, IEEE) is currently a Professor with the School of Electrical, Computer, and Energy Engineering, Arizona State University. He is also the Director of the Sensor Signal and Information Processing (SenSIP) Center and the Founder of the SenSIP Industry Consortium (now an NSF I/UCRC Site). He is the author of two textbooks: Audio Processing and Coding (Wiley and DSP) and Company Law, Interactive Wiley E-Text: An Interactive Approach (Second Edition). He contributed more than 350 papers, 11 monographs, 11 full patents, ten provisional patents, and 12 patent pre-disclosures. His research interests include adaptive signal processing, speech processing, and sensor systems. He was elected as a Senior Member of the National Academy of Inventors (NAI). He was a co-recipient of the 2002 IEEE Donald G. Fink Paper Prize Award. He received the 2018 IEEE Phoenix Chapter Award from the IEEE Region 6 Director for Significant Innovations and patents in signal processing for sensor systems. He also received the 2018 IEEE Region 6 Outstanding Educator Award (across 12 states) with citation ''for outstanding research and education contributions in signal processing.'' He served as the General Co-Chair for IEEE ICASSP-99. He served as an Associate Editor for IEEE TRANSACTIONS ON SIGNAL PROCESSING. He also served as the IEEE Signal Processing Vice-President for conferences. He is a Series Editor for the Synthesis Lecture Series on Algorithms and Software in Engineering (Morgan and Claypool). He served as a Distinguished Lecturer for the IEEE Signal Processing Society, in 2004.