Distributed photovoltaic-based mppt control method, system, device and medium
By combining the FA-EAS hybrid optimization algorithm and the Elman NN-PID controller, the local optimum trap problem of the MPPT algorithm in distributed photovoltaic systems is solved, achieving fast and stable maximum power point tracking, and improving the power generation efficiency and economy of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-01
- Publication Date
- 2026-04-14
AI Technical Summary
The MPPT algorithm of distributed photovoltaic systems is prone to getting trapped in local optima and is difficult to search for the maximum power point globally, resulting in reduced power generation efficiency. Furthermore, traditional centralized MPPT schemes cannot meet the requirements of independent unit operation, and module-level distributed MPPT increases system cost and communication complexity.
The FA-EAS hybrid optimization algorithm is combined with ElmanNN and PID controller. The weight threshold of ElmanNN is optimized by global search of the firefly algorithm and local optimization of the ant colony optimization algorithm. The incremental PID algorithm is combined to generate PWM signal to control the Boost converter and achieve maximum power point tracking.
It improves the tracking speed, stability, and success rate of MPPT, reduces power loss, and enhances the power generation efficiency and economy of distributed photovoltaic systems.
Smart Images

Figure CN121097805B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of distributed photovoltaic power generation technology, and in particular to MPPT methods, systems, devices and media based on distributed photovoltaics. Background Technology
[0002] As the global energy structure accelerates its transformation towards cleaner and lower-carbon energy, distributed photovoltaic (PV) power generation systems have gained widespread application due to their advantages of flexible deployment and localized consumption. However, factors such as uneven sunlight, shading, and differences in component parameters often cause the power-voltage (PV) characteristic curve of distributed PV systems to exhibit multi-peak characteristics. Traditional maximum power point tracking (MPPT) algorithms (such as the perturbation-observation method and the incremental conductance method) are prone to getting trapped in local optima and struggle to globally search for the maximum power point, resulting in a significant reduction in power generation efficiency.
[0003] Existing technologies have employed intelligent optimization algorithms, such as particle swarm optimization and genetic algorithms, to achieve the goal of globally searching for the maximum power point. While these algorithms can handle multi-peak problems, they generally suffer from limitations such as slow convergence speed, high computational complexity, and difficulty in hardware implementation, failing to meet the stringent requirements of distributed photovoltaic systems for dynamic response speed and real-time performance. Furthermore, in distributed scenarios, photovoltaic units are deployed in a dispersed manner, making it difficult for traditional centralized MPPT solutions to meet the independent operation requirements of each unit. While module-level distributed MPPT improves local efficiency, it increases system cost and communication complexity.
[0004] Therefore, there is an urgent need to develop an MPPT controller that combines global optimization capabilities, rapid dynamic response, and low hardware overhead to adapt to the complex operating environment of distributed photovoltaic systems, thereby comprehensively improving the system's power generation efficiency and economy. Summary of the Invention
[0005] The purpose of this application is to provide an MPPT method based on distributed photovoltaics, which can improve the tracking speed, stability and success rate of MPPT.
[0006] Firstly, this application provides an MPPT method based on distributed photovoltaic (PV) power generation, employing the following technical solution: An MPPT method based on distributed PV power generation, comprising:
[0007] Preprocess the photovoltaic array data to obtain irradiance, temperature, and MPP voltage datasets;
[0008] K-fold cross-validation and RMSE function evaluation were used to determine the optimal number of hidden layer nodes for ElmanNN, and the dataset was divided into training set, validation set and test set.
[0009] The training set is input into the global search of the firefly algorithm and the local optimization of the ant colony algorithm until a stable solution is converged. The stable solution is defined as the optimal parameters of FA-EAS.
[0010] Update the weight threshold of ElmanNN based on the optimal parameters, and deploy the trained ElmanNN model to perform online prediction of MPP voltage;
[0011] The difference between the predicted voltage and the reference voltage is input to the PID controller, which calculates the control quantity through the incremental PID algorithm, generates a PWM signal to control the duty cycle of the Boost converter, and achieves maximum power point tracking.
[0012] By adopting the above technical solution, combining the global search capability of the firefly algorithm and the local optimization characteristic of the ant colony optimization algorithm, the optimal parameters can be quickly converged, reducing training time and avoiding local optimum traps, thereby achieving faster response under dynamic irradiance and temperature changes. At the same time, using ElmanNN for prediction, combined with the precise adjustment of the PID controller, ensures that the maximum power point can be maintained stably and effectively under various environmental fluctuations, reducing power loss and thus improving the maximum power point tracking efficiency of the distributed photovoltaic system.
[0013] In a preferred example, this application can be further configured as follows: the step of inputting the training set into the global search of the firefly algorithm and the local optimization of the ant colony optimization algorithm until convergence to a stable solution, and defining the stable solution as the optimal parameters of FA-EAS, includes:
[0014] Set the FA parameters for the firefly algorithm, the EAS parameters for the ant colony optimization algorithm, and the shared parameters, wherein the shared parameters include the maximum number of iterations It. max Convergence accuracy threshold ε;
[0015] When the iteration number It <It max In this process, the optimization process is divided into two stages: FA and EAS. The FA stage involves updating the firefly's position based on brightness and distance, calculating the fitness of the new position, and recording the current optimal solution. The EAS stage involves the ant constructing, evaluating, and updating the solution based on pheromones and heuristic information.
[0016] The fitness of the current optimal solution and the global optimal solution are compared and judged. An elite strategy is adopted to retain the historical optimal solution and adjust the adaptive parameters until a stable solution is converged.
[0017] By adopting the above technical solution, the global exploration capability of the firefly algorithm and the local development advantage of the ant colony optimization algorithm can be effectively integrated, avoiding the problem that a single algorithm is prone to getting trapped in local optima, thereby improving the convergence speed and accuracy of maximum power point tracking in distributed photovoltaic systems. At the same time, the adaptive parameter adjustment mechanism ensures the robustness of the optimization process in dynamic environments, reduces the number of iterations and reduces computational overhead, and ultimately achieves stable control of photovoltaic array power output and optimizes energy capture efficiency.
[0018] In a preferred embodiment, this application can be further configured such that the FA parameters are set with population size nPop and maximum attraction β. max0 The light absorption coefficient γ and the random step size α are given. In the FA-EAS hybrid optimization process, the FA stage includes: defining the meaning of FA parameters, where the firefly position represents the combination of weight threshold parameters used in ElmanNN to establish the mapping relationship between irradiance, temperature and MPP voltage; the distance between fireflies represents the spatial difference of different weight threshold parameter combinations; the optimal position among all fireflies represents the weight threshold parameter combination that makes the MPP voltage prediction accuracy the highest in the current iteration; and the maximum brightness of the firefly represents the fitness value corresponding to the optimal weight threshold parameter combination.
[0019] The irradiance and temperature from the training set are input into the FA for optimization, where the individual position update process is represented as follows:
[0020] x i =x i +β·(x j -x i )+α·(rand-1 / 2);
[0021] Where I is the relative fluorescence intensity at the current moment, I max0 β represents the maximum fluorescence intensity of the firefly at the current moment; β represents the attraction intensity at the current moment; x i x j Let i be the spatial position of the fireflies, j be the individual firefly whose brightness is being compared with i, and r be the individual fireflies whose brightness is being compared with i. ij α represents the distance between fireflies i and j at the current moment; α∈[0,1]; rand is a random number in [0,1].
[0022] Input candidate solutions X, output fitness; the solution with the minimum fitness is defined as the optimal solution, where the formula is:
[0023] X_best=argmin(fitness(X));
[0024] Where X_best is the optimal solution, and X is the value of x. i or x jThe unified representation is that fitness(X) is a function that measures the quality of solution X. The smaller the fitness value, the better the solution X is. argmin(fitness(X)) represents the value of the independent variable that makes the function reach its minimum value. It means finding the solution X that makes the fitness function fitness(X) reach its minimum value, and defining the optimal solution of this iteration as X_best, and establishing the optimal mapping relationship between irradiance, temperature and MPP voltage.
[0025] By adopting the above technical solution, the FA stage can dynamically adjust the firefly's position and optimize the weight threshold parameter combination, thereby improving the processing efficiency of ElmanNN for irradiance and temperature inputs. During the iteration process, the firefly's position update mechanism ensures that individuals move towards a better fitness, avoiding local optimum traps; at the same time, by minimizing the fitness function, it can quickly converge to the optimal solution, establish a high-precision mapping relationship between irradiance, temperature, and MPP voltage, enhance the maximum power point tracking performance of the distributed photovoltaic system, reduce prediction errors under environmental fluctuations, and reduce computational resource consumption.
[0026] In a preferred embodiment, this application can be further configured such that: the EAS parameters are set with population size m and pheromone ρ, and the EAS stage in the FA-EAS hybrid optimization process includes:
[0027] The current optimal solution X_best obtained through global search in the FA stage is used as the initial pheromone source for the EAS stage. Ants construct, evaluate, and update solutions based on pheromones and heuristic information, using the formula:
[0028] X k =construct_solution(tau,heuristic_info);
[0029] Among them, X k The result returned by the function represents the candidate solution constructed by the k-th ant; tau is the pheromone matrix, recording the pheromone concentration of each path parameter selection in the solution space. The higher the pheromone concentration, the better the path performed in historical searches, and the more likely the ant is to choose it; heuristic_info is the heuristic information, based on prior knowledge of the problem characteristics and preset according to the scene rules; construct_solution is the function that constructs the solution, simulating the behavior of ants choosing paths based on pheromones and experience when foraging, and finally generating a complete candidate solution.
[0030] By adopting the above technical solution, based on prior knowledge of the relationship between light intensity, temperature and MPP voltage, and since this prior knowledge is not generated by algorithm iteration but is preset according to the scene rules, it helps ants quickly locate high-quality solution regions. In photovoltaic scenarios, when ants construct candidate solutions, they can prioritize exploring parameter space paths that have performed well in the past and conform to physical laws, thereby improving convergence efficiency and improving the maximum power point tracking efficiency of distributed photovoltaic systems, especially in scenarios with rapid changes in light intensity or partial shading.
[0031] In a preferred embodiment, this application can be further configured such that: when the iteration number It... <It max The optimization process is divided into two stages: FA and EAS. The steps for FA-EAS hybrid optimization include:
[0032] During the iteration process, if the difference between the current optimal fitness and the fitness of the global optimal individual in the previous iteration is greater than ε, then increment It by 1 and continue the FA-EAS hybrid optimization until it converges to a stable solution.
[0033] During the iteration process, if It≥It max If the convergence condition is checked, and the difference between the current optimal fitness and the fitness of the global optimal individual in the previous iteration is less than the preset threshold ε, then it is determined that the solution has converged to a stable solution and the iteration is terminated early.
[0034] By adopting the above technical solution, the global search and local optimization capabilities can be effectively balanced, avoiding the algorithm from getting stuck in local optima. At the same time, by adaptively adjusting the number of iterations, the convergence speed can be improved, the computational overhead can be reduced, and the maximum power point can be quickly locked when the photovoltaic system parameters change, thereby improving the system's energy conversion efficiency and operational stability. Furthermore, by dynamically judging the convergence state through preset thresholds, the accuracy of parameter adjustment can be further optimized, enhancing the robustness and adaptability of MPPT control.
[0035] In a preferred embodiment, this application can be further configured as follows: the step of comparing and judging the fitness of the current optimal solution and the global optimal solution, adopting an elitist strategy, retaining historical optimal solutions, and adjusting the adaptive parameters includes:
[0036] The fitness of the optimal solution X_best in each iteration is compared with that of the global optimal solution X_global_best. An elitist strategy is adopted, historical optimal solutions are retained, and adaptive parameters are adjusted. These adaptive parameters include the random step size α and the information evaporation factor ρ, which are adjusted using the following formula:
[0037]
[0038] ρ = 0.1 + 0.8 * (It / It) max );
[0039] Where It is the number of iterations, It max This represents the maximum number of iterations.
[0040] By adopting the above technical solution, the global exploration and local development capabilities can be effectively balanced in each iteration, avoiding the algorithm from getting stuck in local optima, thereby significantly improving the convergence speed and accuracy of maximum power point tracking. At the same time, by dynamically updating the random step size and information evaporation factor, the adaptability of the algorithm is enhanced, enabling it to quickly respond to local shading or partial shading problems in distributed photovoltaic arrays, ultimately improving the overall energy conversion efficiency.
[0041] In a preferred embodiment, this application can be further configured such that the step of preprocessing the photovoltaic array data to obtain irradiance, temperature, and MPP voltage datasets includes:
[0042] Acquire irradiance G, temperature T, and MPP voltage U mpp The mathematical relationship is expressed by the formula:
[0043] G = (G max -G min )*rand+G min ;
[0044] T = (T max -T min )*rand+T min ;
[0045] U mpp =U mps +(beta*(TT ref ));
[0046] Among them, G max G represents the maximum value of irradiance. min T represents the minimum irradiance. max T represents the maximum temperature. min The minimum temperature; rand∈[0,1]; U mpp U is the MPP voltage value. mps T represents the MPP voltage of the photovoltaic array under STC. ref This is the reference temperature under STC; beta = 0.36091.
[0047] By adopting the above technical solutions, the mathematical relationship between irradiance, temperature and MPP voltage data is constructed to form a dataset, which provides standardized input for subsequent model training, analysis and optimization, and improves the reliability of photovoltaic system design optimization.
[0048] Secondly, this application provides an MPPT system based on distributed photovoltaic power generation, which adopts the following technical solution:
[0049] An MPPT system based on distributed photovoltaic power generation includes:
[0050] Data preprocessing module: preprocesses the photovoltaic array data to obtain irradiance, temperature, and MPP voltage datasets; Parameter optimization and partitioning module: uses K-fold cross-validation and RMSE function evaluation to determine the optimal number of hidden layer nodes in ElmanNN, and partitions the dataset into training, validation, and test sets;
[0051] FA-EAS parameter optimization module: Input the training set into the global search of the firefly algorithm and the local optimization of the ant colony algorithm until convergence to a stable solution, and define the stable solution as the optimal parameters of FA-EAS;
[0052] Model training and prediction module: Updates the weight threshold of ElmanNN based on the optimal parameters, and deploys the trained ElmanNN model to perform online prediction of MPP voltage;
[0053] PID control module: The difference between the predicted voltage and the reference voltage is input to the PID controller, which calculates the control quantity through the incremental PID algorithm, generates a PWM signal to control the duty cycle of the Boost converter, and achieves maximum power point tracking.
[0054] Thirdly, this application provides an electronic device that adopts the following technical solution:
[0055] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the MPPT method based on distributed photovoltaics described above.
[0056] Fourthly, this application provides a computer storage medium, as follows:
[0057] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the MPPT method based on distributed photovoltaics described above.
[0058] In summary, this application has the following beneficial technical effects:
[0059] 1. This application optimizes the ElmanNN weight threshold through the FA-EAS hybrid optimization algorithm, that is, it combines the global search capability of the firefly algorithm and the local optimization capability of the ant colony optimization algorithm, which can improve the parameter convergence speed and global optimization accuracy, realize high-precision online prediction of MPP voltage, and thus improve the tracking speed, stability and success rate of MPPT.
[0060] 2. This application provides a reliable voltage prediction basis for PID control through the FA-EAS optimized ElmanNN model, and combines the incremental PID algorithm to quickly respond to the voltage difference, generate a precise PWM signal to regulate the Boost converter, enhance the dynamic response and robustness of MPPT, reduce power fluctuations, and improve the overall system performance. Attached Figure Description
[0061] Figure 1 This is a flowchart of an MPPT method based on distributed photovoltaics in one embodiment of this application.
[0062] Figure 2 This is a flowchart of a sub-step of step S3 in one embodiment of this application.
[0063] Figure 3 This is a flowchart of the steps in the FA stage of step S31 in one embodiment of this application.
[0064] Figure 4 This is a flowchart of the EAS stage in step S31 of one embodiment of this application.
[0065] Figure 5 This is a flowchart of a sub-step of step S31 in one embodiment of this application.
[0066] Figure 6 This is a flowchart of a sub-step of step S32 in one embodiment of this application.
[0067] Figure 7 This is a flowchart of a sub-step of step S1 in one embodiment of this application.
[0068] Figure 8 This is a schematic diagram of the structure of an MPPT system based on distributed photovoltaics according to one embodiment of this application.
[0069] Figure 9 This is a schematic block diagram of an electronic device in one embodiment of this application.
[0070] Figure labels: 1. Data preprocessing module; 2. Parameter optimization and partitioning module; 3. FA-EAS parameter optimization module; 4. Model training and prediction module; 5. PID control and adjustment module. Detailed Implementation
[0071] The following is in conjunction with the appendix Figure 1-9 This application will be described in further detail.
[0072] It should be noted that all actions involving the acquisition of data or information in this application are carried out in accordance with the relevant data protection laws and policies of the country where the application is located, and with the authorization of the relevant users.
[0073] refer to Figure 1 An MPPT method based on distributed photovoltaics specifically includes:
[0074] S1. Preprocess the photovoltaic array data to obtain irradiance, temperature and MPP voltage datasets.
[0075] Specifically, the output voltage of the photovoltaic array is collected by a voltage sensor, and the output current is collected by a current sensor. The two work together to obtain voltage-current data. At the algorithm level, the MPPT control algorithm is used to monitor the voltage and current in real time and calculate the output power, tracking the MPP voltage corresponding to the maximum power. Based on the collected irradiance, temperature, and MPP voltage data, a convolutional neural network (CNN) consisting of convolutional layers, pooling layers, and fully connected layers (FC) is used. Through key mechanisms such as receptive field, convolutional kernel, stride, fully connected layers, and pooling, the input image or data is subjected to feature extraction, classification, and dimensionality reduction processing, ultimately mapping it to a one-dimensional variable.
[0076] S2. Using K-fold cross-validation and RMSE function evaluation, the optimal number of hidden layer nodes in ElmanNN is determined, and the dataset is divided into training set, validation set and test set.
[0077] Specifically, K-fold cross-validation and the RMSE function are used to determine the optimal number of hidden layer nodes in ElmanNN, and the training, validation, and test sets are divided. The RMSE function is as follows:
[0078]
[0079] Among them, Y j (i) is the predicted value, T j (i) represents the true value, and n represents the number of input datasets. K-fold cross-validation and the RMSE function are used for evaluation to effectively avoid model overfitting and determine the optimal number of hidden nodes for the ElmanNN. The training set is used to train the ElmanNN with the selected structure, the validation set is used to fine-tune hyperparameters, and the test set is used to evaluate the generalization performance of the final model, ensuring that the prediction accuracy meets the requirements of MPPT applications.
[0080] S3. Input the training set into the global search of the firefly algorithm and the local optimization of the ant colony optimization algorithm until a stable solution is converged. The stable solution is defined as the optimal parameters of FA-EAS.
[0081] Specifically, the firefly algorithm parameters are first initialized, including the number of fireflies, the brightness attenuation coefficient, and the maximum number of iterations, with the training set data set as the optimization target. The firefly algorithm performs a global search, updating positions by simulating the brightness attraction mechanism among fireflies, with the position vector corresponding to the weights and thresholds of the Elman NN. For each firefly position (i.e., a set of Elman network parameters), the error (e.g., RMSE) between the predicted MPP voltage and the actual MPP voltage is calculated, and this error is defined as the firefly's fitness value (fitness(X)). Subsequently, an ant colony optimization algorithm is introduced, constructing a pheromone map in the high-quality regions discovered by the firefly algorithm, and finely adjusting the parameters using ant path selection and pheromone update mechanisms to improve the accuracy of the solution. Iteration continues until the rate of change of the objective function value is lower than a preset threshold or the maximum number of iterations is reached. At this point, the solution converges to a stable state, and this stable solution is the optimal parameter for FA-EAS, which can effectively improve the dynamic response speed and power tracking efficiency of MPPT control. Ultimately, these optimized parameters will be applied to subsequent neural network training to reduce training time and avoid local optima traps, thereby achieving faster responses under dynamic irradiance and temperature changes.
[0082] S4. Update the weight threshold of ElmanNN based on the optimal parameters, and deploy the trained ElmanNN model to perform online prediction of MPP voltage.
[0083] Specifically, the system acquires input variables such as the output voltage, current, irradiance, and temperature of the photovoltaic array through a real-time data acquisition module, and then feeds these variables into the model for forward calculation. Based on these inputs, ElmanNN outputs the predicted MPP voltage value.
[0084] S5. Input the difference between the predicted voltage and the reference voltage to the PID controller. The incremental PID algorithm will be used to calculate the control quantity and generate a PWM signal to control the duty cycle of the Boost converter, thereby achieving maximum power point tracking.
[0085] Specifically, the difference between the MPP voltage predicted by Elman NN and the actual voltage is input to the PID controller. An incremental PID algorithm calculates the control input, which is then compared to a triangular wave carrier wave. When the control input is greater than the triangular wave, a high level is output; when it is less, a low level is output. This converts the continuous analog control signal into a discrete square wave PWM signal, used to adjust the switching duty cycle of the Boost converter. The modulated carrier signal is then input to a DC-DC converter, and an inverter converts the DC power to AC power, ensuring efficient energy conversion even under dynamic irradiance and temperature fluctuations.
[0086] refer to Figure 2 Furthermore, in one embodiment, step S3 is refined into the following sub-steps:
[0087] S30. Set the FA parameters for the firefly algorithm, the EAS parameters for the ant colony optimization algorithm, and the shared parameters, where the shared parameters include the maximum number of iterations It. max Convergence accuracy threshold ε.
[0088] Specifically, computational efficiency and optimization accuracy are balanced by setting FA and EAS parameters, while shared parameters such as the maximum number of iterations and the convergence accuracy threshold are used to control the termination conditions of the algorithm, ensuring rapid convergence of the global optimum within limited computational resources. The maximum number of iterations in the shared parameters limits the algorithm's runtime to avoid infinite loops or premature termination of iterations based on conditions. The convergence accuracy threshold defines the termination criterion for the optimization process; convergence is determined when the change in the objective function value is less than this threshold. This allows for efficient driving of the MPPT process under dynamic irradiance and temperature fluctuations, improving the overall energy conversion efficiency of the Boost converter and inverter.
[0089] S31, when the iteration number It <It max The optimization process is divided into two stages: FA and EAS. The FA stage updates the firefly's position based on brightness and distance, calculates the fitness of the new position, and records the current optimal solution. The EAS stage involves the ants constructing, evaluating, and updating the solution based on pheromones and heuristic information.
[0090] Specifically, in the FA phase, each individual firefly updates its position based on its current brightness and distance from other fireflies. The brightness value is calculated by the objective function and used to evaluate the quality of the solution. After the position is updated, the fitness value of the new position is recalculated. The fitness value reflects the power output efficiency of the photovoltaic system under the current irradiance and temperature. The current global optimal solution is recorded by comparison, and the optimal solution corresponds to the maximum power point position of the MPPT.
[0091] In the EAS phase, individual ants construct candidate solutions based on the pheromone concentration matrix and heuristic information, employing a probabilistic selection mechanism during the construction process. After the solution construction is completed, the fitness value of the solution is evaluated. The fitness value is also calculated based on the objective function and compared with the optimal solution recorded in the FA phase. Finally, the pheromone concentration is updated based on the evaluation results. The pheromone evaporation and enhancement mechanism is used to guide the search direction of subsequent ants, thereby refining the solution in the local area.
[0092] Through FA-EAS hybrid optimization, the FA stage uses global exploration to quickly locate potential optimal regions, while the EAS stage uses local development to optimize the accuracy of the solution. The two are executed together until the convergence condition is met, ensuring efficient MPPT control in dynamic environments.
[0093] S32. Compare and judge the fitness of the current optimal solution and the global optimal solution, adopt an elite strategy, retain the historical optimal solution, and adjust the adaptive parameters until convergence to a stable solution.
[0094] Specifically, at the end of each iteration, the fitness values of the current optimal solution and the global optimal solution are compared. If the fitness value of the current optimal solution is higher, it indicates that it corresponds to a higher photovoltaic power output efficiency, and the global optimal solution is updated to that value. An elitist strategy is adopted to retain historical optimal solutions in the pheromone concentration matrix. By increasing the pheromone concentration along their paths, the optimal solutions are ensured not to be overwritten, while also guiding the search direction of subsequent ants.
[0095] By adjusting the adaptive parameters, the FA-EAS hybrid optimization can stably converge to the maximum power point, thereby achieving stable and efficient MPPT control under dynamic irradiance and temperature conditions and optimizing energy capture efficiency.
[0096] In addition, refer to Figure 3 Furthermore, in one embodiment, in step S31, the FA parameter is set with population size nPop and maximum attraction β. max0 The light absorption coefficient γ, the random step size α, and the FA stage in the FA-EAS hybrid optimization process are refined into the following sub-steps:
[0097] S310. Define the meaning of the FA parameters, where the firefly position represents the combination of weight threshold parameters used in ElmanNN to establish the mapping relationship between irradiance, temperature and MPP voltage; the distance between fireflies represents the spatial difference of different weight threshold parameter combinations; the optimal position among all fireflies represents the weight threshold parameter combination that makes the MPP voltage prediction accuracy the highest in the current iteration; and the maximum brightness of the fireflies represents the fitness value corresponding to the optimal weight threshold parameter combination.
[0098] Specifically, in the FA stage, there is an indirect mapping relationship between the firefly's position and the MPP voltage, linked by a chain of "firefly position → ElmanNN parameters → MPP voltage prediction". Each element in the firefly position vector corresponds to a weight or threshold parameter in the ElmanNN, and this parameter combination is used to establish a mapping model with irradiance and temperature as input and predicted MPP voltage as output.
[0099] S311. Input the irradiance and temperature from the training set into the FA for optimization, where the individual position update process is represented as follows:
[0100]
[0101] x i =x i +β·(x j -x i)+α·(rand-1 / 2);
[0102] Where I is the relative fluorescence intensity at the current moment, I max0 β represents the maximum fluorescence intensity of the firefly at the current moment; β represents the attraction intensity at the current moment; x i x j Let i be the spatial position of the fireflies, j be the individual firefly whose brightness is being compared with i, and r be the individual fireflies whose brightness is being compared with i. ij α is the distance between fireflies i and j at the current time; α∈[0,1]; rand is a random number in [0,1].
[0103] Specifically, by inputting the irradiance and temperature from the training set into the FA for optimization, the adaptability and robustness of the MPPT algorithm under complex lighting conditions can be effectively improved. The Firefly Algorithm (FA) uses fluorescence brightness to simulate individual fitness, while a random step size factor maintains population diversity while ensuring exploration towards better solutions. The firefly's position vector can be represented by the weights and thresholds of the Elman NN. For each firefly position (i.e., a set of Elman NN parameters), the error (e.g., RMSE) between its predicted MPP voltage and the actual MPP voltage is calculated. This error is the firefly's "fitness value" (fitness(X)). A smaller error indicates a better fitness value, meaning the firefly is "brighter" and attracts other fireflies with lower brightness to move towards it, resulting in a position update. The quality of a firefly's position (whether it is close to the optimal solution) can be judged by the prediction error of the MPP voltage; a smaller prediction error indicates a better firefly position and better fitness.
[0104] S312. Input candidate solutions X, output fitness. The solution with the minimum fitness is defined as the optimal solution, where the formula is:
[0105] X_best=argmin(fitness(X));
[0106] Where X_best is the optimal solution, and X is the value of x. i or x j The unified representation is that fitness(X) is a function that measures the quality of solution X. The smaller the fitness value, the better the solution X is. argmin(fitness(X)) represents the value of the independent variable that makes the function reach its minimum value. It means finding the solution X that makes the fitness function fitness(X) reach its minimum value, and defining the optimal solution of this iteration as X_best, and establishing the optimal mapping relationship between irradiance, temperature and MPP voltage.
[0107] Specifically, during the iteration process, the firefly's position update mechanism ensures that individuals continuously move towards a better fitness, effectively avoiding local optima traps. At the same time, by continuously minimizing the fitness function, the algorithm can quickly converge to the optimal solution, accurately establish a high-precision mapping relationship between irradiance, temperature, and MPP voltage, enhance the maximum power point tracking performance of the distributed photovoltaic system, thereby reducing prediction errors under environmental fluctuations and also reducing computational resource consumption.
[0108] In addition, refer to Figure 4 Furthermore, in one embodiment, in step S31, the EAS parameters are set with population size m, pheromone evaporation ρ, and the EAS stage in the FA-EAS hybrid optimization process is refined into the following sub-steps:
[0109] S313. The current optimal solution X_best obtained through global search in the FA stage is used as the initial pheromone source for the EAS stage. Ants complete the construction, evaluation, and pheromone update of solutions based on pheromone and heuristic information, using the formula:
[0110] X k =construct_solution(tau,heuristic_info);
[0111] Among them, X k The result returned by the function represents the candidate solution constructed by the k-th ant; tau is the pheromone matrix, recording the pheromone concentration of each path parameter selection in the solution space. The higher the pheromone concentration, the better the path performed in the historical search, and the more likely the ant is to choose it; heuristic_info is the heuristic information, based on prior knowledge of the problem characteristics and preset according to the scene rules; construct_solution is the function that constructs the solution, simulating the behavior of ants choosing paths based on pheromones and experience when foraging, and finally generating a complete candidate solution.
[0112] Specifically, when constructing candidate solutions, the ant traverses all possible combinations of path parameters and calculates the selection probability based on the pheromone concentration τ and the heuristic information heuristic_info. Where X... kThe result returned by the function represents the candidate solution constructed by the k-th ant (an individual in the ant colony). `tau` is the pheromone matrix, recording the pheromone concentration of each "path" (parameter selection) in the solution space. A higher pheromone concentration indicates that the path (parameter combination) has performed better in historical searches, and the ant is more likely to choose it. `heuristic_info` is heuristic information, based on prior knowledge of the problem's characteristics, not generated by algorithm iteration, but preset according to scenario rules. In this embodiment, when applied to a photovoltaic scenario, it can be empirical rules such as "positive correlation between light intensity G and MPP voltage" or "negative correlation between temperature T and MPP voltage," used to help ants quickly locate high-quality solution areas. `construct_solution` is the function for constructing the solution, simulating the behavior of ants "selecting paths based on pheromones and experience" when foraging, ultimately generating a complete candidate solution. In a photovoltaic scenario, when constructing candidate solutions, ants can prioritize exploring parameter space paths that have historically performed well and conform to physical laws, thereby improving convergence efficiency and ultimately improving the maximum power point tracking efficiency of the distributed photovoltaic system, especially in scenarios with rapidly changing light intensity or partial shading.
[0113] In addition, refer to Figure 5 Furthermore, in one embodiment, step S31 is refined into the following sub-steps:
[0114] S314. During the iteration process, if the difference between the current optimal fitness and the fitness of the global optimal individual in the previous iteration is greater than ε, then increment the iteration number It by 1 and continue to perform FA-EAS hybrid optimization until it converges to a stable solution.
[0115] Specifically, ε represents the convergence threshold of fitness changes, used to determine whether the algorithm is close to a stable state. If the fitness difference is less than or equal to ε, the FA-EAS hybrid optimization is considered to have converged, the iteration stops, and the current global optimal solution is output as a candidate parameter combination for MPP; otherwise, It is incremented by 1, and the global exploration steps of the Firefly Algorithm (FA) and the local development steps of the Ant Colony Algorithm (EAS) are re-executed. The FA part enhances diversity by randomly perturbing the solution space to avoid premature convergence, while the EAS part utilizes historical pheromone concentration and heuristic information from photovoltaic physics (such as the positive correlation between light intensity and voltage) to guide ants to prioritize searching high-potential areas. This allows the system to efficiently lock onto the maximum power point under conditions of rapid light fluctuations or partial shading, improving tracking response speed and system stability.
[0116] S315. During the iteration process, if It ≥ It max If the convergence condition is checked, and the difference between the current optimal fitness and the fitness of the global optimal individual in the previous iteration is less than the preset threshold ε, then it is determined that the solution has converged to a stable solution and the iteration is terminated early.
[0117] Specifically, by dynamically determining the convergence state through a preset threshold, the accuracy of parameter adjustments can be further optimized, enhancing the robustness and adaptability of MPPT control. The preset threshold is dynamically adjusted based on the actual operating characteristics of the photovoltaic system and historical experimental data, ensuring reliable identification of the convergence state even under rapidly changing light intensity or partial shading scenarios. If the fitness difference is less than or equal to the threshold, the system immediately terminates the iteration process and outputs the current globally optimal solution as a candidate parameter combination for the maximum power point (MPP). Otherwise, the global exploration step of the FA algorithm continues, introducing new solutions through random perturbation of the solution space to maintain population diversity, while simultaneously triggering the local development step of the EAS algorithm. This utilizes pheromone concentration and photovoltaic physics heuristics (such as the voltage-light correlation) to guide the ant colony to search for high-potential areas. Through FA-EAS hybrid optimization, not only are the number of invalid iterations reduced and the tracking response speed improved, but the system's stability in dynamic environments is also enhanced, preventing the algorithm from getting trapped in local optima or premature convergence, thus efficiently locking onto the true maximum power point.
[0118] In addition, refer to Figure 6 Furthermore, in one embodiment, step S32 is refined into the following sub-steps:
[0119] S320. Compare and determine the fitness of the optimal solution X_best in each iteration with the global optimal solution X_global_best. Adopt an elitist strategy, retain historical best solutions, and adjust the adaptive parameters, including the random step size α and the information evaporation factor ρ, using the following formula:
[0120]
[0121] ρ = 0.1 + 0.8 * (It / It) max );
[0122] Where It is the number of iterations, It max This represents the maximum number of iterations.
[0123] Specifically, by adjusting the random step size α, the global exploration and local development capabilities can be dynamically balanced, avoiding the algorithm from falling into local optima traps, improving the convergence speed and accuracy of maximum power point tracking, and enhancing adaptive performance to quickly respond to local shading or partial obstruction problems in distributed photovoltaic arrays, thereby improving the overall energy conversion efficiency.
[0124] By adjusting the pheromone evaporation rate ρ, the evaporation rate of pheromones can be dynamically controlled, thereby optimizing the path selection behavior of ants or agents, preventing the algorithm from getting stuck in local stagnation due to excessive pheromone accumulation, and helping to quickly adapt to environmental changes such as uneven lighting or temperature fluctuations in distributed photovoltaic arrays, reducing power loss, and improving system stability and energy capture efficiency.
[0125] In each iteration, it can effectively balance global exploration and local development capabilities, thereby avoiding local optimum traps and improving the convergence speed and accuracy of maximum power point tracking. At the same time, by dynamically updating the random step size and information evaporation factor, it enhances the adaptive performance, enabling it to quickly respond to local shading or partial shading problems in distributed photovoltaic arrays, thereby improving the overall energy conversion efficiency.
[0126] In addition, refer to Figure 7 Furthermore, in one embodiment, step S1 is refined into the following sub-steps:
[0127] S10. Obtain irradiance G, temperature T, and MPP voltage U. mpp The mathematical relationship is expressed by the formula:
[0128] G = (G max -G min )*rand+G min ;
[0129] T = (T max -T min )*rand+T min ;
[0130] U mpp =U mps +(beta*(TT ref ));
[0131] Among them, G max G represents the maximum value of irradiance. min T represents the minimum irradiance. max T represents the maximum temperature. min The minimum temperature; rand∈[0,1]; U mpp U is the MPP voltage value. mps T represents the MPP voltage of the photovoltaic array under STC. ref This is the reference temperature under STC; beta = 0.36091.
[0132] Specifically, in this embodiment, G max 1000W / m 2 T max At 35℃, G min 0W / m 2 Tmin 20℃; rand∈[0,1]; V mps Here, beta is the MPP voltage of the photovoltaic array under STC; beta = 0.36091. The formula for calculating irradiance is used to generate values between G and G. min and G max Random light intensity between T and T. The fluctuation characteristics of light intensity in a real environment are simulated using a random number rand (between 0 and 1); the temperature calculation formula is used to generate a value between T and T. min and T max The random temperature values between these values also simulate the randomness of the ambient temperature; the MPP voltage Um is calculated. pp The formula describes the relationship between MPP voltage and temperature, reflecting the linear effect of temperature changes on MPP voltage. Irradiance G, temperature T, and MPP voltage U are obtained through calculation. mpp The mathematical relationships can be used to construct mathematical relationships between irradiance, temperature, and MPP voltage data, forming a dataset that provides standardized input for subsequent model training, analysis, and optimization, thereby improving the reliability of photovoltaic system design optimization.
[0133] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0134] This application also provides an MPPT system based on distributed photovoltaics, which corresponds one-to-one with the MPPT method based on distributed photovoltaics in the embodiments.
[0135] An MPPT system based on distributed photovoltaic power generation includes: a data preprocessing module 1, a parameter optimization and partitioning module 2, a FA-EAS parameter optimization module 3, a model training and prediction module 4, and a PID control and adjustment module 5. The functional modules are described below:
[0136] Data preprocessing module 1: Preprocesses photovoltaic array data to obtain irradiance, temperature, and MPP voltage datasets;
[0137] Parameter optimization partitioning module 2: K-fold cross-validation and RMSE function evaluation are used to determine the optimal number of hidden layer nodes in ElmanNN and to partition the dataset into training set, validation set and test set;
[0138] FA-EAS parameter optimization module 3: Input the training set to the global search of the firefly algorithm and the local optimization of the ant colony algorithm, converge to a stable solution, and define it as the optimal parameters of FA-EAS;
[0139] Model training and prediction module 4: Update the ElmanNN weight threshold based on the optimal parameters and deploy the model for online prediction of MPP voltage;
[0140] PID control adjustment module 5: Input the difference between the predicted voltage and the reference voltage into the PID controller, calculate the control quantity through the incremental PID algorithm, generate a PWM signal to control the duty cycle of the Boost converter, and achieve maximum power point tracking.
[0141] The system comprises the following modules: Data preprocessing module 1 acquires raw data on irradiance, temperature, and MPP voltage to form a dataset; Parameter optimization and partitioning module 2 uses K-fold cross-validation and RMSE function evaluation to determine the optimal number of hidden layer nodes in the ElmanNN and allocates the data as training, validation, and test sets; FA-EAS parameter optimization module 3 integrates the global search of the firefly algorithm and the local optimization of the ant colony optimization algorithm, iterating collaboratively until convergence and outputting the optimal FA-EAS parameters; Model training and prediction module 4 implements ElmanNN weight threshold updates and real-time predictions, and deploys the model to output predicted MPP voltage values; PID control and adjustment module calculates the voltage difference input to the PID controller, uses an incremental PID algorithm to calculate the control quantity, converts it into a duty cycle signal to control the Boost converter, and achieves maximum power point tracking. Through the combined use of these modules, the tracking speed, stability, and success rate of MPPT can be improved.
[0142] Specific limitations regarding the MPPT system based on distributed photovoltaic (PV) power generation can be found in the context of the limitations on the MPPT method based on distributed PV power generation, and will not be repeated here. Each module in the aforementioned MPPT system based on distributed PV power generation can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the electronic device, or stored in the memory of the electronic device as software, so that the processor can call and execute the operations corresponding to each module. In one embodiment, an electronic device is provided, which is a user terminal. (Reference) Figure 9 The electronic device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides the environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores detection data tables. The network interface allows communication with external terminals via a network connection. When the computer program is executed by the processor, it implements an MPPT method based on distributed photovoltaics.
[0143] In one embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0144] S1. Preprocess the photovoltaic array data to obtain irradiance, temperature and MPP voltage datasets.
[0145] S2. Using K-fold cross-validation and RMSE function evaluation, the optimal number of hidden layer nodes in ElmanNN is determined, and the dataset is divided into training set, validation set and test set.
[0146] S3. Input the training set into the global search of the firefly algorithm and the local optimization of the ant colony optimization algorithm until a stable solution is converged. The stable solution is defined as the optimal parameters of FA-EAS.
[0147] S4. Update the weight threshold of ElmanNN based on the optimal parameters, and deploy the trained ElmanNN model to perform online prediction of MPP voltage.
[0148] S5. Input the difference between the predicted voltage and the reference voltage to the PID controller. The incremental PID algorithm will be used to calculate the control quantity and generate a PWM signal to control the duty cycle of the Boost converter, thereby achieving maximum power point tracking.
[0149] In one embodiment, the sub-steps of step S3 refinement include:
[0150] S30. Set the FA parameters for the firefly algorithm, the EAS parameters for the ant colony optimization algorithm, and the shared parameters, where the shared parameters include the maximum number of iterations It. max Convergence accuracy threshold ε.
[0151] S31, when the iteration number It <It max The optimization process is divided into two stages: FA and EAS. The FA stage updates the firefly's position based on brightness and distance, calculates the fitness of the new position, and records the current optimal solution. The EAS stage involves the ants constructing, evaluating, and updating the solution based on pheromones and heuristic information.
[0152] S32. Compare and judge the fitness of the current optimal solution and the global optimal solution, adopt an elite strategy, retain the historical optimal solution, and adjust the adaptive parameters until convergence to a stable solution.
[0153] In one embodiment, in step S31, the FA parameter is set with population size nPop and maximum attraction β. max0 The light absorption coefficient γ, the random step size α, and the sub-steps for refining the FA stage in the FA-EAS hybrid optimization process include:
[0154] S310. Define the meaning of FA parameters, where the firefly position represents the combination of weight threshold parameters used in ElmanNN to establish the mapping relationship between irradiance, temperature and MPP voltage; the distance between fireflies represents the spatial difference of different weight threshold parameter combinations; the optimal position among all fireflies represents the weight threshold parameter combination that makes the MPP voltage prediction accuracy the highest in the current iteration; the maximum brightness of the firefly represents the fitness value corresponding to the optimal weight threshold parameter combination.
[0155] S311. Input the irradiance and temperature from the training set into the FA for optimization, where the individual position update process is represented as follows:
[0156] x i =x i +β·(x j -x i )+α·(rand-1 / 2);
[0157] Where I is the relative fluorescence intensity at the current moment, I max0 β represents the maximum fluorescence intensity of the firefly at the current moment; β represents the attraction intensity at the current moment; x i x j Let i be the spatial position of the fireflies, j be the individual firefly whose brightness is being compared with i, and r be the individual fireflies whose brightness is being compared with i. ij α is the distance between fireflies i and j at the current time; α∈[0,1]; rand is a random number in [0,1].
[0158] S312. Input candidate solutions X, output fitness. The solution with the minimum fitness is defined as the optimal solution, where the formula is:
[0159] X_best=argmin(fitness(X));
[0160] Where X_best is the optimal solution, and X is the value of x. i or x j The unified representation is that fitness(X) is a function that measures the quality of solution X. The smaller the fitness value, the better the solution X is. argmin(fitness(X)) represents the value of the independent variable that makes the function reach its minimum value. It means finding the solution X that makes the fitness function fitness(X) reach its minimum value, and defining the optimal solution of this iteration as X_best, and establishing the optimal mapping relationship between irradiance, temperature and MPP voltage.
[0161] In one embodiment, in step S31, the EAS parameters are set with population size m, pheromone evaporation ρ, and the sub-steps for refining the EAS stage in the FA-EAS hybrid optimization process include:
[0162] S313. The current optimal solution X_best obtained through global search in the FA stage is used as the initial pheromone source for the EAS stage. Ants complete the construction, evaluation, and pheromone update of solutions based on pheromone and heuristic information, using the formula: X k =construct_solution(tau,heuristic_info);
[0163] Among them, X k The result returned by the function represents the candidate solution constructed by the k-th ant; tau is the pheromone matrix, recording the pheromone concentration of each path parameter selection in the solution space. The higher the pheromone concentration, the better the path performed in the historical search, and the more likely the ant is to choose it; heuristic_info is the heuristic information, based on prior knowledge of the problem characteristics and preset according to the scene rules; construct_solution is the function that constructs the solution, simulating the behavior of ants choosing paths based on pheromones and experience when foraging, and finally generating a complete candidate solution.
[0164] In one embodiment, the refined sub-steps of step S31 include:
[0165] S314. During the iteration process, if the difference between the current optimal fitness and the fitness of the global optimal individual in the previous iteration is greater than ε, then increment It by 1 and continue the FA-EAS hybrid optimization until it converges to a stable solution.
[0166] S315. During the iteration process, if It ≥ It max If the convergence condition is checked, and the difference between the current optimal fitness and the fitness of the global optimal individual in the previous iteration is less than the preset threshold ε, then it is determined that the solution has converged to a stable solution and the iteration is terminated early.
[0167] In one embodiment, the sub-steps of step S32 are further refined as follows:
[0168] S320. Compare and determine the fitness of the optimal solution X_best in each iteration with the global optimal solution X_global_best. Adopt an elitist strategy, retain historical best solutions, and adjust the adaptive parameters, including the random step size α and the information evaporation factor ρ, using the following formula:
[0169]
[0170] ρ = 0.1 + 0.8 * (It / It) max );
[0171] Where It is the number of iterations, It max This represents the maximum number of iterations.
[0172] In one embodiment, the sub-steps of step S1 refinement include:
[0173] S10. Obtain irradiance G, temperature T, and MPP voltage U. mpp Mathematical relationship:
[0174] G = (G max -G min )*rand+G min ;
[0175] T = (T max -T min )*rand+T min ;
[0176] U mpp =U mps +(beta*(TT ref ));
[0177] Among them, G max G represents the maximum value of irradiance. min T represents the minimum irradiance. max T represents the maximum temperature. min The minimum temperature; rand∈[0,1]; U mpp U is the MPP voltage value. mps T represents the MPP voltage of the photovoltaic array under STC. ref This is the reference temperature under STC; beta = 0.36091.
[0178] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0179] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
Claims
1. An MPPT method based on distributed photovoltaic power, characterized in that, include: Preprocess the photovoltaic array data to obtain irradiance, temperature, and MPP voltage datasets; K-fold cross-validation and RMSE function evaluation were used to determine the optimal number of hidden layer nodes for ElmanNN, and the dataset was divided into training set, validation set and test set. The training set is input into the global search of the Firefly Algorithm and the local optimization of the Ant Colony Optimization Algorithm until a stable solution is converged. This stable solution is defined as the FA-EAS optimal parameters, which include setting the FA parameters of the Firefly Algorithm, the EAS parameters of the Ant Colony Optimization Algorithm, and shared parameters. The shared parameters include the maximum number of iterations, It. max Convergence accuracy threshold ε; when the number of iterations It <It max The optimization process is divided into two stages: FA and EAS, and a hybrid FA-EAS optimization is performed. In the FA stage, the firefly's position is updated based on brightness and distance, the fitness of the new position is calculated, and the current optimal solution is recorded. In the EAS stage, the ants complete the construction, evaluation, and pheromone update of the solution based on pheromones and heuristic information. The fitness of the current optimal solution and the global optimal solution are compared and judged. An elitist strategy is adopted to retain the historical optimal solution and adjust the adaptive parameters until a stable solution is converged. The process involves comparing the fitness of the current optimal solution and the global optimal solution, employing an elitist strategy, retaining historical optimal solutions, and adjusting adaptive parameters until convergence to a stable solution. This includes comparing the fitness of the optimal solution X_best in each iteration and the global optimal solution X_global_best, employing an elitist strategy, retaining historical optimal solutions, and adjusting adaptive parameters, including the random step size α and the information evaporation factor ρ, which are adjusted using the following formula: ; ; Where It is the number of iterations, It max This represents the maximum number of iterations. Update the weight threshold of ElmanNN based on the optimal parameters, and deploy the trained ElmanNN model to perform online prediction of MPP voltage; The difference between the predicted voltage and the reference voltage is input to the PID controller, which calculates the control quantity through the incremental PID algorithm, generates a PWM signal to control the duty cycle of the Boost converter, and achieves maximum power point tracking.
2. The method according to claim 1, characterized in that, The FA parameters are set with population size nPop and maximum attraction β. max0 The light absorption coefficient γ and the random step size α, in the FA-EAS hybrid optimization process, the FA stage includes: Define the meaning of the FA parameters, where the firefly position represents the combination of weight threshold parameters used in ElmanNN to establish the mapping relationship between irradiance, temperature and MPP voltage; the distance between fireflies represents the spatial difference of different weight threshold parameter combinations; the optimal position among all fireflies represents the weight threshold parameter combination that makes the MPP voltage prediction accuracy the highest in the current iteration; and the maximum brightness of the fireflies represents the fitness value corresponding to the optimal weight threshold parameter combination. The irradiance and temperature from the training set are input into the FA for optimization, where the individual position update process is represented as follows: ; ; Where I is the relative fluorescence intensity at the current moment, I max0 β represents the maximum fluorescence intensity of the firefly at the current moment; β represents the attraction intensity at the current moment; x i x j Let i be the spatial position of the fireflies, j be the individual firefly whose brightness is being compared with i, and r be the individual fireflies whose brightness is being compared with i. ij α represents the distance between fireflies i and j at the current moment; α∈[0,1]; rand is a random number in [0,1]. Input candidate solutions X, output fitness; the solution with the minimum fitness is defined as the optimal solution, where the formula is: ; Where X_best is the optimal solution, and X is the value of x. i or x j A unified representation, It is a function that measures the quality of solution X; the smaller the fitness value, the better the solution X. Let represent the values of the independent variable that minimize the function, and let represent the steps to find the fitness function. Find the solution X with the minimum value, and define the optimal solution of this iteration as X_best, and establish the optimal mapping relationship between irradiance, temperature and MPP voltage.
3. The method according to claim 2, characterized in that, The EAS parameters are set with population size m and pheromone ρ. The EAS stage in the FA-EAS hybrid optimization process includes: The current optimal solution X_best obtained through global search in the FA stage is used as the initial pheromone source for the EAS stage. Ants construct, evaluate, and update solutions based on pheromones and heuristic information, using the formula: ; Among them, X k The result returned by the function represents the candidate solution constructed by the k-th ant; tau is the pheromone matrix, which records the pheromone concentration of each path parameter selection in the solution space. The higher the pheromone concentration, the better the path performed in the historical search, and the more likely the ant is to choose it. Heuristic information is based on prior knowledge of the characteristics of the problem and is pre-set according to the rules of the scenario; To construct the solution function, we simulate the behavior of ants choosing paths based on pheromones and experience when foraging, and finally generate a complete candidate solution.
4. The method according to claim 3, characterized in that, The number of iterations It <It max The optimization process is divided into two stages: FA and EAS. The steps for FA-EAS hybrid optimization include: During the iteration process, if the difference between the current optimal fitness and the fitness of the global optimal individual in the previous iteration is greater than 1, then increment It by 1 and continue the FA-EAS hybrid optimization until it converges to a stable solution. During the iteration process, if It≥It ma If the convergence condition is checked, and the difference between the current optimal fitness and the fitness of the global optimal individual in the previous iteration is less than the preset threshold ε, then it is determined that the solution has converged to a stable solution and the iteration is terminated early.
5. The method according to claim 1, characterized in that, The step of preprocessing photovoltaic array data to obtain irradiance, temperature, and MPP voltage datasets includes: Acquire irradiance G, temperature T, and MPP voltage U mpp The mathematical relationship is expressed by the formula: ; ; ; Among them, G max G represents the maximum value of irradiance. min T represents the minimum irradiance. max T represents the maximum temperature. min The minimum temperature; rand∈[0, 1]; U mpp U is the MPP voltage value. mps T represents the MPP voltage of the photovoltaic array under STC. ref The temperature at STC; beta = 0.36091.
6. An MPPT system based on distributed photovoltaic power, characterized in that, include: Data preprocessing module (1): preprocesses the photovoltaic array data to obtain irradiance, temperature and MPP voltage datasets; Parameter optimization partitioning module (2): K-fold cross-validation and RMSE function evaluation are used to determine the optimal number of hidden layer nodes of ElmanNN and the dataset is divided into training set, validation set and test set; FA-EAS parameter optimization module (3): Input the training set into the global search of the firefly algorithm and the local optimization of the ant colony optimization algorithm until a stable solution is converged. Define the stable solution as the optimal parameters of FA-EAS, including: setting the FA parameters of the firefly algorithm, the EAS parameters of the ant colony optimization algorithm and the shared parameters, wherein the shared parameters include the maximum number of iterations It. max Convergence accuracy threshold ε; when the number of iterations It <It max The optimization process is divided into two stages: FA and EAS, and a hybrid FA-EAS optimization is performed. In the FA stage, the firefly's position is updated based on brightness and distance, the fitness of the new position is calculated, and the current optimal solution is recorded. In the EAS stage, the ants complete the construction, evaluation, and pheromone update of the solution based on pheromones and heuristic information. The fitness of the current optimal solution and the global optimal solution are compared and judged. An elitist strategy is adopted to retain the historical optimal solution and adjust the adaptive parameters until a stable solution is converged. The process involves comparing the fitness of the current optimal solution and the global optimal solution, employing an elitist strategy, retaining historical optimal solutions, and adjusting adaptive parameters until convergence to a stable solution. This includes comparing the fitness of the optimal solution X_best in each iteration and the global optimal solution X_global_best, employing an elitist strategy, retaining historical optimal solutions, and adjusting adaptive parameters, including the random step size α and the information evaporation factor ρ, which are adjusted using the following formula: ; ; Where It is the number of iterations, It max This represents the maximum number of iterations. Model training and prediction module (4): Based on the optimal parameters, update the weight threshold of ElmanNN and deploy the trained ElmanNN model to perform online prediction of MPP voltage; PID control adjustment module (5): Input the difference between the predicted voltage and the reference voltage to the PID controller, calculate the control quantity through the incremental PID algorithm, generate a PWM signal to control the duty cycle of the Boost converter, and realize maximum power point tracking.
7. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executed as described in any one of claims 1 to 5, based on the MPPT method of distributed photovoltaics.
8. A computer-readable storage medium, characterized in that, The computer program is stored and can be loaded by a processor and executed as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Decentralized federated learning communication topological structure optimization method, equipment and medium
CN120301777A
Photovoltaic system maximum power point tracking control method based on APSO-SA
CN120523283A