Marine floating photovoltaic field short-term power output prediction method
The PSO-BP prediction model, optimized by BP neural network and particle swarm optimization algorithm, solves the problem of low prediction accuracy of offshore photovoltaic power plants, and realizes stable operation of offshore floating photovoltaic power plants and grid dispatch optimization.
Patent Information
- Application Number
- CN202511253083.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-03
- Publication Date
- 2026-01-13
AI Technical Summary
Existing offshore photovoltaic forecasting methods have low accuracy in complex marine environments and insufficient generalization ability of statistical models, leading to increased complexity in power grid dispatching and threats to the stability of the power system.
A PSO-BP prediction model based on BP neural network and particle swarm optimization algorithm is adopted. By screening key meteorological feature data through marine meteorological monitoring equipment, and combining gradient descent method and particle swarm algorithm to optimize weights and thresholds, an accurate short-term power prediction model is established.
It improves the accuracy of short-term power output prediction for offshore floating photovoltaic systems, reduces the possibility of power system failures, and enhances the reliability and stability of grid operation.
Smart Images

Figure CN121328796A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of offshore photovoltaic power generation, in particular to a short-term power output prediction method for an offshore floating photovoltaic field area. BACKGROUND
[0002] In recent years, excessive energy consumption has caused problems such as ecological environment deterioration and non-renewable energy depletion. Countries around the world have begun to seek new energy development paths, and offshore floating photovoltaics are an effective way to address the contradiction between photovoltaic development and land resources. Solar energy is valued for its safety, efficiency, economy and environmental protection, and grid-connected power generation represented by photovoltaic power generation is an important part of future power systems. Influenced by meteorological factors such as solar radiation, and facing the harsh environment of strong wind, strong waves, high temperature and high humidity at sea, the output power of the floating photovoltaic system has greater randomness, volatility and intermittency. When the floating photovoltaic system is connected to the grid, the complexity of large grid dispatching also increases, and the stability and reliability of the power system operation will be threatened, and photovoltaic cells have a wide footprint and low conversion efficiency. If photovoltaic power generation is integrated into the main grid, it will have a strong impact on the main grid, which is not conducive to maintaining the stability of the grid. Accurate photovoltaic power prediction is an important prerequisite for effectively mitigating adverse effects, and accurate power prediction for floating photovoltaic power generation is of great significance to guiding grid-connected dispatching, maintaining stable grid operation, and ensuring the safe and stable operation of floating photovoltaic power stations.
[0003] Existing offshore photovoltaic prediction methods and technologies are mostly transplanted from land physical models, but the offshore environment is extremely complex, resulting in a significant reduction in prediction accuracy. Some use statistical model methods, but the environmental conditions and equipment characteristics of offshore photovoltaic power stations in different sea areas differ, limiting the generalization ability.
[0004] The effect achieved by the application is to alleviate the problem of grid dispatching through accurate power prediction, and to propose an artificial neural network and particle swarm optimization algorithm to improve the prediction accuracy of power prediction, providing certain ideas for photovoltaic grid connection and stable operation of floating photovoltaic field areas. SUMMARY
[0005] The purpose of the present application is to provide a short-term power output prediction method for an offshore floating photovoltaic field area, which can overcome the problem of reduced prediction accuracy caused by environmental problems in the sea area of existing physical models, and the problem of insufficient generalization ability of statistical models. The method is simple and effective, and effectively improves the short-term power output prediction accuracy of offshore floating photovoltaics.
[0006] The technical solution of the present application is a short-term power output prediction method for an offshore floating photovoltaic field area, characterized in that it comprises the following steps:
[0007] (1) The meteorological characteristic factor data information of the complex environment where the offshore floating photovoltaic field is located is analyzed, and the data information is obtained from the offshore meteorological monitoring equipment. The main meteorological characteristic data information affecting the offshore photovoltaic power generation is screened out as the input of the model;
[0008] Specifically, the step (1) is that the correlation degrees of all influencing factors and photovoltaic output power are calculated one by one by using PCC correlation coefficients substituted into formula (1), and the main influencing factors are selected as the input variables of the prediction model.
[0009]
[0010] In the formula, n is the total number of collected sample data, wherein the correlation coefficient r ranges between [-1, 1], and when greater than 0, the greater the value, the stronger the correlation; x is the meteorological factor data; and y is the floating photovoltaic power data.
[0011] The selection method of the main influencing factors in the step (1) is as follows: the correlation degrees of all influencing factors and photovoltaic output power are calculated by formula (1), that is, the correlation coefficient r. When |r| = 0, it means that there is no correlation. When 0 < |r| ≤ 0.3, it means weak correlation. When 0.3 < |r| ≤ 0.8, it means moderate correlation. When 0.8 < |r| < 1, it means high correlation. When |r| = 1, it means complete correlation. According to this, the meteorological factors with high correlation and complete correlation are recorded as the main factors, which are used as the input variables of the prediction model.
[0012] Table 1 correlation analysis degree
[0013]
[0014] (2) A short-term power prediction model based on BP neural network is established, wherein the offshore irradiance R and the environmental temperature T are input values of the BP neural network, P out is the power prediction value output by the BP neural network, and ω ij and ω jk are connection weights of the BP neural network.
[0015] Before the artificial neural network algorithm is put into the short-term power prediction of the floating photovoltaic power generation system, a large amount of data samples need to be learned and memorized. The neural network includes three layers: input layer, hidden layer and output layer. The neurons of the input layer are the offshore irradiance R and the environmental temperature T affecting the power generation, so the input layer neurons of the floating photovoltaic prediction model are 2. The signals of the input layer are directly transmitted to the neurons in the hidden layer. The output of the output layer is the predicted field power output.
[0016] (3) The BP neural network is trained based on the error propagation rule of the gradient descent method.
[0017] The step (3) specifically comprises the following:
[0018] (3-1) Network initialization: determining the BP neural network input layer node number N, the hidden layer node number I, initializing the BP neural network connection weight ω between the input layer and the hidden layer neurons, the BP neural network connection weight ω between the hidden layer and the output layer neurons, initializing the hidden layer threshold value a, the output layer threshold value b, the adjustment coefficient α and ρ, and giving the learning rate η and the neuron excitation function according to the system input-output sequence (X, Y); ij jk
[0019] (3-2) Hidden layer output calculation: calculating the hidden layer output H according to the input vector X, the BP neural network connection weight ω between the input layer and the hidden layer, and the hidden layer threshold value a by using formula (2): ij j
[0020]
[0021] In the formula, f is the hidden layer excitation function;
[0022] (3-3) Output layer output calculation: calculating the BP neural network prediction output O according to the hidden layer output H obtained in step (3-2), the connection weight ω between the hidden layer and the output layer neurons set in step (3-1), and the output layer threshold value b: j jk k
[0023]
[0024] (3-4) Error calculation: calculating the error between the BP neural network prediction output O obtained in step (3-3) and the expected output Y, i.e. calculating the network output error e: k k k
[0025] e k = Y k - O k , k = 1, 2, …, m (4)
[0026] (3-5) Weight updating: updating the BP neural network connection weight ω and ω according to the network prediction error e calculated in step (3-4) by using formulas (5) and (6), i.e.: k ij jk
[0027]
[0028] ω jk = ω jk + ηH j e k , j = 1, 2, …, l; k = 1, 2, …, m (6)
[0029] (3-6) Threshold value update: using the network prediction error e k update the hidden layer threshold value a and the output layer threshold value b;
[0030]
[0031] (3-7) Determine whether the algorithm iteration is ended, if not, return to step (3-2) and continue until the iteration is ended; based on the error propagation rule of the gradient descent method, the network output error e k is propagated back from the output layer, when the network output error e k is transmitted to a layer, the BP neural network connection weight ω ij , ω jk of this layer can be updated based on this, and then transmitted to the next layer, and the loss function can be optimized;
[0032] (4) Based on steps (2) and (3), the BP neural network is obtained, and a PSO optimized prediction model is established, and the weight is optimized through the global optimization ability of PSO;
[0033] The step (4) specifically includes the following contents:
[0034] Based on the problem that the initial weight of the BP prediction model is sensitive, a PSO-BP prediction model is established by the particle swarm algorithm, while the structure of the BP neural network prediction model is kept unchanged, including:
[0035] In the PSO algorithm, firstly, the random particle swarm (random solution) is initialized, and then iterated until the optimal solution is found. In each iteration process, the particle updates itself by tracking two "extreme values". Among the two "extreme values", one is the optimal solution P best found by the particle itself, and the optimal solution is the individual value; the other is the optimal solution G best found by the whole population at present, and the extreme value is the global extreme value.
[0036] (4-1) Let the position of each particle in the D-dimensional solution space be:
[0037] X i = (x i1 , x i2 , …, x id ) T (8)
[0038] (4-2) Set individual extreme value P best and global extreme value G best respectively:
[0039] P best = (P i1 , P i2 , … … P id ) T (9)
[0040] G best = (G i1 , G i2 , … … G id ) T (10)
[0041] (4-3) In the particle swarm iteration, the velocity of each particle swarm is:
[0042]
[0043] In the formula: V id is the d-dimensional velocity of the i-th sample; P id is the d-dimensional individual extreme value of the i-th sample; P gd is the d-dimensional global optimal solution; k is the iteration number; i = 1, 2, …, D; d = 1, 2, …, D; c1 and c2 are learning factors; ω is the inertia weight;
[0044] (4-4) Assuming that the position of each particle is a vector, each dimension of which corresponds to the weight or threshold value in the BP neural network, in the particle swarm iteration, the position of each particle is as shown in formula (12):
[0045]
[0046] The particle swarm is driven to move in the search space by the velocity update formula (11) and the position update formula (12), and each movement corresponds to the update and adjustment of the weight and threshold value in the BP neural network. In the particle swarm iteration, the weight and threshold value in the BP neural network are constantly updated, so that the prediction result of the BP neural network is closest to the true value.
[0047] (5) Combine the BP neural network established in step (3) with the particle swarm algorithm performed in step (4) to establish a PSO-BP prediction model;
[0048] The step (5) specifically includes the following contents:
[0049] (5-1) Set the number of particles in the particle swarm, and set the position boundary [X minX max ], the minimum value and the maximum value of the moving speed of the particles in the search space [V min ,V max ], the inertia weight, the maximum number of iterations and the learning factor, and initialize the position X i and the speed V i ;
[0050] (5-2) According to the output-related characteristic data collected by the offshore meteorological monitoring equipment and the photovoltaic power output prediction value output by the PSO, the fitness value of each particle is calculated using the particle fitness formula as shown in formula (13), that is, the mean square error, and the optimal solution P best of the particle and the optimal solution G best of the population are adjusted and recorded;
[0051]
[0052] where n' is the sample; c is the number of output neurons; Y ij is the expected output value of the i-th sample at the j-th output period; y ij is the actual output value of the i-th sample at the j-th output period;
[0053] (5-3) The speed of each particle group is calculated using formula (11):
[0054] In the iteration of the particle group, the position of each particle group is constantly calculated using formula (12); according to the speed of the particle group obtained by formula (11) and the position of each particle group obtained by formula (12), the speed and position of the updated particle are constantly updated;
[0055] (5-4) Determine whether the updated particle speed and position obtained by step (5-3) exceed the range set in step (5-1):
[0056] If V i >V max , then V i =V max : When the particle speed exceeds V max , the particle moves too fast in the search space and may skip the area where the optimal solution is located, resulting in the algorithm failing to converge to the global optimal solution; by limiting the speed to V max , the particle can be prevented from moving too fast, allowing the particle to search more carefully around the optimal solution and improving the probability of finding the global optimal solution;
[0057] If V i V min , then V i =V min : When the particle speed is less than V minAt this time, the particle moves too slowly in the search space, the search efficiency is low, and the convergence time of the algorithm is increased;The speed is limited to V min The particle can explore the solution space at a certain rate, improve the search efficiency, and make the algorithm converge to the optimal solution faster;
[0058] If X i >X max , let X i =X max : when the particle position exceeds X max , the particle searches the area outside the solution space, and the corresponding weight and threshold combination may make the output of the BP neural network unstable or unable to converge;By limiting the position to X max , it can be ensured that the particle searches within a reasonable solution space, improving the effectiveness and reliability of the algorithm;
[0059] If X i X min , let X i =X min : when the particle position is less than X min , it also means that the particle searches the area outside the solution space, and the corresponding weight and threshold combination may cause the BP neural network to work abnormally;Limiting the position to X min can ensure that the particle searches within a reasonable solution space, avoid unreasonable search results, and ensure the stability and accuracy of the algorithm.
[0060] (5-5) calculate the particle fitness again using formula (13);If the extreme position or the number of iterations found by the particle at this time reaches the predetermined error standard, the process is ended, and the prediction result corresponding to the offshore floating photovoltaic short-term power output prediction model is output, otherwise, return to step (5-1) to reinitialize the position and speed of the particle, and then repeat steps (5-2) to (5-5), so that the PSO-BP prediction model can approach the optimal solution through continuous iteration optimization, until the predetermined error standard is met to approach the optimal solution, and the prediction result is output.
[0061] Advantages of the present application:
[0062] (1) In view of the problems existing in the BP neural network prediction model, the present application optimizes the initial weight and threshold of the BP neural network by using the PSO algorithm, effectively solves the problems of the BP neural network, such as being easy to fall into local minimum, slow convergence speed, etc., and the prediction accuracy is more accurate;
[0063] (2) The staff can select a low-power period one day in advance according to the result of photovoltaic power prediction, carry out shutdown maintenance and daily maintenance on the photovoltaic unit equipment in the corresponding period, reduce the possibility of failure, and thus improve the reliability of the operation of the entire power system.
[0064] Therefore, the application combines the voltage value fluctuation of the maximum power point of the inverter caused by the external complex weather of the offshore floating photovoltaic power station, proposes an offshore floating photovoltaic short-term prediction method based on neural network learning, optimizes the model according to the particle swarm algorithm, and predicts the maximum power output of the inverter in different weather, thereby providing a scheme for the maximum power tracking of the offshore floating photovoltaic power station. BRIEF DESCRIPTION OF DRAWINGS
[0065] Figure 1 The PSO-BP prediction model algorithm flowchart of the offshore floating photovoltaic field short-term power output prediction method is shown in the figure.
[0066] Figure 2 The topological structure diagram of the BP neural network of the offshore floating photovoltaic field short-term power output prediction method is shown in the figure.
[0067] Figure 3 The BP neural network algorithm flowchart of the offshore floating photovoltaic field short-term power output prediction method is shown in the figure.
[0068] Figure 4 The particle swarm algorithm flowchart of the offshore floating photovoltaic field short-term power output prediction method is shown in the figure. DETAILED DESCRIPTION
[0069] In order to make the purpose, technical scheme and advantages of the application clearer, the embodiments of the application are further described in detail below.
[0070] The offshore floating photovoltaic field short-term power output prediction method provided by the embodiments of the application has a prediction model as shown in the figure. Figure 1 Considering the complex and harsh environment of the offshore floating photovoltaic field, the weather characteristic factor data information is analyzed first, and the data information is obtained from the offshore weather monitoring equipment, so as to screen out the main weather characteristic data information affecting the offshore photovoltaic power generation, and prepare for the later power prediction.
[0071] Then, the power generated by the photovoltaic is predicted, and a short-term power prediction model based on the BP neural network is established, as shown in the figure. Figure 3
[0072] The BP neural network is trained through an error propagation rule based on the gradient descent method.
[0073] Based on the BP neural network prediction model exists the initial weight sensitive problem, through the particle swarm optimization algorithm, in keeping the BP neural network prediction model structure unchanged based on the establishment of PSO-BP prediction model; Through the PSO global optimization ability, the weight optimization, the final output the most optimal solution.
[0074] (1) According to the analysis of the meteorological characteristic factors of the complex environment of the offshore floating photovoltaic field, two main meteorological characteristic data information affecting the offshore photovoltaic power generation are selected as the input of the model, including:
[0075] The Pearson correlation coefficient is used to calculate the correlation degree of each influencing factor and photovoltaic output power one by one, and the main influencing factors are selected as the input variables of the prediction model, and the PCC calculation formula is shown as formula (1)
[0076]
[0077] In the formula: n-Total number, wherein the correlation coefficient r is in the range of [-1, 1], and when greater than 0, the greater the value, the stronger the correlation; x-Weather factor data; y-Float photovoltaic power data.
[0078] Table 1 Correlation analysis degree
[0079]
[0080] Table 2 Correlation analysis of offshore meteorological factors
[0081]
[0082] (2) According to the above meteorological characteristic factor analysis, a short-term power prediction model based on BP neural network is established
[0083] 201: The offshore environment temperature is complex and changeable, and the offshore irradiance is taken as one of the main factors affecting the power generation;
[0084] 202: The main factors considered in photovoltaic output prediction are offshore irradiance R and environmental temperature T, therefore, the input neurons of the photovoltaic prediction model are two, which are offshore irradiance and offshore environmental temperature;
[0085] 202: As shown in Figure 2 , wherein the offshore irradiance R and the offshore environmental temperature T are the input values of the BP neural network, P out is the power prediction value output by the BP neural network, ω ij and ω jk are the connection weights of the BP neural network; The predicted is the power prediction value sampled every 15 minutes from 8:00-18:00 in a day;
[0086] (3) The BP neural network is trained by using the error propagation rule based on the gradient descent method;
[0087] 301 Network initialization: the number of nodes n of the network input layer, the number of nodes l of the hidden layer are determined according to the system input and output sequence (X, Y), the connection weight ω between the input layer, the hidden layer and the output layer of the BP neural network is initialized ij and ω jk , the hidden layer threshold value a, the output layer threshold value b, the adjustment coefficient and ρ, the given learning rate η and the neuron excitation function are initialized;
[0088] 302 Hidden layer output calculation: the hidden layer output H ij is calculated according to the input vector X, the connection weight ω j between the input layer and the hidden layer and the hidden layer threshold value a:
[0089]
[0090] wherein: l is the number of nodes of the hidden layer; f is the hidden layer excitation function.
[0091] 303 Output layer output calculation: the BP neural network prediction output O j is calculated according to the hidden layer output H jk obtained in step (3-2), the connection weight ω k set in step 301 and the output layer threshold value b, that is:
[0092]
[0093] 304 Error calculation: the error between the BP neural network prediction output O k obtained in step 303 and the expected output Y k is calculated, that is: the network output error e k is calculated;
[0094] e k =Y k -O k , k = 1, 2, …, m
[0095] 305 Weight update: the connection weight ω k and ω ij are updated by using formula (5) and (6) according to the network prediction error e jk calculated in step 304, that is:
[0096]
[0097] ω jk = ω jk + ηH j ek j = 1, 2, …, / ; k = 1, 2, …, m
[0098] In the formula, η is a learning rate.
[0099] 306 Threshold update: according to the network prediction error e k Update the hidden layer threshold a and the output layer threshold b;
[0100]
[0101] 307 Determine whether the algorithm iteration is over. If not, return to step (3-2) and continue until the iteration is over; based on the error propagation rule of the gradient descent method, the network output error e k is propagated back from the output layer. When the error e k is transmitted to a certain layer, the BP neural network connection weight ω ij , ω jk of this layer can be updated based on this, and then transmitted to the next layer, which can optimize the loss function.
[0102] Based on the above-mentioned training process of the BP neural network, an error propagation rule based on the gradient descent method is adopted, the error is propagated back from the output layer, when the error is transmitted to a certain layer, the weight and bias value of this layer can be updated based on this, and then transmitted to the next layer, which can optimize the loss function, and the process is as shown in Figure 3 .
[0103] (4) Since the BP neural network has the problems of local minimization, slow convergence speed, structure selection, and initial weight sensitivity, the BP neural network obtained based on steps (2) and (3) is optimized by the particle swarm algorithm, a PSO-BP prediction model is established based on keeping the structure of the BP neural network prediction model unchanged, and the BP neural network is optimized by the particle swarm algorithm based on the global optimization ability of PSO.
[0104] In the PSO algorithm, first, the random particle swarm (random solution) is initialized, and then iterated until the optimal solution is found. In each iteration process, the particle updates itself by tracking two "extreme values". Among the two "extreme values", one is the optimal solution P best found by the particle itself, and this optimal solution is the individual value; the other is the optimal solution G best found by the whole population at present, and this extreme value is the global extreme value. Referring to Figure 4 , described in detail below:
[0105] The application provides a prediction model based on a particle swarm algorithm optimizing a BP neural network, first, the structure of the established PSO-BP neural network prediction model remains unchanged, and some fixed parameters: interval number show=50, learning rate η=0.05, momentum factor mc=0.9, training number epochs=1000, error precision goal=0.0001, the parameters are not modified and changed, and the selection of initial weights and thresholds has certain randomness, then the actual output is adjusted and modified according to whether the actual output is consistent with the required output, which is a changing process, until the optimal weights and thresholds are found.
[0106] 401: In the PSO algorithm, first, a random particle swarm (random solution) is initialized, and then iteration is performed until the optimal solution is found. In each iteration process, the particle updates itself by tracking two 'extreme values'. Among the two 'extreme values', one is the optimal solution P best found by the particle itself, and the other is the optimal solution G best found by the whole population at present, and the extreme value is the global extreme value.
[0107] 402: Let each particle position in a D-dimensional solution space be:
[0108] X i =(x i1 ,x i2 ,……x id ) T
[0109] 403: The individual extreme value P best and the global extreme value G best are respectively:
[0110] P best =(P i1 ,P i2 ,……P id ) T
[0111] G best =(G i1 ,G i2 ,……G id ) T
[0112] 404: In the particle swarm iteration, the velocity of each particle swarm is:
[0113]
[0114] In the formula: V id is the d-dimensional velocity of the i-th sample; P id is the d-dimensional individual extreme value of the i-th sample; Pgd Dthdimension for global optimal solution; k is the number of iterations; i = 1, 2, …, D; d = 1, 2, …, D; c1and c2are learning factors; ω is the inertia weight.
[0115] 405: In the particle swarm iteration, the position of each particle swarm is:
[0116] In summary, the basic theory of the particle swarm algorithm is studied. The initial weight and threshold of the BP neural network are optimized by using the particle swarm algorithm. The shortcomings of the BP neural network, such as being easy to fall into a local minimum value and slow convergence speed, are effectively solved. The prediction accuracy is also more accurate.
[0117] (5) The BP neural network is combined with the particle swarm algorithm to propose a PSO-BP prediction model for use in the offshore floating photovoltaic power station. Details are described below:
[0118] 501: Set the number of particles in the particle swarm, the value range limit of the position boundary [X min , X max ] of the particle in the search space, the minimum value and the maximum value [V min , V max ] of the moving speed of the particle in the search space, the inertia weight, the maximum number of iterations, and the learning factor, and initialize the position X i and the speed V i of the particle;
[0119] The parameters of the particle swarm algorithm are selected as shown in the table
[0120] Table 3 Selection of parameters of the particle swarm algorithm
[0121]
[0122] 502: According to the input power output characteristic data and the output power prediction value, the fitness function value of each particle is calculated using the particle fitness function shown in formula (13), i.e. the mean square error, and the optimal solution P best and the optimal solution G best of the population are adjusted and recorded;
[0123] The fitness of the particle (i.e. the mean square error) is:
[0124]
[0125] In the formula: n' is the sample; c is the number of output neurons; Y ij is the jthoutput expected value of the ithsample; y ij is the jthoutput actual value of the ithsample.
[0126] 503: Calculate the velocity of each particle group:
[0127]
[0128] wherein V id is the dth dimension velocity of the ith sample; P id is the dth dimension individual extremum of the ith sample; P gd is the dth dimension of the global optimal solution; k is the iteration number; i = 1, 2, …, D; d = 1, 2, …, D; c1 and c2 are learning factors; and ω is an inertia weight.
[0129] In the particle swarm iteration, the position of each particle group is:
[0130]
[0131] The velocity of the particle group obtained according to the above formula and the position formula of each particle group obtained are used to update the velocity and position of the particle;
[0132] 504: Determine whether the updated particle velocity and position obtained in step 503 exceed a set range:
[0133] If V i > V max , V i = V max : When the particle velocity exceeds V max , the particle moves too fast in the search space and may skip the area where the optimal solution is located, resulting in the algorithm failing to converge to the global optimum. By limiting the velocity to V max , the particle can be prevented from moving too fast, so that the particle can search more carefully around the optimal solution, thereby improving the probability of finding the global optimal solution;
[0135] If V i < V min , V i = V min : When the particle velocity is less than V min , the particle moves too slowly in the search space, which reduces the search efficiency and increases the convergence time of the algorithm. Limiting the velocity to V min can ensure that the particle explores the solution space at a certain rate, improves the search efficiency, and enables the algorithm to converge to the optimal solution more quickly.
[0136] If X i > X max , X i = X max : When the particle position exceeds X max ,When the particle position is less than X, it means that the particle has searched the area outside the solution space, and the corresponding weight and threshold combination may make the output of the BP neural network unstable or unable to converge. By limiting the position to X max , it can be ensured that the particle searches within a reasonable solution space, improving the effectiveness and reliability of the algorithm.
[0136] If X i < X min , let X i = X min : When the particle position is less than X min , it also means that the particle has searched the area outside the solution space, and the corresponding weight and threshold combination may cause the BP neural network to malfunction. By limiting the position to X min , it can ensure that the particle searches within a reasonable solution space, avoiding unreasonable search results and ensuring the stability and accuracy of the algorithm.
[0137] 505: Calculate the particle fitness again using formula (13); if the extreme value position or the number of iterations found by the particle at this time reaches the predetermined error standard, end the output of the prediction result corresponding to the offshore floating photovoltaic short-term power output prediction model, otherwise return to step one, (5-1) reinitialize the position and speed of the particle, and then continue according to the subsequent steps, so as to iteratively optimize the PSO-BP prediction model to approach the optimal solution, until the predetermined error standard is met to approach the optimal solution, and the prediction result is output.
[0138] (6) The example of the present application takes a certain offshore floating photovoltaic power generation system with an engineering installed capacity of 20MW as an example, selects its data from 8:00 to 18:00 every day in June, samples every 15 minutes, and compares the actual power generation and the predicted power generation under three types of weather, sunny (21 days), cloudy (5 days), and rainy (4 days), and evaluates the accuracy of the model method proposed in the present application by RMSE, MAE, and R 2 .
[0139] Table 4 Comparison of actual power generation and predicted power generation
[0140]
[0141] Table 5 Evaluation results of the prediction model
[0142]
[0143] By analyzing Table 4 and Table 5 and observing the model evaluation indicators, it can be seen that the PSO-BP prediction model proposed in this paper has improved the prediction accuracy of the power output of the floating photovoltaic field in June.
[0144] The model of each device is not limited unless otherwise specified, and any device that can complete the above functions can be used.
[0145] Those skilled in the art can understand that the drawings are only schematic diagrams of a preferred embodiment, and the above embodiment numbers are only for description, not representing the advantages and disadvantages of the embodiments.
[0146] The above is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for predicting the short-term power output of a floating photovoltaic power plant at sea, characterized in that... It includes the following steps: (1) Analyze meteorological characteristic factors of the complex environment in which the floating photovoltaic field is located. The data information comes from marine meteorological monitoring equipment. Select the main meteorological characteristic data information that affects the marine photovoltaic power generation as the input of the model. (2) A short-term power prediction model based on a BP neural network is established, as shown in Figure 2. Here, marine irradiance R and ambient temperature T are the input values of the BP neural network, and P... out It is the power prediction value output by the BP neural network, ω ij and ω jk These are the connection weights of a BP neural network; (3) The BP neural network is trained based on the error propagation rule of gradient descent. (4) Based on the BP neural network obtained in steps (2) and (3), establish the PSO optimization prediction model and optimize the weights through the global optimization capability of PSO. (5) Combine the BP neural network established in step (3) with the particle swarm algorithm performed in step (4) to establish a PSO-BP prediction model and output the prediction results.
2. The step (1) specifically refers to: using the Pearson correlation coefficient PCC, substituting it into formula (1) to calculate the correlation between all influencing factors and photovoltaic output power, and selecting the main influencing factors as input variables for the prediction model; In the formula: n is the total number of sample data collected, and the correlation coefficient r ranges between [-1, 1]. When it is greater than 0, the larger the value, the stronger the correlation; x is meteorological factor data; y is floating photovoltaic power data.
3. The method for short-term power output prediction of a floating photovoltaic power plant area according to claim 2, characterized in that... The selection method for the main influencing factors in step (1) is as follows: the correlation between all influencing factors and photovoltaic output power is calculated by formula (1), that is: correlation coefficient r, when |r|=0, it indicates no correlation; when 0<|r|≤0.3, it indicates weak correlation; when 0.3<|r|≤0.8, it indicates moderate correlation; when 0.8<|r|<1, it indicates high correlation; when |r|=1, it indicates perfect correlation; based on this, the meteorological factors with high correlation and perfect correlation are recorded as the main factors and used as the input variables of the prediction model.
4. The method for short-term power output prediction of a floating photovoltaic power plant area according to claim 1, characterized in that... Step (3) specifically includes the following: (3-1) Network initialization: Determine the number of nodes N in the input layer and the number of nodes l in the hidden layer of the BP neural network based on the system input-output sequence (X,Y), and initialize the BP neural network connection weights ω between the input layer and the hidden layer neurons. ij and the BP neural network connection weights ω between neurons in the hidden layer and the output layer. jk Initialize hidden layer threshold a, output layer threshold b, and adjustment coefficient. Given ρ, and the learning rate η and the neuron activation function; (3-2) Hidden layer output calculation: Based on the input vector X, the BP neural network connection weights ω between the input layer and the hidden layer. ij And the hidden layer threshold a, the hidden layer output H is calculated using formula (2). j : In the formula, f is the hidden layer activation function; (3-3) Output calculation of the hidden layer: Based on the hidden layer output H obtained in step (3-2) j Step (3-1) sets the connection weights ω between the hidden layer and the output layer neurons. jk And the output layer threshold b, calculate the predicted output O of the BP neural network. k ; (3-4) Error Calculation: Calculate the BP neural network prediction output O obtained in step (3-3). k With expected output Y k The error between them, that is: calculate the network output error e k ; e k =Y k -O k ,k=1,2,…,m (4) (3-5) Weight update: Based on the network prediction error e calculated in step (3-4) k The connection weights ω of the BP neural network are updated using formulas (5) and (6). ij and ω jk Right now: oh jk =ω jk +ηH j e k ,j=1,2,…,l;k=1,2,…,m (6) (3-6) Threshold update: Using the network prediction error e calculated in step (3-4) k Update the hidden layer threshold a and the output layer threshold b; (3-7) Determine if the algorithm iteration has ended. If not, return to step (3-2) and continue until the iteration ends. Based on the error propagation rule of gradient descent, the network output error e is... k Propagating back from the output layer, when the network output error e k When passed to a certain layer, the connection weights ω of the BP neural network in that layer... ij ω jk This information can then be used as a basis for updates, which can then be passed down to the next layer to optimize the loss function.
5. The method for short-term power output prediction of a floating photovoltaic power plant area according to claim 1, characterized in that... Step (4) specifically includes the following: (4-1) Let the position of each particle in the D-dimensional solution space be: X i =(x i1 ,x i2 ,……x id ) T (8) (4-2) Let the individual extreme value P best and global extremum G best They are respectively: P best =(P i1 ,P i2 ,……P id ) T (9) G best =(G i1 ,G i2 ,……G id ) T (10) (4-3) In the particle swarm iteration, the velocities of each particle swarm are: In the formula: V id P represents the d-th dimension velocity of the i-th sample. id P represents the extreme value of the d-th dimension of the i-th sample; gd d is the d-th dimension of the global optimal solution; k is the iteration number; i = 1, 2, ..., D; d = 1, 2, ..., D; c1 and c2 are learning factors; ω is the inertia weight; (4-4) Assuming that the position of each particle is a vector, each dimension corresponds to a weight or threshold in the BP neural network. In the particle swarm iteration, the positions of each particle swarm are as shown in formula (12): The particle swarm drives the particles to move in the search space through two formulas: velocity update (11) and position update (12). Each movement corresponds to the update and adjustment of weights and thresholds in the BP neural network. During the particle swarm iteration, the weights and thresholds in the BP neural network are continuously updated, making the prediction result of the BP neural network as close as possible to the true value.
6. The method for short-term power output prediction of a floating photovoltaic power plant area according to claim 1, characterized in that... Step (5) specifically includes the following: (5-1) Set the position boundaries [X] for limiting the range of particle count and particle position in the search space. min ,X max The minimum and maximum values of the particle's velocity in the search space [V] min V max The algorithm initializes the particle's position X, along with its inertia weight, maximum number of iterations, and learning factor. i With speed V i ; (5-2) Based on the output-related characteristic data collected by the marine meteorological monitoring equipment and the photovoltaic power output prediction value of the PSO, the fitness function value of each particle is calculated using the particle fitness formula, i.e., the root mean square error, as shown in formula (13). At the same time, the optimal solution P of the particle is adjusted and recorded. best The optimal solution G of the population best ; In the formula, n' represents the sample; c represents the number of output neurons; Y ij Let y be the expected value of the j-th output for the i-th sample; ij This is the actual value output for the j-th time for the i-th sample; (5-3) Calculate the velocity of each particle swarm using formula (11): In the particle swarm iteration, the position of each particle swarm is continuously calculated using formula (12); based on the velocity of the particle swarm obtained from formula (11) and the position of each particle swarm obtained from formula (12), the velocity and position of the particles are continuously updated. (5-4) Determine whether the updated particle velocity and position obtained in step (5-3) exceed the range set in step (5-1); (5-5) Calculate the particle fitness again using formula (13); if the extreme position or iteration number found by the particle at this time reaches the predetermined error standard, then end and output the prediction result corresponding to the short-term power output prediction model of the floating photovoltaic system at sea; otherwise, return to step (5-1) to reinitialize the position and velocity of the particle, and then repeat steps (5-2) to (5-5). In this way, the PSO-BP prediction model can continuously approach the optimal solution through continuous iteration and optimization until the predetermined error standard is met and the optimal solution is most closely approximated, and then the prediction result is output.
7. The method for short-term power output prediction of a floating photovoltaic power plant area according to claim 6, characterized in that... Step (5-4) specifically includes: If V i >V max Then let V i =V max When the particle velocity exceeds V max If a particle moves too fast in the search space, it may skip the region where the optimal solution is located, causing the algorithm to fail to converge to the global optimum; by limiting the velocity to V... max This can prevent particles from moving too fast, allowing them to perform a more detailed search near the optimal solution and increasing the probability of finding the global optimum. If V i <V min Then let V i =V min When the particle velocity is less than V min When the particle moves too slowly in the search space, the search efficiency is low, which increases the convergence time of the algorithm; limiting the velocity to V min This ensures that particles explore the solution space at a certain rate, improving search efficiency and enabling the algorithm to converge to the optimal solution more quickly. If X i >X max Let X i =X max When the particle position exceeds X max When a particle searches for a region outside the known space, the corresponding weight and threshold combination in that region may cause the output of the BP neural network to be unstable or fail to converge; by restricting the position to X... max This ensures that particles search within a reasonable solution space, improving the effectiveness and reliability of the algorithm; If X i <X min Let X i =X min When the particle position is less than X min At the same time, it also means that the particle searches for a region outside the known space, and the corresponding combination of weights and thresholds may cause the BP neural network to malfunction; restricting the position to X min This ensures that particles are searched within a reasonable solution space, avoiding unreasonable search results and guaranteeing the stability and accuracy of the algorithm.