Method and device for predicting generated power of photovoltaic panel, electronic equipment and medium
The BP neural network model predicts the power generation power of photovoltaic panels, which solves the problem of power generation power fluctuations in photovoltaic air conditioning systems, and improves power management and user experience.
Patent Information
- Application Number
- CN202411246585.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2025-01-10
AI Technical Summary
The power generation power of photovoltaic panels in photovoltaic air conditioning systems fluctuates due to environmental factors such as weather conditions and sunshine intensity, resulting in inaccurate prediction of power generation, affecting the stable operation of the system and user experience.
Using the BP neural network model, the photovoltaic panel power generation prediction model is trained, including the input layer, the hidden layer and the output layer, by obtaining the equipment load power and weather data (such as sunshine intensity, temperature, and humidity) as input data, and the model parameters are adjusted to Improve prediction accuracy.
It improves the accuracy of photovoltaic power generation prediction, enables the photovoltaic air conditioning system to better plan and manage electricity, reasonably formulate user electricity plans, and improves photovoltaic power efficiency and user experience.
Smart Images

Figure CN119297983A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic power generation, and in particular to a method, device, electronic equipment and medium for predicting power generation of a photovoltaic panel. Background Art
[0002] Photovoltaic air conditioning system, as a cutting-edge green technology, converts solar energy into DC power through photovoltaic panels, and then converts it into AC power through inverters to drive the air conditioning system. With the increasing application of photovoltaic air conditioning in modern life, the power generation of photovoltaic panels fluctuates due to environmental factors such as weather conditions and sunshine intensity. This volatility leads to inaccurate prediction of the power generation of photovoltaic panels, which affects the stable operation and energy management of the system and poor user experience. Summary of the invention
[0003] In view of the above problems, embodiments of the present invention are proposed to provide a method, device, electronic device and medium for predicting the power generation of a photovoltaic panel that overcomes the above problems or at least partially solves the above problems.
[0004] In order to solve the above problems, an embodiment of the present invention discloses a method for predicting the power generation of a photovoltaic panel, which is applied to a device having a photovoltaic panel. The method includes:
[0005] Acquiring input data, wherein the input data includes load power of the device and weather data, wherein the weather data includes at least one of sunshine intensity, temperature and humidity;
[0006] Acquire a photovoltaic panel power generation prediction model, the photovoltaic panel power generation prediction model comprising an input layer, a hidden layer and an output layer; the input layer is used to receive the input data; the hidden layer is used to output feature data according to the input data and preset hidden layer parameters; the output layer is used to output a predicted value of the photovoltaic panel power generation according to the feature data and preset output layer parameters;
[0007] The input data is input into the input layer to obtain the predicted value of the power generation of the photovoltaic panel output by the output layer.
[0008] Optionally, the preset hidden layer parameters include a first weight value from the input layer to the hidden layer, a bias of the hidden layer and a first excitation function, and the hidden layer is used to output the feature data according to the first weight value, the bias of the hidden layer and the first excitation function.
[0009] Optionally, the preset output layer parameters include a second weight value from the hidden layer to the output layer, a bias of the output layer, and a second excitation function, and the output layer is used to output the predicted value based on the second weight value, the bias of the output layer, and the second excitation function.
[0010] Optionally, the photovoltaic panel power generation prediction model is trained in the following manner:
[0011] Acquire input sample data, wherein the input sample data includes a load power sample, a sunshine intensity sample, and a weather data sample of the device;
[0012] Inputting the input sample data into the input layer to obtain output data of the input layer;
[0013] Determining input data of the hidden layer according to the output data of the input layer and the preset hidden layer parameters;
[0014] Inputting the input data of the hidden layer into the hidden layer to obtain the output data of the hidden layer;
[0015] Determining the input data of the output layer according to the output data of the hidden layer and the preset output layer parameters;
[0016] Inputting the input data of the output layer into the output layer to obtain the output data of the output layer;
[0017] According to the output data of the output layer, the expected output data sample of the output layer and the error function, the hidden layer parameters and the output layer parameters are adjusted so that the value of the error function of the output layer after adjustment is less than or equal to a preset maximum error value.
[0018] Optionally, the preset hidden layer parameters include a first weight value from the input layer to the hidden layer and a bias of the hidden layer, and determining the input data of the hidden layer according to the output data of the input layer and the preset hidden layer parameters includes:
[0019] The input data of the hidden layer is determined according to the following formula:
[0020]
[0021] Among them, h0 j is the input data of the jth unit of the hidden layer, w ij is the first weight value from the i-th unit in the input layer to the j-th unit in the hidden layer, u i is the output data of the i-th unit in the input layer, b j is the bias of the jth unit in the hidden layer.
[0022] Optionally, the preset hidden layer parameters further include a first excitation function, and the inputting the input data of the hidden layer into the hidden layer to obtain the output data of the hidden layer includes:
[0023] The output data of the hidden layer is determined according to the following formula:
[0024] h1 j =f1(h0 j )
[0025]
[0026] Among them, h1 j is the output data of the jth unit of the hidden layer, and f1 is the first activation function.
[0027] Optionally, the preset output layer parameters include a second weight value from the hidden layer to the output layer and a bias of the output layer, and determining the input data of the output layer according to the output data of the hidden layer and the preset output layer parameters includes:
[0028] The input data of the output layer is determined according to the following formula:
[0029]
[0030] Among them, y0 is the input data of the hidden layer, w1 j is the second weight value from the hidden layer to the output layer, and b0 is the bias of the output layer.
[0031] Optionally, the preset output layer parameters further include a second excitation function, and the step of inputting the input data of the output layer into the output layer to obtain the output data of the output layer includes:
[0032] The output data of the output layer is determined according to the following formula:
[0033] y1=f2(y0)
[0034] f2(y0)=y0
[0035] Among them, y1 is the output data of the output layer, and f2 is the second excitation function.
[0036] Optionally, adjusting the hidden layer parameters and the output layer parameters according to the output data of the output layer, the expected output data sample of the output layer and the error function includes:
[0037] Adjust the first weight value according to the following formula:
[0038] w ij(n+1) =w ij(n) +Δw ij
[0039]
[0040] Among them, d j is the expected output data sample of the output layer, e is the error function, w ij(n+1) is the adjusted first weight value, w ij(n) is the first weight value of the previous time, Δw ij is the modification amount.
[0041] Accordingly, an embodiment of the present invention discloses a device for predicting power generation of a photovoltaic panel, including a photovoltaic panel device, the device comprising:
[0042] An input data acquisition module, used to acquire input data, wherein the input data includes load power of the device and weather data, wherein the weather data includes at least one of sunshine intensity, temperature and humidity;
[0043] A photovoltaic panel power generation prediction model acquisition module is used to acquire a photovoltaic panel power generation prediction model, wherein the photovoltaic panel power generation prediction model includes an input layer, a hidden layer and an output layer; the input layer is used to receive the input data; the hidden layer is used to output feature data according to the input data and preset hidden layer parameters; the output layer is used to output the predicted value of the photovoltaic panel power generation according to the feature data and preset output layer parameters;
[0044] The predicted value determination module is used to input the input data into the input layer to obtain the predicted value of the power generation of the photovoltaic panel output by the output layer.
[0045] Optionally, the photovoltaic panel power generation prediction model is trained by the following device:
[0046] An input sample data acquisition module, used to acquire input sample data, wherein the input sample data includes a load power sample, a sunshine intensity sample and a weather data sample of the device;
[0047] An output data determination module of the input layer, used for inputting the input sample data into the input layer to obtain output data of the input layer;
[0048] A hidden layer input data determination module, used to determine the input data of the hidden layer according to the output data of the input layer and the preset hidden layer parameters;
[0049] The output data determination module of the hidden layer is used to input the input data of the hidden layer into the hidden layer to obtain the output data of the hidden layer;
[0050] An input data determination module of the output layer, used to determine the input data of the output layer according to the output data of the hidden layer and the preset output layer parameters;
[0051] An output data determination module of the output layer, used for inputting the input data of the output layer into the output layer to obtain the output data of the output layer;
[0052] The parameter adjustment module is used to adjust the hidden layer parameters and the output layer parameters according to the output data of the output layer, the expected output data sample of the output layer and the error function, so that the value of the error function of the output layer after adjustment is less than or equal to a preset maximum error value.
[0053] Optionally, the preset hidden layer parameters include a first weight value from the input layer to the hidden layer and a bias of the hidden layer, and the input data determination module of the hidden layer includes:
[0054] The hidden layer input data determination submodule is used to determine the hidden layer input data according to the following formula:
[0055]
[0056] Among them, h0 j is the input data of the jth unit of the hidden layer, w ij is the first weight value from the i-th unit in the input layer to the j-th unit in the hidden layer, u i is the output data of the i-th unit in the input layer, b j is the bias of the jth unit in the hidden layer.
[0057] Optionally, the preset hidden layer parameters further include a first excitation function, and the output data determination module of the hidden layer includes:
[0058] The output data determination submodule of the hidden layer is used to determine the output data of the hidden layer according to the following formula:
[0059] h1 j =f1(h0 j )
[0060]
[0061] Among them, h1 j is the output data of the jth unit of the hidden layer, and f1 is the first activation function.
[0062] Optionally, the preset output layer parameters include a second weight value from the hidden layer to the output layer and a bias of the output layer, and the input data determination submodule of the output layer includes:
[0063] The input data of the output layer is determined according to the following formula:
[0064]
[0065] Among them, y0 is the input data of the hidden layer, w1 j is the second weight value from the hidden layer to the output layer, and b0 is the bias of the output layer.
[0066] Optionally, the preset output layer parameters further include a second excitation function, and the output data determination module of the output layer includes:
[0067] The output data determination submodule of the output layer is used to determine the output data of the output layer according to the following formula:
[0068] y1=f2(y0)
[0069] f2(y0)=y0
[0070] Among them, y1 is the output data of the output layer, and f2 is the second excitation function.
[0071] Optionally, the parameter adjustment module includes:
[0072] The parameter adjustment submodule is used to adjust the first weight value according to the following formula:
[0073] w ij(n+1) =w ij(n) +Δw ij
[0074]
[0075] Among them, d j is the expected output data sample of the output layer, e is the error function, w ij(m+1) is the adjusted first weight value, w ij(n) is the first weight value of the previous time, Δw ij is the modification amount.
[0076] Correspondingly, an embodiment of the present invention discloses an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program is executed by the processor to perform the various steps of the above-mentioned photovoltaic panel power generation prediction method embodiment.
[0077] Accordingly, an embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various steps of the above-mentioned photovoltaic panel power generation prediction method embodiment are implemented.
[0078] The embodiments of the present invention include the following advantages:
[0079] The method for predicting the power generation of a photovoltaic panel according to an embodiment of the present invention comprises: obtaining input data, the input data comprising the load power of the device and weather data, the weather data comprising at least one of sunshine intensity, temperature and humidity; obtaining a photovoltaic panel power generation prediction model, the photovoltaic panel power generation prediction model comprising an input layer, a hidden layer and an output layer; the input layer is used to receive the input data; the hidden layer is used to output feature data according to the input data and preset hidden layer parameters; the output layer is used to output the predicted value of the power generation of the photovoltaic panel according to the feature data and preset output layer parameters; the input data is input into the input layer to obtain the predicted value of the power generation of the photovoltaic panel output by the output layer. By taking the load power of the device and weather data that affect the power generation of the photovoltaic panel as input data and inputting them into the power generation prediction model of the photovoltaic panel to obtain the predicted value of the power generation of the photovoltaic panel, the accuracy of the prediction of the power generation of the photovoltaic panel is improved, so that the photovoltaic air conditioning system (device with photovoltaic panels) can better plan and manage electric energy, reasonably formulate the user's power consumption plan, improve the efficiency of photovoltaic power consumption, and enhance the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 is a flow chart of steps of a method for predicting power generation of a photovoltaic panel according to an embodiment of the present invention;
[0081] Figure 2 is a schematic diagram of a topological structure of a photovoltaic panel power generation prediction model according to an embodiment of the present invention;
[0082] Figure 3 It is a structural block diagram of an embodiment of the XX device of the present invention. DETAILED DESCRIPTION
[0083] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0084] Photovoltaic air conditioning system, as a cutting-edge green technology, converts solar energy into DC power through photovoltaic panels, and then converts it into AC power through inverters to drive the air conditioning system. With the increasing application of photovoltaic air conditioning in modern life, the power generation of photovoltaic panels fluctuates due to environmental factors such as weather conditions and sunshine intensity. This volatility leads to inaccurate prediction of the power generation of photovoltaic panels, which affects the stable operation and energy management of the system and poor user experience.
[0085] One of the core concepts of the embodiment of the present invention is that by taking the equipment load power and weather data that affect the power generation of photovoltaic panels as input data and inputting them into the photovoltaic panel power generation prediction model, the predicted value of the power generation of photovoltaic panels is obtained, thereby improving the accuracy of photovoltaic power generation prediction, thereby enabling the photovoltaic air-conditioning system to better plan and manage electric energy, reasonably formulate user electricity consumption plans, improve photovoltaic power consumption efficiency, and enhance user experience.
[0086] Reference Figure 1 , shows a flowchart of a method for predicting power generation of a photovoltaic panel according to an embodiment of the present invention, which is applied to a device having a photovoltaic panel and may specifically include the following steps:
[0087] Step 101, obtaining input data, wherein the input data includes load power of the device and weather data, wherein the weather data includes at least one of sunshine intensity, temperature and humidity.
[0088] Specifically, the device with photovoltaic panels may be a photovoltaic air conditioner, and of course, may be other types of devices with photovoltaic panels. Input data is obtained, and the input data may include load power of the photovoltaic air conditioner and weather data, wherein the weather data may include weather conditions, temperature, humidity, etc., which may affect the power generation of the photovoltaic panel.
[0089] Step 102, obtaining a photovoltaic panel power generation prediction model, the photovoltaic panel power generation prediction model includes an input layer, a hidden layer and an output layer; the input layer is used to receive the input data; the hidden layer is used to output feature data according to the input data and preset hidden layer parameters; the output layer is used to output the predicted value of the photovoltaic panel power generation according to the feature data and preset output layer parameters.
[0090] Specifically, a photovoltaic panel power generation prediction model is obtained. The photovoltaic panel power generation prediction model can be a BP (Back Propagation) neural network. The BP neural network is a multi-layer feedforward neural network that adjusts the weights in the network through a back propagation algorithm to minimize the output error. The photovoltaic panel power generation prediction model includes an input layer, a hidden layer (which can have multiple layers) and an output layer. Each layer is composed of multiple neurons (or nodes), and the neurons are connected by weights. The data enters from the input layer, is processed by the hidden layer, and finally the result is obtained in the output layer. The input layer is used to receive input data, the hidden layer is used to output feature data based on the input data and preset hidden layer parameters, and the output layer is used to output the predicted value of the photovoltaic panel power generation according to the feature data and preset output layer parameters.
[0091] Step 103: input the input data into the input layer to obtain the predicted value of the power generation of the photovoltaic panel output by the output layer.
[0092] Specifically, after obtaining the input data and the photovoltaic panel power generation prediction model, the input data is input into the photovoltaic panel power generation prediction model. The input layer of the photovoltaic panel power generation prediction model receives the input data, and after being processed by the hidden layer, the output layer outputs the predicted value of the photovoltaic panel power generation.
[0093] The method for predicting the power generation of a photovoltaic panel according to an embodiment of the present invention comprises: obtaining input data, the input data comprising the load power of the device and weather data, the weather data comprising at least one of sunshine intensity, temperature and humidity; obtaining a photovoltaic panel power generation prediction model, the photovoltaic panel power generation prediction model comprising an input layer, a hidden layer and an output layer; the input layer is used to receive the input data; the hidden layer is used to output feature data according to the input data and preset hidden layer parameters; the output layer is used to output the predicted value of the power generation of the photovoltaic panel according to the feature data and preset output layer parameters; the input data is input into the input layer to obtain the predicted value of the power generation of the photovoltaic panel output by the output layer. By taking the load power of the device and weather data that affect the power generation of the photovoltaic panel as input data and inputting them into the power generation prediction model of the photovoltaic panel to obtain the predicted value of the power generation of the photovoltaic panel, the accuracy of the prediction of the power generation of the photovoltaic panel is improved, so that the photovoltaic air conditioning system (device with photovoltaic panels) can better plan and manage electric energy, reasonably formulate the user's power consumption plan, improve the efficiency of photovoltaic power consumption, and enhance the user experience.
[0094] In an embodiment of the present invention, the preset hidden layer parameters include a first weight value from the input layer to the hidden layer, a bias of the hidden layer and a first excitation function, and the hidden layer is used to output the feature data according to the first weight value, the bias of the hidden layer and the first excitation function.
[0095] Specifically, the preset hidden layer parameters include the first weight value from the input layer to the hidden layer, the bias of the hidden layer and the first excitation function. The hidden layer is used to output feature data according to the first weight value, the bias of the hidden layer and the first excitation function. The photovoltaic panel power generation prediction model determines the input data of the hidden layer according to the following formula:
[0096]
[0097] Among them, h0 j is the input data of the jth unit of the hidden layer, w ij is the first weight value from the i-th unit in the input layer to the j-th unit in the hidden layer, u i is the output data of the i-th unit in the input layer, b j is the bias of the jth unit in the hidden layer.
[0098] After the input data of the hidden layer is input into the hidden layer, the hidden layer determines the input data according to the following formula:
[0099] h1 j =f1(h0 j )
[0100]
[0101] Among them, h1 j is the output data of the jth unit of the hidden layer, and f1 is the first activation function.
[0102] In an embodiment of the present invention, the preset output layer parameters include a second weight value from the hidden layer to the output layer, a bias of the output layer, and a second excitation function, and the output layer is used to output the predicted value based on the second weight value, the bias of the output layer, and the second excitation function.
[0103] Specifically, the preset output layer parameters include the second weight value from the hidden layer to the output layer, the bias of the output layer, and the second excitation function. The output layer is used to output the predicted value according to the second weight value, the bias of the output layer, and the second excitation function. The photovoltaic panel power generation prediction model determines the input data of the output layer according to the following formula:
[0104]
[0105] Among them, y0 is the input data of the hidden layer, w1 j is the second weight value from the hidden layer to the output layer, and b0 is the bias of the output layer.
[0106] After the input data of the output layer is input into the output layer, the output layer determines the output data according to the following formula:
[0107] y1=f2(y0)
[0108] f2(y0)=y0
[0109] Among them, y1 is the output data of the output layer, and f2 is the second excitation function.
[0110] Reference Figure 2 , showing a schematic diagram of the topological structure of a photovoltaic panel power generation prediction model according to an embodiment of the present invention, including an input layer, a hidden layer and an output layer.
[0111] In an embodiment of the present invention, the photovoltaic panel power generation prediction model is trained in the following manner:
[0112] Step 201: acquiring input sample data, wherein the input sample data includes a load power sample, a sunshine intensity sample, and a weather data sample of the device.
[0113] Specifically, first obtain input sample data. The input sample data can be obtained based on historical data. The input sample data may include historical load power samples of the equipment and historical weather data samples. The historical weather data samples may include sunshine intensity samples, temperature samples, humidity samples, and other data that may affect the power generation of photovoltaic panels. The input sample data
[0114] Since there may be particularly large or small singular data between input variables of different dimensions and between input variables of the same dimension, it is necessary to normalize the input sample data. For example, the normalization can be performed using the following formula:
[0115]
[0116] Among them, u is the normalized input data, u ′ is the original input data before normalization, u ′ max is the maximum value of the original input data, u ′ max It is the minimum value of the original input data. After normalization, the values of the input variables are limited to the range of [-1, 1].
[0117] Step 202: input the input sample data into the input layer to obtain output data of the input layer.
[0118] Specifically, the normalized input sample data is input into the input layer to obtain the output data of the input layer. The input sample data of the input layer is the same as the output data of the input layer. The input layer does not involve any calculation or transformation, but simply passes the data to the next layer of the network, that is, the hidden layer.
[0119] Step 203: Determine the input data of the hidden layer according to the output data of the input layer and the preset hidden layer parameters.
[0120] Specifically, the input data of the hidden layer is determined according to the output data of the input layer and the preset hidden layer parameters.
[0121] Step 204: input the input data of the hidden layer into the hidden layer to obtain the output data of the hidden layer.
[0122] Specifically, the input data of the hidden layer is input into the hidden layer, and the hidden layer processes the input data of the hidden layer to obtain the output data of the hidden layer.
[0123] Step 205: Determine the input data of the output layer according to the output data of the hidden layer and the preset output layer parameters.
[0124] Specifically, the input data of the output layer is determined according to the output data of the hidden layer and the preset output layer parameters.
[0125] Step 206: input the input data of the output layer into the output layer to obtain the output data of the output layer.
[0126] Specifically, the input data of the output layer is input into the output layer, and the input layer processes the input data of the output layer to determine the output data of the output layer.
[0127] Step 207, adjusting the hidden layer parameters and the output layer parameters according to the output data of the output layer, the expected output data sample of the output layer and the error function, so that the value of the error function of the output layer after adjustment is less than or equal to a preset maximum error value.
[0128] Specifically, the training process of the photovoltaic panel power prediction model is mainly divided into two stages. The first stage is the forward propagation of the signal, from the input layer through the hidden layer, and finally to the output layer; the second stage is the back propagation of the error, from the output layer to the hidden layer, and finally to the input layer, adjusting the weights and biases from the hidden layer to the output layer, and the weights and biases from the input layer to the hidden layer in turn.
[0129] After determining the output data of the output layer, the hidden layer parameters and the output layer parameters are adjusted according to the expected output data sample and the error function of the output layer, so that after adjusting the hidden layer parameters and the output layer parameters, the value of the error function corresponding to the output result of the output layer is less than or equal to the preset maximum error value.
[0130] In the embodiment of the present invention, the preset hidden layer parameters include the first weight value from the input layer to the hidden layer and the bias of the hidden layer. The step 203 of determining the input data of the hidden layer according to the output data of the input layer and the preset hidden layer parameters may specifically include the following:
[0131] The input data of the hidden layer is determined according to the following formula:
[0132]
[0133] Among them, h0 j is the input data of the jth unit of the hidden layer, w ij is the first weight value from the i-th unit in the input layer to the j-th unit in the hidden layer, u i is the output data of the i-th unit in the input layer, b j is the bias of the jth unit in the hidden layer.
[0134] Specifically, the input of the hidden layer is the result of weighting the input sample data and adding the bias term. This result is usually called "net input" or "weighted input". The input of each neuron in the hidden layer is: the sum of the input sample data multiplied by the weight connected to the neuron (unit) plus the bias term of the neuron. Each neuron has a bias term, which is a learnable parameter. The initial weight value can be obtained by a random number.
[0135]
[0136] wij is the first weight value from the i-th unit in the input layer to the j-th unit in the hidden layer, u i is the output data of the i-th unit in the input layer, b j is the bias of the jth unit in the hidden layer.
[0137] In the embodiment of the present invention, the preset hidden layer parameters further include a first activation function, and the step 204 of inputting the input data of the hidden layer into the hidden layer to obtain the output data of the hidden layer includes:
[0138] The output data of the hidden layer is determined according to the following formula:
[0139] h1 j =f1(h0 j )
[0140]
[0141] Among them, h1 j is the output data of the jth unit of the hidden layer, and f1 is the first activation function.
[0142] Specifically, the input of the hidden layer is the result of weighting the input sample data and adding a bias term. This result is usually called "net input" or "weighted input". Then, this "net input" will be nonlinearly transformed through the excitation function, and the result is the output of the hidden layer. The output data of the hidden layer is obtained by nonlinearly transforming the input data of the hidden layer through the excitation function. It should be noted that the excitation function can be selected and set according to actual needs in actual applications, and the embodiments of the present invention do not limit this.
[0143] In the embodiment of the present invention, the preset output layer parameters include the second weight value from the hidden layer to the output layer and the bias of the output layer. The step 205 of determining the input data of the output layer according to the output data of the hidden layer and the preset output layer parameters includes:
[0144] The input data of the output layer is determined according to the following formula:
[0145]
[0146] Among them, y0 is the input data of the hidden layer, w1 j is the second weight value from the hidden layer to the output layer, and b0 is the bias of the output layer.
[0147] Specifically, the input of each neuron in the output layer is the output of the last hidden layer weighted by the weight and the bias term. This result is usually called the "net input" or "weighted input".
[0148]
[0149] Among them, w1 j is the second weight value from the hidden layer to the output layer, h1 j is the output data of the jth unit of the hidden layer, and b0 is the bias of the output layer.
[0150] In the embodiment of the present invention, the preset output layer parameters further include a second excitation function, and the step 206 of inputting the input data of the output layer into the output layer to obtain the output data of the output layer includes:
[0151] The output data of the output layer is determined according to the following formula:
[0152] y1=f2(y0)
[0153] f2(y0)=y0
[0154] Among them, y1 is the output data of the output layer, and f2 is the second excitation function.
[0155] Specifically, the output data of the output layer is the result of processing by the output layer activation function, and the output of each neuron in the output layer is the value of its net input after nonlinear transformation through the activation function. During the training process, these outputs are compared with the true labels, the loss function is calculated, and the weights and biases of the network are adjusted through the back-propagation algorithm to minimize the loss function.
[0156] In the embodiment of the present invention, the step 207 of adjusting the hidden layer parameters and the output layer parameters according to the output data of the output layer, the expected output data sample of the output layer and the error function includes:
[0157] Adjust the first weight value according to the following formula:
[0158] w ij(n+1) =w ij(n) +Δw ij
[0159]
[0160] Among them, d j is the expected output data sample of the output layer, e is the error function, w ij(m+1) is the adjusted first weight value, w ij(n) is the first weight value of the previous time, Δw ij is the modification amount.
[0161] Specifically, after obtaining the output data of the output layer, the second stage of the training process begins: the back propagation of the error. This is mainly done by adjusting the connection weights each time to make the output error meet the requirements. Adjusting the weights is to use the error function to correct the way of seeking excitation from the hidden layer to the output layer.
[0162] The output data of the output layer is compared with the expected output data sample of the output layer, and the error is calculated according to the error function. e is the error function, which is equal to half the square of the difference between the expected value and the output value.
[0163] Starting from the output layer, the gradient of the error function with respect to each weight is calculated, and then these gradients are back-propagated to the hidden layers until the input layer. This process involves the chain rule for calculating the derivatives of a composite function.
[0164] The calculated gradient is then used to update the weights, Δw ij is the modification amount, that is, the gradient of the error function with respect to the weight. The updated weight is equal to the weight before the update plus the modification amount. In this way, the first weight value from the input layer to the hidden layer and the second weight value from the hidden layer to the output layer are updated. After the update, the error function e is calculated again. When the output error meets the requirements or reaches the predetermined number of iterations, the model training is exited, otherwise the next round of training and learning will continue.
[0165] During the back-propagation process, the gradient of the error function to the output layer weight can be calculated directly, while the gradient to the hidden layer weight needs to be back-propagated layer by layer through the chain rule. This process ensures that each weight can be properly adjusted according to its position and role in the network, so that the output of the network gradually approaches the true label.
[0166] The convergence and fitting degree of the photovoltaic panel power generation prediction model are directly related to the rationality of the input-output data. Therefore, it is necessary to determine the main influencing factors affecting photovoltaic power generation through experimental testing and theoretical analysis to obtain reasonable input data. The embodiment of the present invention lists the three main influencing factors affecting photovoltaic power generation: historical load power, sunshine intensity and weather, and determines these three variables as the input data of the photovoltaic panel power generation prediction model. According to the above photovoltaic panel power generation prediction model, the photovoltaic power generation can be accurately predicted.
[0167] Accurate prediction of photovoltaic power generation can help photovoltaic air conditioning systems better plan and manage electricity, reasonably formulate user electricity plans, and improve photovoltaic power efficiency. Taking the operation time of photovoltaic air conditioning as an example, when the photovoltaic air conditioning system is short of power supply, the air conditioning operation time is short; based on the operation time of air conditioning controlled by the photovoltaic panel power generation prediction model, when it is predicted that the photovoltaic power generation is insufficient, a reasonable power plan is formulated for the user, such as: the air conditioning frequency is reduced, and the air conditioning operation time is increased, which provides user experience and highlights the superior performance of the photovoltaic panel power generation prediction model control. Moreover, there is no need to increase any hardware cost, and there is no risk of hardware damage, which reduces the cost of power generation. It also reduces frequency deviation, voltage fluctuation, harmonics and other problems in the photovoltaic power generation system, providing more reliable support for the stable operation of the photovoltaic air conditioning system.
[0168] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0169] Reference Figure 3 , shows a structural block diagram of a device for predicting power generation of a photovoltaic panel according to an embodiment of the present invention, which may specifically include the following modules:
[0170] An input data acquisition module 301 is used to acquire input data, wherein the input data includes load power of the device and weather data, wherein the weather data includes at least one of sunshine intensity, temperature and humidity;
[0171] The photovoltaic panel power generation prediction model acquisition module 302 is used to acquire the photovoltaic panel power generation prediction model, and the photovoltaic panel power generation prediction model includes an input layer, a hidden layer and an output layer; the input layer is used to receive the input data; the hidden layer is used to output feature data according to the input data and preset hidden layer parameters; the output layer is used to output the predicted value of the photovoltaic panel power generation according to the feature data and preset output layer parameters;
[0172] The predicted value determination module 303 is used to input the input data into the input layer to obtain the predicted value of the power generation of the photovoltaic panel output by the output layer.
[0173] The device for predicting the power generation of a photovoltaic panel of an embodiment of the present invention obtains input data, the input data includes the load power of the device and weather data, the weather data includes at least one of sunshine intensity, temperature and humidity; obtains a photovoltaic panel power generation prediction model, the photovoltaic panel power generation prediction model includes an input layer, a hidden layer and an output layer; the input layer is used to receive the input data; the hidden layer is used to output feature data according to the input data and preset hidden layer parameters; the output layer is used to output the predicted value of the power generation of the photovoltaic panel according to the feature data and preset output layer parameters; the input data is input into the input layer to obtain the predicted value of the power generation of the photovoltaic panel output by the output layer. By taking the load power of the device and weather data that affect the power generation of the photovoltaic panel as input data and inputting them into the power generation prediction model of the photovoltaic panel to obtain the predicted value of the power generation of the photovoltaic panel, the accuracy of the photovoltaic power generation prediction is improved, so that the photovoltaic air conditioning system (equipment with photovoltaic panels) can better plan and manage electric energy, reasonably formulate user power consumption plans, improve photovoltaic power consumption efficiency, and enhance user experience.
[0174] In an embodiment of the present invention, the photovoltaic panel power generation prediction model is trained by the following device:
[0175] An input sample data acquisition module, used to acquire input sample data, wherein the input sample data includes a load power sample, a sunshine intensity sample and a weather data sample of the device;
[0176] An output data determination module of the input layer, used for inputting the input sample data into the input layer to obtain output data of the input layer;
[0177] A hidden layer input data determination module, used to determine the input data of the hidden layer according to the output data of the input layer and the preset hidden layer parameters;
[0178] The output data determination module of the hidden layer is used to input the input data of the hidden layer into the hidden layer to obtain the output data of the hidden layer;
[0179] An input data determination module of the output layer, used to determine the input data of the output layer according to the output data of the hidden layer and the preset output layer parameters;
[0180] An output data determination module of the output layer, used for inputting the input data of the output layer into the output layer to obtain the output data of the output layer;
[0181] The parameter adjustment module is used to adjust the hidden layer parameters and the output layer parameters according to the output data of the output layer, the expected output data sample of the output layer and the error function, so that the value of the error function of the output layer after adjustment is less than or equal to a preset maximum error value.
[0182] In an embodiment of the present invention, the preset hidden layer parameters include a first weight value from the input layer to the hidden layer and a bias of the hidden layer, and the input data determination module of the hidden layer includes:
[0183] The hidden layer input data determination submodule is used to determine the hidden layer input data according to the following formula:
[0184]
[0185] Among them, h0 j is the input data of the jth unit of the hidden layer, w ij is the first weight value from the i-th unit in the input layer to the j-th unit in the hidden layer, u i is the output data of the i-th unit in the input layer, b j is the bias of the jth unit in the hidden layer.
[0186] In an embodiment of the present invention, the preset hidden layer parameters further include a first activation function, and the output data determination module of the hidden layer includes:
[0187] The output data determination submodule of the hidden layer is used to determine the output data of the hidden layer according to the following formula:
[0188] h1 j =f1(h0 j )
[0189]
[0190] Among them, h1 j is the output data of the jth unit of the hidden layer, and f1 is the first activation function.
[0191] In an embodiment of the present invention, the preset output layer parameters include the second weight value from the hidden layer to the output layer and the bias of the output layer, and the input data determination submodule of the output layer includes:
[0192] The input data of the output layer is determined according to the following formula:
[0193]
[0194] Among them, y0 is the input data of the hidden layer, w1 j is the second weight value from the hidden layer to the output layer, and b0 is the bias of the output layer.
[0195] In an embodiment of the present invention, the preset output layer parameters further include a second excitation function, and the output data determination module of the output layer includes:
[0196] The output data determination submodule of the output layer is used to determine the output data of the output layer according to the following formula:
[0197] y1=f2(y0)
[0198] f2(y0)=y0
[0199] Among them, y1 is the output data of the output layer, and f2 is the second excitation function.
[0200] In an embodiment of the present invention, the parameter adjustment module includes:
[0201] The parameter adjustment submodule is used to adjust the first weight value according to the following formula:
[0202] w ij(n+1) =w ij(n) +Δw ij
[0203]
[0204] Among them, d j is the expected output data sample of the output layer, e is the error function, w ij(n+1) is the adjusted first weight value, w ij(n) is the first weight value of the previous time, Δw ij is the modification amount.
[0205] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0206] An embodiment of the present invention also provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned photovoltaic panel power generation prediction method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0207] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned photovoltaic panel power generation prediction method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0208] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0209] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0210] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0211] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0212] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0213] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0214] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0215] The above is a detailed introduction to the method, device, electronic device and medium for predicting the power generation of a photovoltaic panel provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for predicting the power generation of a photovoltaic panel, characterized in that: Applied to a device having a photovoltaic panel, the method comprises: Acquiring input data, wherein the input data includes load power of the device and weather data, wherein the weather data includes at least one of sunshine intensity, temperature and humidity; Acquire a photovoltaic panel power generation prediction model, the photovoltaic panel power generation prediction model comprising an input layer, a hidden layer and an output layer; the input layer is used to receive the input data; the hidden layer is used to output feature data according to the input data and preset hidden layer parameters; the output layer is used to output a predicted value of the photovoltaic panel power generation according to the feature data and preset output layer parameters; The input data is input into the input layer to obtain the predicted value of the power generation of the photovoltaic panel output by the output layer.
2. The method according to claim 1, characterized in that The preset hidden layer parameters include a first weight value from the input layer to the hidden layer, a bias of the hidden layer, and a first excitation function. The hidden layer is used to output the feature data according to the first weight value, the bias of the hidden layer, and the first excitation function.
3. The method according to claim 1, characterized in that The preset output layer parameters include a second weight value from the hidden layer to the output layer, a bias of the output layer, and a second excitation function. The output layer is used to output the predicted value according to the second weight value, the bias of the output layer, and the second excitation function.
4. The method according to claim 1, characterized in that: The photovoltaic panel power generation prediction model is trained in the following way: Acquire input sample data, wherein the input sample data includes a load power sample, a sunshine intensity sample, and a weather data sample of the device; Inputting the input sample data into the input layer to obtain output data of the input layer; Determining input data of the hidden layer according to the output data of the input layer and the preset hidden layer parameters; Inputting the input data of the hidden layer into the hidden layer to obtain the output data of the hidden layer; Determining the input data of the output layer according to the output data of the hidden layer and the preset output layer parameters; Inputting the input data of the output layer into the output layer to obtain the output data of the output layer; According to the output data of the output layer, the expected output data sample of the output layer and the error function, the hidden layer parameters and the output layer parameters are adjusted so that the value of the error function of the output layer after adjustment is less than or equal to a preset maximum error value.
5. The method according to claim 4, characterized in that The preset hidden layer parameters include a first weight value from the input layer to the hidden layer and a bias of the hidden layer, and the step of determining the input data of the hidden layer according to the output data of the input layer and the preset hidden layer parameters includes: The input data of the hidden layer is determined according to the following formula: Among them, h0 j is the input data of the jth unit of the hidden layer, w ij is the first weight value from the i-th unit in the input layer to the j-th unit in the hidden layer, u i is the output data of the i-th unit in the input layer, b j is the bias of the jth unit in the hidden layer.
6. The method according to claim 5, characterized in that The preset hidden layer parameters also include a first excitation function, and the inputting the input data of the hidden layer into the hidden layer to obtain the output data of the hidden layer includes: The output data of the hidden layer is determined according to the following formula: h1 j =f1(h0 j ) Among them, h1 j is the output data of the jth unit of the hidden layer, and f1 is the first activation function.
7. The method according to claim 6, characterized in that The preset output layer parameters include a second weight value from the hidden layer to the output layer and a bias of the output layer, and the determining the input data of the output layer according to the output data of the hidden layer and the preset output layer parameters includes: The input data of the output layer is determined according to the following formula: Among them, y0 is the input data of the hidden layer, w1 j is the second weight value from the hidden layer to the output layer, and b0 is the bias of the output layer.
8. The method according to claim 7, characterized in that The preset output layer parameters also include a second excitation function, and the step of inputting the input data of the output layer into the output layer to obtain the output data of the output layer includes: The output data of the output layer is determined according to the following formula: y1=f2(y0) f2(y0)=y0 Among them, y1 is the output data of the output layer, and f2 is the second activation function.
9. The method according to claim 8, characterized in that The step of adjusting the hidden layer parameters and the output layer parameters according to the output data of the output layer, the expected output data sample of the output layer and the error function comprises: Adjust the first weight value according to the following formula: In ij(n+1) =in ij(n) +Δw ij Among them, d j is the expected output data sample of the output layer, e is the error function, w ij(m+1) is the adjusted first weight value, w ij(n) is the first weight value of the previous time, Δw ij is the modification amount.
10. A device for predicting the power generation of a photovoltaic panel, characterized in that: A device having a photovoltaic panel, the device comprising: An input data acquisition module, used to acquire input data, wherein the input data includes load power of the device and weather data, wherein the weather data includes at least one of sunshine intensity, temperature and humidity; A photovoltaic panel power generation prediction model acquisition module is used to acquire a photovoltaic panel power generation prediction model, wherein the photovoltaic panel power generation prediction model includes an input layer, a hidden layer and an output layer; the input layer is used to receive the input data; the hidden layer is used to output feature data according to the input data and preset hidden layer parameters; the output layer is used to output the predicted value of the photovoltaic panel power generation according to the feature data and preset output layer parameters; The predicted value determination module is used to input the input data into the input layer to obtain the predicted value of the power generation of the photovoltaic panel output by the output layer.
11. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the method for predicting the power generation of a photovoltaic panel as described in any one of claims 1 to 9 are implemented.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for predicting the power generation of a photovoltaic panel as claimed in any one of claims 1 to 9 are implemented.