Photovoltaic module output calculation method and system based on gradient descent
Through the photovoltaic module output calculation method based on gradient descent, the problem of balancing efficiency and accuracy in the photovoltaic module parameter extraction process is solved, and the efficient and accurate calculation of photovoltaic module output is achieved. The five parameters can be extracted quickly and accurately with only a small amount of data.
Patent Information
- Application Number
- CN202510737129.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-09-26
AI Technical Summary
In the existing technology, it is difficult to strike a balance between the efficiency of the photovoltaic module parameter extraction process and the accuracy of the model simulation, and high requirements are placed on photovoltaic module data, and the parameter extraction accuracy of the simplified model is insufficient.
A photovoltaic module output calculation method based on gradient descent is adopted. By establishing a single diode model and using the gradient descent idea to build a parameter update module, the five parameters of the photovoltaic module can be quickly and accurately extracted relying only on the four key electrical parameters and structural parameters provided by the photovoltaic manufacturer.
The calculation efficiency and accuracy of photovoltaic module output data are improved, the demand for large amounts of photovoltaic module data is reduced, and efficient and accurate photovoltaic module output calculations are achieved.
Smart Images

Figure CN120706047A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of photovoltaics and relates to photovoltaic module output calculation, and in particular to a photovoltaic module output calculation method and system based on gradient descent. Background Art
[0002] Efficient and accurate modeling of photovoltaic modules is a fundamental and crucial component of photovoltaic power plant simulation, and is also crucial for design optimization and intelligent operation and maintenance. However, accurately analyzing the output characteristics and operating efficiency of photovoltaic modules is complex due to the highly nonlinear nature of their output characteristic curves. Therefore, theoretical analysis of the module output model formula is necessary.
[0003] Photovoltaic module modeling is usually achieved using the equivalent circuit method. Based on the number of diodes included in the equivalent circuit, it can be divided into: single diode model, double diode model, and triple diode model. Although the double diode model and triple diode model have some engineering applications, the computational complexity limits further application, so the single diode model has become the main choice for photovoltaic module modeling. Even so, the five parameters of the single diode model (I ph ,I o ,a,R s ,R sh ) extraction efficiency still cannot meet the demand, so the model began to be simplified, such as the three-parameter and four-parameter models. Although the simplified model did greatly improve the efficiency of parameter extraction, the parameter extraction accuracy of the simplified model was still not enough to meet the actual requirements.
[0004] Current parameter extraction methods for single-diode models can be broadly categorized into three categories: numerical methods, analytical methods, and meta-heuristic iterative methods. Numerical methods are essentially curve-fitting techniques that determine model parameters by fitting experimentally measured IV curve data points. Analytical methods, on the other hand, typically employ rigorous mathematical formulas to systematically analyze the local characteristics of key locations on the IV curve, particularly critical points and their corresponding local derivatives, to extract parameters. Both of these methods primarily require access to the IV curve of the PV module. However, only a few manufacturers provide this data for some of their products, and data such as local derivatives of the curve is even more difficult to obtain. Therefore, both methods face limitations in practical application. Meta-heuristic iterative algorithms include a variety of methods, the most prominent of which is particle swarm optimization. These algorithms require a sufficient number of well-distributed IV curve points for parameter extraction. PV module manufacturers typically only provide three of these points, so their accuracy is insufficient for practical applications. The most famous current research on component output characteristics is the De SOT0 model, which is a recognized IV curve algorithm. However, its solution process requires not only the open-circuit voltage, short-circuit current, and maximum power point voltage and current on the nameplate, but also additional open-circuit voltage temperature coefficient and short-circuit current temperature coefficient, which cannot generally be obtained directly from the nameplate, making it inconvenient for practical research. Summary of the Invention
[0005] Purpose of the invention: In order to solve the problems in the prior art that it is difficult to strike a balance between the efficiency of the parameter extraction process and the simulation accuracy of the established model, as well as the high requirements for photovoltaic module data, a photovoltaic module output calculation method and system based on gradient descent is provided, which solves the problem of insufficient simulation accuracy caused by simplified models and simplified equations, and reduces the demand for a large amount of photovoltaic module data in the parameter extraction process.
[0006] Technical solution: To achieve the above-mentioned purpose, the present invention provides a method for calculating photovoltaic module output based on gradient descent, comprising the following steps:
[0007] S1: Establish the output characteristic model of a single-diode photovoltaic module and obtain the output characteristic equation of the photovoltaic module;
[0008] S2: Initialize the five parameters of the single diode model of the photovoltaic module according to the technical parameters and output characteristic equation of the photovoltaic module;
[0009] S3: Set the maximum number of iterations for parameter extraction (N_max), the learning rate (Lr1 and Lr2), and the threshold for exiting the loop (edge);
[0010] S4: Calculating the first loss according to the five parameters of the current photovoltaic module;
[0011] S5: Based on the first loss, the five parameters of the photovoltaic module are updated;
[0012] S6: Calculating the second loss according to the five parameters of the current photovoltaic module;
[0013] S7: If the current number of iterations is greater than N, determine whether to exit the loop based on the changes in the first loss and the second loss over the past N times; if so, exit the loop and directly execute step S9; otherwise, execute step S8;
[0014] S8: Determine whether to exit the loop based on the current values of the first loss and the second loss; if yes, exit the loop and directly execute step S9; otherwise, return to step S4 and enter the next loop update;
[0015] S9: Calculate the output voltage, current and power of the photovoltaic module according to the five parameters of the photovoltaic module obtained through the iterative calculation.
[0016] Furthermore, in step S1, the photovoltaic module is equivalent to a single diode model to establish an equivalent circuit of the photovoltaic module; and the output characteristic equation of the photovoltaic module is obtained according to the equivalent circuit of the photovoltaic module as shown in formula (1):
[0017]
[0018] Where, I is the output current of the photovoltaic module, V is the output voltage of the photovoltaic module, I ph is the photocurrent of the photovoltaic module, I d The current flowing through the diode, I sh is the current flowing through the parallel resistor, I o is the equivalent diode reverse saturation current, R s is the series resistance, R sh is the parallel resistance, a is the curve fitting factor, n is the diode ideal factor, N s is the number of photovoltaic module cells connected in series, k is the Boltzmann coefficient, q is the electron charge, and T is the temperature of the photovoltaic module.
[0019] Furthermore, the five parameters of the photovoltaic module single diode model in step S2 include I ph , I o ,a,R s 、R sh , the initialization process includes:
[0020] A1: In practice, the current flowing through the parallel resistor is often very small. Therefore, the parallel resistor in the equivalent circuit diagram is ignored to obtain a four-parameter model, thereby obtaining the output characteristic equation of the photovoltaic module of the four-parameter model:
[0021]
[0022] A2: In the case of short circuit, I o =0 Substitute into equation (3) to obtain I ph Initialization equation:
[0023] I ph =I sc (4)
[0024] A3: In the open circuit condition, set I = 0 and V = V oc Substituting into equation (3) we get the equation:
[0025]
[0026] A4: Select the initial value of the ideality factor coefficient of a single diode and obtain the initialization equation of a:
[0027]
[0028] A5: From equation (5), we get I o Initialization equation:
[0029]
[0030] A6: At the maximum power point, set I = I mpp and V = V mpp Substituting into equation (3) we get R s Initialization equation:
[0031]
[0032] A7: Due to R s Relative to R sh Very small, so at the maximum power point, I = I mpp , V=V mpp and R s =0 Substitute into formula (1) to obtain R sh Initialization formula:
[0033]
[0034] Furthermore, the method for calculating the first loss according to the five parameters of the current photovoltaic module in step S4 includes:
[0035] The formula for calculating the first loss is as follows:
[0036]
[0037] In the formula, the subscript p represents the predicted value, which is calculated by substituting the subsequent voltage value into formula (11);
[0038]
[0039] Furthermore, the step S5 specifically includes:
[0040] Based on whether the first loss is greater than edge, determine whether it is necessary to use the first parameter update module to update the current five parameters. If so, use the first parameter update module to update the current five parameters and the first loss; otherwise, go directly to the next step;
[0041] Based on whether loss 1 is less than 5×edge, determine whether it is necessary to use the second parameter update module to update the current five parameters. If it is less than, use the second parameter update module to update the current five parameters and the first loss; otherwise, go directly to the next step.
[0042] Furthermore, in step S5, the step of using the first parameter updating module to update the current five parameters and the first loss includes:
[0043] B1: Calculate the partial derivatives of current I with respect to the five parameters. The specific formula is as follows:
[0044]
[0045] Where: P k and P lambertw The calculation formula is as follows:
[0046]
[0047] B2: Calculate the partial derivatives of the first loss with respect to the five parameters based on the partial derivatives of the current with respect to the five parameters. The calculation formula of the partial derivatives is as follows:
[0048]
[0049] In the formula, parm is used to replace five parameters;
[0050] B3: Update the current five parameters based on the partial derivatives of the first loss with respect to the five parameters. The parameter update formula is as follows:
[0051]
[0052] Where ρ represents the learning rate, the learning rate of the first update module is Lr1, and the learning rate of the second update module is Lr2;
[0053] B4: Based on the updated five parameters, use formula (10) to update the first loss.
[0054] Furthermore, in step S5, the step of using the second parameter updating module to update the current five parameters and the first loss includes:
[0055] C1: Calculate the second loss based on the current five parameters of the photovoltaic module;
[0056] C2: Calculation The specific formula for the partial derivatives with respect to the five parameters is as follows:
[0057]
[0058]
[0059] C3: According to The partial derivatives with respect to the five parameters are used to calculate the partial derivatives of the second loss with respect to the five parameters. The calculation formula is as follows:
[0060]
[0061] C4: Update the current five parameters using formula (20) based on the partial derivatives of the first loss with respect to the five parameters;
[0062] C5: Based on the updated five parameters, the first loss is updated using formula (10).
[0063] Furthermore, the method for calculating the second loss according to the five parameters of the current photovoltaic module in step S6 includes:
[0064] D1: Calculate the derivative of current with respect to voltage. The formula is as follows:
[0065]
[0066] D2: Calculate the derivative of power (Power = IV) with respect to voltage using the following formula:
[0067]
[0068] D3: Calculate the second loss. The calculation formula is as follows:
[0069]
[0070] Furthermore, the step S9 specifically includes:
[0071] E1: Based on the meteorological parameters of the environment in which the photovoltaic system is located, the five parameters of the photovoltaic modules are corrected. The correction formula is as follows:
[0072]
[0073] E2: Generates a voltage array based on the open circuit voltage with a step size of 0.01;
[0074] E3: Calculate the voltage array to generate the current array according to formula (11);
[0075] E4: Calculate the power array and find the maximum power point in it to obtain the maximum power point voltage, current and output power of the photovoltaic module.
[0076] The present invention also provides a photovoltaic module output calculation system based on gradient descent, comprising:
[0077] A model building module is used to build an output characteristic model of a single-diode photovoltaic module and obtain an output characteristic equation of the photovoltaic module;
[0078] Initialization module, used to initialize the five parameters of the single diode model of the photovoltaic module;
[0079] A loss calculation module, used to calculate the first loss and the second loss;
[0080] Update module, used to update the five parameters of photovoltaic modules;
[0081] Iteration module, used for cyclic iteration to obtain the five parameters of photovoltaic modules;
[0082] The output module is used to obtain the output voltage, current and power of the photovoltaic module.
[0083] Beneficial effects: Compared with the prior art, the present invention, based on the analysis of the mathematical output characteristics of the photovoltaic module single diode model, builds two modules (the first parameter update module and the second parameter update module) that can be used to update the five parameters of the photovoltaic module based on the idea of gradient descent, so as to realize the parameter extraction of the photovoltaic module and further realize the output calculation of the photovoltaic module. The present invention only relies on the four key electrical parameters (V oc , I sc ,V mpp ,I mpp ) and the number of cells in series in the structural parameters can quickly and accurately realize the parameter extraction of photovoltaic modules, which solves the problem of difficulty in balancing the efficiency of the parameter extraction process and the simulation accuracy of the established model and the high requirements for photovoltaic module data, and improves the calculation efficiency and accuracy of the photovoltaic module output data. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] Figure 1 is a flow chart of the method of the present invention;
[0085] Figure 2 is the equivalent circuit diagram of the photovoltaic module;
[0086] Figure 3 Comparison chart of the results corrected to the same temperature and different irradiances with the measured data;
[0087] Figure 4 Comparison chart of the results corrected to the same irradiance and different temperatures with the measured data. DETAILED DESCRIPTION
[0088] The present invention is further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, modifications of various equivalent forms of the present invention made by those skilled in the art all fall within the scope defined by the claims attached to this application.
[0089] Example 1:
[0090] like Figure 1 As shown, this embodiment provides a method for calculating photovoltaic module output based on gradient descent, comprising the following steps:
[0091] S1: Establish the output characteristic model of a single-diode photovoltaic module and obtain the output characteristic equation of the photovoltaic module;
[0092] In this embodiment, the photovoltaic module is equivalent to a single diode model, and the following is established: Figure 2 The equivalent circuit diagram of the photovoltaic module is shown in FIG. ; the output characteristic equation of the photovoltaic module is obtained according to the equivalent circuit diagram of the photovoltaic module as shown in formula (1):
[0093]
[0094] Where, I is the output current of the photovoltaic module, V is the output voltage of the photovoltaic module, I ph is the photocurrent of the photovoltaic module, I d The current flowing through the diode, I sh is the current flowing through the parallel resistor, I o is the equivalent diode reverse saturation current, R s is the series resistance, R sh is the parallel resistance, a is the curve fitting factor, n is the diode ideal factor, N s is the number of photovoltaic modules connected in series, k is the Boltzmann coefficient (1.38×10 -23 J / K), q is the electron charge (1.6×10 -9 C), T is the temperature of the photovoltaic module.
[0095] S2: Initialize the five parameters of the single diode model of the photovoltaic module according to the technical parameters and output characteristic equation of the photovoltaic module;
[0096] The five parameters of the photovoltaic module single diode model in this embodiment include Iph , I o ,a,R s 、R sh , the initialization process includes:
[0097] A1: In practice, the current flowing through the parallel resistor is often very small. Therefore, the parallel resistor in the equivalent circuit diagram is ignored to obtain a four-parameter model, thereby obtaining the output characteristic equation of the photovoltaic module of the four-parameter model:
[0098]
[0099] A2: In the case of short circuit, I o =0 Substitute into equation (3) to obtain I ph Initialization equation:
[0100] I ph =I sc (4)
[0101] A3: In the open circuit condition, set I = 0 and V = V oc Substituting into equation (3) we get the equation:
[0102]
[0103] A4: Since the ideality factor coefficient of a single diode ranges from 1 to 2, in this embodiment, 1 is selected as the initial value, and the initialization equation for a is obtained:
[0104]
[0105] A5: From equation (5), we get I o Initialization equation:
[0106]
[0107] A6: At the maximum power point, set I = I mpp and V = V mpp Substituting into equation (3) we get R s Initialization equation:
[0108]
[0109] A7: Due to R s Relative to R sh Very small, so at the maximum power point, I = I mpp , V=V mpp and R s =0 Substitute into formula (1) to obtain R sh Initialization formula:
[0110]
[0111] S3: Set the maximum number of iterations for parameter extraction (N_max), the learning rate (Lr1 and Lr2), and the threshold for exiting the loop (edge);
[0112] S4: Calculate the first loss based on the five parameters of the current photovoltaic module, including:
[0113] The formula for calculating the first loss is as follows:
[0114]
[0115] In the formula, the subscript p represents the predicted value, which is calculated by substituting the subsequent voltage value into formula (11);
[0116]
[0117] S5: Based on the first loss, the five parameters of the photovoltaic module are updated;
[0118] Based on whether the first loss is greater than edge, determine whether it is necessary to use the first parameter update module to update the current five parameters. If so, use the first parameter update module to update the current five parameters and the first loss; otherwise, go directly to the next step;
[0119] Based on whether loss 1 is less than 5×edge, determine whether it is necessary to use the second parameter update module to update the current five parameters. If it is less than, use the second parameter update module to update the current five parameters and the first loss; otherwise, go directly to the next step.
[0120] The steps of updating the current five parameters and the first loss using the first parameter updating module include:
[0121] B1: Calculate the partial derivatives of current I with respect to the five parameters. The specific formula is as follows:
[0122]
[0123] Where: P k and P lambertw The calculation formula is as follows:
[0124]
[0125]
[0126] B2: Calculate the partial derivatives of the first loss with respect to the five parameters based on the partial derivatives of the current with respect to the five parameters. The calculation formula of the partial derivatives is as follows:
[0127]
[0128] In the formula, parm is used to replace five parameters;
[0129] B3: Update the current five parameters based on the partial derivatives of the first loss with respect to the five parameters. The parameter update formula is as follows:
[0130]
[0131] Where ρ represents the learning rate, the learning rate of the first update module is Lr1, and the learning rate of the second update module is Lr2;
[0132] B4: Based on the updated five parameters, use formula (10) to update the first loss.
[0133] The steps of using the second parameter updating module to update the current five parameters and the first loss include:
[0134] C1: Calculate the second loss based on the current five parameters of the photovoltaic module;
[0135] C2: Calculation The specific formula for the partial derivatives with respect to the five parameters is as follows:
[0136]
[0137] C3: According to The partial derivatives with respect to the five parameters are used to calculate the partial derivatives of the second loss with respect to the five parameters. The calculation formula is as follows:
[0138]
[0139] C4: Update the current five parameters using formula (20) based on the partial derivatives of the first loss with respect to the five parameters;
[0140] C5: Based on the updated five parameters, the first loss is updated using formula (10).
[0141] S6: Calculate the second loss based on the five parameters of the current photovoltaic module, including:
[0142] D1: Calculate the derivative of current with respect to voltage. The formula is as follows:
[0143]
[0144] D2: Calculate the derivative of power (Power = IV) with respect to voltage using the following formula:
[0145]
[0146] D3: Calculate the second loss. The calculation formula is as follows:
[0147]
[0148] S7: Steps S5 to S6 form an update loop. If the current number of iterations is greater than N, determine whether to exit the loop based on the changes in the first loss and the second loss over the past N times. If so, exit the loop and directly execute step S9; otherwise, execute step S8.
[0149] In this embodiment, the specific judgment conditions for determining whether to exit the loop are as follows based on the changes in the loss values (first loss and second loss) for the past 20 times. The two conditions need to be met at the same time to indicate that the change in the loss values for the past 20 times is very small, and then the loop is exited;
[0150] a) The absolute value of the difference between the average of the first 10 losses and the average of the last 10 losses is less than 0.1×edge;
[0151] b) The absolute value of the difference between the average of the first 10 losses and the average of the last 10 losses of loss 2 is less than edge.
[0152] S8: Determine whether to exit the loop based on the current values of the first loss and the second loss; if yes, exit the loop and directly execute step S9; otherwise, return to step S4 and enter the next loop update;
[0153] In this embodiment, the conditions for determining whether to exit the loop are as follows based on the current values of the first loss and the second loss. If both conditions are met, it means that the current five parameters have reached the preset accuracy, and the loop is exited.
[0154] a) Loss 1 is less than edge
[0155] b) Loss 2 is less than 10×edge.
[0156] S9: Calculate the output voltage, current, and power of the photovoltaic module based on the five parameters of the photovoltaic module obtained through iterative calculation, specifically including:
[0157] E1: Based on the meteorological parameters of the environment in which the photovoltaic system is located, the five parameters of the photovoltaic modules are corrected. The correction formula is as follows:
[0158]
[0159] E2: Generates a voltage array based on the open circuit voltage with a step size of 0.01;
[0160] E3: Calculate the voltage array to generate the current array according to formula (11);
[0161] E4: Calculate the power array and find the maximum power point in it to obtain the maximum power point voltage, current and output power of the photovoltaic module.
[0162] Example 2:
[0163] Based on the method of Example 1, this embodiment provides a photovoltaic module output calculation system based on gradient descent, including:
[0164] A model building module is used to build an output characteristic model of a single-diode photovoltaic module and obtain an output characteristic equation of the photovoltaic module;
[0165] Initialization module, used to initialize the five parameters of the single diode model of the photovoltaic module;
[0166] A loss calculation module, used to calculate the first loss and the second loss;
[0167] Update module, used to update the five parameters of photovoltaic modules;
[0168] Iteration module, used for cyclic iteration to obtain the five parameters of photovoltaic modules;
[0169] The output module is used to obtain the output voltage, current and power of the photovoltaic module.
[0170] Example 3:
[0171] In order to verify the effect of the present invention, this embodiment is described through the following examples and data analysis:
[0172] The model of the component selected in this embodiment is GSM-MH3 / 132-BHDG705. The relevant technical parameters of the component are shown in Table 1:
[0173] Table 1
[0174]
[0175] Through the five-parameter extraction method of photovoltaic modules, the five parameters of the photovoltaic modules under standard conditions are obtained. The specific data are shown in Table 2:
[0176] Table 2
[0177]
[0178] The five parameters were corrected using the correction equation to the same temperature (25°C) and different irradiances (1000, 800, 600, 400, 200 W / m 2 ); and the same irradiance (1000W / m 2 ), different temperatures (10, 25, 40, 55, 70℃). The results of the two correction comparisons are compared with the actual measured data in the laboratory. The results are as follows Figure 3 and Figure 4 As shown, it can be seen that the method of the present invention has excellent calculation accuracy.
Claims
1. A method for calculating photovoltaic module output based on gradient descent, characterized in that: The steps include: S1: Establish the output characteristic model of a single-diode photovoltaic module and obtain the output characteristic equation of the photovoltaic module; S2: Initialize the five parameters of the single diode model of the photovoltaic module according to the technical parameters and output characteristic equation of the photovoltaic module; S3: Set the maximum number of iterations for parameter extraction, the learning rate, and the threshold for exiting the loop; S4: Calculating the first loss according to the five parameters of the current photovoltaic module; S5: Based on the first loss, the five parameters of the photovoltaic module are updated; S6: Calculating the second loss according to the five parameters of the current photovoltaic module; S7: If the current number of iterations is greater than N, determine whether to exit the loop based on the changes in the first loss and the second loss over the past N times; if so, exit the loop and directly execute step S9; Otherwise, execute step S8; S8: Determine whether to exit the loop based on the current values of the first loss and the second loss; if yes, exit the loop and directly execute step S9; otherwise, return to step S4 and enter the next loop update; S9: Calculate the output voltage, current and power of the photovoltaic module according to the five parameters of the photovoltaic module obtained through the iterative calculation.
2. The method for calculating photovoltaic module output based on gradient descent according to claim 1, characterized in that: In step S1, the photovoltaic module is equivalent to a single diode model to establish an equivalent circuit of the photovoltaic module; the output characteristic equation of the photovoltaic module is obtained according to the equivalent circuit of the photovoltaic module as shown in formula (1): Where, I is the output current of the photovoltaic module, V is the output voltage of the photovoltaic module, I ph is the photocurrent of the photovoltaic module, I d The current flowing through the diode, I sh is the current flowing through the parallel resistor, I o is the equivalent diode reverse saturation current, R s is the series resistance, R sh is the parallel resistance, a is the curve fitting factor, n is the diode ideal factor, N s is the number of photovoltaic module cells connected in series, k is the Boltzmann coefficient, q is the electron charge, and T is the temperature of the photovoltaic module.
3. The method for calculating photovoltaic module output based on gradient descent according to claim 2, characterized in that: The five parameters of the photovoltaic module single diode model in step S2 include I ph , I o ,a,R s 、R sh , the initialization process includes: A1: Ignoring the parallel resistance in the equivalent circuit diagram, we obtain a four-parameter model, and thus the output characteristic equation of the photovoltaic module of the four-parameter model is obtained: A2: In the case of short circuit, I o =0 Substitute into equation (3) to obtain I ph Initialization equation: I ph =I sc (4) A3: In the open circuit condition, set I = 0 and V = V oc Substituting into equation (3) we get the equation: A4: Select the initial value of the ideality factor coefficient of a single diode and obtain the initialization equation of a: A5: From equation (5), we get I o Initialization equation: A6: At the maximum power point, set I = I mpp and V = V mpp Substituting into equation (3) we get R s Initialization equation: A7: At the maximum power point, set I = I mpp , V=V mpp and R s =0 Substitute into formula (1) to obtain R sh Initialization formula:
4. The method for calculating photovoltaic module output based on gradient descent according to claim 3, characterized in that: The method for calculating the first loss according to the five parameters of the current photovoltaic module in step S4 includes: The formula for calculating the first loss is as follows: In the formula, the subscript p represents the predicted value, which is calculated by substituting the subsequent voltage value into formula (11); 5. The method for calculating photovoltaic module output based on gradient descent according to claim 4, characterized in that: The step S5 specifically includes: Based on whether the first loss is greater than edge, determine whether it is necessary to use the first parameter update module to update the current five parameters. If so, use the first parameter update module to update the current five parameters and the first loss; otherwise, go directly to the next step; Based on whether loss 1 is less than 5×edge, determine whether it is necessary to use the second parameter update module to update the current five parameters. If it is less than, use the second parameter update module to update the current five parameters and the first loss; otherwise, go directly to the next step.
6. The method for calculating photovoltaic module output based on gradient descent according to claim 5, characterized in that: The step of using the first parameter updating module to update the current five parameters and the first loss in step S5 includes: B1: Calculate the partial derivatives of current I with respect to the five parameters. The specific formula is as follows: Where: P k and P lambertw The calculation formula is as follows: B2: Calculate the partial derivatives of the first loss with respect to the five parameters based on the partial derivatives of the current with respect to the five parameters. The calculation formula of the partial derivatives is as follows: In the formula, parm is used to replace five parameters; B3: Update the current five parameters based on the partial derivatives of the first loss with respect to the five parameters. The parameter update formula is as follows: Where ρ represents the learning rate, the learning rate of the first update module is Lr1, and the learning rate of the second update module is Lr2; B4: Based on the updated five parameters, use formula (10) to update the first loss.
7. The method for calculating photovoltaic module output based on gradient descent according to claim 5, characterized in that: The step of using the second parameter updating module to update the current five parameters and the first loss in step S5 includes: C1: Calculate the second loss based on the current five parameters of the photovoltaic module; C2: Calculation The specific formula for the partial derivatives with respect to the five parameters is as follows: C3: According to The partial derivatives with respect to the five parameters are used to calculate the partial derivatives of the second loss with respect to the five parameters. The calculation formula is as follows: C4: Update the current five parameters using formula (20) based on the partial derivatives of the first loss with respect to the five parameters; C5: Based on the updated five parameters, the first loss is updated using formula (10).
8. The method for calculating photovoltaic module output based on gradient descent according to claim 7, characterized in that: The method for calculating the second loss according to the five parameters of the current photovoltaic module in step S6 includes: D1: Calculate the derivative of current with respect to voltage. The formula is as follows: D2: Calculate the derivative of power (Power = IV) with respect to voltage using the following formula: D3: Calculate the second loss. The calculation formula is as follows:
9. The method for calculating photovoltaic module output based on gradient descent according to claim 8, characterized in that: The step S9 specifically includes: E1: Based on the meteorological parameters of the environment in which the photovoltaic system is located, the five parameters of the photovoltaic modules are corrected. The correction formula is as follows: E2: Generates a voltage array based on the open circuit voltage with a step size of 0.01; E3: Calculate the voltage array to generate the current array according to formula (11); E4: Calculate the power array and find the maximum power point in it to obtain the maximum power point voltage, current and output power of the photovoltaic module.
10. A photovoltaic module output calculation system based on gradient descent, characterized in that: include: A model building module is used to build an output characteristic model of a single-diode photovoltaic module and obtain an output characteristic equation of the photovoltaic module; Initialization module, used to initialize the five parameters of the single diode model of the photovoltaic module; A loss calculation module, used to calculate the first loss and the second loss; Update module, used to update the five parameters of photovoltaic modules; Iteration module, used for cyclic iteration to obtain the five parameters of photovoltaic modules; The output module is used to obtain the output voltage, current and power of the photovoltaic module.