Photovoltaic power generation efficiency optimization method based on AI

By employing an AI-based photovoltaic power generation efficiency optimization method, utilizing deep Q-networks and a global voltage scanning procedure, the local optima problem caused by the multi-peak characteristics of photovoltaic systems under non-uniform illumination is solved, achieving global maximum power point tracking and efficiency improvement.

CN121365601APending Publication Date: 2026-01-20CHINA CONSTR EIGHT ENG DIV CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511612633.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-06
Publication Date
2026-01-20

AI Technical Summary

Technical Problem

Under non-uniform illumination conditions, traditional maximum power point tracking algorithms for photovoltaic power generation systems cannot identify multi-peak characteristics, leading to getting stuck in local optima and failing to track the global maximum power point, resulting in a decrease in system power generation efficiency.

Method used

An AI-based photovoltaic power generation efficiency optimization method is adopted. By collecting real-time operating data, using a deep Q-network maximum power point tracking model and a global voltage scanning program, the multi-peak characteristics of the power-voltage curve are identified, and the voltage and switching frequency are dynamically adjusted to achieve global maximum power point tracking.

Benefits of technology

Under non-uniform illumination conditions, accurately tracking the global maximum power point improves the power generation efficiency of photovoltaic systems, avoids local optima trapping, and enhances the overall system efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121365601A_ABST
    Figure CN121365601A_ABST
Patent Text Reader

Abstract

The invention provides a photovoltaic power generation efficiency optimization method based on AI, and belongs to the technical field of photovoltaic power generation efficiency optimizing.The method comprises the steps that real-time operation data of a photovoltaic array under different illumination and temperature conditions are collected, and multi-peak characteristic parameters such as the peak number, the peak position set and the peak amplitude set of a power voltage curve are extracted; the curve characteristics, current and historical string output voltage and inverter input power information form a state input vector, the state input vector is input to a pre-trained deep Q network maximum power point tracking model, and the model dynamically adjusts exploration rate parameters according to the peak value number and the environment temperature and then outputs an optimal voltage adjustment action; and when the multi-peak characteristic is detected and the voltage fluctuation exceeds a stable interval, a global voltage scanning program is started to traverse the string voltage range according to the intelligently determined step length to measure the power point by point, so that the technical problem that the photovoltaic system cannot track the global maximum power point is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of photovoltaic power generation efficiency optimization, and particularly relates to an AI-based photovoltaic power generation efficiency optimization method. BACKGROUND

[0002] A photovoltaic power generation system converts solar energy into electric energy through a photovoltaic array and outputs the electric energy to a power grid through an inverter. The maximum power point tracking technology is a core method for improving the photovoltaic power generation efficiency. Traditional maximum power point tracking algorithms include gradient search methods such as the perturbation and observation method and the conductance increment method. These methods find the power maximum value point by continuously adjusting the working voltage and observing the power change direction. In the condition of uniform illumination such as sunny days without obstruction, the maximum power point can be effectively tracked and stable operation can be maintained. However, in actual application scenarios, the photovoltaic array often faces non-uniform illumination conditions such as building obstruction, cloud movement, and tree shadow. These complex environments cause significant differences in the illumination intensity received by different components, so that the power-voltage curve has multiple local peaks. The traditional gradient search algorithm is prone to converging to the local peak closest to the current working point and cannot identify and track the global maximum power point, resulting in a significant decrease in the system power generation efficiency. In the prior art, the traditional maximum power point tracking algorithm lacks the ability to identify the multi-peak characteristics of the power-voltage curve and the global search mechanism. In the condition of the multi-peak power curve caused by non-uniform illumination, the algorithm falls into local optimization, so that the actual output power of the photovoltaic system is much lower than the theoretical maximum power level. That is, in the prior art, there is a technical problem that the maximum power point tracking algorithm falls into local optimization and cannot track the global maximum power point due to the multi-peak characteristics of the power-voltage curve under non-uniform illumination conditions. SUMMARY

[0003] Therefore, the application provides an AI-based photovoltaic power generation efficiency optimization method, which can solve the technical problem that the maximum power point tracking algorithm falls into local optimization and cannot track the global maximum power point due to the multi-peak characteristics of the power-voltage curve under non-uniform illumination conditions in the prior art.

[0004] The application is implemented in the following manner: the application provides an AI-based photovoltaic power generation efficiency optimization method, which collects real-time operation data of a photovoltaic array to form a historical data sequence and calculates a load rate, extracts a time series input matrix to input into an inverter nonlinear loss prediction model to output an inverter loss power prediction value, collects power-voltage curve data to extract a peak value number, a peak value position set and a peak value amplitude set, inputs a string output voltage, an inverter input power and a curve characteristic parameter into a state input vector to input into a deep Q network maximum power point tracking model to output a voltage adjustment step value, calculates a system total efficiency value and adjusts an inverter switching frequency according to an efficiency interval, judges a voltage fluctuation amplitude value to determine whether to start a global voltage scanning program, constructs a system state transition matrix to calculate a matrix exponential function by Jordan standard form decomposition to predict a system state to generate an inverter control instruction; by extracting multi-peak characteristic parameters of a power-voltage curve and combining a deep Q network to dynamically adjust an exploration rate parameter according to a peak value number, adaptive decision making is realized, and when a multi-peak characteristic is detected, the global voltage scanning program is started to traverse a voltage range, so that accurate tracking of a global maximum power point under non-uniform illumination conditions is realized.

[0005] In the collection step of the real-time operation data, the string output voltage, the string output current, the inverter input power, the inverter output power, the environmental temperature and the illumination intensity are collected, the sampling frequency is set to 10 Hz, the historical data sequence is continuously collected, and the load rate is the ratio of the inverter input power to the inverter rated power.

[0006] In the extraction step of the time series input matrix, the string output voltage, the string output current, the environmental temperature and the load rate of the recent several sampling points in the historical data sequence are extracted to form a two-dimensional matrix arranged by rows, and the row index corresponds to the time step and the column index corresponds to the characteristic dimension.

[0007] In the structure of the inverter nonlinear loss prediction model, the input layer receives the time series input matrix, the position coding layer adds time position information, the multi-layer multi-head attention coding layer calculates the attention weight between different time steps, the global average pooling layer compresses the time dimension, the multi-layer full connection layer outputs the inverter loss power prediction value, and the attention head sparsity coefficient is determined according to the load rate, the environmental temperature and the illumination intensity.

[0008] In the collection step of the power-voltage curve data, the power-voltage curve data of the photovoltaic array in the running process is collected, the curve is drawn with voltage as the horizontal axis and power as the vertical axis, all local maximum points in the power-voltage curve data are extracted, the number of local maximum points is counted as the peak value number, the voltage coordinates of each local maximum point are recorded as the peak value position set, and the power coordinates of each local maximum point are recorded as the peak value amplitude set.

[0009] The state input vector is composed of the current time group string output voltage, the historical time group string output voltage, the current time inverter input power, the historical time inverter input power, the peak value number, the peak value position set and the peak value amplitude set.

[0010] The structure of the deep Q network maximum power point tracking model comprises an input layer receiving the state input vector, a plurality of one-dimensional convolution layers extracting features, a plurality of fully connected layers processing the features, and an output layer outputting a Q value vector corresponding to a plurality of discrete actions, wherein the action corresponding to the element with the maximum value in the Q value vector is selected as the optimal action, the voltage adjustment amount corresponding to the optimal action is recorded as a voltage adjustment step value, and the exploration rate parameter is determined according to the peak value number and the environmental temperature.

[0011] The system total efficiency value is calculated according to the inverter output power, the inverter input power and the inverter loss power prediction value, and the calculation method of the system total efficiency value is the inverter output power divided by the sum of the inverter input power and the inverter loss power prediction value.

[0012] The adjustment step of the inverter switching frequency comprises judging the interval to which the system total efficiency value belongs, maintaining the current inverter switching frequency unchanged when the system total efficiency value belongs to the high-efficiency operation interval, reducing the inverter switching frequency when the system total efficiency value belongs to the low-efficiency operation interval, and further reducing the inverter switching frequency when the system total efficiency value is lower than a threshold value.

[0013] The starting step of the global voltage scanning program comprises calculating the difference between the maximum value and the minimum value of the group string output voltage in the recent time as a voltage fluctuation amplitude value, and starting the global voltage scanning program when the voltage fluctuation amplitude value does not belong to the stable voltage interval and the peak value number is greater than a threshold value, wherein the global voltage scanning program measures the output power point by point in the group string voltage range with the voltage adjustment step value as the scanning interval.

[0014] The Jordan standard form decomposition step comprises constructing a system state transition matrix, performing Jordan standard form decomposition on the system state transition matrix to obtain a quasi-diagonalization matrix and a similarity transformation matrix, calculating a matrix exponential function by using the block diagonal structure of the quasi-diagonalization matrix, and multiplying the matrix exponential function by the current state vector to obtain a next time system state prediction vector.

[0015] Further, before the step of generating the inverter control instruction, the method further comprises generating an artificial inspection instruction when the peak value number is greater than a threshold value and the system total efficiency value is lower than a threshold value, and sending the artificial inspection instruction to an operation and maintenance terminal device through a communication module, wherein an operation and maintenance personnel receives the artificial inspection instruction, carries a cleaning tool to the photovoltaic array site, and identifies and removes the obstructions on the surface of the photovoltaic module.

[0016] The training step of the inverter nonlinear loss prediction model, specifically, the original data set is obtained by running test of different power level inverters under different load rates, environmental temperatures and light intensities in a laboratory environment, the training sample is obtained by sliding window segmentation according to time window after data cleaning of the original data set, the model parameters are initialized and updated by gradient descent using optimization algorithm, and the model parameters at the time of minimum validation set loss are saved as the final model.

[0017] The training step of the deep Q network maximum power point tracking model, specifically, the state action transition samples under different working conditions are collected from multiple real photovoltaic power stations to build an experience replay buffer, a double Q network architecture including an online network and a target network is constructed, state transition samples are randomly sampled from the experience replay buffer, the Q value of the current state is calculated using the online network, the target Q value of the next state is calculated using the target network, the mean square error of the online network Q value and the target Q value is calculated as a loss function and the online network parameters are updated, and the online network parameters are periodically copied to the target network.

[0018] The calculation step of the attention head sparsity coefficient, specifically, the current load rate normalized value is multiplied by the first weight coefficient, the current environmental temperature normalized value is multiplied by the second weight coefficient, and the current light intensity normalized value is multiplied by the third weight coefficient, and the attention head sparsity coefficient controls the proportion of non-zero elements retained in the attention weight matrix.

[0019] The calculation step of the exploration rate parameter, specifically, the base exploration rate is added to the peak number multiplied by the first adjustment coefficient, and the environmental temperature normalized value is multiplied by the second adjustment coefficient, the exploration rate parameter increases with the increase of the peak number, and the model has higher exploration ability when multiple peaks are detected.

[0020] The present application extracts curve characteristic parameters such as peak value quantity, peak value position and peak value amplitude by collecting power voltage curve data, combines the current time and historical time string output voltage and inverter input power information to form a state input vector, uses the pre-trained deep Q network maximum power point tracking model to output the optimal voltage adjustment action, and starts the global voltage scanning program to traverse the voltage range to find the global optimum point when the multi-peak characteristic is detected. The deep Q network learns on a large-scale training data containing sunny unobstructed, cloudy weather, local shadow and fast cloud movement and other complex working conditions, obtains the decision-making ability to select the optimal voltage adjustment strategy under the condition of multi-peak power curve, and the model dynamically adjusts the exploration rate parameter according to the extracted peak value quantity and environmental temperature, automatically increases the exploration degree to avoid falling into local optimum when the multi-peak condition is detected, and the global voltage scanning program measures the output power in the string voltage range point by point with an intelligently determined voltage adjustment step as the scanning interval, ensures to traverse all possible working points to find the global maximum power point instead of local peak. In summary, the present application intelligently identifies the multi-peak characteristics of the power voltage curve and combines the adaptive decision-making ability of deep reinforcement learning and the complete search mechanism of global voltage scanning, solves the technical problem that the maximum power point tracking algorithm falls into local optimum and cannot track the global maximum power point due to the multi-peak characteristics of the power voltage curve of the photovoltaic system under non-uniform illumination in the prior art. BRIEF DESCRIPTION OF DRAWINGS

[0021] Figure 1 is a flowchart of the method of the present application.

[0022] Figure 2 is a power voltage curve multi-peak characteristic distribution graph in the embodiment.

[0023] Figure 3 is a global voltage scanning power measurement curve graph in the embodiment. DETAILED DESCRIPTION

[0024] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application.

[0025] As Figure 1 shown, is a flowchart of a photovoltaic power generation efficiency optimization method based on AI provided by the present application, and the method includes the following steps:

[0026] S01, collect real-time operation data of the photovoltaic array under different light intensities and temperature conditions, the real-time operation data including string output voltage, string output current, inverter input power, inverter output power, ambient temperature and light intensity, the sampling frequency is set to 10Hz, the continuous collection duration is 10 seconds to form a historical data sequence, and the load rate is calculated as the ratio of the inverter input power to the rated power of the inverter;

[0027] S02, extracting string output voltage, string output current, ambient temperature and load rate of the last 100 sampling points in the historical data sequence to form a time sequence input matrix, inputting the time sequence input matrix into a pre-trained inverter nonlinear loss prediction model, the attention head sparsity coefficient in the inverter nonlinear loss prediction model being determined according to the load rate, ambient temperature and light intensity at the current moment, and outputting an inverter loss power prediction value;

[0028] S03, collecting power-voltage curve data of the photovoltaic array during operation, drawing a curve with voltage as the horizontal axis and power as the vertical axis, extracting all local maximum points in the power-voltage curve data, counting the number of local maximum points as the peak value number, recording the voltage coordinates of each local maximum point as a peak position set, and recording the power coordinates of each local maximum point as a peak amplitude set;

[0029] S04, combining the string output voltage at the current moment, the string output voltage at the previous 20 moments, the inverter input power at the current moment, the inverter input power at the previous 20 moments, the peak value number, the peak position set and the peak amplitude set to form a state input vector, inputting the state input vector into a pre-trained deep Q network maximum power point tracking model, determining an exploration rate parameter in the deep Q network maximum power point tracking model according to the peak value number and the ambient temperature, outputting a Q value vector corresponding to 21 discrete actions, selecting an action corresponding to the element with the maximum value in the Q value vector as an optimal action, and recording a voltage adjustment amount corresponding to the optimal action as a voltage adjustment step value;

[0030] S05, calculating a system total efficiency value according to the inverter output power, the inverter input power and the inverter loss power prediction value, and the system total efficiency value being calculated in a manner that the inverter output power is divided by the sum of the inverter input power and the inverter loss power prediction value;

[0031] S06, judging the interval to which the system total efficiency value belongs, when the system total efficiency value belongs to the high-efficiency operation interval [87%, 95%], maintaining the current inverter switching frequency unchanged and continuously monitoring the real-time operation data, when the system total efficiency value belongs to the low-efficiency operation interval (75%, 87%), adjusting the inverter switching frequency from the current value to 85% of the rated switching frequency, when the system total efficiency value is less than 75%, adjusting the inverter switching frequency to 70% of the rated switching frequency;

[0032] S07, calculating the difference between the maximum value and the minimum value of the group string output voltage in the last 5 seconds as the voltage fluctuation amplitude value, judging the interval to which the voltage fluctuation amplitude value belongs, when the voltage fluctuation amplitude value belongs to the stable voltage interval [250V, 350V], keeping the existing voltage adjustment strategy unchanged, when the voltage fluctuation amplitude value does not belong to the stable voltage interval and the peak value number is greater than 1, starting the global voltage scanning program, which measures the output power point by point in the group string voltage range with the voltage adjustment step value as the scanning interval;

[0033] S08, when the peak value number is greater than 2 and the system total efficiency value is less than 80%, generating an artificial inspection instruction and sending it to the operation and maintenance terminal device through the communication module, the operation and maintenance personnel receiving the artificial inspection instruction carrying cleaning tools to the photovoltaic array site, identifying and removing the obstructions on the surface of the photovoltaic module;

[0034] S09, constructing a system state transition matrix, the number of rows and columns of the system state transition matrix is equal to the dimension of the state variable, performing Jordan standard form decomposition on the system state transition matrix to obtain a quasi-diagonalization matrix and a similarity transformation matrix, calculating the matrix exponential function using the block diagonal structure of the quasi-diagonalization matrix, multiplying the matrix exponential function by the current state vector to obtain a next time system state prediction vector, generating an inverter control instruction containing switching frequency instruction value, modulation depth instruction value and phase angle instruction value according to the system state prediction vector, sending the inverter control instruction to the inverter execution unit through the communication bus.

[0035] The structure of the inverter nonlinear loss prediction model is that the input layer receives a time sequence input matrix, the dimension of the time sequence input matrix is 100 rows and 4 columns, 100 rows correspond to 100 time steps, and 4 columns correspond to group string output voltage normalized value, group string output current normalized value, environmental temperature normalized value and load rate normalized value; the input layer output is transmitted to the position coding layer to add time position information; the position coding layer output is transmitted to the 4-layer multi-head attention coding layer; each layer of the multi-head attention coding layer contains 8 attention heads, each attention head calculates the attention weight between different time steps of the input sequence, the attention head sparsity coefficient controls the proportion of non-zero elements retained in the attention weight matrix, the multi-head attention coding layer output is transmitted to the global average pooling layer to compress the time dimension, the global average pooling layer output is transmitted to the 2-layer full connection layer, the number of neurons of the first layer full connection layer is 128, the number of neurons of the second layer full connection layer is 64, and the output layer outputs a single numerical value as the inverter loss power prediction value; the calculation method of the attention head sparsity coefficient is that the current time load rate normalized value is multiplied by 0.4, the current time environmental temperature normalized value is multiplied by 0.35, and the current time illumination intensity normalized value is multiplied by 0.25; the steps of establishing the training data set of the inverter nonlinear loss prediction model include building a photovoltaic power generation test platform in a laboratory environment, the test platform includes 20 inverters with different power levels, the power level ranges from 3kW to 100kW, each inverter is tested under the condition that the load rate belongs to the interval [5%, 100%], the environmental temperature belongs to the interval [-20℃, 60℃], and the illumination intensity belongs to the interval [100 ,1200 ]; each inverter is tested for 720 hours, the sampling frequency is 10Hz, the original data set is obtained, the abnormal data points with measurement error greater than 5% are removed through data cleaning, the cleaned data is divided into training samples according to the time window of 100 sampling points, and the training samples are divided into training set, validation set and test set according to the proportion of 7:2:1; the steps of training the inverter nonlinear loss prediction model include initializing the model parameters by using the Xavier initialization method, updating the gradient descent by using the Adam optimization algorithm, setting the initial value of the learning rate as 0.001, using the cosine annealing scheduling for the learning rate decay strategy, setting the batch size as 64, setting the total number of training rounds as 800 rounds, using the mean absolute percentage error function as the loss function, calculating the loss value on the validation set after each training round, stopping training in advance when the validation set loss does not decrease for 30 consecutive rounds, and saving the model parameters at the time of the minimum validation set loss as the final model.

[0036] The structure of the deep Q network maximum power point tracking model is that an input layer receives a state input vector, the dimension of the state input vector is 43 dimensions including 1 dimension of current time group string output voltage, 20 dimensions of historical group string output voltage, 1 dimension of current time inverter input power, 20 dimensions of historical inverter input power, and 1 dimension of peak value, the input layer reshapes the state input vector into a two-dimensional tensor with 42 rows and 1 column, the reshaped tensor is transmitted to three one-dimensional convolution layers, the number of convolution kernels of the first one-dimensional convolution layer is 32, the convolution kernel size is 5, and the step is 1, the number of convolution kernels of the second one-dimensional convolution layer is 64, the convolution kernel size is 3, and the step is 1, the number of convolution kernels of the third one-dimensional convolution layer is 64, the convolution kernel size is 3, and the step is 1, a ReLU activation function and a maximum pooling layer are connected after each one-dimensional convolution layer, the pooling window size of the maximum pooling layer is 2, the one-dimensional convolution layer output is flattened and transmitted to three fully connected layers, the number of neurons of the first fully connected layer is 256, the number of neurons of the second fully connected layer is 128, the number of neurons of the third fully connected layer is 64, the output layer outputs a 21-dimensional vector corresponding to the Q values of 21 discrete actions, the voltage adjustment amount corresponding to the 21 discrete actions is uniformly distributed from negative 10% rated voltage to positive 10% rated voltage at an interval of 1%, the calculation method of the exploration rate parameter is 0.1 plus the peak value multiplied by 0.08 plus the ambient temperature normalized value multiplied by 0.2; the steps of establishing the training data set of the deep Q network maximum power point tracking model include collecting running data on site at 200 real photovoltaic power stations, the collection time length of each photovoltaic power station is 360 hours, the working conditions include sunny and unshaded working condition, cloudy weather working condition, local shadow working condition and fast cloud movement working condition, the sampling frequency is 10Hz, the group string voltage, inverter power and power voltage curve characteristics at each moment are recorded, state action transition samples are constructed, 50000 state transition samples are generated for each power station, a total of 10000000 state transition samples are generated for all power stations and stored in an experience replay buffer; the steps of training the deep Q network maximum power point tracking model include constructing a double Q network architecture including an online network and a target network with the same structure, the online network parameters are randomly initialized by using the He initialization method, the target network parameters are copied from the online network, a batch size of 256 state transition samples is randomly sampled from the experience replay buffer, the Q value of the current state is calculated by using the online network, the target Q value of the next state is calculated by using the target network, the target Q value calculation formula is the immediate reward plus the discount factor multiplied by the maximum Q value of the next state, the discount factor is set to 0.95, the mean square error of the online network Q value and the target Q value is calculated as a loss function, the online network parameters are updated by using the Adam optimization algorithm, the learning rate is set to 0.0001, the online network parameters are copied to the target network every 200 training steps, the total number of training steps is 2000000 steps, and the exploration rate parameter is linearly decayed from 1.0 to 0 during the training process.1, Evaluate the model performance on an independent test set, and end the training when the average tracking efficiency remains above 97.5% for 5000 consecutive steps.

[0037] Wherein, the historical data sequence is a set of real-time running data arranged in chronological order, and 100 data points are obtained at a sampling frequency of 10 Hz for 10 seconds.

[0038] Wherein, the time series input matrix is a two-dimensional matrix formed by arranging the feature values of multiple time steps in the historical data sequence by rows, with the row index corresponding to the time step and the column index corresponding to the feature dimension.

[0039] Wherein, the attention head sparsity coefficient is a parameter that controls the sparsity of the attention weight matrix in the attention mechanism, and the greater the sparsity coefficient, the fewer the retained attention connections and the smaller the computational load, and the smaller the sparsity coefficient, the more the retained attention connections and the stronger the model expression ability.

[0040] Wherein, the attention weight matrix is a square matrix formed by arranging the attention weights between all pairs of positions in the sequence, with the row index and column index of the matrix corresponding to the sequence positions, respectively.

[0041] Wherein, the peak number is the total number of local maximum points in the power-voltage curve, and a peak number of 1 indicates no occlusion or uniform occlusion, and a peak number greater than 1 indicates non-uniform occlusion resulting in a multi-peak phenomenon.

[0042] Wherein, the peak position set is a set of voltage coordinate values corresponding to all local maximum points, and different peak positions reflect the working voltage distribution of different components or strings.

[0043] Wherein, the peak amplitude set is a set of power coordinate values corresponding to all local maximum points, and the size of the peak amplitude determines the power level that can be output at the corresponding voltage, and the largest peak amplitude corresponds to the global maximum power point.

[0044] Wherein, the state input vector is a state representation input to the deep Q network maximum power point tracking model, containing current and historical voltage and power information as well as curve feature information, providing a basis for decision-making for the agent.

[0045] Wherein, the voltage adjustment step value is the voltage change corresponding to the optimal action, and the new working voltage is obtained by adding the voltage adjustment step value to the current working voltage.

[0046] Wherein, the high-efficiency operating interval is an efficiency range in which the total efficiency value of the system is at a normal working level, and an efficiency value falling within the high-efficiency operating interval indicates that the system is in good working condition and does not need to be adjusted.

[0047] The low-efficiency operation interval is an efficiency range in which the total efficiency value of the system is lower than the normal level but is not seriously abnormal, and the efficiency value falling within the low-efficiency operation interval needs to be reduced by reducing the switching frequency to reduce the switching loss.

[0048] The stable voltage interval is an interval in which the voltage fluctuation amplitude value is in an acceptable range, and the fluctuation amplitude value falling within the stable voltage interval indicates that the illumination condition is relatively stable.

[0049] The global voltage scanning program is a search algorithm for measuring power point by point in the voltage operating range according to a set step size, and finding the global maximum power point by traversing all possible operating points.

[0050] The string voltage range is the upper and lower limits of the voltage allowed to work of the photovoltaic string, and the lower limit is 30% of the open circuit voltage, and the upper limit is 95% of the open circuit voltage.

[0051] The Jordan canonical form decomposition is a matrix decomposition method for converting a matrix into a quasi-diagonal form through a similarity transformation, and the decomposed matrix is composed of several Jordan blocks to facilitate the calculation of the matrix function.

[0052] The quasi-diagonalization matrix is a matrix obtained by Jordan canonical form decomposition, and the diagonal line is the eigenvalue, and the sub-diagonal line is 0 or 1, and has a block diagonal structure.

[0053] The block diagonal structure is a structural feature of the quasi-diagonalization matrix, and the matrix is decomposed into several Jordan blocks arranged on the diagonal line, and the non-diagonal block elements are zero.

[0054] The matrix exponential function is a function with the natural constant e as the base and the matrix as the exponent, and the matrix exponential function can be decomposed into the combination of the Jordan block exponential functions through the block diagonal structure of the Jordan canonical form to simplify the calculation.

[0055] The system state prediction vector is the system state at the future time based on the system state transition matrix, and includes the predicted value of the string output voltage, the predicted value of the string output current and the predicted value of the inverter input power at the next time.

[0056] The sliding window segmentation is a data processing method for dividing continuous time series data into multiple overlapping or non-overlapping subsequences according to a fixed window size and a sliding step size.

[0057] The sunny day unshading working condition is an ideal running state in which all components of the photovoltaic array receive uniform and sufficient light, and the power-voltage curve presents a single peak characteristic. The cloudy weather working condition is a running state in which uneven distribution of sky clouds causes the light intensity received by the photovoltaic array to fluctuate over time. The local shadow working condition is a running state in which part of the photovoltaic array is shaded by buildings, trees or other obstacles, and the power-voltage curve presents multiple peaks. The fast cloud movement working condition is a running state in which fast movement of clouds causes the light intensity received by the photovoltaic array to change rapidly, and the power-voltage curve dynamically changes in shape.

[0058] The double Q network architecture is an improved algorithm of deep Q learning, which separates action selection and value evaluation using two independent Q networks to reduce overestimation of Q values. The online network is a neural network in the double Q network that interacts with the environment and updates parameters in real time, used to select actions and calculate current Q values. The target network is a neural network in the double Q network whose parameters are periodically copied from the online network, used to calculate target Q values to stabilize the training process. The exploration rate parameter is a parameter in reinforcement learning that controls the balance between exploration and exploitation, with a higher exploration rate parameter encouraging exploration in the early stages of training and a lower exploration rate parameter focusing on exploitation in the later stages of training. The tracking efficiency is a performance evaluation index of the maximum power point tracking algorithm, equal to the ratio of the actual average power tracked to the theoretical maximum power, and a higher tracking efficiency indicates better algorithm performance.

[0059] The specific implementation of the above steps is described in detail below.

[0060] The specific implementation of step S01 is to achieve continuous acquisition of real-time operation data by deploying a data acquisition device on the photovoltaic array site. The purpose of this step is to establish a basic data source required for subsequent analysis and optimization. The data acquisition device first measures voltage and current signals from the output of the photovoltaic string. The voltage sensor has a range that covers the open-circuit voltage of the string, and the current sensor has a range that covers the short-circuit current of the string. The accuracy level of the sensors is selected to be 0.5 to ensure measurement accuracy. Power measurement modules are installed at the input and output of the inverter, respectively. The input power measurement module is used to monitor the DC side power, and the output power measurement module is used to monitor the AC side power. High-precision power analyzers are used to implement the power measurement modules. The ambient temperature is obtained by a temperature sensor installed near the photovoltaic array, with a measurement range of -40°C to 85°C. The light intensity is measured by a silicon-based light meter, with a measurement range of 0 to 1500 The output signals of all sensors are converted from analog to digital by a data acquisition card, the sampling frequency of the data acquisition card is set to 10 Hz, that is, 10 data points are collected per second, and the collection process lasts 10 seconds, thereby forming a historical data sequence containing 100 time points. At the same time of data collection, the calculation module calculates the load rate in real time. The calculation method of the load rate is to divide the inverter input power at the current time by the rated power of the inverter. This parameter reflects the degree of inverter workload and has important reference value for subsequent loss prediction.

[0061] The specific implementation of step S02 is to use the pre-trained inverter nonlinear loss prediction model to accurately estimate the inverter loss power. The purpose of this step is to provide loss data support for system efficiency evaluation. First, extract the data of the last 100 sampling points from the historical data sequence obtained in step S01. For each sampling point, extract four key features, namely, group string output voltage, group string output current, ambient temperature, and load rate. Normalize the four features respectively. The normalization method uses the maximum and minimum value normalization, which maps each feature value to the interval of 0 to 1. The normalization formula is the current value minus the minimum value divided by the difference between the maximum value and the minimum value. The normalized data is arranged in time sequence to form a time sequence input matrix of 100 rows and 4 columns. The rows of the matrix correspond to the time steps, and the columns correspond to the feature dimensions. The time sequence input matrix is input into the inverter nonlinear loss prediction model. The model first adds time position information to the input sequence through the position encoding layer. The position encoding uses the sine and cosine function to generate, so that the model can perceive the time relationship of different positions in the sequence. Then the data enters the multi-head attention encoding layer. There are 4 encoding layers, each containing 8 attention heads. The attention mechanism calculates the dot product of the query vector and the key vector to get the attention weight, thereby capturing the dependency between different time steps in the sequence. The attention head sparsity coefficient plays a key role in this process. The coefficient is dynamically determined according to the load rate, ambient temperature, and light intensity at the current time. The specific calculation method is to multiply the normalized value of the load rate by the weight coefficient 0.4, multiply the normalized value of the ambient temperature by the weight coefficient 0.35, and multiply the normalized value of the light intensity by the weight coefficient 0.25. The sum of the three is the sparsity coefficient. The sparsity coefficient controls the proportion of non-zero elements retained in the attention weight matrix. When the coefficient is large, only important attention connections are retained to reduce the amount of calculation. When the coefficient is small, more attention connections are retained to enhance the expression ability of the model. After the multi-head attention layer outputs, the global average pooling layer is used to compress the time dimension. Then, two fully connected layers are used for feature extraction and dimension transformation. The first fully connected layer contains 128 neurons, and the second fully connected layer contains 64 neurons. The final output layer outputs a single value as the inverter loss power prediction value.

[0062] The specific implementation of step S03 is to analyze the power-voltage characteristic curve of the photovoltaic array to identify the multi-peak characteristic of the power curve, and the purpose of this step is to provide curve characteristic information for subsequent maximum power point tracking. The photovoltaic array obtains a series of voltage-power data points by gradually changing the operating voltage of the string and recording the corresponding output power during operation. These data points are plotted into a curve on a two-dimensional plane, with the horizontal axis representing voltage and the vertical axis representing power. Local maximum points of the curve are identified by traversing each data point on the curve to determine whether the power value of the point is greater than the power values of its adjacent points. If the point is greater than both the left and right adjacent points, it is determined to be a local maximum point. The number of all local maximum points is counted and recorded as the peak number, which reflects the peak characteristic of the power-voltage curve. When the peak number is 1, it indicates that the curve exhibits a single-peak characteristic, which means that the photovoltaic array is in an unshaded or uniformly shaded state. When the peak number is greater than 1, it indicates that the curve exhibits a multi-peak characteristic, which means that the photovoltaic array has non-uniform shading, causing different strings to operate at different power levels. The voltage coordinate value of each local maximum point is recorded to form a peak position set, which reflects the voltage position distribution of different peaks. At the same time, the power coordinate value of each local maximum point is recorded to form a peak amplitude set, which reflects the power size of different peaks, where the largest peak amplitude corresponds to the global maximum power point.

[0063] The specific implementation of step S04 is to use a deep Q network maximum power point tracking model to realize intelligent decision of the optimal operating voltage. The purpose of this step is to find the operating voltage point that maximizes the output power of the photovoltaic array. First, a state input vector is constructed, which contains multiple dimensions of state information, including the current string output voltage, the historical values of the string output voltage for the previous 20 time points, the current inverter input power, the historical values of the inverter input power for the previous 20 time points, the peak value number obtained in step S03, the peak position set and the peak amplitude set. These information together constitute a 43-dimensional state input vector. The vector is input into the deep Q network maximum power point tracking model. The model first reshapes the input vector into a two-dimensional tensor with 42 rows and 1 column. Then, through three one-dimensional convolution layers, the time sequence features are extracted. The first convolution layer contains 32 convolution kernels, each with a size of 5. The second convolution layer contains 64 convolution kernels, each with a size of 3. The third convolution layer contains 64 convolution kernels, each with a size of 3. After each convolution layer, a ReLU activation function is connected to introduce nonlinearity and a max-pooling layer is used for down-sampling. The convolution layer output is flattened and transmitted to three fully connected layers for further feature extraction. The first fully connected layer contains 256 neurons, the second fully connected layer contains 128 neurons, and the third fully connected layer contains 64 neurons. The final output layer outputs a 21-dimensional vector, and each element of the vector corresponds to the Q value of a discrete action. The voltage adjustment amount corresponding to the 21 discrete actions is uniformly distributed from -10% of the rated voltage to +10% of the rated voltage at an interval of 1%, covering all possible directions and amplitudes of voltage adjustment. The exploration rate parameter in the deep Q network model is dynamically determined according to the peak value number and the ambient temperature. The calculation method is to add the product of the base value 0.1 and the peak value number multiplied by the coefficient 0.08, and then add the product of the normalized value of the ambient temperature multiplied by the coefficient 0.2. This parameter is used to balance the relationship between exploring new actions and using known optimal actions. The largest element in the 21 Q values output by the model is selected, and the action corresponding to this element is the optimal action. The voltage adjustment amount corresponding to the optimal action is the voltage adjustment step value.

[0064] The specific implementation of step S05 is to calculate the system total efficiency value to evaluate the overall energy conversion performance of the photovoltaic power generation system. The purpose of this step is to provide a quantitative evaluation index for subsequent efficiency optimization. The input parameters for calculating the system total efficiency value include the inverter output power, the inverter input power, and the inverter loss power prediction value obtained in step S02. The output parameter is the system total efficiency value. The calculation principle is to take the inverter output power as the numerator and the sum of the inverter input power and the inverter loss power prediction value as the denominator, and then divide them to get the system total efficiency value. This value reflects the overall energy conversion efficiency from the photovoltaic string output to the inverter output.

[0065] The specific implementation of step S06 is to dynamically adjust the switching frequency of the inverter according to the system total efficiency value to optimize energy loss, and the purpose of this step is to reduce the switching loss of the inverter by changing the switching frequency to improve the system efficiency. First, determine the efficiency interval to which the system total efficiency value calculated in step S05 belongs. The efficiency interval is divided into three categories. When the system total efficiency value is in the high-efficiency operating interval, i.e., 87% to 95%, it indicates that the system is in good working condition, and the current inverter switching frequency is maintained without adjustment, but real-time operating data needs to be continuously monitored to prevent efficiency from decreasing. When the system total efficiency value is between 75% and 87% in the low-efficiency operating interval, it indicates that the system efficiency is lower than normal but not severely abnormal, and the switching loss is reduced by lowering the switching frequency. The specific operation is to adjust the inverter switching frequency from the current value to 85% of the rated switching frequency. When the system total efficiency value is less than 75%, it indicates that the system efficiency is severely low, and the switching frequency needs to be reduced more significantly, adjusting the inverter switching frequency to 70% of the rated switching frequency. The principle of the switching frequency adjustment strategy is that the switching loss of the inverter is proportional to the switching frequency, and reducing the switching frequency can effectively reduce the conduction loss and turn-off loss of the switching tube, thereby improving the overall efficiency.

[0066] The specific implementation of step S07 is to determine whether to start the global scanning program by analyzing the fluctuation of the string output voltage, and the purpose of this step is to adopt a more robust maximum power point search strategy when the light condition is unstable or has multiple peak characteristics. First, calculate the fluctuation amplitude of the string output voltage in the last 5 seconds. The calculation method is to find the maximum and minimum values from the voltage data in the last 5 seconds, and the difference between the two is the voltage fluctuation amplitude value, which reflects the stability of the voltage. Then determine the interval to which the voltage fluctuation amplitude value belongs. When the fluctuation amplitude value is in the stable voltage interval, i.e., 250V to 350V, it indicates that the light condition is relatively stable, and the existing voltage adjustment strategy is maintained without change. When the voltage fluctuation amplitude value is not in the stable voltage interval and the peak value obtained in step S03 is greater than 1, it indicates that the system may be trapped in a local optimum or the light condition changes rapidly, and the global voltage scanning program is started. The working principle of the global voltage scanning program is to measure the output power point by point in the string voltage range with the voltage adjustment step value obtained in step S04 as the scanning interval. The lower limit of the string voltage range is set to 30% of the open-circuit voltage, and the upper limit is set to 95% of the open-circuit voltage. By traversing all possible working points, the global maximum power point is found, which can effectively avoid the local optimal trap.

[0067] The specific implementation of step S08 is to trigger the manual inspection mechanism when serious multi-peak phenomenon and efficiency anomaly are detected, and the purpose of this step is to clear the physical obstructions that may affect the power generation efficiency through manual intervention. The system first determines whether the number of peaks obtained in step S03 is greater than 2, and simultaneously determines whether the total system efficiency value obtained in step S05 is less than 80%, when both conditions are met, it means that there is serious non-uniform shading of the photovoltaic array and it causes significant efficiency loss. At this time, the system generates a manual inspection instruction, which contains fault location information, efficiency drop degree and recommended treatment measures, etc., and sends it to the operation and maintenance terminal device through the wireless communication module or wired communication interface. After receiving the instruction, the operation and maintenance personnel carry cleaning tools to the photovoltaic array site to inspect the surface of the photovoltaic module, identify and remove possible obstructions such as fallen leaves, bird droppings, dust or other debris. After removing the obstructions, the multi-peak phenomenon of the power-voltage curve will be improved, and the system efficiency will be correspondingly improved.

[0068] The specific implementation of step S09 is to use the system state transition matrix to realize the prediction of the system state at the future time and generate accurate inverter control instructions, and the purpose of this step is to realize forward-looking control to improve the dynamic response performance of the system. First, the system state transition matrix is constructed, which describes the mathematical law of the evolution of the system state with time, and the number of rows and columns of the matrix is equal to the dimension of the state variable. The Jordan standard form decomposition method is used to transform the original matrix into a quasi-diagonal form, and the decomposition result includes a quasi-diagonalization matrix and a similarity transformation matrix. The quasi-diagonalization matrix has a block diagonal structure, the diagonal line is the eigenvalue of the matrix, and the sub-diagonal line is 0 or 1. The matrix is decomposed into several Jordan blocks arranged along the diagonal, and the elements of the off-diagonal block are zero. The block diagonal structure of the quasi-diagonalization matrix is used to calculate the matrix exponential function, and the calculation principle is to decompose the exponential function of the entire matrix into the exponential function of each Jordan block, and the exponential function of each Jordan block can be calculated by Taylor series expansion. Multiply the calculated matrix exponential function by the system state vector at the current time to obtain the system state prediction vector at the next time, which contains the predicted values of the string output voltage, the string output current and the inverter input power at the next time. According to the system state prediction vector, the inverter control instruction is generated, which includes the switch frequency instruction value for controlling the working frequency of the inverter switch, the modulation depth instruction value for controlling the output voltage amplitude of the inverter, and the phase angle instruction value for controlling the output voltage phase of the inverter. The generated control instruction is sent to the inverter execution unit through the communication bus, and the inverter execution unit adjusts the internal control parameters according to the received instruction, thereby realizing accurate control of the operation state of the photovoltaic array.

[0069] It should be noted that the key technical ideas of the present application include an inverter loss prediction technology based on a dynamic sparse attention mechanism, a deep Q network driven adaptive maximum power point tracking technology, and a system state prediction technology based on Jordan standard form decomposition. In terms of inverter loss prediction, the dynamic adjustment of the attention mechanism is realized by introducing an attention head sparsity coefficient, which changes in real time according to the load rate, environmental temperature and illumination intensity, enabling the model to adaptively select key timing features under different operating conditions. Compared with traditional fixed-structure neural networks, this method can dynamically optimize the allocation of computing resources according to the operating conditions, significantly reducing the computational complexity while ensuring prediction accuracy, and is particularly suitable for real-time loss estimation of edge computing devices. In terms of maximum power point tracking, the deep Q network realizes intelligent decision-making for complex multi-peak power curves through a reinforcement learning framework. The model extracts timing features of voltage and power using a convolutional neural network, and constructs a state representation combining curve feature information such as peak number and peak position. The exploration rate parameter is dynamically adjusted according to the peak number and environmental temperature, enabling the tracking strategy to flexibly balance between exploring the global optimum and utilizing known information. Compared with traditional perturb and observe and incremental conductance methods, this method has stronger global search capability and faster response speed under complex conditions such as partial shading, effectively avoiding the problem of falling into local optimum. In terms of system state prediction, the Jordan standard form decomposition converts complex matrix exponential operations into block diagonal structure calculations, and the special structure of the quasi-diagonalization matrix significantly simplifies the solution process of the matrix function, enabling the system to quickly predict the operating state at future time and generate forward-looking control instructions. Compared with traditional linear prediction or empirical models, this method is more mathematically rigorous and can accurately capture the dynamic characteristics of the system. The synergy of these three key technologies forms a complete closed loop from loss prediction to power optimization to state control. Loss prediction provides accurate basis for efficiency evaluation, deep Q network tracking ensures operation at the optimal power point, and state prediction realizes forward-looking control. The three work together to enable the system to maintain efficient and stable operation under time-varying illumination and complex shading conditions. Compared with the traditional method of independent optimization of each module, the collaborative optimization strategy can globally optimize the system performance and significantly improve the energy output of photovoltaic power generation.

[0070] It needs to be explained that the present application also solves the following technical problems: in the prior art, the loss of a photovoltaic inverter presents a complex nonlinear variation characteristic with operating conditions such as load rate, ambient temperature, and light intensity, and the traditional loss estimation method based on a linear model or a lookup table method cannot accurately predict the actual loss power under different working conditions, resulting in a large deviation in the evaluation of the total efficiency of the system, and further affecting the accuracy of the efficiency optimization control strategy. The present application builds an inverter nonlinear loss prediction model based on a multi-head attention mechanism. The model receives a time sequence input matrix containing 100 time steps of string output voltage, string output current, ambient temperature, and load rate. Through 4 layers of multi-head attention encoding layers, the model learns the correlation between different time steps of operating parameters, and dynamically adjusts the attention head sparsity coefficient according to the load rate, ambient temperature, and light intensity at the current time, so that the model can adaptively focus on key time sequence features under different operating conditions, thereby accurately capturing the nonlinear law of the inverter loss varying with multi-dimensional operating parameters. The model is trained on a training set covering the operating test data of 20 inverters of different power levels under a wide load rate range, a wide temperature range, and a wide light intensity range, and has obtained accurate prediction capability for the nonlinear loss of the inverter. The predicted loss power value is used to calculate the total efficiency of the system and guide the adaptive adjustment of the switching frequency, ensuring that appropriate loss reduction measures are taken in different efficiency intervals, thereby realizing global efficiency optimization of the photovoltaic power generation system.

[0071] Specifically, the principle of the present application is that the present application solves the technical problem by explicitly incorporating the multi-peak shape characteristics of the power-voltage curve into the decision-making process of maximum power point tracking. By extracting the peak value number, peak value position set, and peak value amplitude set to form a curve feature representation, the deep Q network can determine whether the current power-voltage curve is in a multi-peak state according to these feature parameters and select an exploratory or exploitative voltage adjustment strategy accordingly. The exploration rate parameter increases linearly with the increase of the peak value number to ensure that the model has sufficient exploration ability to escape from the local optimal trap in the multi-peak case. When the number of peaks is greater than 1 and the voltage fluctuation amplitude exceeds the stable interval, the system determines that the light conditions are complex, and at this time, a global voltage scanning program is started with the voltage adjustment step output by the deep Q network as the scanning interval. The output power is measured point by point within the string voltage operating range from 30% to 95% of the open-circuit voltage, and the global maximum power point position is found by completely traversing the voltage space, rather than just a local peak point. The training data of the deep Q network covers the operating samples of 200 real photovoltaic power stations under various complex working conditions such as local shadow and rapid cloud movement, so that the model has generalization decision-making ability and adaptability to complex light patterns under multi-peak conditions, thereby realizing accurate positioning and continuous tracking of the global maximum power point.

[0072] A specific embodiment 1 of the present application is provided below, and the specific implementation of each step in embodiment 1 is described in detail as follows.

[0073] The specific implementation of step S01 is to realize continuous acquisition of real-time operation data by deploying a data acquisition device on the photovoltaic array site, and the purpose of this step is to establish a basic data source required for subsequent analysis and optimization. The data acquisition device first measures the voltage and current signals from the output of the photovoltaic string, the voltage sensor has a range covering the open circuit voltage of the string, the current sensor has a range covering the short circuit current of the string, and the accuracy level of the sensor is selected to be 0.5 level to ensure measurement accuracy. At the same time, power measurement modules are installed at the input and output of the inverter respectively, the input power measurement module is used to monitor the DC side power, and the output power measurement module is used to monitor the AC side power, and the power measurement module is realized by using a high-precision power analyzer. The ambient temperature is obtained by a temperature sensor installed near the photovoltaic array, the measurement range of the temperature sensor is -40℃ to 85℃, and the light intensity is measured by a silicon-based light intensity meter, the measurement range of the light intensity meter is 0 to 1500 . The output signals of all sensors are converted by a data acquisition card, the sampling frequency of the data acquisition card is set to 10Hz, that is, 10 data points are collected per second, and the collection process lasts for 10 seconds, thereby forming a historical data sequence containing 100 time points. At the same time of data acquisition, the load rate is calculated in real time, and the calculation formula of the load rate is as follows:

[0074] ;

[0075] In the formula, is the load rate, dimensionless; is the input power of the inverter at the current moment, the unit is ; is the rated power of the inverter, the unit is . This parameter reflects the degree of workload of the inverter, and has important reference value for subsequent loss prediction.

[0076] The specific implementation of step S02 is to realize accurate estimation of the inverter loss power by using a pre-trained inverter nonlinear loss prediction model, and the purpose of this step is to provide loss data support for system efficiency evaluation. First, extract the data of the last 100 sampling points from the historical data sequence obtained in step S01, and extract four key features for each sampling point, namely string output voltage, string output current, ambient temperature and load rate. Normalize the four features respectively, and the normalization method adopts the maximum and minimum value normalization, and the normalization formula is as follows:

[0077] ;

[0078] In the formula, is the normalized feature value, dimensionless; ​is the current feature value; is the minimum value of the feature in the historical data; is the maximum value of the feature in the historical data, and the three have the same dimension. The normalized data is arranged in time sequence to form a time sequence input matrix of 100 rows and 4 columns, and the expression form of the matrix is as follows:

[0079]

[0080] In the formula, is the time sequence input matrix, and the dimension is 100 rows and 4 columns; the superscript represents the time step, ; is the normalized value of the group string output voltage at the time step, which is dimensionless; is the normalized value of the group string output current at the time step, which is dimensionless; is the normalized value of the ambient temperature at the time step, which is dimensionless; is the normalized value of the load rate at the time step, which is dimensionless. The time sequence input matrix is input to the inverter nonlinear loss prediction model. The model first adds time position information to the input sequence through the position encoding layer, and then the data enters the multi-head attention encoding layer. There are 4 encoding layers, each containing 8 attention heads. The attention head sparsity coefficient plays a key role in this process. The coefficient is dynamically determined according to the load rate, ambient temperature and light intensity at the current time, i.e., the 100th sampling point. The specific calculation formula is as follows:

[0081]

[0082] In the formula, is the attention head sparsity coefficient, which is dimensionless; is the normalized value of the load rate at the current time, which is dimensionless and ranges from 0 to 1; is the normalized value of the ambient temperature at the current time, which is dimensionless and ranges from 0 to 1; ​​is the normalized value of the light intensity at the current time, dimensionless, with a value range of 0 to 1; 0.4, 0.35 and 0.25 are weight coefficients, dimensionless. The sparsity coefficient controls the proportion of non-zero elements reserved in the attention weight matrix. When the coefficient is larger, only important attention connections are reserved to reduce the amount of calculation, and when the coefficient is smaller, more attention connections are reserved to enhance the expression ability of the model. After the multi-head attention layer is output, the global average pooling layer is used to compress the time dimension, and then two fully connected layers are used for feature extraction and dimension transformation. The first fully connected layer contains 128 neurons, and the second fully connected layer contains 64 neurons. The final output layer outputs a single value as the inverter loss power prediction value.

[0083] The specific implementation of step S03 is to analyze the power-voltage characteristic curve of the photovoltaic array to identify the multi-peak characteristic of the power curve. The purpose of this step is to provide curve characteristic information for subsequent maximum power point tracking. The photovoltaic array changes the operating voltage of the string step by step during operation and records the corresponding output power, thereby obtaining a series of voltage-power data points. These data points are plotted into a curve on a two-dimensional plane, with the horizontal axis representing voltage and the vertical axis representing power. Local maximum points of the curve are identified by traversing each data point on the curve to determine whether the power value of the point is greater than the power values of its adjacent points. If the point is greater than both the left and right adjacent points, it is determined to be a local maximum point. The number of all local maximum points is counted and recorded as the peak number, which reflects the peak characteristic of the power-voltage curve. When the peak number is 1, it indicates that the curve exhibits single-peak characteristic, indicating that the photovoltaic array is in an unshaded or uniformly shaded state. When the peak number is greater than 1, it indicates that the curve exhibits multi-peak characteristic, indicating that the photovoltaic array has non-uniform shading, causing different strings to operate at different power levels. The voltage coordinate value corresponding to each local maximum point is recorded to form a peak position set, which reflects the voltage position distribution of different peaks. The power coordinate value corresponding to each local maximum point is also recorded to form a peak amplitude set, which reflects the power size of different peaks, where the largest peak amplitude corresponds to the global maximum power point.

[0084] The specific implementation of step S04 involves using a deep Q-network maximum power point tracking model to achieve intelligent decision-making on the optimal operating voltage. The purpose of this step is to find the operating voltage point that maximizes the output power of the photovoltaic array. First, a state input vector is constructed, containing multi-dimensional state information, specifically including the current string output voltage, the historical string output voltage values ​​from the previous 20 time steps, the current inverter input power, the historical inverter input power values ​​from the previous 20 time steps, the number of peak values ​​obtained in step S03, the set of peak positions, and the set of peak amplitudes. This information collectively constitutes a 43-dimensional state input vector. This vector is input to the deep Q-network maximum power point tracking model. The model extracts temporal features through three one-dimensional convolutional layers. The output of the convolutional layers is flattened and passed to three fully connected layers for further feature extraction. Finally, the output layer outputs a 21-dimensional vector, where each element corresponds to the Q-value of a discrete action. The set of voltage adjustment amounts corresponding to these 21 discrete actions is described as follows:

[0085] ;

[0086] In the formula, It is a set of discrete actions; For the first The voltage adjustment amount corresponding to each action, in units of ; Rated voltage, unit: ; This is the action index, ranging from 0 to 20, and is dimensionless. This set covers all possible adjustment directions and magnitudes, uniformly distributed at 1% intervals from -10% of the rated voltage to +10% of the rated voltage. The exploration rate parameter in the deep Q-network model is dynamically determined based on the number of peak values ​​and the ambient temperature, and the calculation formula is as follows:

[0087] ;

[0088] In the formula, The exploration rate parameter is dimensionless. The number of peak values ​​is dimensionless and typically ranges from 1 to 5. The normalized value of the current ambient temperature is dimensionless, ranging from 0 to 1; 0.1, 0.08, and 0.2 are empirical coefficients, also dimensionless. This formula is an empirical formula that uses a weighted summation method to integrate the influence of different factors into an exploration rate parameter, used to balance the relationship between exploring new actions and utilizing known optimal actions. The element with the largest value among the 21 Q values ​​output by the model is selected; the action corresponding to this element is the optimal action, and the voltage adjustment amount corresponding to the optimal action is the voltage adjustment step size value, calculated as follows:

[0089] ;

[0090] In the formula, This is the voltage adjustment step size, in units of... ; To maximize the Q-value of the action index, by Sure; For the first The Q value corresponding to each action is dimensionless; This is the index corresponding to the maximum value.

[0091] The specific implementation of step S05 involves calculating the overall system efficiency value to evaluate the overall energy conversion performance of the photovoltaic power generation system. The purpose of this step is to provide a quantitative evaluation index for subsequent efficiency optimization. The formula for calculating the overall system efficiency value is as follows:

[0092] ;

[0093] In the formula, The total system efficiency is a dimensionless value. The inverter output power is expressed in units of 1. ; The inverter input power, in units of With step S01 For the same variable; This is the predicted power loss value for the inverter, in units of This value reflects the overall energy conversion efficiency from the photovoltaic string output to the inverter output.

[0094] The specific implementation of step S06 involves dynamically adjusting the inverter's switching frequency based on the overall system efficiency value to optimize energy loss. The purpose of this step is to improve system efficiency by reducing inverter switching losses through changing the switching frequency. First, the efficiency range of the overall system efficiency value calculated in step S05 is determined. Efficiency ranges are divided into three categories. When the overall system efficiency value is in the high-efficiency operating range (87% to 95%), it indicates that the system is operating well. In this case, the current inverter switching frequency is maintained without adjustment, but real-time operating data needs to be continuously monitored to prevent efficiency degradation. When the overall system efficiency value is in the low-efficiency operating range (75% to 87%), it indicates that the system efficiency is below normal but not severely abnormal. In this case, the switching frequency is reduced to decrease switching losses, adjusting the inverter switching frequency from the current value to 85% of the rated switching frequency. When the overall system efficiency value is less than 75%, it indicates that the system efficiency is severely low. In this case, the switching frequency needs to be reduced more significantly, adjusting the inverter switching frequency to 70% of the rated switching frequency.

[0095] The specific implementation of step S07 is to determine whether to start the global scanning program by analyzing the fluctuation of the group string output voltage. The purpose of this step is to adopt a more robust maximum power point search strategy when the light condition is unstable or there is a multi-peak characteristic. First, the fluctuation amplitude of the group string output voltage in the last 5 seconds is calculated, and the calculation formula is as follows:

[0096] ;

[0097] In the formula, is the voltage fluctuation amplitude value, and the unit is ; is the maximum voltage in the last 5 seconds, and the unit is ; is the minimum voltage in the last 5 seconds, and the unit is . This value reflects the stability of the voltage. Then, it is determined which interval the voltage fluctuation amplitude value belongs to. When the fluctuation amplitude value is in the stable voltage interval, i.e. 250V to 350V, it means that the light condition is relatively stable, and the existing voltage adjustment strategy is maintained without change. When the voltage fluctuation amplitude value is not in the stable voltage interval and the number of peaks obtained in step S03 is greater than 1, it means that the system may be trapped in a local optimum or the light condition changes rapidly, and the global voltage scanning program is started. The working principle of the global voltage scanning program is to measure the output power point by point in the group string voltage range with the voltage adjustment step value obtained in step S04 as the scanning interval. The lower limit of the group string voltage range is set to 30% of the open circuit voltage, and the upper limit is set to 95% of the open circuit voltage. By traversing all possible working points, the global maximum power point is found. This method can effectively avoid the local optimal trap.

[0098] The specific implementation of step S08 is the same as described above, and will not be described in detail here.

[0099] The specific implementation of step S09 is to use the system state transition matrix to predict the system state at future time and generate accurate inverter control instructions. The purpose of this step is to realize forward-looking control and improve the dynamic response performance of the system. First, the system state transition matrix is constructed, which describes the mathematical law of the evolution of the system state over time. The number of rows and columns of the matrix is equal to the dimension of the state variable. The matrix is decomposed into Jordan normal form by similarity transformation. The decomposition result includes the quasi-diagonalization matrix and the similarity transformation matrix. The quasi-diagonalization matrix has a block diagonal structure. The eigenvalues are on the diagonal, and 0 or 1 are on the sub-diagonal. The matrix is decomposed into several Jordan blocks arranged along the diagonal, and the elements of the off-diagonal block are zero. The block diagonal structure of the quasi-diagonalization matrix is used to calculate the matrix exponential function. The calculated matrix exponential function is multiplied by the system state vector at the current time to obtain the system state prediction vector at the next time, and the calculation formula is as follows:

[0100] ;

[0101] wherein, is the normalized system state prediction vector of next time, containing the normalized form of the prediction value of the string output voltage, the prediction value of the string output current and the prediction value of the inverter input power, and each component in the vector is dimensionless; is the normalized system state vector of current time, and each component in the vector is dimensionless; is the system state transition matrix, describing the dynamic characteristics of the system, and the unit is ; is the matrix exponential function, which is calculated by the Jordan canonical form decomposition, and the matrix is dimensionless; is the prediction time step, and the unit is , and the default is 0.1s. Each component in the state vector is normalized to ensure that different physical quantities are calculated on the same numerical scale. The normalization method is consistent with the normalization formula in step S02. According to the system state prediction vector, the inverter control instruction is generated, which includes the switch frequency instruction value for controlling the working frequency of the inverter switch, the modulation depth instruction value for controlling the output voltage amplitude of the inverter, and the phase angle instruction value for controlling the output voltage phase of the inverter. The generated control instruction is sent to the inverter execution unit through the communication bus, and the inverter execution unit adjusts the internal control parameters according to the received instruction, thereby realizing accurate control of the operating state of the photovoltaic array.

[0102] It needs to be explained that the time sequence input matrix provides complete time sequence information for the deep learning model by organizing the multi-dimensional features of 100 time steps in a row-column structure. The row dimension of the matrix preserves the time evolution characteristics, and the column dimension preserves the correlation between different features, enabling the multi-head attention mechanism to effectively capture time-dependent and feature interactions, significantly improving the accuracy of loss prediction. The attention head sparsity coefficient formula takes into account three key operating parameters: load rate, ambient temperature, and light intensity. It dynamically adjusts the sparsity of the attention mechanism through weighted summation, increasing sparsity under high load, high temperature, or strong light to reduce computational complexity, and decreasing sparsity under low load, low temperature, or weak light to enhance model expression ability, achieving a balance between computational efficiency and prediction accuracy, allowing the model to adaptively adjust computational complexity according to actual operating conditions. The discrete action set formula discretizes the continuous voltage adjustment space into 21 uniformly distributed actions, covering the complete adjustment range from -10% to +10% of the rated voltage. This uniform discretization design enables the deep Q network to systematically explore different adjustment strategies, avoiding the infinite search problem in continuous action space, while the 1% interval setting strikes a good balance between adjustment precision and search efficiency. The exploration rate parameter formula dynamically adjusts the exploration-exploitation trade-off in reinforcement learning based on the number of peaks in the power-voltage curve and the ambient temperature. When the number of peaks is high or the temperature changes significantly, the exploration rate is increased to avoid falling into a local optimum, and when the number of peaks is low and the temperature is stable, the exploration rate is reduced to quickly converge to the optimal strategy. This formula significantly improves the performance of maximum power point tracking under complex shading conditions, enabling the system to find the global maximum power point in a multi-peak curve. The voltage adjustment step value formula selects the voltage adjustment amount corresponding to the action with the maximum Q value, realizing optimal decision-making based on the value function. This formula combines the feature extraction capability of deep neural networks and the value evaluation mechanism of Q learning, enabling the voltage adjustment strategy to adaptively select the optimal adjustment direction and amplitude based on the current state, resulting in faster tracking speed and higher tracking accuracy compared to traditional perturbation and observation methods.

[0103] To better understand and implement the present application, the following provides an embodiment 2 of a specific application scenario of the present application: a technical team implements efficiency optimization work in a large-scale ground photovoltaic power station with a capacity of 50MW, which is composed of 5000 single-crystal silicon photovoltaic components and configured with 250 200kW inverters. After the power station has been in operation for 3 years, it is found that the total system efficiency has gradually decreased from 92% at the initial stage to 78%, especially in cloudy weather and early and late periods. The technical team decides to upgrade and transform the system using the AI-based photovoltaic power generation efficiency optimization method described in the present application.

[0104] The technical team first deployed a sampling module in the power plant data acquisition and monitoring system, set the sampling frequency to 10 Hz, and continuously collected data for 10 seconds to form a historical data sequence containing 100 data points. During the collection process at 10:30 am on a certain day, the string output voltage stabilized at around 680V, the string output current fluctuated between 42A and 46A, the inverter input power was 28.6kW, the inverter output power was 27.1kW, the environmental temperature was 32℃, and the light intensity was 950 . By calculation, the load rate at this time was 0.143. The technical team extracted the data of the last 100 sampling points to form a time series input matrix, which had a dimension of 100 rows and 4 columns, corresponding to 100 time steps and 4 normalized feature values respectively. The time series input matrix was input into the pre-trained inverter nonlinear loss prediction model. The attention head sparsity coefficient in the model was calculated to be 0.562 after normalization based on the current load rate 0.143, environmental temperature 32℃, and light intensity 950 . After 4 layers of multi-head attention encoding layers and 2 layers of fully connected layers, the model output the predicted inverter loss power value as 1.48kW.

[0105] The technical team then collected the power-voltage curve data of the photovoltaic array, plotted the curve with voltage as the horizontal axis and power as the vertical axis, as shown in Figure 2 , three local maximum points were identified on the power-voltage curve, the number of peaks was 3, the first peak position was at voltage 620V corresponding to power 26.8kW, the second peak position was at voltage 685V corresponding to power 28.9kW, and the third peak position was at voltage 740V corresponding to power 25.2kW. The peak position set was 620V, 685V, 740V, and the peak amplitude set was 26.8kW, 28.9kW, 25.2kW. The multi-peak phenomenon indicated that the photovoltaic array was subject to non-uniform shading. The technical team combined the current string output voltage 680V, the string output voltage sequence of the previous 20 time steps, the current inverter input power 28.6kW, the inverter input power sequence of the previous 20 time steps, the peak number 3, the peak position set, and the peak amplitude set to form a 43-dimensional state input vector, which was input into the deep Q-network maximum power point tracking model. The exploration rate parameter in the model was calculated to be 0.504 based on the peak number 3 and the normalized value of the environmental temperature. After processing through 3 one-dimensional convolution layers and 3 fully connected layers, the model output a 21-dimensional Q-value vector. The 8th action with the maximum Q-value was selected as the optimal action, corresponding to a positive voltage adjustment step size of 5V.

[0106] The technical team calculates the system total efficiency value as 0.901 according to the inverter output power 27.1 kW, the inverter input power 28.6 kW and the inverter loss power prediction value 1.48 kW, which belongs to the high efficiency operation interval 87% to 95%, so the current inverter switching frequency 16 kHz is maintained unchanged and the real-time operation data is continuously monitored. The technical team calculates the difference between the maximum value 693 V and the minimum value 668 V of the group string output voltage in the last 5 seconds to obtain the voltage fluctuation amplitude value 25 V, which does not belong to the stable voltage interval 250 V to 350 V, and the peak number is 3 which is greater than 1, so the system automatically starts the global voltage scanning program. The scanning interval is 5 V as the voltage adjustment step value, and the output power is measured point by point in the group string voltage range 204 V to 646 V. The scanning process is shown in FIG. 8, and the scanning result shows that the global maximum power point is located at the voltage 685 V corresponding to the power 28.9 kW. Figure 3

[0107] Since the peak number 3 is greater than 2 and the system total efficiency value 90.1% is close to the lower limit although it is in the high efficiency interval, the technical team generates artificial inspection instructions and sends them to the operation and maintenance personnel's handheld terminal device through the 4G wireless communication module. After receiving the instructions, the operation and maintenance personnel carry cleaning tools to the photovoltaic array site and find that there are tree branches and leaves blocking the 12th and 13th group strings and thick dust accumulated on the surface of the 27th group string. After the operation and maintenance personnel remove the obstructions and clean the surface of the components, the power voltage curve returns to the single peak characteristic, the peak number decreases to 1, and the system total efficiency value increases to 91.8%.

[0108] The technical team constructs a system state transition matrix with a dimension of 43 rows and 43 columns. The Jordan canonical form decomposition of the state transition matrix obtains a quasi-diagonalization matrix and a similarity transformation matrix. The block diagonal structure of the quasi-diagonalization matrix is used to calculate the matrix exponential function. The matrix exponential function is multiplied by the current state vector to obtain the system state prediction vector at the next time. The prediction vector includes the group string output voltage prediction value 688 V, the group string output current prediction value 44.2 A and the inverter input power prediction value 30.4 kW at the next time. According to the system state prediction vector, the inverter control instruction is generated, the switching frequency instruction value is 16 kHz, the modulation depth instruction value is 0.92, and the phase angle instruction value is 0 degrees. The control instruction is sent to the inverter execution unit through the CAN bus to realize real-time control. The technical team records the system performance under different working conditions in the continuous 30-day operation data monitoring, as shown in Table 1.

[0109] Table 1 System performance data table under different working conditions

[0110]

[0111] ​The application has significant technical progress relative to the conventional perturbation observation method and conductance increment method maximum power point tracking technology, the conventional method uses fixed step blind search, which leads to being easily trapped in local optimal point in the case of multiple peaks, while the application can accurately identify and track the global maximum power point through the deep Q network intelligent decision dynamic adjustment search strategy, the conventional method does not consider the dynamic change of inverter nonlinear loss with load rate and temperature, while the application realizes accurate loss prediction through the multi-head attention mechanism modeling inverter complex loss characteristics, the conventional method relies on artificial regular inspection to find the shading problem, and the response is lagging, while the application can automatically identify the shading state through the power voltage curve multiple peak characteristics and trigger the artificial inspection instruction to realize timely processing, the conventional method uses fixed control parameters, which cannot adapt to the working condition change, while the application realizes feedforward control to improve the system dynamic response ability through the system state transition matrix prediction of future state.

[0112] It should be noted that the variables involved in the application are explained in detail as shown in Table 2.

[0113] Table 2 Variable explanation table

[0114]

[0115] The above is only a specific embodiment of the application, but the protection scope of the application is not limited to this, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the application, which should be covered within the protection scope of the application.

Claims

1. An AI-based photovoltaic power generation efficiency optimization method, characterized in that, The real-time operation data of the photovoltaic array is collected to form a historical data sequence and calculate a load rate, a time sequence input matrix is extracted and input into an inverter nonlinear loss prediction model to output an inverter loss power prediction value, power voltage curve data is collected to extract a peak value number, a peak value position set and a peak value amplitude set, a string output voltage, an inverter input power and a curve characteristic parameter are combined to form a state input vector which is input into a deep Q network maximum power point tracking model to output a voltage adjustment step value, a system total efficiency value is calculated and the inverter switching frequency is adjusted according to the efficiency interval, a voltage fluctuation amplitude value is judged to determine whether to start a global voltage scanning program, a system state transition matrix is constructed to calculate a matrix exponential function by Jordan standard form decomposition to predict the system state and generate an inverter control instruction; the multi-peak characteristic parameters of the power voltage curve are extracted and combined with the deep Q network to dynamically adjust the exploration rate parameter according to the peak value number to realize adaptive decision-making, and when the multi-peak characteristic is detected, the global voltage scanning program is started to traverse the voltage range, so that the global maximum power point can be accurately tracked under the condition of non-uniform illumination. 2.The AI-based photovoltaic power generation efficiency optimization method of claim 1, wherein, The collection of the real-time operation data is specifically collecting the string output voltage, the string output current, the inverter input power, the inverter output power, the environmental temperature and the illumination intensity, setting the sampling frequency to 10 Hz, continuously collecting to form a historical data sequence, and the load rate being the ratio of the inverter input power to the inverter rated power. 3.The AI-based photovoltaic power generation efficiency optimization method of claim 2, wherein, The extraction of the time sequence input matrix is specifically extracting the string output voltage, the string output current, the environmental temperature and the load rate of the recent several sampling points in the historical data sequence to form a two-dimensional matrix arranged by rows, and the row index corresponds to the time step and the column index corresponds to the characteristic dimension. 4.The AI-based photovoltaic power generation efficiency optimization method of claim 3, wherein, The structure of the inverter nonlinear loss prediction model is specifically that the input layer receives the time sequence input matrix, the position coding layer adds the time position information, the multi-layer multi-head attention coding layer calculates the attention weight between different time steps, the global average pooling layer compresses the time dimension, the multi-layer full connection layer outputs the inverter loss power prediction value, and the attention head sparsity coefficient is determined according to the load rate, the environmental temperature and the illumination intensity. 5.The AI-based photovoltaic power generation efficiency optimization method of claim 4, wherein, The collection of the power voltage curve data is specifically collecting the power voltage curve data of the photovoltaic array in the operation process, drawing a curve with the voltage as the horizontal axis and the power as the vertical axis, extracting all local maximum points in the power voltage curve data, counting the number of local maximum points as the peak value number, recording the voltage coordinates of each local maximum point as the peak value position set, and recording the power coordinates of each local maximum point as the peak value amplitude set. 6.The AI-based photovoltaic power generation efficiency optimization method of claim 5, wherein, The construction of the state input vector is specifically combining the string output voltage at the current time, the string output voltage at the historical time, the inverter input power at the current time, the inverter input power at the historical time, the peak value number, the peak value position set and the peak value amplitude set to form the state input vector. 7.The AI-based photovoltaic power generation efficiency optimization method of claim 6, wherein, The structure of the deep Q network maximum power point tracking model is specifically that an input layer receives a state input vector, a plurality of one-dimensional convolution layers extract features, a plurality of fully connected layers process the features, and an output layer outputs a Q value vector corresponding to a plurality of discrete actions, an action corresponding to an element with the maximum value in the Q value vector is selected as an optimal action, a voltage adjustment amount corresponding to the optimal action is recorded as a voltage adjustment step value, and an exploration rate parameter is determined according to the peak value quantity and the ambient temperature. 8.The AI-based photovoltaic power generation efficiency optimization method of claim 7, wherein, The calculation step of the system total efficiency value is specifically that the system total efficiency value is calculated according to the inverter output power, the inverter input power and the inverter loss power prediction value, and the calculation manner of the system total efficiency value is that the inverter output power is divided by the sum of the inverter input power and the inverter loss power prediction value. 9.The AI-based photovoltaic power generation efficiency optimization method of claim 8, wherein, The adjustment step of the inverter switching frequency is specifically that the system total efficiency value is judged, when the system total efficiency value belongs to a high-efficiency operation interval, the current inverter switching frequency is maintained unchanged, when the system total efficiency value belongs to a low-efficiency operation interval, the inverter switching frequency is reduced, and when the system total efficiency value is lower than a threshold value, the inverter switching frequency is further reduced. 10.The AI-based photovoltaic power generation efficiency optimization method of claim 9, wherein, The starting step of the global voltage scanning program is specifically that a difference between the maximum value and the minimum value of the module string output voltage in the recent several times is calculated and recorded as a voltage fluctuation amplitude value, when the voltage fluctuation amplitude value does not belong to a stable voltage interval and the peak value quantity is greater than a threshold value, the global voltage scanning program is started, and the global voltage scanning program measures the output power point by point in the module string voltage range with the voltage adjustment step value as a scanning interval.