Discharge method of multi-output solar power source based on neural network algorithm
Through the multi-output solar power discharge method based on neural network algorithm, the problems of complexity and low efficiency of power distribution in the prior art are solved, and the power performance is dynamically optimized, and the adaptability and reliability of the system are improved.
Patent Information
- Application Number
- CN202410637720.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-05-22
AI Technical Summary
The existing multi-output solar power supply system has problems such as increasing complexity, increasing cost and low efficiency in power distribution and management, and it is difficult to dynamically optimize the power discharge performance based on environmental conditions and user needs.
Using a multi-output solar power discharge method based on neural network algorithm, by configuring a multi-layer neural network model, the mapping relationship between the charging state, environmental conditions and user electricity consumption needs of solar power is trained and learned, and data is collected in real time to generate discharge control signals. , adjust current and voltage to optimize power distribution.
Dynamic optimization based on changing environmental conditions and user needs is achieved, the adaptability, accuracy and real-time nature of the power supply system are improved, human intervention is reduced, the efficiency and reliability of the system are improved, and efficient and stable power distribution is ensured.
Smart Images

Figure CN118611174B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of electric variable regulation, and more specifically, particularly relates to a discharge method of a multi-output solar power source based on a neural network algorithm. Background Art
[0002] With the rapid development of renewable energy technology, solar power generation systems have become a widely used energy solution, especially in remote areas and occasions where independent power supply is required. Traditional solar power generation system designs are mainly aimed at a single load or output, but in actual applications, solar power sources need to power a variety of different load devices, which may have different power requirements and operating voltages.
[0003] In existing multi-output solar power systems, the distribution and management of electrical energy is a key issue. These systems usually rely on complex power management units, including multiple maximum power point tracking controllers, to optimize the energy utilization of each output. However, this design may lead to increased system complexity, rising costs, and may have inefficient energy distribution; therefore, we propose a discharge method for multi-output solar power based on a neural network algorithm. Summary of the invention
[0004] The purpose of the present invention is to solve the shortcomings of the prior art and propose a discharge method for a multi-output solar power source based on a neural network algorithm. The method adopts a neural network algorithm to optimize the target of minimizing the prediction error function, thereby dynamically optimizing the discharge performance of the power source according to the changing environmental conditions and user needs.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] The discharging method of a multi-output solar power source based on a neural network algorithm comprises the following steps:
[0007] S1. configuring a multi-layer neural network model, wherein the model comprises an input layer, a hidden layer and an output layer;
[0008] S2. Training the neural network model to learn the mapping relationship between the charging state of the solar power source, environmental conditions, historical discharge data and user power demand, wherein the optimization goal used in the training is to minimize the prediction error function, wherein the error function is the difference between the actual discharge effect and the expected discharge effect;
[0009] S3, collecting the current charging status of the solar power source, environmental data and instant user power demand information in real time, and providing them as input data to the trained neural network model;
[0010] S4. Processing the input data using a neural network model and generating corresponding discharge control signals, each control signal corresponding to an output end, so as to optimize the discharge efficiency of the solar power source and meet the power requirements of different output ends;
[0011] S5. According to the discharge control signal generated by the neural network model, the discharge current and voltage of the multi-output solar power source are adjusted to realize the power distribution to each output terminal.
[0012] Preferably, in step S2, the specific process is:
[0013] S21. Collect and organize training data sets, including input features such as the charging state of the solar power source, environmental conditions, historical discharge data, and user power demand, as well as corresponding target labels;
[0014] S22. Define the structure of the neural network, including determining the number of neurons in the input layer, hidden layer, and output layer and the connection between the neurons;
[0015] S23, forward propagation, input the training data into the neural network, calculate the activation value of each neuron, and finally get the predicted output of the model;
[0016] S24, compare the predicted output of the network with the true label and calculate the prediction error of the model;
[0017] S25, back propagation, updating the weights and bias parameters in the network layer by layer from the output layer to the input layer to reduce the value of the error function;
[0018] S26. Iteratively update the parameters of the model to minimize the error function.
[0019] Preferably, in step S23, the forward propagation calculation formula is:
[0020]
[0021] in, is the output of the jth neuron in the l-1th layer, is the weight of the jth neuron in the l-1th layer, is the bias of the jth neuron in the l-1th layer.
[0022] Preferably, in step S24, the prediction error of the calculation model is calculated using the following formula:
[0023]
[0024] Where: E is the value of the loss function, that is, the mean square error; N is the number of samples; C is the output dimension; y nk is the kth true output of the nth sample; is the k-th predicted output for the n-th sample.
[0025] Preferably, in step S4, the input data is processed using a neural network model and a corresponding discharge control signal is generated, specifically:
[0026] S41, preprocessing the current charging state of the solar power source, environmental data and instant user power demand information collected in real time, wherein the preprocessing includes normalizing and denoising the data to ensure the quality and accuracy of the data;
[0027] S42, using the preprocessed data as input of an input layer, wherein the input layer includes a plurality of groups of neurons, each neuron corresponding to a feature;
[0028] S43, the hidden layer performs nonlinear transformation on the input data to extract higher-level features, wherein the data of the input layer is connected to the neurons of the hidden layer through a weight matrix;
[0029] S44. The data of the hidden layer is connected to the neurons of the output layer through the weight matrix, and the data is transmitted to the output layer. Each neuron in the output layer corresponds to a discharge control signal to adjust the discharge current and voltage of the corresponding output end.
[0030] Preferably, in step S4, the vectorized equation of the neural network model can be expressed as:
[0031] Y=F[W 2 ×ReLU(W 1 ×X+B 1 )+B 2 ];
[0032] Among them, W 1 is the weight matrix from the input layer to the hidden layer, W 2 is the weight matrix from the hidden layer to the output layer, B 1 is the bias vector from the input layer to the hidden layer, B 2 is the bias vector from the hidden layer to the output layer, ReLU is the rectified linear unit activation function, and F is the activation function of the output layer.
[0033] Preferably, in step S5, the discharge current and voltage of the multi-output solar power source are regulated by a PI control module, and the transfer function of the PI control module is expressed as:
[0034] V (s) =K p ×e (s) +K i ×∫e (s) dt;
[0035] Among them, V (s)is the controller output, e (s) is the error signal, K p is the proportional gain, K i is the integral gain, ∫e (s) dt represents the integration operation of the error signal, and s represents the complex frequency domain variable.
[0036] Preferably, after distributing the electric energy to each output terminal, the method further comprises:
[0037] Information feedback is used to monitor the difference between the actual discharge effect and the predicted value of the neural network model, and this information is used to adjust the weights and bias of the neural network model to improve the accuracy of the prediction.
[0038] Preferably, the information feedback calculation formula is:
[0039]
[0040] Among them, ΔW is the adjustment value of the weight, ΔB is the adjustment value of the bias, η is the learning rate, and is the partial derivative of the error function E with respect to the weights and biases.
[0041] Technical effects and advantages of the present invention: Compared with the prior art, the present invention provides a discharge method for a multi-output solar power source based on a neural network algorithm. The optimization target of the neural network algorithm is to minimize the prediction error function, thereby dynamically optimizing the discharge performance of the power source according to the changing environmental conditions and user needs.
[0042] Secondly, in the present invention, the mapping relationship between the charging state, environmental conditions, historical discharge data and user power demand of the solar power source is learned, and the optimization goal used in the training is to minimize the prediction error function. Its adaptability, accuracy, real-time, intelligent power distribution, reduction of human intervention, improvement of system performance and continuous learning and optimization capabilities are helpful to improve the efficiency and reliability of the multi-output solar power system;
[0043] In addition, the current charging status of the solar power source, environmental data and instant user electricity demand information collected in real time are provided as input data to the trained neural network model, so that the neural network model can make more accurate predictions based on the latest situation and enhance the prediction accuracy. At the same time, the use of real-time data enables the system to respond quickly to changes in the environment and load, so as to adjust the discharge strategy in time, optimize the distribution of electricity, and ensure efficient and stable operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1This is a flow chart of a discharge method of a multi-output solar power source based on a neural network algorithm of the present invention;
[0045] Figure 2 This is a flow chart of the method for training a neural network model of the present invention;
[0046] Figure 3 This is a flow chart of the discharge control signal generated by the neural network model of the present invention. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0048] The present invention provides a discharge method for a multi-output solar power source based on a neural network algorithm, such as Figure 1 As shown, the following steps are included:
[0049] S1. Configure a multi-layer neural network model, which includes an input layer, a hidden layer, and an output layer;
[0050] S2. Training the neural network model to learn the mapping relationship between the charging state of the solar power source, environmental conditions, historical discharge data and user power demand. The optimization goal used in the training is to minimize the prediction error function, where the error function is the difference between the actual discharge effect and the expected discharge effect.
[0051] In step S2, Figure 2 As shown, the specific process is:
[0052] S21. Collect and organize training data sets, including input features such as the charging state of the solar power source, environmental conditions, historical discharge data, and user power demand, as well as corresponding target labels;
[0053] Among them, at this stage, the data comes from field sensor measurements, historical records or user feedback; in order to improve the generalization ability of the model, the data set should be as diverse as possible, covering different seasons, weather conditions and user behavior patterns;
[0054] S22. Define the structure of the neural network, including determining the number of neurons in the input layer, hidden layer, and output layer and the connection between the neurons;
[0055] S23, forward propagation, input the training data into the neural network, calculate the activation value of each neuron, and finally obtain the predicted output of the model; in step S23, the forward propagation calculation formula is:
[0056]
[0057] in, is the output of the jth neuron in the l-1th layer, is the weight of the jth neuron in the l-1th layer, is the bias of the jth neuron in the l-1th layer;
[0058] S24, compare the predicted output of the network with the true label, and calculate the prediction error of the model; in step S24, the prediction error of the model is calculated using the following calculation formula:
[0059]
[0060] Where: E is the value of the loss function, that is, the mean square error; N is the number of samples; C is the output dimension; y nk is the kth true output of the nth sample; is the k-th predicted output of the n-th sample;
[0061] S25, back propagation, updating the weights and bias parameters in the network layer by layer from the output layer to the input layer to reduce the value of the error function;
[0062] S26, iteratively updating the parameters of the model to minimize the error function;
[0063] During the neural network training process, the model parameters are updated iteratively multiple times to minimize the error function. After each iteration, the performance of the model usually improves until a certain stopping criterion is reached, which is the maximum number of iterations.
[0064] S3, collecting the current charging status of the solar power source, environmental data and instant user power demand information in real time, and providing them as input data to the trained neural network model;
[0065] Exemplarily, the above real-time collection of the current charging state of the solar power source, environmental data and instant user power demand information, and providing this information as input data to the trained neural network model, adopts the following process:
[0066] S31: Data Collection
[0067] Charging status data: obtain the current battery power from the solar power management system; collect battery temperature, voltage, and current parameters;
[0068] Environmental data: Use sensors to measure environmental factors such as ambient temperature, light intensity, wind speed, etc.; obtain weather forecast data for the next few hours or days from weather forecast services;
[0069] User electricity demand information: Collect users' real-time electricity consumption data through smart meters or home energy management systems; predict future electricity demand based on users' electricity consumption habits and patterns;
[0070] S32: Data preprocessing
[0071] Clean the data to remove outliers and noise;
[0072] Standardize or normalize the data to ensure that different data features are at the same level;
[0073] Handle missing data, such as interpolation or filling with historical data;
[0074] S33: Data Fusion and Feature Engineering
[0075] Merge the collected data into one data set;
[0076] Select or construct relevant features according to the input requirements of the neural network model;
[0077] Perform feature selection as needed to reduce dimensionality and improve model performance;
[0078] S34: Real-time prediction
[0079] Input the preprocessed data into the trained neural network model;
[0080] Use the model to make real-time predictions to obtain the discharge effect prediction results of the solar power source;
[0081] S35: Feedback and Adjustment
[0082] Compare the model's prediction results with the actual discharge effect and calculate the prediction error;
[0083] If the error is beyond the acceptable range, the model may need to be fine-tuned or retrained;
[0084] Update models based on real-time data to adapt to environmental changes and the dynamic nature of user needs;
[0085] S36: Decision Support
[0086] Use the model's prediction results to provide decision support for the charging and discharging strategy of solar power sources;
[0087] Optimize energy distribution and ensure the stability and efficiency of power supply.
[0088] S4, using the neural network model to process the input data and generate corresponding discharge control signals, each control signal corresponds to an output end, so as to optimize the discharge efficiency of the solar power supply and meet the power requirements of different output ends; In step S4, the neural network model is used to process the input data and generate corresponding discharge control signals, such as Figure 3 As shown, specifically:
[0089] S41, preprocessing the current charging state of the solar power source, environmental data and instant user power demand information collected in real time, wherein the preprocessing includes normalizing and denoising the data to ensure the quality and accuracy of the data;
[0090] S42, using the preprocessed data as input of an input layer, where the input layer includes a plurality of groups of neurons, each neuron corresponding to a feature;
[0091] S43, the hidden layer performs nonlinear transformation on the input data to extract higher-level features, wherein the data of the input layer is connected to the neurons of the hidden layer through a weight matrix;
[0092] S44, the data of the hidden layer is connected to the neurons of the output layer through the weight matrix, and the data is transmitted to the output layer, each output layer neuron corresponds to a discharge control signal, and the discharge current and voltage of the corresponding output end are adjusted;
[0093] Among them, the vectorized equation of the neural network model can be expressed as:
[0094] Y=F[W 2 ×ReLU(W 1 ×X+B 1 )+B 2 ];
[0095] Among them, W 1 is the weight matrix from the input layer to the hidden layer, W 2 is the weight matrix from the hidden layer to the output layer, B 1 is the bias vector from the input layer to the hidden layer, B 2 is the bias vector from the hidden layer to the output layer, ReLU is the rectified linear unit activation function, and F is the activation function of the output layer.
[0096] Exemplarily, a neural network includes two input nodes, a hidden layer and an output node. The activation function of the hidden layer is a ReLU function, and the activation function of the output layer is an identity function.
[0097] 1. Initialize weights and biases:
[0098] The weight matrix W from the input layer to the hidden layer 1 , shape is (2,3);
[0099] The weight matrix W from the hidden layer to the output layer 2 , shape is (3,1);
[0100] The bias vector B of the hidden layer 1 , shape is (3,1);
[0101] The bias vector B of the output layer 2 , the shape is (1,1);
[0102] 2. Forward propagation:
[0103] Calculate the weighted input of the hidden layer Z1 = X × W 1 +B 1 , where X is the input data, shape is (n_samples, 2);
[0104] Calculate the activation value A of the hidden layer 1 =ReLU(Z 1) ;
[0105] Calculate the weighted input Z of the output layer 2 =A 1 ×W 2 +B 2 ;
[0106] Calculate the activation value A of the output layer 2 =Z 2 (identity function);
[0107] 3. Generate discharge control signal:
[0108] According to the activation value A of the output layer 2 , generating a corresponding discharge control signal, if the value of A2 is greater than a certain threshold, a high level signal is generated; otherwise, a low level signal is generated;
[0109] 4. Send the generated discharge control signal to the corresponding output terminal to adjust the discharge current and voltage.
[0110] 5. Repeat 2-4, continuously update the model based on the real-time collected data, and generate new discharge control signals.
[0111] S5. According to the discharge control signal generated by the neural network model, the discharge current and voltage of the multi-output solar power source are adjusted to realize the power distribution to each output end. In step S5, the discharge current and voltage of the multi-output solar power source are adjusted using a PI control module, and the transfer function of the PI control module is expressed as:
[0112] V (s) =K p ×e (s) +K i×∫e (s) dt;
[0113] Among them, V (s) is the controller output, e (s) is the error signal, K p is the proportional gain, K i is the integral gain, ∫e (s) dt represents the integration operation of the error signal, and s represents the complex frequency domain variable.
[0114] After distributing the electric energy to each output terminal in the above method, the method further includes:
[0115] Information feedback is used to monitor the difference between the actual discharge effect and the predicted value of the neural network model, and use this information to adjust the weight and bias of the neural network model to improve the accuracy of the prediction. The information feedback calculation formula is:
[0116]
[0117] Among them, ΔW is the adjustment value of the weight, ΔB is the adjustment value of the bias, η is the learning rate, and is the partial derivative of the error function E with respect to the weights and biases.
[0118] In summary, the present invention uses a neural network algorithm to optimize the target of minimizing the prediction error function, thereby dynamically optimizing the discharge performance of the power supply according to the changing environmental conditions and user needs;
[0119] Secondly, in the present invention, the mapping relationship between the charging state, environmental conditions, historical discharge data and user power demand of the solar power source is learned, and the optimization goal used in the training is to minimize the prediction error function. Its adaptability, accuracy, real-time, intelligent power distribution, reduction of human intervention, improvement of system performance and continuous learning and optimization capabilities are helpful to improve the efficiency and reliability of the multi-output solar power system;
[0120] In addition, the current charging status of the solar power source, environmental data and instant user electricity demand information collected in real time are provided as input data to the trained neural network model, so that the neural network model can make more accurate predictions based on the latest situation and enhance the prediction accuracy. At the same time, the use of real-time data enables the system to respond quickly to changes in the environment and load, so as to adjust the discharge strategy in time, optimize the distribution of electricity, and ensure efficient and stable operation.
[0121] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A discharge method for a multi-output solar power source based on a neural network algorithm, characterized in that: The following steps are involved: S1. configuring a multi-layer neural network model, wherein the model comprises an input layer, a hidden layer and an output layer; S2, training the neural network model to learn the mapping relationship between the charging state of the solar power source, environmental conditions, user power demand and historical discharge data, the optimization goal used in the training is to minimize the prediction error function, and the error function is the difference between the actual discharge effect and the expected discharge effect; in step S2, the specific process is: S21. Collect and organize training data sets, including charging status, environmental conditions, historical discharge data, and user power demand of solar power sources, as well as corresponding target labels; S22. Define the structure of the neural network, including determining the number of neurons in the input layer, hidden layer, and output layer and the connection between the neurons; S23, forward propagation, input the training data into the neural network, calculate the activation value of each neuron, and finally get the predicted output of the model; S24. Compare the predicted output of the network with the true label and calculate the prediction error of the model; the prediction error of the model is calculated using the following formula: ; Where: E is the value of the loss function, that is, the mean square error; N is the number of samples; C is the output dimension; is the kth true output of the nth sample; is the k-th predicted output of the n-th sample; S25, back propagation, updating the weights and bias parameters in the network layer by layer from the output layer to the input layer to reduce the value of the error function; S26, iteratively updating the parameters of the model to minimize the error function; S3, collecting the current charging status of the solar power source, environmental data and instant user power demand information in real time, and providing them as input data to the trained neural network model; S4, using the neural network model to process the input data and generate corresponding discharge control signals, each control signal corresponds to an output end, so as to optimize the discharge efficiency of the solar power source and meet the power requirements of different output ends; In step S4, the neural network model is used to process the input data and generate corresponding discharge control signals, specifically: S41, preprocessing the current charging state of the solar power source, environmental data and instant user power demand information collected in real time, wherein the preprocessing includes normalizing and denoising the data to ensure the quality and accuracy of the data; S42, using the preprocessed data as input of an input layer, wherein the input layer includes a plurality of groups of neurons, each neuron corresponding to a feature; S43, the hidden layer performs nonlinear transformation on the input data to extract higher-level features, wherein the data of the input layer is connected to the neurons of the hidden layer through a weight matrix; S44, the data of the hidden layer is connected to the neurons of the output layer through the weight matrix, and the data is transmitted to the output layer, each output layer neuron corresponds to a discharge control signal, and the discharge current and voltage of the corresponding output end are adjusted; S5, according to the discharge control signal generated by the neural network model, the discharge current and voltage of the multi-output solar power source are adjusted to realize the distribution of electric energy to each output end; in step S5, the discharge current and voltage of the multi-output solar power source are adjusted using a PI control module, and the transfer function of the PI control module is expressed as: V (s) =K p ×e (s) +K i ×∫e (s) dt; Among them, V (s) is the controller output, e (s) is the error signal, K p is the proportional gain, K i is the integral gain, ∫e (s) dt represents the integration operation of the error signal, and s represents the complex frequency domain variable; After distributing the electric energy to each output terminal, it also includes: Information feedback is used to monitor the difference between the actual discharge effect and the predicted value of the neural network model, and this information is used to adjust the weights and bias of the neural network model to improve the accuracy of the prediction.
Citation Information
Patent Citations
Electric quantity scheduling method and device based on block chain and computer equipment
CN111612363A
Thermal management for solar-powered off-grid refrigeration
US20230152035A1
