Photovoltaic module shadow recognition and power generation optimization method based on deep learning
Through the combination of light sensor array and deep learning model, the shadows of photovoltaic modules are accurately identified and the MPPT strategy is optimized, which solves the problems of shadow recognition response lag and extensive control in the existing technology, and improves the power generation efficiency and reliability of photovoltaic systems.
Patent Information
- Application Number
- CN202510729429.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-08-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing photovoltaic module shadow recognition methods have lagged responses, extensive control, high power loss, and difficult transformation. It is difficult to accurately adapt to rapidly changing shadow conditions, resulting in reduced power generation efficiency of photovoltaic systems and component damage.
The illumination sensor array is used to extract shadow features in combination with improved Sobel operator and local weighted correction factor, and a deep learning model (CNN+GRU-LSTM) is built to predict the maximum power point, and to optimize the MPPT strategy with static voltage correction and dynamic voltage adjustment, adaptively manage the bypass diode.
It realizes high-precision shadow recognition, improves the power generation efficiency and reliability of the photovoltaic system, shortens the MPPT optimization time, and optimizes the overall power generation.
Smart Images

Figure CN120491753A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of photovoltaic power generation, and in particular relates to a photovoltaic module shadow recognition and power generation optimization method based on deep learning. Background Art
[0002] Photovoltaic power generation, as a mainstream form of clean, renewable energy, has received significant attention worldwide. However, in the actual operation of photovoltaic power plants, shading effects often result in partial shading of photovoltaic modules due to factors such as ambient obstruction and cloud cover. This can cause reverse current flow between cells and hot spot effects, severely reducing module efficiency and even causing permanent damage. Furthermore, due to the nonlinear voltage and current characteristics of photovoltaic modules and their string connection structure, the reduction in power generation caused by partial shading often has a "barrel effect," meaning that partial shading of a single module can significantly reduce the power output of the entire string.
[0003] At present, the solutions to the shadow problem of photovoltaic modules can be roughly divided into the following categories: First, by improving the physical structure of the module itself to reduce the impact of shadows, such as adopting advanced packaging processes such as half-cell and shingled packaging. This requires a major transformation of the module manufacturing process and is difficult to implement; second, on the inverter or smart junction box side, the bypass diodes are started and stopped based on the relative size relationship of the current in each branch, but this is only a passive response, the control granularity is coarse, and it is difficult to adapt to the local rapid changes in shadows in time; third, on the software algorithm side, by scanning the IV curves of each substring to find the global maximum power point, but because the IV curves of the modules under shadows show multi-peak characteristics, the scanning search requires a large amount of calculation and the response is not timely enough, and it will also cause a certain amount of power loss.
[0004] Therefore, we need to develop a deep learning-based photovoltaic module shadow recognition and power generation optimization method that can accurately identify the shadow area on the surface of the photovoltaic module and optimize the MPPT and bypass management strategies accordingly, so as to continuously maintain the optimal power generation performance of the photovoltaic system under complex and changeable meteorological conditions. Summary of the Invention
[0005] The purpose of the present invention is to provide a photovoltaic module shadow recognition and power generation optimization method based on deep learning, so as to solve the problems mentioned in the above background technology in the existing photovoltaic module shadow solution, such as delayed response, rough control, high power loss, great difficulty in transformation, and difficulty in accurately adapting to rapidly changing shadows.
[0006] To achieve the above objectives, the present invention provides a photovoltaic module shadow recognition and power generation optimization method based on deep learning, the method is as follows:
[0007] Step S101: Collect the light intensity data and temperature data on the surface of the photovoltaic module, and perform data preprocessing to obtain the light intensity matrix of the photovoltaic module at time t , temperature matrix ;
[0008] Step S102: Based on the light intensity matrix and temperature matrix , extract shadow feature parameters, including: illumination intensity matrix Perform shadow edge detection to obtain the gradient matrix of the shadow edge , introduce a local weighted correction factor for each element in the gradient matrix G[t] Correction is performed to obtain the corrected gradient matrix , by using the threshold segmentation method from Extract the significant shadow area;
[0009] Setting a global threshold ,when When At the edge of the shadow, ,otherwise ,in, As the shadow determination result;
[0010] The shadow determination results of all elements in the gradient matrix will be corrected Organized into shadow determination matrix , count the proportion of elements with a value of 1 to the total number of elements, and obtain the shadow area ratio of the photovoltaic module at time t: , the shadow feature parameters include the shadow determination matrix and shadow area ratio ;
[0011] Step S103: The illumination intensity matrix , the temperature matrix , the shadow determination matrix , the shadow area ratio And the electrical parameters of photovoltaic modules short-circuit current , open circuit voltage forming a photovoltaic feature dataset in time series, and training a deep learning model based on the photovoltaic feature dataset;
[0012] Step S104: Based on the light intensity matrix , average temperature , shadow area ratio , shadow determination matrix , and the theoretical maximum output power predicted by the deep learning model , actual output power , the power generation efficiency of the photovoltaic array is optimized and controlled through MPPT.
[0013] Based on the above scheme, the illumination intensity matrix Perform shadow edge detection, specifically:
[0014] An improved Sobel operator is used as the shadow edge detection algorithm to Find the gradient and get the gradient matrix of the shadow edge , suppose the improved Sobel operator template and They are: , , The matrix elements of Through templates and and the matrix The convolution operation of is obtained: ,in:
[0015]
[0016]
[0017] In the formula represents a two-dimensional convolution operation, Represents the light intensity matrix The element in row a and column b; in the gradient matrix At the boundary, the convolution result is processed by border filling.
[0018] Based on the above scheme, the local weighted correction factor Obtain it through the following methods:
[0019] Light intensity matrix First Rank Column Elements Take the center Neighborhood window, set the neighborhood window size is an odd number, and the elements in the neighborhood window constitute a set , then the set mean for: , defines the local discreteness of the neighborhood window for:
[0020]
[0021] Setting the local dispersion threshold ,and ,when When Located in the significant transition area between shadow and non-shadow, the corresponding local weighted correction factor Take it as: On the contrary, if , then let , that is, the element The weights of the non-shaded edge areas are reduced. is an empirical parameter.
[0022] Based on the above solution, the construction of the deep learning model includes:
[0023] A three-layer convolutional neural network (CNN) is used to extract the input light intensity matrix. and shadow determination matrix The shadow space distribution characteristics are obtained by combining the pooling results of the three convolutional layers with the normalized first photovoltaic feature vector Splicing in the channel dimension, the splicing result is recorded as the second photovoltaic eigenvector , where the first photovoltaic eigenvector From the temperature matrix , shadow area ratio , electrical parameters and Spliced together;
[0024] Will The data is input to the time series association modeling module, which uses the long short-term memory network (LSTM) improved by the gated recurrent unit (GRU) to model the association characteristics of the time series data.
[0025] The temporal association modeling module stacks two layers of GRU-LSTM units, and an attention layer is connected after the second GRU-LSTM unit. The temperature matrix is calculated using an adaptive weighting strategy. , shadow determination matrix Attention allocation coefficient 、 , the hidden state of each time step Perform weighted fusion to obtain the feature f focusing on key influencing factors;
[0026] The feature f is passed to the multi-task prediction output module, which sets three fully connected layers to predict the theoretical maximum output power of the photovoltaic array at time t. , actual output power and overall efficiency .
[0027] Based on the above scheme, 、 、 and Organized by time series, the training set of the deep learning model is constructed, expressed as , where N is the total number of samples, Respectively 、 as well as Photovoltaic characteristic dataset organized in time series, =[ , , ] is the theoretical maximum output power of the photovoltaic array at time t obtained by actual measurement or prediction , actual output power and overall efficiency ;
[0028] After the model training is completed, in actual deployment or online prediction, at the new time t+1, the photovoltaic characteristic data set at time t in the same form as the training set, the monitoring or prediction , , Input the trained deep learning model and output the predicted time t+1 、 and .
[0029] Based on the above scheme, the optimization through MPPT is divided into two parts: static voltage correction and dynamic voltage adjustment, where the static voltage correction is the theoretical global maximum power point voltage estimate output by the deep learning model. Based on this, the temperature correction term is introduced and shadow correction items , get the corrected maximum power point voltage instruction ; wherein said is the maximum power point voltage of the photovoltaic array at time t+1 The predicted or estimated value of It is used to compensate for the deviation of the volt-ampere characteristic curve of the photovoltaic module when the temperature deviates from the standard condition of 25°C.
[0030] Based on the above scheme, the temperature correction term The calculation formula is as follows:
[0031]
[0032] in, is the temperature coefficient of the photovoltaic module, which reflects the rate of change of the open circuit voltage with temperature; for The open-circuit voltage of the photovoltaic module measured at the moment, if ,but ,make Adjusted downward accordingly.
[0033] Based on the above solution, the shadow correction term Based on the shadow area ratio and the conduction state of the bypass diode. When <5%, the shadow The influence of can be ignored, and we can directly take ;when ≥5% and lasts longer than After a sampling period, it is determined that the shadow scale has become significant and it is necessary to consider whether to put the bypass diode into use.
[0034] Based on the above solution, whether to put the bypass diode into use is determined as follows:
[0035] Assume that the photovoltaic array consists of It is composed of a series of sub-arrays, each sub-array is connected in parallel with a bypass diode, and its conduction function is:
[0036]
[0037] in Indicates the The bypass diodes of each sub-array are Always on; and is the subarray index, and its value range is ; is the total number of series-connected sub-arrays in the PV array; Indicates the maximum power point voltage command; The theoretical maximum output power of the subarray at time t+1 predicted by the deep learning model; is the power loss threshold;
[0038] make ,express The conduction state of the bypass diode is based on Calculate the array equivalent open circuit voltage taking into account the bypass effect , the calculation formula is as follows:
[0039]
[0040] in, It reflects the virtual open-circuit voltage of the array after the parallel bypass diode is turned on.
[0041] Based on the above scheme, the shadow correction term for:
[0042]
[0043] in is the proportional coefficient; the maximum power point voltage instruction after static correction is as follows, as the static correction result: .
[0044] The present invention has the following advantages and effects compared to the prior art:
[0045] By using a light sensor array, an improved Sobel operator, and a local weighted correction factor, shadow features are directly extracted from the light matrix and temperature matrix, achieving a shadow recognition accuracy of over 97%. A deep learning model (CNN+GRU-LSTM) is combined to predict the maximum power point, avoiding local optimality and improving optimization efficiency. The deep learning model predicts substring power and adaptively optimizes the start and stop of bypass diodes to increase overall power generation. A combination of static correction and dynamic adjustment is used to shorten the MPPT optimization time to 10-25 seconds. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly describes the drawings required for the specific embodiments or the description of the prior art. Similar elements or parts are generally identified by similar reference numerals throughout the drawings. Elements or parts in the drawings are not necessarily drawn to scale.
[0047] Figure 1 This is a flowchart of a photovoltaic module shadow recognition and power generation optimization method based on deep learning provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0048] In order to more clearly illustrate the purpose, technical solutions and advantages of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. The example implementation methods can be implemented in various forms and should not be understood as being limited to the examples described herein. On the contrary, these implementation methods are provided to make the present invention more comprehensive and complete, and to fully convey the concepts of the example implementation methods to those skilled in the art.
[0049] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present invention. However, it will be appreciated by those skilled in the art that the technical solutions of the present invention can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring various aspects of the present invention.
[0050] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0051] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.
[0052] The present invention will be described in detail below with reference to specific embodiments:
[0053] Example 1
[0054] As attached Figure 1 As shown, embodiment 1 of the present invention provides a photovoltaic module shadow recognition and power generation optimization method based on deep learning, including steps S101 to S104, which are specifically as follows:
[0055] Step S101: Collect the light intensity data and temperature data of the photovoltaic module surface, and perform data preprocessing to obtain the light intensity matrix and temperature matrix ;
[0056] Specifically, several light intensity sensors are arranged on the surface of the photovoltaic module to form a two-dimensional array to collect local light intensity data in real time; at the same time, temperature sensors are arranged on the back of the photovoltaic module or other suitable locations to collect temperature data of the photovoltaic module.
[0057] For example, M×N light intensity sensors are arranged on the front of the photovoltaic module, where M and N are the number of rows and columns of the sensor array respectively. The light intensity sensor uses a photoresistor or silicon photocell, etc., with a range covering 1200W / m², a measurement accuracy better than ±3%, and is connected to the data acquisition unit via the RS485 bus. The sensors are arranged as evenly as possible, and the spacing between rows and columns is determined according to the size of the photovoltaic module. Each cell is covered with at least one sensor. The sensor sampling period is 110 seconds. At the same time, 14 temperature sensors are arranged on the back of the photovoltaic module, using Pt100 platinum resistance, a temperature measurement range of -25 to 85°C, an accuracy of ±0.5°C, and sharing the RS485 bus with the light intensity sensor, and the light intensity data and temperature data are collected in sync. Suppose the light intensity data collected by the light intensity sensor array at time t is a two-dimensional matrix ,in Indicates that it is located at Rank The light intensity values collected by the light intensity sensor at time t are used as the light data matrix , Individual sensors may fail, resulting in missing values in the data matrix. The missing values can be repaired through methods such as mean interpolation and median filtering to obtain a complete illumination data matrix.
[0058] Preferably, the original temperature data collected by the temperature sensor is assumed to be a vector ,in is the number of temperature sensors. , then calculate the arithmetic mean of the measured values of each temperature sensor, and get the average temperature of the photovoltaic module at time t:
[0059]
[0060] Preferably, the output end of the photovoltaic module is connected to an electrical parameter acquisition unit, which completes the acquisition and processing of electrical parameters including current and voltage signals, and the electrical parameter acquisition unit includes an inverter;
[0061] Specifically, the output current of the photovoltaic module and output voltage Perform real-time sampling, with a sampling frequency of preferably 1kHz and a quantization accuracy of no less than 16bit, to obtain the IV characteristic curve of the photovoltaic module, which is usually composed of 256 discrete sampling points; the algorithm unit extracts key characteristic parameters from the collected IV curve, including: short-circuit current ; Open circuit voltage ; Maximum power point current and voltage Fill factor :Maximum power( and The ratio of the input voltage to the output current characterizes the "squareness" of the IV curve. When multiple PV panels are connected in series or parallel, the voltage, total output current, and branch current of each string can be measured separately. The inverter sampling period can be set between 1 and 5 minutes. During each sampling period, the voltage and current on the inverter input side are measured using a multimeter, and the inverter AC output power is read through the communication interface. The error should not exceed 0.1% of the rated value.
[0062] Furthermore, data preprocessing involves aligning the time sequence of the collected data, unifying the timestamps, and constructing a topology tree based on the physical connection between the PV panels, combiner boxes, and inverters. It should be noted that the combiner box is a hardware device that combines the outputs of individual PV panel substrings. Data is organized and managed according to the "PV panel → combiner box → inverter" hierarchy.
[0063] Specifically, the illumination data matrix I[t] is subjected to outlier detection and correction, and amplitude normalization is performed to map all values to the interval [0, 1] to obtain the illumination intensity matrix: ,in 、 The historical maximum and minimum light intensity measurements;
[0064] For the temperature data, zero-mean normalization is performed to obtain the temperature matrix: ,in are the mean and standard deviation of historical temperature data respectively.
[0065] Step S102: Based on the light intensity matrix obtained in step S101 and temperature matrix , extract shadow feature parameters, including:
[0066] Step S1021: Light intensity matrix Perform shadow edge detection;
[0067] Specifically, an improved Sobel operator is used as the shadow edge detection algorithm to Find the gradient and get the gradient matrix of the shadow edge , suppose the improved Sobel operator template and They are: , , The matrix elements of Templates available and and the matrix The convolution operation of is obtained: ,in:
[0068]
[0069]
[0070] In the formula represents a two-dimensional convolution operation, Representation matrix The element at row a and column b;
[0071] In the gradient matrix At the boundary, the convolution result is processed by border filling. Considering the discrete characteristics of the image, the size of the convolution template is selected as 3×3.
[0072] Step S1022: Introduce a local weighted correction factor for each element in the gradient matrix G[t] Make corrections as follows: ,in is the corrected gradient amplitude;
[0073] Preferably, the local weighted correction factor The calculation steps are as follows:
[0074] Light intensity matrix First Rank Column Elements Take the center Neighborhood window, set the neighborhood window size is an odd number, and the elements in the neighborhood window constitute a set , then the set mean for:
[0075]
[0076] Furthermore, the local discreteness of the neighborhood window is defined as for:
[0077]
[0078] Local dispersion Characterized by the light intensity matrix Inner elements As the center, It is the fluctuation degree of light intensity distribution in the neighborhood of the neighborhood window. The larger it is, the clearer the boundary between shadow and non-shadow in the neighborhood window is, and it is a potential shadow edge area.
[0079] Furthermore, the local discreteness threshold is set ,and ,when When Located in the significant transition area between shadow and non-shadow, the corresponding local weighted correction factor Take it as: On the contrary, if , then let , that is, the element The weights of the non-shaded edge areas are reduced. are empirical parameters, and in this embodiment, they are taken as 0.3 and 0.05 respectively. The value of needs to be debugged according to actual data and application scenarios. In this embodiment, it is set to 0.15~0.35.
[0080] Step S1023: The above locally weighted correction factor The corrected gradient matrix is recorded as the corrected gradient matrix , by using the threshold segmentation method from Extract the significant shadow area. Set the global threshold ,when When At the edge of the shadow, ,otherwise ,in, As the shadow determination result. In this embodiment, the global threshold Defined as k times the standard deviation of the overall mean:
[0081]
[0082] In the formula It represents the variance, and the coefficient k can be 1.5~3.
[0083] Furthermore, the shadow determination results of all elements in the gradient matrix are corrected Organized into shadow determination matrix , count the proportion of elements with a value of 1 to the total number of elements, and get the shadow area ratio of the photovoltaic module at time t:
[0084]
[0085] In summary, step S102 can further extract shadow feature parameters reflecting shadow area ratio and shadow distribution. and These parameters will be input into the subsequent deep learning model together with other monitoring quantities such as temperature to provide a decision basis for accurately evaluating the impact of shadows on photovoltaic power generation efficiency, and then guide the optimization of MPPT and bypass control. Represented by the temperature matrix , shadow area ratio , electrical parameters and The first photovoltaic eigenvector formed by splicing.
[0086] Step S103: The electrical parameters short-circuit current obtained in step S101 and step S102 are converted to , open circuit voltage , light intensity matrix , temperature matrix , shadow determination matrix And the shadow area ratio Organize a photovoltaic feature dataset in time series, train a deep learning model based on the photovoltaic feature dataset, and use the deep learning model to predict the theoretical maximum output power of the photovoltaic module at the next time t+1. , actual output power ;
[0087] Preferably, a deep learning model is constructed based on the photovoltaic feature dataset, including feature extraction, time series modeling and other processes, specifically:
[0088] A three-layer convolutional neural network (CNN) is used to extract the input light intensity matrix. and shadow determination matrix The shadow space distribution characteristics of A convolution kernel of size 5×5, a stride of 1, a padding of SAME, and a ReLU activation function can be expressed as:
[0089]
[0090] in , is and The input tensor concatenated along the channel dimension, are the convolution kernel parameters and bias parameters respectively; the structures of the second and third convolution layers are similar to the first layer, using 、 3×3 convolution kernels, where 、 、 The values can be 16, 32, or 64 respectively;
[0091] Furthermore, the outputs of the three convolutional layers are subjected to the maximum pooling operation, with a pooling kernel size of 2×2 and a step size of 2, which can reduce the size of the feature map while retaining the significant features; the pooling results of the three convolutional layers, that is, the illumination intensity matrix and shadow determination matrix The shadow spatial distribution characteristics and the normalized first photovoltaic eigenvector Splicing in the channel dimension, the splicing result is recorded as the second photovoltaic eigenvector :
[0092]
[0093] in is the time step, Represents the splicing operation in the channel dimension; it should be noted that, It not only includes the spatial distribution characteristics of light and shadow of the photovoltaic array, but also contains information such as the temperature and electrical performance of the photovoltaic modules; the photovoltaic array is a power generation unit composed of several photovoltaic modules connected in series and parallel.
[0094] Furthermore, considering that the power generation efficiency and power output of the photovoltaic power generation system have a certain dependence on the historical state, The data is input to the time series association modeling module, through which a long short-term memory (LSTM) network based on the gated recurrent unit (GRU) is used to model the association characteristics of the time series data; this module can capture the dynamic characteristics of the photovoltaic system over time.
[0095] Specifically, the update equations of the input gate, forget gate, and output gate of the LSTM unit are:
[0096]
[0097]
[0098]
[0099]
[0100]
[0101] in is the S-type activation function, is the hyperbolic tangent function, for The cell state at any moment, is the hidden state at time t; They are input gate, forget gate and output gate respectively; Represents candidate memory, the "proposal" of new information at the current moment obtained by the tanh function; is the weight matrix of the gate unit, 、 、 is the bias vector; Represents element-wise multiplication.
[0102] Specifically, the improved GRU-LSTM unit omits the cell state. In the improved structure of the present invention, referring to the idea of GRU, the cell state of the traditional LSTM is omitted. Merge with hidden state into one state , and introduce the update gate and reset gate , thus eliminating the need for explicit cell states. Introducing the update gate and reset gate Controlling hidden states The update is as follows:
[0103]
[0104]
[0105]
[0106]
[0107] in, , , are the weight matrices of the update gate, reset gate, and candidate hidden state, respectively. For candidate hidden states, through the activation function get; , They are the gating coefficients of the update gate and the reset gate respectively.
[0108] For example, the temporal association modeling module stacks two layers of GRU-LSTM units, and the hidden state dimension of each layer is set to , which can be 128 or 256. To further enhance the influence of key factors such as shadow area and temperature, an attention layer is added after the second GRU-LSTM unit, and the temperature matrix is calculated using an adaptive weighting strategy similar to that used in step S101 when assigning weights to variables. , shadow determination matrix Attention allocation coefficient of equal variables 、 , the hidden state of each time step Perform weighted fusion to obtain the feature f of the key influencing factors, which is expressed as follows:
[0109]
[0110]
[0111]
[0112]
[0113] in, Represents the hidden state And the score vector obtained after linear transformation and activation of key features is used to calculate the attention weight; represents the final attention weight vector; Indicates that the scoring vector is at index The weight of the place; are the values of the key factors of the temperature and shadow coverage of the photovoltaic module at time t, respectively, and the corresponding attention coefficients can be assigned through the attention layer; Represents the hidden state at time s; and is the parameter matrix and bias vector of the attention layer, is element-wise multiplication.
[0114] Furthermore, the feature f is passed to the multi-task prediction output module, which sets three fully connected layers to predict the theoretical maximum output power of the photovoltaic array at time t. , actual output power and overall efficiency .by As an example, the calculation formula is:
[0115]
[0116]
[0117]
[0118] in 、 and is the weight matrix of the fully connected layer, 、 and is the bias vector. The number of neurons in each layer can be 128, 64, and 1 respectively. and The prediction method of is similar to that of , sharing the first two fully connected layers, and the number of neurons in the last layer is also 1.
[0119] Furthermore, the above information is organized into time series to construct a training set, which is expressed as , where N is the total number of samples, The corresponding light intensity matrix is obtained in step S101 and step S102. , shadow determination matrix , temperature matrix And the shadow area ratio Photovoltaic characteristic dataset organized in time series, =[ , , ] is the theoretical maximum output power of the photovoltaic array at time t obtained by actual measurement or prediction , actual output power and overall efficiency ;
[0120] It should be noted that the deep learning model is trained by the training set so that the deep learning model can predict the newly input feature data. , , Input the trained model to obtain the corresponding predicted value at the future time t+1 、 and , used for subsequent MPPT collaborative optimization.
[0121] Specifically, the loss function of the entire deep learning model is defined as the mean square error (MSE) between the predicted value and the true value:
[0122]
[0123] in Represents all parameters to be optimized in the deep learning model, including the weight matrix and bias vector of each layer. During the model training phase, the stochastic gradient descent (SGD) method or its variant Adam optimization algorithm is used to minimize the loss function . Assume the total number of training rounds is , each round is divided into batches, and the number of samples in each batch is . In the epoch The loss of a batch is , then the update formula of parameter θ is: ,in is the learning rate, which can be selected between 0.01 and 0.001; The learning rate is the gradient operator of the loss function with respect to the parameters. After each epoch, the model performance is evaluated on the validation set. If the model performance does not improve after five consecutive epochs, the learning rate is reduced. Training terminates when the validation set performance stabilizes or the preset number of epochs is reached.
[0124] After the model training is completed, in actual deployment or online prediction, at each new time t+1, the photovoltaic characteristic data set at time t in the same form as the training set, the monitoring or prediction data set will be , , Input the trained deep learning model and output 、 and .
[0125] Step S104: Based on the light intensity matrix of the photovoltaic components obtained in step S101 , average temperature , the shadow area ratio obtained in step S102 , shadow determination matrix , and the theoretical maximum output power of the array predicted by the deep learning model in step S103 , actual output power The power generation efficiency of the photovoltaic array is optimized and controlled through MPPT, and the optimization through MPPT is divided into two parts: static voltage correction and dynamic voltage adjustment, as follows:
[0126] Step S1041, the static voltage correction is the theoretical global maximum power point voltage estimate output by the deep learning model Based on this, the temperature correction term is introduced and shadow correction items , get the corrected maximum power point voltage instruction ; wherein said is the maximum power point voltage of the photovoltaic array at time t+1 The predicted or estimated value of It is used to compensate for the deviation of the volt-ampere characteristic curve of the photovoltaic module when the temperature deviates from the standard condition of 25°C. The calculation formula is as follows:
[0127]
[0128] in, is the temperature coefficient of the photovoltaic module, which reflects the rate of change of the open circuit voltage with temperature and can be between -0.3% / °C and -0.4% / °C; for The open-circuit voltage of the photovoltaic module measured at the moment, if ,but ,make Adjust downward accordingly; vice versa.
[0129] Furthermore, unlike temperature correction, shadow correction The shadow area ratio needs to be considered at the same time and the conduction state of the bypass diode. When <5%, the shadow The influence of can be ignored, and we can directly take ;when ≥5% and lasts longer than When the shadow scale is determined to be significant during the sampling period, it is necessary to further consider whether to put in bypass diodes. In this embodiment, The value is between 5 and 10.
[0130] Preferably, whether to put the bypass diode into use is specifically determined as follows:
[0131] Assume that the photovoltaic array consists of It is composed of a series of sub-arrays, each sub-array is connected in parallel with a bypass diode, and its conduction function is:
[0132]
[0133] in Indicates the The bypass diodes of each sub-array are Always on; and is the subarray index, and its value range is ; is the total number of series-connected sub-arrays in the PV array; Indicates the maximum power point voltage command; The theoretical maximum output power of the subarray at time t+1 predicted by the deep learning model; is the power loss threshold, usually ranging from 0.7 to 0.9. The above formula shows that when the theoretical maximum power of a sub-array is significantly lower than that of other sub-arrays, it usually means that the sub-array is blocked by a large area of shadow, and its bypass diode will be turned on, thereby short-circuiting the sub-array in the circuit and preventing it from seriously limiting the power generation efficiency of the entire photovoltaic array. express The conduction state of the bypass diode is based on Calculates the array equivalent open circuit voltage taking into account the bypass effect :
[0134]
[0135] in, Reflects the virtual open-circuit voltage of the array after the parallel bypass diode is turned on; from this, the shadow correction term for:
[0136]
[0137] in is the proportional coefficient, which can be taken as an empirical value between 0.5 and 0.8. The value and shadow area ratio And the open circuit voltage drop caused by bypass conduction Basically proportional. When the bypass begins to conduct a lot, ,make Towards Direction adjustment guides the photovoltaic array to operate near the virtual open-circuit voltage under shadow conditions to improve power generation efficiency. The maximum power point voltage instruction after static correction is obtained as the following formula, which is the static correction result:
[0138]
[0139] It should be noted that and For example, the temperature of the components in the shadow area is usually lower than that in the non-shadow area. If the arithmetic mean of the temperature of each component is used, a certain degree of repeated correction will occur. To calculate ,and It mainly depicts the voltage drop caused by shadow, avoids the coupling effect, and achieves a good balance between correction accuracy and implementation complexity.
[0140] Step S1042, obtain the statically corrected Then, it is substituted into the photovoltaic array control loop. After a certain dynamic response, the actual output voltage of the array is will gradually converge to nearby.
[0141] To further improve control accuracy and suppress disturbances introduced by measurement noise, modeling errors, etc., this embodiment also introduces a dynamic voltage adjustment mechanism. Based on the dynamic voltage adjustment mechanism, the static correction result is adaptively fine-tuned, specifically including the following:
[0142] Preferably, and are voltage error and current error respectively, then:
[0143]
[0144]
[0145] in and for The output voltage and output current of the photovoltaic array are measured at the moment, and The global maximum power point current at time t+1 predicted by the deep learning model.
[0146] Specifically, the introduction and The purpose of is to evaluate the effect of static correction: and If the values are all less than the preset threshold, such as 1% of the rated value, it is considered that the static correction has basically achieved the expected goal and no further adjustment is required; otherwise, it is necessary to adjust Perform dynamic fine-tuning, and the adjustment law is:
[0147]
[0148] in and is the proportional coefficient of the voltage regulator and the current regulator, which can be between 0.1 and 0.5 and 0.05 and 0.2 respectively. or When the controller will further improve ,drive Towards Return; vice versa.
[0149] It should be noted that the introduction The consideration is that under shadow conditions, the maximum power point current may deviate greatly from the voltage value. It is difficult to ensure that the system is stable at the global optimal point by relying solely on voltage feedback, so current feedback is needed.
[0150] Furthermore, the dynamically adjusted adjustment law Substitute into the control loop to guide the photovoltaic array to At the same time, and Deviations are fed back to the deep learning model to support online incremental learning, continuously improving the prediction accuracy of the static correction term. This dual-loop optimization control strategy of "static correction + dynamic adjustment" enables adaptive dynamic optimization of MPPT performance under variable shading conditions, maximizing the power generation efficiency of the PV array.
[0151] This embodiment encompasses five main steps: data acquisition, shadow detection, feature extraction, deep learning modeling, and MPPT optimization control. First, an array of light intensity sensors is deployed on the surface of the PV module, and a temperature sensor is installed on the back to obtain light intensity and temperature data. Subsequently, a modified Sobel operator is used to extract shadow edge information and enhance shadow features using a local weighted correction factor. This method further calculates the shadow area ratio and, combined with the electrical parameters of the PV module, constructs a time-series PV feature dataset. The deep learning model uses a CNN (convolutional neural network) to extract spatial features and a GRU-LSTM (gated recurrent unit-long short-term memory) network for time-series data modeling. The model outputs include the theoretical maximum power, actual output power, and overall efficiency predictions for the PV array. Based on these predictions, the MPPT optimization control strategy optimizes the maximum power point voltage of the PV module through a combination of static voltage correction and dynamic voltage adjustment. The static correction is based on the deep learning model's predictions, combined with temperature and shadow correction terms, while the dynamic adjustment relies on voltage and current error feedback to achieve precise tracking.
[0152] It should be pointed out that during the project implementation, the threshold selection and coefficient setting involved in each optimization strategy still need to be adjusted according to the actual construction conditions and operation requirements of the photovoltaic power station, and necessary simulation analysis and field tests should be carried out in order to obtain satisfactory control effects. In addition, although the embodiment focuses on solving the problem of local shadows, its ideas and methods are also of great inspiration for other refined control requirements of photovoltaic arrays, such as component aging detection and balancing, hot spot defect diagnosis, etc. Subsequent research can further expand the scope of intelligent operation and maintenance based on this embodiment, and provide more powerful technical support for safe and efficient photovoltaic power generation.
[0153] Example 2
[0154] Based on the method described in Example 1, the practical effects of this method were tested. The experimental site was selected as a corner of a distributed photovoltaic power station. A test system with a capacity of approximately 10 kW was installed. The components used were conventional monocrystalline silicon photovoltaic modules (nominal power of approximately 300 W per module), totaling 30 modules, divided into three parallel series, with 10 modules in each series. A light intensity sensor array was evenly arranged on the front surfaces of the three photovoltaic modules. Each module had 4 × 6 = 24 light sensors (photoresistors or silicon photocells) arranged on the surface, with the array rows and columns spaced appropriately based on the module size. Two temperature sensors (Pt100 platinum resistors) were placed on the back of each module, for a total of six temperature sampling points.
[0155] Specifically, the data acquisition unit can simultaneously record the light intensity matrix, module temperature, single-string voltage / current, inverter input / output voltage, current, and power, with a sampling period of 5 seconds. It communicates with the host computer via the RS485 bus. The method proposed in Example 1 is implemented on the inverter side and includes: a shadow recognition module (based on an improved Sobel and locally weighted modified edge detection algorithm); a deep learning model (CNN + GRU-LSTM hybrid network) for predicting the theoretical maximum output power, actual output power, and overall efficiency of photovoltaic modules; and an MPPT collaborative control module (static voltage correction + dynamic voltage adjustment + bypass diode management).
[0156] Furthermore, control experiments were conducted. Control method 1: conventional P&O disturbance observation MPPT: without shadow detection, based only on the instantaneous values of voltage and current, the maximum power point is searched by periodically increasing / decreasing the voltage reference; control method 2: improved global scanning MPPT: the global maximum power point is found by multi-point scanning of the IV curve of the component (or substring), with slight consideration of the start and stop of the parallel bypass diode.
[0157] Specifically, this experiment mainly sets up the following test scenes for common partial occlusion / shadow situations:
[0158] Scenario A: The module is blocked by the shadow of a building or power pole, with an obstruction ratio of about 10%;
[0159] Scenario B: The component is partially obscured by leaves and dust, with an obstruction ratio of approximately 30%;
[0160] Scenario C: Large-scale occlusion (simulating adjacent arrays or large-area foreign objects), with an occlusion ratio of approximately 50%;
[0161] Scenario D: Dynamic shadows (artificially simulated rapid cloud movement, with the occlusion range frequently changing between 10% and 50%).
[0162] It should be noted that continuous sampling tests were conducted for 3 to 5 days in each scenario, with multiple rounds repeated at different time periods (morning, noon, and afternoon) to eliminate the randomness of environmental changes.
[0163] Please refer to Table 1 below, which provides a selection of actual data collection and calculation results for Scenario B (approximately 30% occlusion), along with a brief description of the shadow recognition accuracy and power generation efficiency of the method described in this disclosure. For ease of illustration, key data from one PV panel equipped with a sensor array was selected between 9:00 AM and 3:00 PM on a specific day. The table summarizes the data collected every 30 minutes.
[0164]
[0165] Table 1
[0166] As shown in the table above, the recognition accuracy of the method described in Example 1 at this shading ratio averages approximately 97% to 98%, demonstrating that the shadow detection method based on the improved Sobel operator, local weighted correction, and deep learning fusion can stably and accurately track changes in shadow areas. Even with approximately 30% shading, individual PV panels can still maintain a good output power, with MPPT tracking efficiency generally exceeding 98% (compared to the theoretical value predicted by the model). When applied to the entire string / array, power generation losses can be further reduced.
[0167] It should be noted that the sampling period in Example 1 is set to 110 seconds, which is mainly used to construct a historical sample data set and train the photovoltaic module state recognition and power generation performance prediction model. Compared with the high-speed response required for real-time control, the model training stage pays more attention to the feature stability and trend fitting ability under long time scales, so the sampling interval can be appropriately extended to reduce the number of redundant samples and storage pressure, thereby improving training efficiency. In addition, the data sequence collected under a longer period can better highlight the boundary characteristics of occlusion changes, enhance the model's perception of shadow edges, and contribute to the subsequent accurate judgment and area extraction of shadow areas. In contrast, Example 2 adopts a 5-second sampling period for real-time power generation optimization control scenarios, which can achieve rapid perception and closed-loop adjustment of illumination changes and system responses, verifying the adaptability and flexibility advantages of the present invention in the dual stages of historical modeling and real-time control.
[0168] Please refer to Table 2 below. To systematically evaluate the superiority of the method in Example 1 of the present invention, long-term tests were conducted for scenarios A through D, comparing it to control method 1 (traditional P&O) and control method 2 (improved global scanning). Total power generation and key performance indicators were measured over a three-day period (one day each of sunny, partly cloudy, and light rain). The comparative experimental results in the table show that neither traditional P&O nor improved global scanning specifically detects shadow distribution, and therefore lack comparable accuracy. The present invention, leveraging a sensor array deployed on the module surface and a deep learning model, maintains a shadow recognition accuracy exceeding 95% in all scenarios.
[0169]
[0170] Table 2
[0171] As shown in the table above, under 10% to 50% occlusion conditions, the traditional P&O method has a relatively short average optimization time of approximately 20 to 40 seconds, but its accuracy is moderate and may experience local extremes or fluctuations. To avoid local extremes, the improved global scan method requires more scanning points and judgments, and can take tens of seconds to several minutes. The "static correction + dynamic adjustment" dual-loop control mechanism of the proposed method can achieve approximation within 10 to 25 seconds, ensuring high real-time performance and stability.
[0172] Experimental results demonstrate that this method achieves over 97% shadow recognition accuracy. Compared to traditional P&O (perturbation and observation) and improved global scanning MPPT methods, it improves overall power generation efficiency by over 10% under 10% to 50% shading conditions, while reducing MPPT optimization time to 10 to 25 seconds. This method effectively adapts to complex shadow conditions, improving the stability and profitability of photovoltaic power generation systems. Compared to existing technologies, this solution offers advantages such as high shadow recognition accuracy, strong real-time control, and robust adaptability.
[0173] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present invention are indicated by the claims. It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and that various modifications and changes can be made without departing from its scope. The scope of the present invention is limited only by the appended claims.
Claims
1. A photovoltaic module shadow recognition and power generation optimization method based on deep learning, characterized in that: include: Step S101: Collect the light intensity data and temperature data on the surface of the photovoltaic module, and perform data preprocessing to obtain the light intensity matrix of the photovoltaic module at time t , temperature matrix ; Step S102: Based on the light intensity matrix and temperature matrix , extract shadow feature parameters, including: illumination intensity matrix Perform shadow edge detection to obtain the gradient matrix of the shadow edge , introduce a local weighted correction factor for each element in the gradient matrix G[t] Correction is performed to obtain the corrected gradient matrix , by using the threshold segmentation method from Extract the significant shadow area; Setting a global threshold ,when When At the edge of the shadow, ,otherwise ,in, As the shadow determination result; The shadow determination results of all elements in the gradient matrix will be corrected Organized into shadow determination matrix , count the proportion of elements with a value of 1 to the total number of elements, and obtain the shadow area ratio of the photovoltaic module at time t: , the shadow feature parameters include the shadow determination matrix and shadow area ratio ; Step S103: The illumination intensity matrix , the temperature matrix , the shadow determination matrix , the shadow area ratio And the electrical parameters of photovoltaic modules short-circuit current , open circuit voltage forming a photovoltaic feature dataset in time series, and training a deep learning model based on the photovoltaic feature dataset; Step S104: Based on the light intensity matrix , average temperature , shadow area ratio , shadow determination matrix , and the theoretical maximum output power predicted by the deep learning model , actual output power , the power generation efficiency of the photovoltaic array is optimized and controlled through MPPT.
2. The photovoltaic module shadow recognition and power generation optimization method based on deep learning according to claim 1 is characterized in that: The light intensity matrix Perform shadow edge detection, specifically: An improved Sobel operator is used as the shadow edge detection algorithm to Find the gradient and get the gradient matrix of the shadow edge , suppose the improved Sobel operator template and They are: , , The matrix elements of Through templates and and the matrix The convolution operation of is obtained: ,in: , , where represents a two-dimensional convolution operation, Represents the light intensity matrix The element in row a and column b; in the gradient matrix At the boundary, the convolution result is processed by border filling.
3. The photovoltaic module shadow recognition and power generation optimization method based on deep learning according to claim 1, characterized in that: The local weighted correction factor Obtain it through the following methods: Light intensity matrix First Rank Column Elements Take the center Neighborhood window, set the neighborhood window size is an odd number, and the elements in the neighborhood window constitute a set , then the set mean for: , defines the local discreteness of the neighborhood window for: , set the local discreteness threshold ,and ,when When Located in the significant transition area between shadow and non-shadow, the corresponding local weighted correction factor Take it as: On the contrary, if , then let , that is, the element The weights of the non-shaded edge areas are reduced. is an empirical parameter.
4. The photovoltaic module shadow recognition and power generation optimization method based on deep learning according to claim 1, characterized in that: The construction of the deep learning model includes: A three-layer convolutional neural network (CNN) is used to extract the input light intensity matrix. and shadow determination matrix The shadow space distribution characteristics are obtained by combining the pooling results of the three convolutional layers with the normalized first photovoltaic feature vector Splicing in the channel dimension, the splicing result is recorded as the second photovoltaic eigenvector , where the first photovoltaic eigenvector From the temperature matrix , shadow area ratio , electrical parameters and Spliced together; Will The data is input to the time series association modeling module, which uses the long short-term memory network (LSTM) improved by the gated recurrent unit (GRU) to model the association characteristics of the time series data. The temporal association modeling module stacks two layers of GRU-LSTM units, and an attention layer is connected after the second GRU-LSTM unit. The temperature matrix is calculated using an adaptive weighting strategy. , shadow determination matrix Attention allocation coefficient 、 , the hidden state of each time step Perform weighted fusion to obtain the feature f focusing on key influencing factors; The feature f is passed to the multi-task prediction output module, which sets three fully connected layers to predict the theoretical maximum output power of the photovoltaic array at time t. , actual output power and overall efficiency .
5. The photovoltaic module shadow recognition and power generation optimization method based on deep learning according to claim 4 is characterized in that: Will 、 、 and Organized by time series, the training set of the deep learning model is constructed, expressed as , where N is the total number of samples, Respectively 、 as well as Photovoltaic characteristic dataset organized in time series, =[ , , ] is the theoretical maximum output power of the photovoltaic array at time t obtained by actual measurement or prediction , actual output power and overall efficiency ; After the model training is completed, in actual deployment or online prediction, at the new time t+1, the photovoltaic characteristic data set at time t in the same form as the training set, the monitoring or prediction , , Input the trained deep learning model and output the predicted time t+1 、 and .
6. The photovoltaic module shadow recognition and power generation optimization method based on deep learning according to claim 1, characterized in that: The optimization through MPPT is divided into two parts: static voltage correction and dynamic voltage adjustment, where the static voltage correction is the theoretical global maximum power point voltage estimate output by the deep learning model. Based on this, the temperature correction term is introduced and shadow correction items , get the corrected maximum power point voltage instruction ; wherein said is the maximum power point voltage of the photovoltaic array at time t+1 The predicted or estimated value of It is used to compensate for the deviation of the volt-ampere characteristic curve of the photovoltaic module when the temperature deviates from the standard condition of 25°C.
7. The photovoltaic module shadow recognition and power generation optimization method based on deep learning according to claim 6, characterized in that: The temperature correction term The calculation formula is as follows: ,in, is the temperature coefficient of the photovoltaic module, which reflects the rate of change of the open circuit voltage with temperature; for The open-circuit voltage of the photovoltaic module measured at the moment, if ,but ,make Adjusted downward accordingly.
8. The photovoltaic module shadow recognition and power generation optimization method based on deep learning according to claim 6, characterized in that: The shadow correction term Based on the shadow area ratio and the conduction state of the bypass diode. When <5%, the shadow The influence of can be ignored, and we can directly take ;when ≥5% and lasts longer than After a sampling period, it is determined that the shadow scale has become significant and it is necessary to consider whether to put the bypass diode into use.
9. The photovoltaic module shadow recognition and power generation optimization method based on deep learning according to claim 8, characterized in that: Whether to put the bypass diode into operation is determined as follows: Assume that the photovoltaic array consists of It is composed of a series of sub-arrays, each sub-array is connected in parallel with a bypass diode, and its conduction function is: ,in Indicates the The bypass diodes of each sub-array are Always on; and is the subarray index, and its value range is ; is the total number of series-connected sub-arrays in the PV array; Indicates the maximum power point voltage command; The theoretical maximum output power of the subarray at time t+1 predicted by the deep learning model; is the power loss threshold; make ,express The conduction state of the bypass diode is based on Calculate the array equivalent open circuit voltage taking into account the bypass effect , the calculation formula is as follows: ,in, It reflects the virtual open-circuit voltage of the array after the parallel bypass diode is turned on.
10. The photovoltaic module shadow recognition and power generation optimization method based on deep learning according to claim 9, characterized in that: Shadow Correction for: ,in is the proportional coefficient; the maximum power point voltage instruction after static correction is as follows, as the static correction result: .
Citation Information
Cited By
Photovoltaic array dynamic adjustment method based on artificial intelligence shadow detection and prediction
CN120803073A
Intelligent optimization method suitable for photovoltaic power station shadow shielding simulation array layout
CN121562177A