A photovoltaic grid-connected and off-grid system and method
By constructing a photovoltaic grid-connected state recognition model and an off-grid decision model, combined with the residual fitting model, the flexibility and adaptability of the photovoltaic system off-grid operation are solved, and the efficient and stable operation of the photovoltaic system and the optimal utilization of energy are achieved.
Patent Information
- Application Number
- CN202510014585.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-01-06
AI Technical Summary
The off-grid operation of existing photovoltaic systems mainly relies on manual judgment or simple rule control, lacks flexibility and adaptability, cannot dynamically adjust according to the actual conditions of the photovoltaic system and the power grid, and fails to make full use of future information such as weather forecasts, resulting in the decision-making results being not forward-looking and optimized enough.
A photovoltaic grid-connected state recognition model and off-grid decision model are built, a dual machine learning algorithm is used to train the model, and combined with the residual fitting model, to generate accurate off-grid operation instructions. The specific steps include: using support vector machine (SVM) and random forest (RF) algorithms for model training, optimizing decision results through residual fitting model, and combining real-time photovoltaic system data, grid status and weather forecast data for decisions.
实现了光伏系统的灵活、鲁棒的离并网操作,提高了决策的准确性和效率,避免能源浪费,确保系统稳定性和经济效益,降低设备损坏风险。
Smart Images

Figure CN119401558B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic off-grid and grid-connected management, and specifically provides a photovoltaic off-grid and grid-connected system and method. Background Technique
[0002] With the transformation of the global energy structure and the rapid development of renewable energy, as a clean and renewable energy form, photovoltaic power generation is increasingly widely used in the power system. Photovoltaic systems usually have two operating modes: grid-connected and off-grid. The grid-connected mode means that the photovoltaic system is connected to the power grid and directly sends the generated electric energy into the grid; the off-grid mode means that the photovoltaic system operates independently of the power grid and usually supplies power to local loads. In practical applications, how to intelligently determine the off-grid and grid-connected operations of the photovoltaic system according to the current state of the photovoltaic system, the grid conditions, and future weather conditions is of great significance for improving the efficiency of photovoltaic power generation and ensuring the stability and security of the power system.
[0003] Currently, the off-grid and grid-connected operations of photovoltaic systems mainly rely on manual judgment or simple rule control. However, this method has many deficiencies. First of all, manual judgment is often limited by experience, knowledge level, and reaction speed, and it is difficult to make decisions quickly and accurately. Secondly, although simple rule control is easy to implement, it lacks flexibility and self-adaptability and cannot be dynamically adjusted according to the actual conditions of the photovoltaic system and the power grid. In addition, traditional control methods often ignore the impact of future information such as weather forecasts on decision-making, resulting in less forward-looking and optimized decision-making results. With the continuous development of photovoltaic systems and power grids, their complexity and scale are also increasing. In this case, relying solely on manual judgment and empirical decision-making is no longer sufficient to meet the actual needs. An intelligent decision support system can make accurate predictions and decisions based on a large amount of historical data and real-time information through advanced algorithms and models, thereby effectively improving the accuracy and efficiency of photovoltaic off-grid and grid-connected operations. Summary of the Invention
[0004] The purpose of the present invention is to provide a photovoltaic off-grid and grid-connected system and method to solve the problems raised in the above background technique.
[0005] To achieve the above purpose, the present invention provides the following technical solution: A photovoltaic off-grid and grid-connected method, the system includes:
[0006] Construct a photovoltaic grid-connected state recognition model and a photovoltaic off-grid and grid-connected decision model, wherein the photovoltaic grid-connected state recognition model is used to identify the grid-connected state and its characteristics of the current photovoltaic system, and the photovoltaic off-grid and grid-connected decision model is used to determine the off-grid and grid-connected operations of the photovoltaic system based on the current and historical photovoltaic system data, grid status, and weather forecast data;
[0007] Use double machine learning algorithms to train the photovoltaic grid-connected status recognition model and the photovoltaic grid-connected and off-grid decision-making model respectively, and construct a residual fitting model using the residuals of the two models. The residual fitting model is used to correct and optimize the results of photovoltaic grid-connected and off-grid decisions;
[0008] Use the trained models, combined with real-time photovoltaic system data, grid status, and weather forecast data, to generate grid-connected and off-grid operation instructions for the photovoltaic system.
[0009] Preferably, use the support vector machine (SVM) algorithm to construct the photovoltaic grid-connected status recognition model, and classify the grid-connected status of the photovoltaic system through feature selection and kernel function techniques.
[0010] Preferably, the training steps of the photovoltaic grid-connected status recognition model include:
[0011] Data preprocessing: Collect and clean the photovoltaic system data, including voltage, current, power, frequency, and grid status indicators, and normalize the collected data;
[0012] Construct the support vector machine (SVM) structure: Select an appropriate kernel function and design the SVM model, including an input layer, a kernel function layer, and an output layer. Among them, the input layer receives the preprocessed photovoltaic system data, the kernel function layer is used to map the data to a high-dimensional space for linear classification, and the output layer outputs the classification result of the photovoltaic grid-connected status;
[0013] Model training: Input the preprocessed photovoltaic system data into the SVM model, solve the support vectors by optimizing the objective function, and use the cross-validation method to select the best parameters, including the penalty parameter and the kernel function parameter;
[0014] Model evaluation: Evaluate the classification performance of the model on the test set, and adjust the model parameters or feature selection according to the evaluation results.
[0015] Preferably, use the random forest (RF) algorithm to construct the photovoltaic grid-connected and off-grid decision-making model, and output the grid-connected and off-grid operation instructions for the photovoltaic system through the method of ensemble learning.
[0016] Preferably, the training steps of the photovoltaic grid-connected and off-grid decision-making model include:
[0017] Dataset preparation: Integrate historical photovoltaic system data, grid status data, and corresponding weather forecast data to form a complete dataset, including feature variables and target variables;
[0018] Construct the random forest (RF) structure: Design the RF model, including multiple decision trees. Each decision tree independently performs regression on the data, and finally obtains the output result through voting or averaging; The algorithm expression of the random forest model is:
[0019]
[0020] Among them, is the input feature vector, is the target variable, represents the output of the th decision tree, is the total number of decision trees;
[0021] Model training: Input the dataset into the RF model, generate multiple training subsets through the bootstrap sampling method, train the decision trees respectively, evaluate the model performance using the out-of-bag error, and adjust parameters such as the number and maximum depth of the decision trees;
[0022] Model optimization: Evaluate the decision-making performance of the model on the validation set, and adjust the feature selection, decision tree parameters, and integration strategy according to the evaluation results.
[0023] Preferably, the steps for constructing the residual fitting model include:
[0024] Calculate the residuals between the actual output and the expected output of the photovoltaic grid-connected state recognition model and the photovoltaic grid-connected and off-grid decision-making model, and denote them as the state recognition residual and the decision residual respectively;
[0025] Use the state recognition residual and the decision residual as new features, combine with the original photovoltaic system data, grid state, and weather forecast data to construct a residual feature set;
[0026] Select the gradient boosting decision tree GBDT algorithm to train the residual feature set to obtain a residual fitting model; The update formula of GBDT is:
[0027]
[0028] Among them, is the model after the th iteration, is the newly constructed decision tree in the th round, γ is the learning rate, which is used to control the contribution of each tree to the final model;
[0029] The structure of the residual fitting model includes an input layer, multiple decision trees, and an output layer. The input layer receives the residual feature set, and the output layer outputs the corrected photovoltaic grid-connected and off-grid decision result.
[0030] Preferably, the acquisition method of the training data of the photovoltaic grid-connected state recognition model and the photovoltaic grid-connected and off-grid decision-making model is:
[0031] Real-time operation data collection: Real-time collect operation data through sensors installed in various parts of the photovoltaic system, including the voltage, current, power, temperature, light intensity of the photovoltaic modules, the working state of the inverter, the grid voltage, grid frequency, and grid connection state;
[0032] Historical data collection: Extract the operation data of the past period from the historical database of the photovoltaic system, including daily power generation, daily radiation, grid fault records, and photovoltaic system maintenance records, as well as the corresponding weather conditions and grid status;
[0033] Integrate the real-time operation data, historical data, and weather forecast data to form a data set with time series characteristics. For each data point, it includes the operation status of the photovoltaic system, grid status, weather conditions, and the corresponding timestamp.
[0034] Preferably, the method further includes:
[0035] For the photovoltaic grid connection status recognition model, specifically mark the time points of the photovoltaic system's grid connection and disconnection, as well as the system parameters and external environmental conditions before and after these state changes;
[0036] For the photovoltaic grid connection and disconnection decision model, construct decision labels based on the grid fault records, photovoltaic system maintenance records, and the corresponding weather conditions in the historical data, that is, record whether the photovoltaic system should be disconnected from the grid or remain grid-connected under these conditions.
[0037] Preferably, before the start of model training, further preprocess the training data, including:
[0038] Perform one-hot encoding conversion on discrete features;
[0039] Use the Z-score normalization method to normalize continuous features. Specifically: Subtract the mean of each numerical data from it and divide by its standard deviation, so that the processed data conforms to the standard normal distribution. The formula for the normalization process is:
[0040]
[0041] Among them, is the original data, is the mean of the original data, is the standard deviation of the original data, is the data after normalization.
[0042] Preferably, a photovoltaic grid connection and disconnection system, the system includes:
[0043] Data acquisition module: Used to collect the operation data of the photovoltaic system in real time, including the voltage, current, power, temperature, and light intensity of the photovoltaic modules, as well as the voltage, frequency, and connection status of the grid; At the same time, obtain the historical data and weather forecast data of the photovoltaic system, including daily power generation, daily radiation, grid fault records, photovoltaic system maintenance records, and future weather information;
[0044] Model construction module: It includes a PV grid-connected status recognition model construction unit and a PV grid-connected / disconnected decision-making model construction unit; the PV grid-connected status recognition model construction unit is used to construct and train a model based on the collected data to identify the current grid-connected status and its characteristics of the PV system; the PV grid-connected / disconnected decision-making model construction unit is used to construct and train a model based on the current and historical PV system data, grid status, and weather forecast data to determine the grid-connected / disconnected operation of the PV system.
[0045] Residual fitting module: It is used to construct and train a residual fitting model according to the output residuals of the PV grid-connected status recognition model and the PV grid-connected / disconnected decision-making model, and this model is used to correct and optimize the results of the PV grid-connected / disconnected decision-making.
[0046] Decision instruction generation module: It receives the real-time PV system data, grid status, and weather forecast data provided by the data acquisition module, inputs them into the trained PV grid-connected status recognition model and the PV grid-connected / disconnected decision-making model, and combines the correction results of the residual fitting model to generate the grid-connected / disconnected operation instructions for the PV system.
[0047] Instruction execution module: According to the operation instructions output by the decision instruction generation module, it controls the grid-connected or off-grid operation of the PV system.
[0048] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0049] The PV grid-connected status recognition model constructed by the present invention can identify the grid-connected status and its characteristics of the PV system in real time and accurately, providing a reliable basis for subsequent decision-making. At the same time, the PV grid-connected / disconnected decision-making model comprehensively considers the current and historical PV system data, grid status, and weather forecast data, and uses dual machine learning algorithms for training, which can comprehensively and deeply analyze various influencing factors, thereby generating more accurate and timely grid-connected / disconnected operation instructions. Different from the preset rules that rely on fixed thresholds and logics, the method of the present invention automatically learns and adapts to the dynamic changes of the PV system and grid status through machine learning algorithms, making the decision-making process more flexible and robust. Even in the face of complex and changeable weather conditions and grid conditions, it can quickly adjust the strategy to ensure the stable operation and efficient utilization of the PV system.
[0050] By accurately identifying the grid-connected status of the photovoltaic system and making intelligent decisions on grid-connected and off-grid operations, the present invention can effectively avoid unnecessary energy waste. For example, when the power grid fails or the electricity price is at a low ebb, it can be switched to the off-grid mode in a timely manner to store electrical energy using energy storage devices; when the power grid is stable and the electricity price is at a peak, it is switched to the grid-connected mode to transmit the excess electrical energy to the power grid, thereby achieving the maximum utilization of energy and the improvement of economic benefits. The present invention also introduces a residual fitting model for correcting and optimizing the results of photovoltaic grid-connected and off-grid decisions. This innovative design can further reduce errors and uncertainties in the decision-making process, improve the stability and reliability of the operation of the photovoltaic system, and reduce the risks of equipment damage and safety accidents caused by improper operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is a step diagram of a photovoltaic grid-connected and off-grid method according to the present invention;
[0052] Figure 2 It is a training diagram of a photovoltaic grid-connected status identification model;
[0053] Figure 3 It is a training flow chart of a residual fitting model. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0054] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0055] Please refer to Figures 1-3 , the present invention provides a technical solution: a photovoltaic grid-connected and off-grid method, the method includes:
[0056] Construct a photovoltaic grid-connected status identification model and a photovoltaic grid-connected and off-grid decision model: According to the operating characteristics of the photovoltaic system and the historical data of the grid-connected / off-grid status, construct a photovoltaic grid-connected status identification model. This model can identify the current grid-connected status of the photovoltaic system and extract the features related to the grid-connected status. At the same time, construct a photovoltaic grid-connected and off-grid decision model, which is based on the current and historical photovoltaic system data (such as voltage, current, power, temperature, light intensity, etc.), grid status (such as voltage fluctuation, frequency deviation, fault records, etc.) and weather forecast data (such as temperature, humidity, irradiance, wind speed, wind direction, etc.) to determine the grid-connected and off-grid operations of the photovoltaic system.
[0057] Model training using a dual machine learning algorithm: The photovoltaic grid-connected status recognition model and the photovoltaic grid-connected and off-grid decision-making model are trained using a dual machine learning algorithm. Specifically, a suitable machine learning algorithm is selected as the base learner to initially train the two models. Then, using the initial prediction results of the two models, the residuals are calculated, i.e., the difference between the actual value and the predicted value. Next, the residuals are used as new training data to retrain the two models to correct the errors in the initial predictions. Through multiple iterative trainings, the accuracy and generalization ability of the models are continuously improved.
[0058] Constructing a residual fitting model: Based on the dual machine learning algorithm, a residual fitting model is further constructed. This model is used to correct and optimize the results of the photovoltaic grid-connected and off-grid decision-making. Specifically, the residuals of the photovoltaic grid-connected status recognition model and the photovoltaic grid-connected and off-grid decision-making model are used as inputs, and the residual fitting model is trained through a machine learning algorithm so that it can predict and correct the errors in the decision-making process of the two main models.
[0059] Generating grid-connected and off-grid operation instructions for the photovoltaic system: After completing the model training, using the trained photovoltaic grid-connected status recognition model, the photovoltaic grid-connected and off-grid decision-making model, and the residual fitting model, combined with real-time photovoltaic system data, grid status, and weather forecast data, generate grid-connected and off-grid operation instructions for the photovoltaic system. Specifically, first, identify the current grid-connected status of the photovoltaic system through the photovoltaic grid-connected status recognition model; then, input the real-time data into the photovoltaic grid-connected and off-grid decision-making model to obtain preliminary grid-connected and off-grid operation suggestions; next, use the residual fitting model to correct and optimize the preliminary suggestions; finally, based on the corrected decision results, generate grid-connected and off-grid operation instructions for the photovoltaic system and control the photovoltaic system to perform the corresponding operations.
[0060] The following further illustrates the present method in conjunction with Examples 1 to 3: Example 1:
[0061] The following will describe in detail a photovoltaic grid-connected and off-grid method proposed in this patent in conjunction with specific examples, including the construction of a photovoltaic grid-connected status recognition model, the construction of a photovoltaic grid-connected and off-grid decision-making model, and the construction of a residual fitting model.
[0062] ① Construction of the photovoltaic grid-connected status recognition model:
[0063] The photovoltaic grid-connected status recognition model is constructed using the support vector machine (SVM) algorithm. First, data preprocessing is performed. The operating data of the photovoltaic system every 15 minutes in the past year is collected, including voltage, current, power, frequency, and grid status indication (grid-connected / off-grid), and the data is normalized to eliminate the dimension difference.
[0064] Build an SVM model. Select the radial basis function (RBF) as the kernel function because it performs well in dealing with non - linear problems. Determine the optimal penalty parameter and kernel function parameter through grid search and cross - validation methods. During the training process, use the pre - processed data as input and the photovoltaic grid - connected status (grid - connected or off - grid) as output to train the SVM model to accurately identify the grid - connected status of the photovoltaic system.
[0065] ② Construction of the photovoltaic grid - connected and off - grid decision model:
[0066] Training of the photovoltaic grid - connected and off - grid decision model (random forest RF algorithm):
[0067] Dataset preparation: Collect historical photovoltaic system data, including but not limited to the voltage, current, power output of the photovoltaic array, and the corresponding grid status (such as grid - connected / off - grid), weather forecast data (such as irradiance, temperature), etc. These data will be used as feature variables X, and the actual grid - connected and off - grid operation records of the photovoltaic system will be used as the target variable Y. The dataset needs to be cleaned and pre - processed, including removing outliers, filling missing values, and performing normalization or standardization to ensure the comparability of each feature in the model. The algorithm expression of the random forest model is:
[0068]
[0069] Among them, is the input feature vector, is the target variable, represents the output of the th decision tree, is the total number of decision trees.
[0070] Construction of the random forest model: Use the random forest algorithm to construct the photovoltaic grid - connected and off - grid decision model. First, determine the parameters of the random forest, such as the number of decision trees, the maximum tree depth, the minimum number of samples for splitting, etc. Then, generate multiple training subsets from the original dataset through the bootstrap sampling method, and each subset is used to train a decision tree.
[0071] Decision tree training: For each decision tree, starting from the root node, recursively select the optimal feature for splitting. Feature selection is based on information gain. For each candidate feature f and value v, calculate the information gain before and after splitting, and select the feature and value with the maximum information gain as the splitting point of the current node. This process continues until the stopping condition is reached, such as the number of samples in the node is less than the minimum number of samples for splitting, or the tree reaches the maximum depth.
[0072] Let and Let \(D_{left}\) and \(D_{right}\) be the datasets of the left and right child nodes split according to the feature \(f\) and the value \(v\), respectively. Then the information gain can be expressed as:
[0073]
[0074] where represents the entropy or Gini index of the dataset .
[0075] Model output and evaluation: To evaluate the performance of the model, the out-of-bag error (OOB error) is used as the evaluation metric. The OOB error is the average of the prediction errors of the samples not involved in the training of a certain tree in the random forest on that tree, and it provides an unbiased estimate of the model's generalization ability. Adjust parameters such as the number of decision trees and the maximum depth according to the OOB error to optimize the model performance.
[0076] ③ Construction of the residual fitting model:
[0077] After the photovoltaic grid-connected state recognition model and the photovoltaic grid-connected and off-grid decision-making model are trained, calculate the residuals between the actual output and the expected output of the two models on the validation set, denoted as the state recognition residual and the decision residual respectively. Use these two types of residuals as new features, and combine the original photovoltaic system data, grid state, and weather forecast data to construct a residual feature set.
[0078] Select the gradient boosting decision tree (GBDT) algorithm to train the residual feature set to obtain a residual fitting model. In the GBDT model, set the learning rate to 0.1, the number of iterations to 100, and the maximum depth of the decision tree to 3. In each iteration, use the residual as the target variable to train a new decision tree, and update the model through the gradient descent method. The update formula of GBDT is:
[0079]
[0080] where is the model after the -th iteration, is the newly constructed decision tree in the -th iteration, and \(\gamma\) is the learning rate, which is used to control the contribution degree of each tree to the final model.
[0081] The iteration process continues until the preset number of iterations is reached or the change in the loss function is less than the threshold. Example 2:
[0082] The following combines specific examples to describe in detail the training data acquisition method and preprocessing steps of the photovoltaic grid-connected state recognition model and the photovoltaic grid-connected and off-grid decision-making model in this patent.
[0083] Step 1. Acquisition of Training Data
[0084] Step 1.1 Real-time Operation Data Collection
[0085] The operating data of the photovoltaic system are collected in real time through sensors installed at key parts of the photovoltaic system, such as voltage sensors, current sensors, power meters, thermometers, light intensity meters, and inverter status monitors. These data include, but are not limited to, the voltage, current, power, temperature, and light intensity of photovoltaic modules, the operating status of the inverter (such as startup, shutdown, and faults), the grid voltage, grid frequency, and grid connection status (grid-connected or off-grid). The data collection frequency can be set according to actual needs, for example, once every 15 minutes.
[0086] Step 1.2 Historical Data Collection
[0087] Extract the operating data within a past period (such as one year) from the historical database of the photovoltaic system. These data include daily power generation, daily radiation, grid fault records, and photovoltaic system maintenance records. At the same time, it is also necessary to collect the weather condition data for the corresponding period, such as sunshine duration, average wind speed, and air temperature, as well as the grid status data, such as grid voltage fluctuations and frequency changes. These data provide rich historical backgrounds and context information for model training.
[0088] Step 1.3 Data Integration
[0089] Integrate the real-time operation data, historical data, and weather forecast data to form a dataset with time series features. For each data point, it includes the operating status of the photovoltaic system (such as grid-connected or off-grid), grid status, weather conditions (such as light intensity and air temperature), and the corresponding timestamp. In this way, each data point becomes a feature vector containing multi-dimensional information, providing rich inputs for model training.
[0090] Step 2. Data Annotation
[0091] Step 2.1 Data Annotation for the Photovoltaic Grid-connection Status Recognition Model
[0092] In the integrated dataset, specifically mark the time points when the photovoltaic system is grid-connected and off-grid. These time points can be determined by changes in the grid connection status. At the same time, record the system parameters (such as voltage and current) and external environmental conditions (such as light intensity and air temperature) before and after these status changes to provide context information for the model before and after the status changes.
[0093] Step 2.2 Data Annotation for the Photovoltaic Grid-connection and Disconnection Decision-making Model
[0094] Construct decision labels based on power grid fault records, photovoltaic system maintenance records, and corresponding weather conditions in historical data. Specifically, analyze whether the photovoltaic system should be off-grid or remain grid-connected under these conditions, and use these decision results as labels to mark the corresponding data points. For example, when power grid faults occur frequently or the photovoltaic system needs maintenance, it may be more inclined to disconnect the photovoltaic system from the grid; while when the weather is good and the power grid is stable, it is more inclined to remain grid-connected.
[0095] Step 3. Data preprocessing
[0096] Before starting model training, preprocess the training data to improve the training efficiency and accuracy of the model.
[0097] Step 3.1 Encoding of discrete features
[0098] For discrete features in the dataset (such as inverter operating status, grid connection status, etc.), perform one-hot encoding conversion. One-hot encoding is a method of converting discrete features into binary vectors, where each feature value corresponds to a binary bit. In this way, discrete features can be effectively processed by the model.
[0099] Step 3.2 Standardization of continuous features
[0100] For continuous features in the dataset (such as voltage, current, power, temperature, light intensity, etc.), use the Z-score standardization method for standardization processing. The specific formula is:
[0101]
[0102] Among them, is the original data, is the mean of the original data, is the standard deviation of the original data, is the data after standardization. Through standardization processing, the dimensionality differences between different features can be eliminated, making the data conform to the standard normal distribution, thereby improving the training efficiency and accuracy of the model. Example 3:
[0103] The present invention also includes a photovoltaic off-grid and grid-connected system, and the system includes:
[0104] Data acquisition module: used to collect the operation data of the photovoltaic system in real time, including the voltage, current, power, temperature, and light intensity of the photovoltaic modules, as well as the voltage, frequency, and connection status of the power grid; at the same time, obtain the historical data and weather forecast data of the photovoltaic system, including daily power generation, daily radiation, power grid fault records, photovoltaic system maintenance records, and future weather information.
[0105] Model construction module: It includes a photovoltaic grid-connected status recognition model construction unit and a photovoltaic grid-connected and off-grid decision-making model construction unit; the photovoltaic grid-connected status recognition model construction unit is used to construct and train a model based on the collected data to identify the current grid-connected status and its characteristics of the photovoltaic system; the photovoltaic grid-connected and off-grid decision-making model construction unit is used to construct and train a model based on the current and historical photovoltaic system data, grid status, and weather forecast data to determine the grid-connected and off-grid operations of the photovoltaic system.
[0106] Residual fitting module: It is used to construct and train a residual fitting model according to the output residuals of the photovoltaic grid-connected status recognition model and the photovoltaic grid-connected and off-grid decision-making model. This model is used to correct and optimize the results of the photovoltaic grid-connected and off-grid decision-making.
[0107] Decision instruction generation module: It receives the real-time photovoltaic system data, grid status, and weather forecast data provided by the data acquisition module, inputs them into the trained photovoltaic grid-connected status recognition model and the photovoltaic grid-connected and off-grid decision-making model, and combines the correction results of the residual fitting model to generate the grid-connected and off-grid operation instructions for the photovoltaic system;
[0108] Instruction execution module: According to the operation instructions output by the decision instruction generation module, it controls the grid-connected or off-grid operation of the photovoltaic system.
[0109] The implementation manner of this system is the same as that of the above embodiment, and will not be elaborated in the specification.
[0110] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device.
[0111] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A photovoltaic grid-connected and off-grid method, characterized in that, The method includes: Constructing a photovoltaic grid-connected status identification model and a photovoltaic grid-connected and off-grid decision-making model. Among them, the photovoltaic grid-connected status identification model is used to identify the grid-connected status and its characteristics of the current photovoltaic system, and the photovoltaic grid-connected and off-grid decision-making model is used to determine the grid-connected and off-grid operations of the photovoltaic system based on the current and historical photovoltaic system data, grid status, and weather forecast data; Using a dual machine learning algorithm to train the photovoltaic grid-connected status identification model and the photovoltaic grid-connected and off-grid decision-making model respectively, and constructing a residual fitting model using the residuals of the two models. The residual fitting model is used to correct and optimize the results of the photovoltaic grid-connected and off-grid decision-making; Using the trained models, combined with real-time photovoltaic system data, grid status, and weather forecast data, to generate grid-connected and off-grid operation instructions for the photovoltaic system; Adopting the support vector machine SVM algorithm to construct a photovoltaic grid-connected status identification model, and classifying the grid-connected status of the photovoltaic system through feature selection and kernel function techniques; Adopting the random forest RF algorithm to construct a photovoltaic grid-connected and off-grid decision-making model, and outputting grid-connected and off-grid operation instructions for the photovoltaic system through the method of ensemble learning; The steps of constructing the residual fitting model include: Calculating the residuals between the actual output and the expected output of the photovoltaic grid-connected status identification model and the photovoltaic grid-connected and off-grid decision-making model, which are respectively recorded as the status identification residual and the decision residual; Taking the status identification residual and the decision residual as new features, and combining the original photovoltaic system data, grid status, and weather forecast data to construct a residual feature set; Selecting the gradient boosting decision tree GBDT algorithm to train the residual feature set to obtain a residual fitting model; The update formula of GBDT is: Among them, is the model after the -th round of iteration, is the newly constructed decision tree in the -th round, and γ is the learning rate, which is used to control the contribution degree of each tree to the final model; The structure of the residual fitting model includes an input layer, multiple decision trees, and an output layer. The input layer receives the residual feature set, and the output layer outputs the corrected photovoltaic grid-connected and off-grid decision-making results.
2. The photovoltaic grid-connected and off-grid method according to claim 1, wherein The training steps of the photovoltaic grid-connected status identification model include: Data preprocessing: Collecting and cleaning photovoltaic system data, including voltage, current, power, frequency, and grid status indicators, and normalizing the collected data; Constructing a support vector machine SVM structure: Selecting an appropriate kernel function and designing an SVM model, including an input layer, a kernel function layer, and an output layer; Among them, the input layer receives the preprocessed photovoltaic system data, the kernel function layer is used to map the data to a high-dimensional space for linear classification, and the output layer outputs the classification result of the photovoltaic grid-connected status; Model training: Inputting the preprocessed photovoltaic system data into the SVM model, solving the support vectors by optimizing the objective function, and using the cross-validation method to select the best parameters, including the penalty parameter and the kernel function parameter; Model evaluation: Evaluating the classification performance of the model on the test set, and adjusting the model parameters or feature selection according to the evaluation results.
3. A photovoltaic off-grid and grid-connected method according to claim 1, characterized in that, The training steps of the photovoltaic grid-connected and off-grid decision-making model include: Dataset preparation: Integrating historical photovoltaic system data, grid status data, and corresponding weather forecast data to form a complete dataset, including feature variables and target variables; Constructing a random forest RF structure: Designing an RF model, including multiple decision trees, each of which independently performs regression on the data, and finally obtaining the output result through voting or averaging; The algorithm expression of the random forest model is: Among them, is the input feature vector, is the target variable, represents the output of the th decision tree, is the total number of decision trees; Model training: Input the dataset into the RF model. Generate multiple training subsets through the bootstrap sampling method, train decision trees respectively, use the out-of-bag error to evaluate the model performance, and adjust the number of decision trees and the maximum depth parameter. Model optimization: Evaluate the decision-making performance of the model on the validation set, and adjust the feature selection, decision tree parameters, and integration strategy according to the evaluation results.
4. A photovoltaic grid-connected and off-grid method according to claim 1, characterized in that, The acquisition method of the training data for the photovoltaic grid connection status recognition model and the photovoltaic grid connection / disconnection decision model is as follows: Real-time operation data collection: Install sensors at various parts of the photovoltaic system to collect operation data in real time, including the voltage, current, power, temperature, light intensity of the photovoltaic modules, the working status of the inverter, the grid voltage, grid frequency, and grid connection status. Historical data collection: Extract the operation data of the past period from the historical database of the photovoltaic system, including daily power generation, daily radiation, grid fault records, and photovoltaic system maintenance records, as well as the corresponding weather conditions and grid status. Integrate the real-time operation data, historical data, and weather forecast data to form a dataset containing time series features. For each data point, it includes the operation status of the photovoltaic system, grid status, weather conditions, and the corresponding timestamp.
5. A photovoltaic grid-connected and off-grid method according to claim 4, wherein The method further includes: For the photovoltaic grid connection status recognition model, mark the time points of the photovoltaic system's grid connection and disconnection, as well as the system parameters and external environmental conditions before and after these state changes. For the photovoltaic grid connection / disconnection decision model, construct decision labels according to the grid fault records, photovoltaic system maintenance records, and the corresponding weather conditions in the historical data, that is, record whether the photovoltaic system should disconnect from the grid or remain connected under these conditions.
6. A photovoltaic grid-connected and off-grid method according to claim 5, characterized in that Before the start of model training, further preprocess the training data, including: Perform one-hot encoding conversion on discrete features. Use the Z-score standardization method to standardize continuous features. Specifically: Subtract the mean of each numerical data and divide it by its standard deviation, so that the processed data conforms to the standard normal distribution. The formula for standardization processing is: Among them, is the original data, is the mean value of the original data, is the standard deviation of the original data, is the data after standardization.
7. A photovoltaic grid-connected and off-grid system, characterized in that, The system includes: Data acquisition module: Used to collect the operation data of the photovoltaic system in real time, including the voltage, current, power, temperature, light intensity of the photovoltaic modules, and the voltage, frequency, and connection status of the grid; at the same time, obtain the historical data and weather forecast data of the photovoltaic system, including daily power generation, daily radiation, grid fault records, photovoltaic system maintenance records, and future weather information. Model construction module: It includes a PV grid-connected status recognition model construction unit and a PV grid-connected / disconnected decision-making model construction unit; the PV grid-connected status recognition model construction unit is used to construct and train a model based on the collected data to identify the current grid-connected status and its characteristics of the PV system; a support vector machine (SVM) algorithm is used to construct the PV grid-connected status recognition model, and the grid-connected status of the PV system is classified through feature selection and kernel function techniques; the PV grid-connected / disconnected decision-making model construction unit is used to construct and train a model based on the current and historical PV system data, grid status, and weather forecast data to determine the grid-connected / disconnected operation of the PV system; a random forest (RF) algorithm is used to construct the PV grid-connected / disconnected decision-making model, and the grid-connected / disconnected operation instruction of the PV system is output through the method of ensemble learning; Residual fitting module: It is used to construct and train a residual fitting model according to the output residuals of the PV grid-connected status recognition model and the PV grid-connected / disconnected decision-making model, and this model is used to correct and optimize the results of the PV grid-connected / disconnected decision-making; the steps of constructing the residual fitting model include: Calculating the residuals between the actual output and the expected output of the PV grid-connected status recognition model and the PV grid-connected / disconnected decision-making model, which are respectively denoted as the status recognition residual and the decision residual; Taking the status recognition residual and the decision residual as new features, and combining the original PV system data, grid status, and weather forecast data to construct a residual feature set; Selecting the gradient boosting decision tree (GBDT) algorithm to train the residual feature set to obtain the residual fitting model; the update formula of GBDT is: Among them, is the model after the -th round of iteration, is the newly constructed decision tree in the -th round. γ is the learning rate, which is used to control the contribution degree of each tree to the final model; The structure of the residual fitting model includes an input layer, multiple decision trees, and an output layer. The input layer receives the residual feature set, and the output layer outputs the corrected PV grid-connected / disconnected decision-making result; Decision instruction generation module: Receiving the real-time PV system data, grid status, and weather forecast data provided by the data acquisition module, inputting them into the trained PV grid-connected status recognition model and the PV grid-connected / disconnected decision-making model, and combining the correction results of the residual fitting model to generate the grid-connected / disconnected operation instruction of the PV system; Instruction execution module: Controlling the grid-connected or off-grid operation of the PV system according to the operation instruction output by the decision instruction generation module.
Citation Information
Patent Citations
Photovoltaic power generation power short-term prediction method by adopting composite data source based on Sigmoid kernel function support vector machine
CN103955758A
Method and device for real-time prediction of generation power of photovoltaic system
CN106779223A
Job shop real-time scheduling method based on PCA-XGBoost-IRF
CN113256066A
Power regulation and grid-connected and off-grid control equipment for distributed photovoltaic system
CN118693901A