Photovoltaic off-grid and grid-connected system and method
By building a photovoltaic grid-connected state recognition model and decision-making model, combining machine learning algorithms and real-time data, accurate photovoltaic system off-grid operation instructions are generated, and the problem of lack of intelligence and adaptability of off-grid operations in the existing technology is solved. , realizes efficient and flexible energy management.
Patent Information
- Application Number
- CN202510014585.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-02-07
- 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 intelligence and adaptability, and cannot make decisions quickly and accurately, especially in complex and changing weather conditions and power grid conditions.
Build a photovoltaic grid-connected state recognition model and a photovoltaic off-grid decision model, use dual machine learning algorithms (such as support vector machine SVM and random forest RF) for training, and combine real-time photovoltaic system data, grid state and weather forecast data to generate accurate Off-grid operation instructions and optimize decision results through residual fitting model.
It realizes intelligent off-grid decision-making for photovoltaic systems, improves operational accuracy and efficiency, and can flexibly respond to complex power grid and weather conditions, avoid energy waste, and improves energy utilization efficiency and economic benefits.
Smart Images

Figure CN119401558A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic off-grid and on-grid management, and in particular to a photovoltaic off-grid and on-grid system and method. Background Art
[0002] With the transformation of the global energy structure and the rapid development of renewable energy, photovoltaic power generation, as a clean and renewable energy form, is increasingly widely used in power systems. Photovoltaic systems usually have two operating modes: grid-connected and off-grid. The grid-connected mode refers to the photovoltaic system being connected to the grid and directly feeding the generated electricity into the grid; the off-grid mode refers to the photovoltaic system operating independently of the grid, usually supplying power to local loads. In practical applications, how to intelligently determine the off-grid operation of the photovoltaic system based on the current state of the photovoltaic system, the status of the grid, 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] At present, the off-grid operation of photovoltaic systems mainly relies on manual judgment or simple rule control. However, this method has many shortcomings. First, 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 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 insufficient foresight and optimization of decision-making results. With the continuous development of photovoltaic systems and power grids, their complexity and scale are also increasing. In this case, it is difficult to meet actual needs by relying solely on manual judgment and experience-based decision-making. Intelligent decision support systems 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 operation. Summary of the invention
[0004] The object of the present invention is to provide a photovoltaic off-grid system and method to solve the problems raised in the above background technology.
[0005] To achieve the above object, the present invention provides the following technical solution: a photovoltaic off-grid method, the system comprising: Construct a photovoltaic grid-connected state recognition model and a photovoltaic off-grid decision model. The photovoltaic grid-connected state recognition model is used to identify the current photovoltaic system's grid-connected state and its characteristics, and the photovoltaic off-grid decision model is used to determine the photovoltaic system's off-grid operation based on current and historical photovoltaic system data, grid status, and weather forecast data. A dual machine learning algorithm is used to train the photovoltaic grid-connected state recognition model and the photovoltaic off-grid decision model respectively, and the residuals of the two models are used to construct a residual fitting model, which is used to correct and optimize the results of the photovoltaic off-grid decision; The trained model is used in combination with real-time photovoltaic system data, grid status and weather forecast data to generate off-grid and on-grid operation instructions for the photovoltaic system.
[0006] Preferably, a support vector machine (SVM) algorithm is used to construct a photovoltaic grid-connected state recognition model, and the grid-connected state of the photovoltaic system is classified through feature selection and kernel function techniques.
[0007] Preferably, the training step of the photovoltaic grid-connected state recognition model includes: Data preprocessing: Collect and clean photovoltaic system data, including voltage, current, power, frequency and grid status indication, and normalize the collected data; Construct the support vector machine (SVM) structure: select an appropriate kernel function and design the SVM model, including the input layer, kernel function layer and output layer. 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 results of the photovoltaic grid-connected status; Model training: The preprocessed PV system data is input into the SVM model, the support vector is solved by optimizing the objective function, and the optimal parameters, including penalty parameters and kernel function parameters, are selected using the cross-validation method; Model evaluation: Evaluate the classification performance of the model on the test set and adjust the model parameters or feature selection based on the evaluation results.
[0008] Preferably, a random forest RF algorithm is used to construct a photovoltaic off-grid and on-grid decision model, and an integrated learning method is used to output off-grid and on-grid operation instructions for the photovoltaic system.
[0009] Preferably, the training step of the photovoltaic off-grid and grid-connected decision model includes: Dataset preparation: Integrate historical PV system data, grid status data, and corresponding weather forecast data to form a complete dataset, including feature variables and target variables; Construct a random forest RF structure: Design an RF model, including multiple decision trees. Each decision tree regresses the data independently, and finally obtains the output result by voting or averaging. The algorithm expression of the random forest model is:
[0010] in, is the input feature vector, is the target variable, Indicates The output of a decision tree, is the total number of decision trees; Model training: Input the data set into the RF model, generate multiple training subsets through the bootstrap sampling method, train the decision trees separately, use the out-of-bag error to evaluate the model performance, and adjust the number of decision trees and maximum depth and other parameters; Model optimization: Evaluate the decision performance of the model on the validation set, and adjust feature selection, decision tree parameters, and integration strategy based on the evaluation results.
[0011] Preferably, the step of constructing the residual fitting model includes: Calculate the residuals between the actual output and the expected output of the photovoltaic grid-connected state recognition model and the photovoltaic off-grid decision model, which are recorded as the state recognition residual and the decision residual respectively; The state recognition residual and decision residual are used as new features, combined with the original photovoltaic system data, power grid status and weather forecast data to construct a residual feature set; The gradient boosting decision tree GBDT algorithm is selected to train the residual feature set to obtain the residual fitting model; the update formula of GBDT is:
[0012] in, For the After rounds of iterations, the model For the The newly constructed decision tree is γ, which is the learning rate and is used to control the contribution 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 off-grid and grid-connected decision result.
[0013] Preferably, the training data of the photovoltaic grid-connected state recognition model and the photovoltaic off-grid decision model are obtained in the following manner: Real-time operation data collection: Sensors installed in various parts of the photovoltaic system 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: Extracting the operating 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; The real-time operation data, historical data and weather forecast data are integrated to form a data set with time series characteristics. For each data point, it contains the operation status of the photovoltaic system, the grid status, the weather conditions and the corresponding timestamp.
[0014] Preferably, the method further comprises: For the photovoltaic grid-connected state identification model, the time points of the photovoltaic system being connected to the grid and off-grid, as well as the system parameters and external environmental conditions before and after these state changes are specially marked; For the photovoltaic off-grid and on-grid decision model, a decision label is constructed based on the grid fault records, photovoltaic system maintenance records and corresponding weather conditions in the historical data, that is, recording whether the photovoltaic system should be off-grid or remain on-grid under these conditions.
[0015] Preferably, before the model training begins, the training data is further preprocessed, including: Perform one-hot encoding conversion on discrete features; The Z-score standardization method is used to standardize continuous features. Specifically, each numerical data is subtracted from its mean and divided by its standard deviation so that the processed data conforms to the standard normal distribution. The formula for standardization is:
[0016] in, is the original data, is the mean of the original data, is the standard deviation of the original data, is the standardized data.
[0017] Preferably, a photovoltaic off-grid system comprises: Data acquisition module: used to collect real-time operating data of the photovoltaic system, including the voltage, current, power, temperature, light intensity of the photovoltaic modules, and the voltage, frequency and connection status of the power grid; at the same time, obtain 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; Model building module: including a photovoltaic grid-connected state identification model building unit and a photovoltaic off-grid decision model building unit; the photovoltaic grid-connected state identification model building unit is used to build and train a model based on the collected data to identify the current grid-connected state and its characteristics of the photovoltaic system; the photovoltaic off-grid decision model building unit is used to build and train a model based on current and historical photovoltaic system data, grid status and weather forecast data to determine the off-grid operation of the photovoltaic system; Residual fitting module: used to construct and train a residual fitting model based on the output residuals of the photovoltaic grid-connected state identification model and the photovoltaic off-grid decision model. The model is used to correct and optimize the results of photovoltaic off-grid decision-making; Decision instruction generation module: 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 photovoltaic off-grid decision model, and combines the correction results of the residual fitting model to generate off-grid operation instructions for the photovoltaic system; Instruction execution module: controls the grid-connected or off-grid operation of the photovoltaic system according to the operation instructions output by the decision instruction generation module.
[0018] Compared with the prior art, the present invention has the following beneficial effects: The photovoltaic grid-connected state recognition model constructed by the present invention can identify the grid-connected state and characteristics of the photovoltaic system in real time and accurately, providing a reliable basis for subsequent decision-making. At the same time, the photovoltaic off-grid decision model comprehensively considers the current and historical photovoltaic system data, the power grid status and the weather forecast data, and is trained using a dual machine learning algorithm. It can comprehensively and deeply analyze various influencing factors, thereby generating more accurate and timely off-grid operation instructions. Unlike preset rules that rely on fixed thresholds and logic, the method of the present invention automatically learns and adapts to the dynamic changes of the photovoltaic system and the power grid status through a machine learning algorithm, making the decision-making process more flexible and robust. Even in the face of complex and changeable weather conditions and power grid conditions, the strategy can be quickly adjusted to ensure the stable operation and efficient utilization of the photovoltaic system.
[0019] By accurately identifying the grid-connected status of the photovoltaic system and making intelligent decisions on 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 point, it can switch to the off-grid mode in time and use energy storage equipment to store electricity; when the power grid is stable and the electricity price is at a peak, it can switch to the grid-connected mode and transmit excess electricity to the grid, thereby maximizing energy utilization and improving economic benefits. The present invention also introduces a residual fitting model to correct and optimize the results of photovoltaic off-grid and on-grid decisions. This innovative design can further reduce errors and uncertainties in the decision-making process, improve the stability and reliability of the photovoltaic system operation, and reduce the risk of equipment damage and safety accidents caused by improper operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A step diagram of a photovoltaic off-grid method according to the present invention; Figure 2 It is the training graph of the photovoltaic grid-connected state recognition model; Figure 3 Training flowchart for fitting a model to residuals. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] See also Figure 1-3 The present invention provides a technical solution: a photovoltaic off-grid method, the method comprising: Constructing a photovoltaic grid-connected state recognition model and a photovoltaic off-grid decision model: Based on the operating characteristics of the photovoltaic system and the historical data of the grid-connected / off-grid state, a photovoltaic grid-connected state recognition model is constructed. This model can identify the current grid-connected state of the photovoltaic system and extract features related to the grid-connected state. At the same time, a photovoltaic off-grid decision model is constructed. This model determines the off-grid operation of the photovoltaic system based on current and historical photovoltaic system data (such as voltage, current, power, temperature, light intensity, etc.), grid status (such as voltage fluctuations, frequency offsets, fault records, etc.) and weather forecast data (such as temperature, humidity, irradiance, wind speed, wind direction, etc.).
[0023] Model training using dual machine learning algorithms: The dual machine learning algorithms are used to train the photovoltaic grid-connected state recognition model and the photovoltaic off-grid decision model. Specifically, a suitable machine learning algorithm is selected as the base learner to perform preliminary training on the two models. Then, the residual, that is, the difference between the actual value and the predicted value, is calculated using the preliminary prediction results of the two models. Then, the residual is used as new training data to train the two models again to correct the errors in the preliminary predictions. Through multiple iterative training, the accuracy and generalization ability of the model are continuously improved.
[0024] Constructing 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 photovoltaic grid-connected decision-making. Specifically, the residuals of the photovoltaic grid-connected state identification model and the photovoltaic grid-connected decision-making model are used as inputs, and the residual fitting model is trained through the machine learning algorithm so that it can predict and correct the errors of the two main models in the decision-making process.
[0025] Generate off-grid and on-grid operation instructions for the photovoltaic system: After completing model training, the trained photovoltaic grid-connected state recognition model, photovoltaic off-grid decision model and residual fitting model are used to combine real-time photovoltaic system data, grid status and weather forecast data to generate off-grid and on-grid operation instructions for the photovoltaic system. Specifically, the photovoltaic grid-connected state recognition model is used to identify the current grid-connected state of the photovoltaic system; then, the real-time data is input into the photovoltaic off-grid decision model to obtain preliminary off-grid operation suggestions; then, the residual fitting model is used to correct and optimize the preliminary suggestions; finally, based on the corrected decision results, the off-grid and on-grid operation instructions for the photovoltaic system are generated, and the photovoltaic system is controlled to perform the corresponding operations.
[0026] The present invention will be further described below in conjunction with Examples 1 to 3: Embodiment 1:
[0027] The following will describe in detail a photovoltaic off-grid method proposed in this patent with specific examples, including the construction of a photovoltaic grid-connected state recognition model, the construction of a photovoltaic off-grid decision model, and the construction of a residual fitting model.
[0028] ① Construction of photovoltaic grid-connected status identification model: The support vector machine (SVM) algorithm is used to build a photovoltaic grid-connected state recognition model. First, data preprocessing is performed to collect the operating data of the photovoltaic system every 15 minutes in the past year, including voltage, current, power, frequency, and grid status indication (grid-connected / off-grid), and the data is normalized to eliminate dimensional differences.
[0029] Construct an SVM model. Select the radial basis function (RBF) as the kernel function because it performs well in dealing with nonlinear problems. Determine the optimal penalty parameter and kernel function parameter through grid search and cross-validation methods. During the training process, use the preprocessed 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.
[0030] ② Construction of photovoltaic off-grid decision-making model: Training of photovoltaic off-grid decision model (Random Forest RF algorithm): Dataset preparation: Collect historical PV system data, including but not limited to the voltage, current, power output of the PV 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 off-grid and grid-connected operation records of the PV system will be used as the target variable Y. The data set needs to be cleaned and preprocessed, including removing outliers, filling missing values, and normalizing or standardizing to ensure that each feature is comparable in the model. The algorithm expression of the random forest model is:
[0031] in, is the input feature vector, is the target variable, Indicates The output of a decision tree, is the total number of decision trees.
[0032] Random forest model construction: Use the random forest algorithm to build a photovoltaic off-grid decision model. First, determine the parameters of the random forest, such as the number of decision trees, maximum tree depth, minimum sample split number, etc. Then, generate multiple training subsets from the original data set through the bootstrap sampling method, and each subset is used to train a decision tree.
[0033] Decision tree training: For each decision tree, starting from the root node, recursively select the best feature to split. Feature selection is based on information gain. For each candidate feature f and value v, calculate the information gain before and after the split , select the feature and value with the largest information gain as the split 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 sample splits, or the tree reaches the maximum depth.
[0034] set up and are the data sets of the left child node and the right child node after splitting according to the feature f and the value v, respectively. The information gain It can be expressed as:
[0035] in, Representation dataset The entropy or Gini index of
[0036] Model output and evaluation: To evaluate the performance of the model, the out-of-bag error (OOB error) is used as an evaluation metric. OOB error is the average prediction error of samples that did not participate in the training of a tree in the random forest. It provides an unbiased estimate of the generalization ability of the model. According to the OOB error, the number of decision trees, maximum depth and other parameters are adjusted to optimize the model performance.
[0037] ③ Construction of residual fitting model: After the photovoltaic grid-connected state recognition model and photovoltaic off-grid decision model are trained, the residuals between the actual output and the expected output of the two models on the validation set are calculated and recorded as state recognition residuals and decision residuals, respectively. These two types of residuals are used as new features, combined with the original photovoltaic system data, grid status and weather forecast data to construct a residual feature set.
[0038] The gradient boosted decision tree (GBDT) algorithm is selected to train the residual feature set to obtain the residual fitting model. In the GBDT model, the learning rate is set to 0.1, the iteration round is 100, and the maximum depth of the decision tree is 3. In each iteration, the residual is used as the target variable to train a new decision tree, and the model is updated by the gradient descent method. The update formula of GBDT is:
[0039] in, For the After rounds of iterations, the model For the The newly constructed decision tree is γ, which is the learning rate and is used to control the contribution of each tree to the final model.
[0040] The iteration process continues until the preset iteration round is reached or the loss function changes less than the threshold. Embodiment 2:
[0041] The following is a detailed description of the training data acquisition method and preprocessing steps of the photovoltaic grid-connected state recognition model and the photovoltaic off-grid decision model in this patent, combined with specific examples.
[0042] Step 1. Obtaining training data Step 1.1 Run data collection in real time The operation data of the photovoltaic system is collected in real time through sensors installed in 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 the photovoltaic components, the working status of the inverter (such as power on, power off, fault, etc.), 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.
[0043] Step 1.2 Historical data collection Extract the operation data of the 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, photovoltaic system maintenance records, etc. At the same time, it is also necessary to collect weather condition data for the corresponding time period, such as sunshine duration, average wind speed, temperature, etc., as well as grid status data, such as grid voltage fluctuations, frequency changes, etc. These data provide rich historical background and context information for model training.
[0044] Step 1.3 Data Integration Integrate real-time operation data, historical data, and weather forecast data to form a data set containing time series features. For each data point, it contains the operating status of the photovoltaic system (such as grid-connected, off-grid), grid status, weather conditions (such as light intensity, temperature, etc.) and the corresponding timestamp. In this way, each data point becomes a feature vector containing multi-dimensional information, providing rich input for model training.
[0045] Step 2. Data labeling Step 2.1 Data labeling of photovoltaic grid-connected status recognition model In the integrated data set, the time points when the photovoltaic system is connected to the grid and disconnected from the grid are specially marked. These time points can be determined by the change of the grid connection state. At the same time, the system parameters (such as voltage, current, etc.) and external environmental conditions (such as light intensity, temperature, etc.) before and after these state changes are recorded to provide the model with contextual information before and after the state changes.
[0046] Step 2.2 Data labeling of photovoltaic off-grid decision model Decision labels are constructed based on the grid fault records, PV system maintenance records, and corresponding weather conditions in the historical data. Specifically, it analyzes whether the PV system should be disconnected from the grid or remain connected to the grid under these conditions, and annotates these decision results as labels on the corresponding data points. For example, when grid faults occur frequently or the PV system needs maintenance, it may be more inclined to disconnect the PV system from the grid; when the weather conditions are good and the grid is stable, it is more inclined to remain connected to the grid.
[0047] Step 3. Data preprocessing Before model training begins, the training data is preprocessed to improve the training efficiency and accuracy of the model.
[0048] Step 3.1 Discrete feature encoding For discrete features in the data set (such as inverter working status, grid connection status, etc.), one-hot encoding conversion is performed. 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.
[0049] Step 3.2: Standardization of continuous features For continuous features in the data set (such as voltage, current, power, temperature, light intensity, etc.), the Z-score standardization method is used for standardization. The specific formula is:
[0050] in, is the original data, is the mean of the original data, is the standard deviation of the original data, is the standardized data. Through standardization, the dimensional 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. Embodiment 3:
[0051] The invention also includes a photovoltaic off-grid system, the system comprising: Data acquisition module: used to collect real-time operating data of the photovoltaic system, including the voltage, current, power, temperature, light intensity of the photovoltaic modules, and the voltage, frequency and connection status of the power grid; at the same time, obtain 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.
[0052] Model building module: including a photovoltaic grid-connected state identification model building unit and a photovoltaic off-grid decision model building unit; the photovoltaic grid-connected state identification model building unit is used to build and train a model based on the collected data to identify the current grid-connected state and its characteristics of the photovoltaic system; the photovoltaic off-grid decision model building unit is used to build and train a model based on current and historical photovoltaic system data, grid status and weather forecast data to determine the off-grid operation of the photovoltaic system.
[0053] Residual fitting module: It is used to construct and train the residual fitting model according to the output residuals of the photovoltaic grid-connected state identification model and the photovoltaic off-grid decision model. The model is used to correct and optimize the results of the photovoltaic off-grid decision.
[0054] Decision instruction generation module: 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 photovoltaic off-grid decision model, and combines the correction results of the residual fitting model to generate off-grid operation instructions for the photovoltaic system; Instruction execution module: controls the grid-connected or off-grid operation of the photovoltaic system according to the operation instructions output by the decision instruction generation module.
[0055] The implementation method of the system is the same as the above embodiment and will not be described in detail in the specification.
[0056] 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 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 device.
[0057] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A photovoltaic off-grid method, characterized in that: The method comprises: Construct a photovoltaic grid-connected state recognition model and a photovoltaic off-grid decision model. The photovoltaic grid-connected state recognition model is used to identify the current photovoltaic system's grid-connected state and its characteristics, and the photovoltaic off-grid decision model is used to determine the photovoltaic system's off-grid operation based on current and historical photovoltaic system data, grid status, and weather forecast data. A dual machine learning algorithm is used to train the photovoltaic grid-connected state recognition model and the photovoltaic off-grid decision model respectively, and the residuals of the two models are used to construct a residual fitting model, which is used to correct and optimize the results of the photovoltaic off-grid decision; The trained model is used in combination with real-time photovoltaic system data, grid status and weather forecast data to generate off-grid and on-grid operation instructions for the photovoltaic system.
2. A photovoltaic off-grid method according to claim 1, characterized in that: The support vector machine (SVM) algorithm is used to build a photovoltaic grid-connected state recognition model, and the grid-connected state of the photovoltaic system is classified through feature selection and kernel function techniques.
3. A photovoltaic off-grid method according to claim 2, characterized in that: The training steps of the photovoltaic grid-connected state recognition model include: Data preprocessing: Collect and clean photovoltaic system data, including voltage, current, power, frequency and grid status indication, and normalize the collected data; Construct the support vector machine (SVM) structure: select an appropriate kernel function and design the SVM model, including the input layer, kernel function layer and output layer; 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 results of the photovoltaic grid-connected status; Model training: The preprocessed PV system data is input into the SVM model, the support vector is solved by optimizing the objective function, and the optimal parameters, including penalty parameters and kernel function parameters, are selected using the cross-validation method; Model evaluation: Evaluate the classification performance of the model on the test set and adjust the model parameters or feature selection based on the evaluation results.
4. A photovoltaic off-grid method according to claim 1, characterized in that: The random forest RF algorithm is used to build a photovoltaic off-grid and on-grid decision model, and the off-grid and on-grid operation instructions of the photovoltaic system are output through the integrated learning method.
5. A photovoltaic off-grid method according to claim 1, characterized in that: The training steps of the photovoltaic off-grid and grid-connected decision model include: Dataset preparation: Integrate historical PV system data, grid status data, and corresponding weather forecast data to form a complete dataset, including feature variables and target variables; Construct a random forest RF structure: Design an RF model, including multiple decision trees. Each decision tree regresses the data independently, and finally obtains the output result by voting or averaging. The algorithm expression of the random forest model is: ; in, is the input feature vector, is the target variable, Indicates The output of a decision tree, is the total number of decision trees; Model training: Input the data set into the RF model, generate multiple training subsets through the bootstrap sampling method, train the decision trees separately, use the out-of-bag error to evaluate the model performance, and adjust the number of decision trees and maximum depth and other parameters; Model optimization: Evaluate the decision performance of the model on the validation set, and adjust feature selection, decision tree parameters, and integration strategy based on the evaluation results.
6. A photovoltaic off-grid method according to claim 1, characterized in that: The steps to construct a residual fitting model include: Calculate the residuals between the actual output and the expected output of the photovoltaic grid-connected state recognition model and the photovoltaic off-grid decision model, which are recorded as the state recognition residual and the decision residual respectively; The state recognition residual and decision residual are used as new features, combined with the original photovoltaic system data, power grid status and weather forecast data to construct a residual feature set; The gradient boosting decision tree GBDT algorithm is selected to train the residual feature set to obtain the residual fitting model; the update formula of GBDT is: ; in, For the After rounds of iterations, the model For the The newly constructed decision tree is γ, which is the learning rate and is used to control the contribution 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 off-grid and grid-connected decision result.
7. A photovoltaic off-grid method according to claim 6, characterized in that: The training data of the photovoltaic grid-connected state recognition model and the photovoltaic off-grid decision model are obtained in the following manner: Real-time operation data collection: Sensors installed in various parts of the photovoltaic system 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: Extracting the operating 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 real-time operation data, historical data and weather forecast data to form a data set containing time series features; For each data point, it contains the operating status of the PV system, the grid status, the weather conditions and the corresponding timestamp.
8. A photovoltaic off-grid method according to claim 7, characterized in that: The method further comprises: For the photovoltaic grid-connected state identification model, the time points of the photovoltaic system being connected to the grid and off-grid, as well as the system parameters and external environmental conditions before and after these state changes are specially marked; For the photovoltaic off-grid and on-grid decision model, a decision label is constructed based on the grid fault records, photovoltaic system maintenance records and corresponding weather conditions in the historical data, that is, recording whether the photovoltaic system should be off-grid or remain on-grid under these conditions.
9. A photovoltaic off-grid method according to claim 8, characterized in that: Before model training begins, the training data is further preprocessed, including: Perform one-hot encoding conversion on discrete features; The Z-score standardization method is used to standardize continuous features. Specifically, each numerical data is subtracted from its mean and divided by its standard deviation so that the processed data conforms to the standard normal distribution. The formula for standardization is: ; in, is the original data, is the mean of the original data, is the standard deviation of the original data, is the standardized data.
10. A photovoltaic off-grid system, characterized in that: The system comprises: Data acquisition module: used to collect real-time operating data of the photovoltaic system, including the voltage, current, power, temperature, light intensity of the photovoltaic modules, and the voltage, frequency and connection status of the power grid; at the same time, obtain 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; Model building module: including a photovoltaic grid-connected state identification model building unit and a photovoltaic off-grid decision model building unit; the photovoltaic grid-connected state identification model building unit is used to build and train a model based on the collected data to identify the current grid-connected state and its characteristics of the photovoltaic system; the photovoltaic off-grid decision model building unit is used to build and train a model based on current and historical photovoltaic system data, grid status and weather forecast data to determine the off-grid operation of the photovoltaic system; Residual fitting module: used to construct and train a residual fitting model based on the output residuals of the photovoltaic grid-connected state identification model and the photovoltaic off-grid decision model. The model is used to correct and optimize the results of photovoltaic off-grid decision-making; Decision instruction generation module: 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 photovoltaic off-grid decision model, and combines the correction results of the residual fitting model to generate off-grid operation instructions for the photovoltaic system; Instruction execution module: controls the grid-connected or off-grid operation of the photovoltaic system according to the operation instructions output by the decision instruction generation module.
Citation Information
Patent Citations
Off-grid grid-connected hybrid photovoltaic power generation control system and economical operation optimization method thereof
CN103795079A
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
Distributed photovoltaic power generation power prediction method
CN117013527A
Cited By
Photovoltaic off-grid and grid-connected integrated control system based on big data technology
CN119865128A
Intelligent light storage charging detection energy collaborative optimization control method and system
CN120127800A