Photovoltaic inverse power probability prediction method and system with different seasons and workday characteristics
By constructing a photovoltaic reverse power probability prediction model that incorporates seasonal and weekday characteristics, the problem of insufficient model generalization ability in existing technologies has been solved, enabling quantifiable assessment and refined management of reverse power risk, and improving the safety and stability of the distribution network.
Patent Information
- Application Number
- CN202610312424.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-16
- Publication Date
- 2026-06-26
- Estimated Expiration
- 2046-03-16
AI Technical Summary
Existing technologies fail to effectively consider seasonal and weekday characteristics when predicting photovoltaic reverse power, resulting in insufficient generalization ability of the model in cross-seasonal or cross-day scenarios. They cannot provide information on risk magnitude and confidence level, making it difficult to meet the needs of risk classification and early handling in actual scheduling and operation and maintenance.
By acquiring historical operating data of the target distribution network, performing time alignment and cleaning, constructing a multivariate fusion sample that includes seasonal and weekday characteristics, establishing an inverse power probability prediction model, and introducing distribution difference constraints for probability calibration and parameter optimization, the probability curve of inverse power occurrence is output.
It improves the forecasting stability and generalization ability in cross-seasonal and cross-day scenarios, provides quantifiable reverse power risk assessment, supports the safety and refined operation management of distribution networks, and outputs the high-risk periods of reverse power and their probability levels in advance.
Smart Images

Figure CN121834314B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system operation analysis and new energy grid connection management technology, specifically to a method and system for predicting the probability of photovoltaic reverse power under different seasonal and weekday characteristics. Background Technology
[0002] As the installed capacity of distributed photovoltaic (PV) power in distribution networks continues to grow, during periods of abundant sunshine and relatively low load, PV output may exceed local electricity demand, resulting in reverse power flow at grid connection points, feeder heads, transformer substations, or the low-voltage side of distribution transformers. Reverse power flow can alter the direction of power flow, potentially leading to voltage exceeding limits, malfunctions of protection and automation devices, failure of voltage regulation and reactive power compensation strategies, and equipment overload, increasing the operational risks of the distribution network. To ensure the safe and stable operation of distribution networks with a high proportion of distributed PV, the operation side typically needs to assess reverse power risks in advance to develop measures such as time-limited power generation, energy storage charging and discharging, and reactive power-voltage coordinated control.
[0003] Existing reverse power correlation technologies are mostly based on detection or deterministic prediction. Common practices include determining the reverse power based on the power direction at the grid connection point or the relationship between net injected power and a threshold, or first predicting photovoltaic output and load separately, and then inferring the possibility of reverse power through net injection calculation or power flow calculation. However, photovoltaic output is significantly random due to meteorological factors such as cloud cover, irradiance, and temperature, and load fluctuates due to changes in user behavior, production rhythm, and operating conditions. Simply giving a single "occurrence / non-occurrence" conclusion often fails to reflect uncertainty and cannot provide information on the magnitude and confidence level of risk, thus failing to meet the needs of risk classification and early response in actual dispatching and operation and maintenance. At the same time, there are significant differences in solar irradiance, sunshine duration, and ambient temperature in different seasons, which changes the intraday pattern and statistical distribution of photovoltaic output; electricity consumption behavior on weekdays and weekends or holidays has different patterns, and the peak and valley periods, amplitude levels, and fluctuation characteristics of the load curve will also change. If seasonal factors and weekday characteristics are not fully incorporated into the inverse power prediction model, the model is prone to insufficient generalization ability in cross-seasonal or cross-day scenarios, leading to false alarms, false negatives, or biased risk assessments. Furthermore, some methods rely on a single data source or a single-scale feature, making it difficult to simultaneously characterize intraday structural changes and short-term fluctuations, and the prediction results often lack probabilistic output indicators that can be directly used for scheduling decisions. Summary of the Invention
[0004] To address the shortcomings of existing technologies, the purpose of this invention is to provide a method and system for predicting photovoltaic reverse power probabilistically based on the characteristics of different seasons and working days.
[0005] A method for predicting the probability of photovoltaic inverse power based on different seasonal and weekday characteristics, provided by the present invention, includes:
[0006] Step S1: Obtain historical operating data and forecast period basic data of the target distribution network and perform preprocessing;
[0007] Step S2: Perform feature annotation on the preprocessed data, construct multivariate fusion samples, and further obtain the feature matrix and probability label sequence;
[0008] Step S3: Construct and train an inverse power probability prediction model based on the feature matrix and probability label sequence;
[0009] Step S4: Input the relevant data for the prediction period into the trained inverse power probability prediction model and output the prediction results.
[0010] Preferably, the preprocessing includes time alignment and data cleaning of the historical operating data and forecast period basic data of the target distribution network to obtain photovoltaic output time series data, load time series data, and power direction related data at the grid connection point.
[0011] Preferably, step S1 includes:
[0012] Obtain the raw measurement value of the photovoltaic side active power at the target identification point. Raw measured values of active power on the load side and the original measured values of active power at the grid connection point ,in For the first Timestamp of each record; set alignment reference time With uniform sampling interval Map timestamps to discrete alignment indices Its formula is:
[0013]
[0014] in, For timestamps Aligned discrete indexes; This is the floor operator; To align with the reference time; To standardize the sampling interval; This is the original timestamp; The data is recorded with sequence numbers; the original data is aggregated based on the same index, and missing and outlier values are processed to obtain the aligned and cleaned photovoltaic power output time series. Load timing With grid connection point power .
[0015] Preferably, step S2 includes:
[0016] The samples are labeled with seasonal and weekday features to construct a multi-source fusion sample containing seasonal and weekday / weekend labels, and form a feature matrix and probability label sequence.
[0017] Preferably, based on the sample index Extracting the corresponding date information by month With week attribute Map months to season tags Its formula is:
[0018]
[0019] in, For the sample Seasonal tags; This is the floor operator; For the sample The month; based on the weekday attribute Determine weekday / weekend tags Of which, 1 is taken on weekdays and 0 is taken on weekends; , , , , The fusion forms the sample feature vector The samples are stacked in order to form a feature matrix. Simultaneously, construct probability label sequences that correspond one-to-one with the samples. .
[0020] Preferably, step S3 includes the following sub-steps:
[0021] Step S3.1: Construct an inverse power probability learning objective based on the relative relationship between photovoltaic output and load, establish an inverse power probability prediction model, and use historical samples to perform initial training on the inverse power probability prediction model;
[0022] Step S3.2: Introduce distribution difference constraints or calibration mechanisms under different seasons and day types to perform probability calibration and parameter optimization on the initially trained inverse power probability prediction model to obtain the trained inverse power probability prediction model.
[0023] Preferably, step S3.1 includes:
[0024] With sample feature vector Construct an inverse power probability prediction model for the input. Initial value of the probability of outputting inverse power Its formula is:
[0025]
[0026] in, For the sample The initial value of the probability of the inverse power occurring; This is an inverse power probability prediction model; These are model parameters; The input feature vector integrates power features, seasonal labels, and weekday labels; the probabilistic learning objective is... Powered by photovoltaics With load The relative size relationships and their continuous structure make Characterize the probability of inverse power occurring and use it for supervised training;
[0027] The training process of the inverse power probability prediction model includes:
[0028] The feature matrix of historical samples With probability label sequence For training data, adjust the model parameters. Perform iterative updates; upon completion of training, obtain the initially trained inverse power probability prediction model, and output the initial sequence of inverse power occurrence probabilities for historical or validation samples. .
[0029] Preferably, step S3.2 includes:
[0030] Samples were categorized by season label With weekday tags Grouping the data, establishing probability calibration parameters for each group, and setting initial probability values for the output of the initially trained model. Perform calibration and minimize the calibration error on the calibration dataset to determine the calibration parameters;
[0031] Based on the completion of probability calibration, the model parameters are further optimized and updated. Optimization stops when the validation set loss converges or the difference in loss between adjacent rounds is less than a preset threshold, thus obtaining the trained inverse power probability prediction model.
[0032] Preferably, step S4 includes:
[0033] The inverse power probability prediction model is trained by inputting seasonal and weekday characteristics, meteorological forecasts, and load forecasts for the forecast period. The model outputs an inverse power occurrence probability curve and generates specific time periods and their probability levels within the forecast period.
[0034] A photovoltaic inverse power probability prediction system based on different seasonal and weekday characteristics, provided by the present invention, includes:
[0035] The data alignment and cleaning module is used to acquire historical operating data and forecast period basic data of the target distribution network and perform preprocessing.
[0036] The seasonal and weekday labeling module is used to label the preprocessed data with features, construct multivariate fusion samples, and further obtain the feature matrix and probability label sequence.
[0037] The probability prediction model training module constructs and trains an inverse power probability prediction model based on the feature matrix and the probability label sequence.
[0038] The probability calibration and optimization module is used to calibrate and optimize the inverse power probability prediction model, and outputs prediction results based on the relevant data of the prediction period of the input inverse power probability prediction model.
[0039] Compared with the prior art, the present invention has the following beneficial effects:
[0040] 1. This invention acquires historical operating data of the target distribution network and performs time alignment and cleaning to construct sample data containing photovoltaic output time sequence, load time sequence and grid connection point power direction information, so that reverse power risk can be accurately characterized on a unified time scale.
[0041] 2. This invention innovatively introduces seasonal features and weekday / weekend features into the sample construction and modeling process, enabling the model to explicitly learn the impact of changes in solar sunshine conditions in different seasons and differences in load curves of different day types on the formation of inverse power, thereby effectively improving the stability and generalization ability of predictions in cross-seasonal and cross-day type scenarios.
[0042] 3. This invention outputs reverse power risk in a probabilistic form, which can transform the fluctuations caused by the randomness of photovoltaic power output and the uncertainty of load into a quantifiable probability curve and risk level, realizing an upgrade from the traditional deterministic judgment of "whether it will happen" to the risk assessment of "the probability of occurrence changes over time".
[0043] 4. In practical applications, this invention can output the high-risk periods of reverse power and their corresponding probability levels in advance during the prediction period, providing guidance for reverse power early warning of distribution networks, formulation of time-limited power generation strategies, energy storage charging and discharging plans, and source-grid-load-storage coordinated scheduling, thereby improving the safety, stability, and operational management level of distribution networks with a high proportion of distributed photovoltaic access. Attached Figure Description
[0044] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0045] Figure 1 This is a flowchart of the calculation method of the present invention.
[0046] Figure 2 This is a structural diagram of the inverse power probability prediction model of the present invention.
[0047] Figure 3This is a schematic diagram of the system structure of the present invention. Detailed Implementation
[0048] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.
[0049] A method for probabilistic prediction of photovoltaic inverse power with different seasonal and weekday characteristics includes:
[0050] Step S1: Obtain historical operating data and forecast period basic data of the target distribution network and perform preprocessing;
[0051] Step S2: Perform feature annotation on the preprocessed data, construct multivariate fusion samples, and further obtain the feature matrix and probability label sequence;
[0052] Step S3: Construct and train an inverse power probability prediction model based on the feature matrix and probability label sequence;
[0053] Step S4: Input the relevant data for the prediction period into the trained inverse power probability prediction model and output the prediction results.
[0054] like Figure 1 As shown, in a specific embodiment, the above steps include:
[0055] Step S1: Obtain historical operating data and forecast period basic data of the target distribution network, and perform time alignment and data cleaning to obtain photovoltaic output time series data, load time series data and power direction related data at the grid connection point;
[0056] Specifically, obtain the raw measured value of the photovoltaic active power at the target identification point. Raw measured values of active power on the load side and the original measured values of active power at the grid connection point ,in For the first Timestamp of each record; set alignment reference time With uniform sampling interval Map timestamps to discrete alignment indices Its formula is:
[0057]
[0058] in, For timestamps Aligned discrete indexes; This is the floor operator; To align with the reference time; To standardize the sampling interval; This is the original timestamp; The data is recorded with sequence numbers; the original data is aggregated based on the same index, and missing and outlier values are processed to obtain the aligned and cleaned photovoltaic power output time series. Load timing With grid connection point power .
[0059] Step S2: Label the samples with seasonal features and weekday / weekend features, construct a multi-source fusion sample containing seasonal labels and weekday / weekend labels, and form a feature matrix and probability label sequence;
[0060] Specifically, based on the sample index Extracting the corresponding date information by month With week attribute Map months to season tags Its formula is:
[0061]
[0062] in, For the sample Seasonal tags; This is the floor operator; For the sample The month; based on the weekday attribute Determine weekday / weekend tags The calculation is as follows: 1 for weekdays and 0 for weekends, and adjusted according to the holiday calendar as needed. Correct; will , , , , The fusion forms the sample feature vector The samples are stacked in order to form a feature matrix. Simultaneously, construct probability label sequences that correspond one-to-one with the samples. .
[0063] Step S3: As Figure 2 As shown, an inverse power probability learning objective is constructed based on the relative relationship between photovoltaic output and load, an inverse power probability prediction model is established, and the prediction model is trained using historical samples to obtain the initial trained inverse power probability prediction model.
[0064] Specifically, using sample feature vectors Construct an inverse power probability prediction model for the input. Initial value of the probability of outputting inverse power Its formula is:
[0065]
[0066] in, For the sample The initial value of the probability of the inverse power occurring; This is an inverse power probability prediction model; These are model parameters; The input feature vector is a combination of power features, seasonal labels, and weekday labels; the probabilistic learning objective is... Powered by photovoltaics With load The relative size relationships and their continuous structure make Characterize the probability of inverse power occurring and use it for supervised training.
[0067] The feature matrix of historical samples With probability label sequence For training data, adjust the model parameters. Perform iterative updates; upon completion of training, obtain the initially trained inverse power probability prediction model, and output the initial sequence of inverse power occurrence probabilities for historical or validation samples. The training process can set weights for samples from different seasons or different day types to alleviate the imbalance in sample distribution, making the model more adaptable to seasonal and day type differences.
[0068] Step S4: Introduce distribution difference constraints or calibration mechanisms under different seasons and day types to perform probability calibration and parameter optimization on the initial training model to obtain the trained inverse power probability prediction model.
[0069] Specifically, the samples were labeled according to the season. With weekday tags Grouping the data, establishing probability calibration parameters for each group, and setting initial probability values for the output of the initially trained model. Calibration is performed to ensure that the calibrated probabilities are consistent and comparable across different seasons and day types, and calibration parameters are determined by minimizing the calibration error on the calibration dataset.
[0070] Based on the completion of probability calibration, the model parameters are further optimized and updated. Optimization stops when the validation set loss converges or the difference in loss between adjacent rounds is less than a preset threshold, resulting in a well-trained inverse power probability prediction model. The threshold is used to control the training stopping condition and avoid overfitting, so that the model maintains stable prediction performance in cross-seasonal and cross-day scenarios.
[0071] Step S5: Input the seasonal and weekday characteristics of the forecast period, meteorological forecasts, and load forecasts into the trained inverse power probability prediction model, output the inverse power occurrence probability curve, and generate the high-risk periods of inverse power and their probability levels within the forecast period.
[0072] Specifically, the seasonal labels, weekday labels, meteorological forecast features, and load forecast values for the forecast period are fused to construct a sample feature vector for the forecast period. And input the trained model to obtain the probability of inverse power occurring during the prediction period. Its formula is:
[0073]
[0074] in, Forecast period index The probability of the inverse power occurring; For the trained inverse power probability prediction model; The parameters of the trained model; For the feature vector of the sample during the prediction period; Connect them in chronological order to form the probability curve of inverse power occurrence.
[0075] The specific method for generating the high-risk periods of inverse power and their probability levels within the forecast period is as follows:
[0076] Set a high-risk threshold Based on the probability of the prediction period Constructing high-risk indicators Its formula is:
[0077]
[0078] in, This is a high-risk indicator. For indicator functions; This represents the probability of reverse power occurring during the prediction period. This is a high-risk threshold; it will meet the following requirements. The continuous intervals are merged into a high-risk period of reverse power, and the average or maximum probability within the interval is used as the probability level output for that period.
[0079] Example 1
[0080] A method for probabilistic prediction of photovoltaic inverse power with different seasonal and weekday characteristics includes:
[0081] Step 1: Obtain historical operating data and forecast period basic data of the target distribution network, and perform time alignment and data cleaning to obtain photovoltaic power output time-series data, load time-series data, and power direction related data at the grid connection point:
[0082] In this invention, the target identification point is determined to be any one of the following: grid connection point (PCC), feeder head end, transformer substation meter, or low-voltage side of the transformer. Raw active power data of the photovoltaic side are collected respectively. Raw data of active power on the load side and raw data of active power at grid connection point ,in For the first The timestamp of each record. Then, the starting reference time for the forecast period or historical period. As an alignment reference, and with a uniform sampling interval set as , will any timestamp Mapped to discrete alignment index Its mapping formula is:
[0083]
[0084] in, For timestamps Aligned discrete indexes; This is the floor operator; To align with reference times (e.g., the start time of the forecast period or 00:00 on a certain day); To standardize the sampling interval; The timestamp of the original record; This refers to the original record sequence number. Through the above mapping, the original sampling points from different data sources, such as photovoltaics, loads, and grid connection points, are uniformly placed into the same discrete index sequence, achieving time alignment.
[0085] In this invention, the aligned discrete time-series data are aggregated using the same index to obtain a uniformly sampled power sequence; taking photovoltaic power as an example, the aligned... The aggregate value of each sampling point is:
[0086]
[0087] in, The index after alignment is The active power output of photovoltaic power; For timestamps The original photovoltaic power measurement value at the location; To meet The number of original data points (i.e., falling into the index) (number of samples); This indicates that for all conditions that are met... Sum the original data; This is a discrete-time index. Load time-series data can be obtained using the same method. Power timing data at grid connection point When some corresponding When missing data is found, it is filled in using adjacent index interpolation or window mean. When there are obvious outliers, sliding window robust statistics are used to remove or replace them, thereby completing data cleaning and ensuring the continuity and stability of the sequence.
[0088] In this invention, to generate grid connection point power direction related data, a power direction indicator is constructed based on the aligned and cleaned grid connection point power sequence. And introduce a dead zone threshold The criterion for suppressing directional jitter caused by measurement noise near zero is as follows:
[0089]
[0090] in, For index The reverse power direction indicator at the location, with a value of 0 or 1; This is an indicator function that takes the value 1 if the condition within the parentheses is true, and 0 otherwise. To align the active power of the grid connection point after cleaning; This is the dead zone threshold, used to filter out positive and negative flips caused by small noise. It can be set by measurement accuracy or experience. When When the grid connection point experiences a reverse power supply trend, This indicates that no reverse power direction has occurred.
[0091] Through the above time alignment and data cleaning process, photovoltaic power output time-series data are obtained for subsequent seasonal and weekday feature modeling. Load time series data and related data on the power direction at the grid connection point. (or retain both) As a characteristic of continuous values).
[0092] Step 2: Label the samples with seasonal and weekday features, construct a multi-source fusion sample containing seasonal and weekday / weekend labels, and form a feature matrix and probability label sequence:
[0093] In this invention, the photovoltaic power output time series data after alignment and cleaning obtained in step 1 is used. Load time series data And data related to the power direction at the grid connection point or grid connection point power Determine each discrete index Corresponding calendar date With Month The samples are labeled with seasonal features according to the month-season mapping rules; the seasonal labels are represented by four-class discrete coding. Its defining formula is:
[0094]
[0095] in, For index Seasonal labels corresponding to the samples; This is the floor operator; For index The month corresponding to the date ranges from 1 to 12; when This indicates the season corresponding to the first quarter (which can be defined as spring or customized by region). This indicates the season corresponding to the second quarter. This indicates the season corresponding to the third quarter. The fourth quarter corresponds to the season; the correspondence between seasons and months can be adjusted according to the climate characteristics of the target region, but the mapping consistency is maintained so that the model can learn seasonal differences.
[0096] In this invention, samples are labeled with weekday features based on an index. Weekday attribute of the corresponding date Determine whether it belongs to a weekday or weekend / rest day, and construct a binary weekday label. The formula for determining this is:
[0097]
[0098] in, For index The corresponding weekday label for the sample is set to 1 for weekday and 0 for weekend; For indicator functions; For index The set of possible values for the week number corresponding to the date. Where 1 to 5 correspond to Monday to Friday, and 6 and 7 correspond to Saturday and Sunday, respectively; when it is necessary to consider the adjustment of statutory holidays, etc., it can be... Based on this, a holiday calendar will be further introduced. The correction is made, but the binary meaning of the label is not changed.
[0099] In this invention, a multi-source fusion sample feature vector is constructed, which integrates photovoltaic, load, grid connection point direction information, and seasonal and weekday labels into a fused encoding. To facilitate model training, discrete seasonal and weekday labels are converted into input-friendly numerical features and concatenated with power-related features to form an index. fused feature vector And stack all samples in chronological order to form a feature matrix. Its construction formula is:
[0100]
[0101] in, This is a multi-source fusion feature matrix; For index The fused feature vector contains at least , , (or ), and Several items in; The total number of samples; For transpose operator; This means that the matrix is obtained by concatenating columns and then transposing them, so that each row of the matrix corresponds to a sample and each column corresponds to a feature.
[0102] In this invention, a probability label sequence is formed for learning a probabilistic prediction model. Power direction-related data at the grid connection point are probabilistically statistically analyzed within a certain time window, or the probability of inverse power occurrence is represented by empirical frequencies, to obtain the probability label sequence of the samples. The probability labels can be constructed in subsequent steps based on the proportion of inverse power indicators within a time window or the verification results, thus enabling the model output to show the probability of inverse power occurrence instead of simply outputting a 0 / 1 discrimination result. Through the above process of labeling seasonal and weekday features and constructing multi-source fusion, a multi-source fusion sample feature matrix containing seasonal labels and weekday / weekend labels is obtained. With the corresponding probability label sequence This is used for subsequent training and prediction of the inverse power probability prediction model.
[0103] Step 3: Construct an inverse power probability learning objective based on the relative relationship between photovoltaic output and load, establish an inverse power probability prediction model, and train the prediction model using historical samples to obtain the initially trained inverse power probability prediction model:
[0104] In this invention, photovoltaic power output time-series data after alignment and cleaning from historical samples is used. With load time series data At every moment To avoid the problems of training instability and sensitivity to noise caused by using only 0 / 1 hard labels, a soft probability label of "inverse power risk intensity" is constructed. Specifically, it is taken as... Centered on or with The length starting from is Time window Within the window, the degree to which "photovoltaic output exceeds load and exceeds the dead zone" is smoothly counted to obtain the probability learning objective. Its formula is:
[0105]
[0106] in, For a moment The inverse power probability learning objective (soft label); For time The corresponding time window index set; The number of sampling points within the time window; For the time index within the window; For index Active power output of photovoltaic power generation; For index Active power at the load; The dead zone threshold is used to suppress the risk of spurious reverse rotation caused by noise when the grid connection point power is near zero (when...). (It is not over-amplified only when it is slightly greater than 0). To smooth the temperature coefficient, it is used to control the slope of the mapping from "relative relationship" to probability; It is an S-shaped smoothing function used to continuously map the degree of transcendence to... Risk contribution value within the range, avoiding jumps caused by hard thresholds.
[0107] In this invention, an inverse power probability prediction model is established, which uses a fused feature vector that includes seasonal labels, weekday / weekend labels, and multi-source power features. Input, output time Inverse power occurrence probability prediction value The model described can be a probabilistic regression network, a time series model, or an ensemble learning model, and its output layer uses probabilistic mapping to ensure that the output falls within a certain range. The interval. Further, the prediction model is trained using historical samples. By minimizing the weighted log-likelihood loss between the "soft probability label and the model output probability" and introducing a time smoothing regularization term, an initially trained inverse power probability prediction model is obtained, whose training objective function is:
[0108]
[0109] in, These are the parameters of the inverse power probability prediction model; For training the loss function; The total number of historical samples; For sample time index; The probability learning objective is constructed using the aforementioned formula; For the model to sample The output inverse power probability prediction value; The sample weights are used to further weight samples from different seasons and day types (e.g., to compensate for class / distribution imbalances caused by a smaller proportion of samples in certain seasons or on weekends). The regularization coefficient is used. The time smoothing constraint term is used to suppress non-physically drastic jumps in the probability output between adjacent time steps, improving the stability and interpretability of the prediction curve. Through iterative optimization of the above loss function, the initially trained inverse power probability prediction model is obtained, which is used for the output of the inverse power probability curve in subsequent prediction periods.
[0110] Step 4: Introduce distribution difference constraints or calibration mechanisms under different seasons and day types to perform probability calibration and parameter optimization on the initially trained model, thereby obtaining the trained inverse power probability prediction model:
[0111] In this invention, historical samples are grouped according to "seasonal tag - day type tag" to obtain a group set. Each group This corresponds to a combination of a season and a day pattern; the inverse power probability prediction model trained initially outputs the uncalibrated probability on the calibration dataset. And convert it to logit (logit) representation. Then for each group Introducing in-group temperature / bias calibration parameters Intra-group calibration is performed on the output probabilities of samples within the same group to mitigate the "probability bias inconsistency" problem caused by different seasons and day types. The intra-group probability calibration formula is as follows:
[0112]
[0113] in, For the sample The calibrated inverse power probability; This is a sigmoid mapping function used to map real numbers to... ; The uncalibrated inverse power probability is the output of the model during initial training. This represents the log-odds ratio corresponding to the uncalibrated probability. Indicates sample The season it belongs to—day type group; Grouping The temperature parameter is used to adjust the "sharpness" or "smoothness" of the probability distribution; Grouping The bias parameter is used to correct for systematic overestimation or underestimation at the grouping level; It is the natural logarithm function. By introducing... The group calibration ensures that the probability outputs of the model are comparable and consistent under different data distributions, such as summer and winter, weekdays and weekends.
[0114] In this invention, to optimize the parameters of the initially trained model, "group probability consistency" is used as one of the optimization objectives during the calibration phase. A calibration loss based on group binning statistics is introduced to ensure that the calibrated probability is as consistent as possible with the frequency of the true inverse power within each group in each confidence interval. This calibration loss is then jointly optimized with the fine-tuning objective of the original model parameters. The calibration loss can be defined as the consistency of the probability between each group and the frequency of the true inverse power within each group. calibrated probability By dividing the data into bins based on confidence intervals, and comparing the average predicted probability with the actual frequency of occurrence within each bin, a loss function that can be used for parameter optimization is obtained.
[0115]
[0116] in, For calibration loss; Grouped into seasonal-day patterns; This refers to the number of boxes; Grouping The set of calibration samples; Grouping Falling into the middle A subset of samples divided into confidence interval bins; The number of samples in the subset. The total number of samples in each group; For set internal calibration probability The average value; For set Internal true inverse power label The average value (i.e., the empirical frequency of occurrence within this sub-bin); Indicates sample Does inverse power occur? This loss explicitly constrains the probability output under different distribution conditions to be consistent with the true frequency by grouping by season and day type and binning by confidence interval, thereby suppressing the systematic high / low probability drift of the model in certain seasonal or weekend scenarios.
[0117] The specific method for jointly optimizing model parameters and calibration parameters using an iterative update approach is as follows: during the optimization process, the calibration loss is combined with the probability prediction objective from the initial training phase. On the one hand, the initial model parameters are fixed, and only the parameters for each group are updated. Optimize to make The model decreases and stabilizes; on the other hand, small-step fine-tuning of the model parameters is performed when necessary to ensure that the calibrated probability output not only fits the label overall but also maintains consistent reliability across different seasons and day types. Finally, optimization stops when the calibration loss and the overall prediction loss converge on the validation set, or when the change in loss between adjacent rounds is less than a preset threshold, resulting in a well-trained inverse power probability prediction model. This model can output more reliable and comparable inverse power occurrence probabilities under different seasonal and weekday / weekend distribution differences, providing support for subsequent inverse power risk warning and scheduling decisions.
[0118] Step 5: Input the seasonal and weekday characteristics, weather forecasts, and load forecasts for the forecast period into the trained inverse power probability prediction model, output the inverse power occurrence probability curve, and generate the high-risk periods of inverse power and their probability levels within the forecast period:
[0119] First, the forecast period is determined, and meteorological and load forecast data are obtained within this period. The meteorological forecast data includes at least one or more of the following: irradiance forecast, ambient temperature forecast, and cloud cover / weather condition forecast. The load forecast data is the predicted active power sequence of the target identification point. Then, seasonal labels are generated based on the calendar date corresponding to each moment in the forecast period. With weekday / weekend tags The tags are then fused with meteorological forecast features, load forecast values, and necessary historical statistical features to construct an input feature vector for the forecast period. .
[0120] Secondly, Input the trained inverse power probability prediction model The probability of inverse power occurrence at each time point within the prediction period is obtained. This forms the probability curve of inverse power occurrence, and its calculation formula is:
[0121]
[0122] in, For index The probability of the inverse power occurring; For the trained inverse power probability prediction model; These are model parameters; For the fused feature vector during the prediction period, it must contain at least... , Meteorological forecast characteristics and load forecast values.
[0123] Finally, a high-risk threshold was set as follows: , will satisfy The consecutive moments are merged into a high-risk period of inverse power, and the maximum or average probability within this period is taken as the probability level output for that period. The discrimination formula is as follows:
[0124]
[0125] in, This is a high-risk indicator. For indicator functions; The threshold is set as the high-risk threshold. The above process yields the high-risk periods for inverse power within the forecast period and their corresponding probability levels, which are used for early warning and operational decision-making.
[0126] Example 2
[0127] like Figure 3 As shown, a photovoltaic inverse power probability prediction system based on different seasonal and weekday characteristics includes:
[0128] The data alignment and cleaning module is used to acquire historical operating data and forecast period basic data of the target distribution network and perform preprocessing.
[0129] The seasonal and weekday labeling module is used to label the preprocessed data with features, construct multivariate fusion samples, and further obtain the feature matrix and probability label sequence.
[0130] The probability prediction model training module constructs and trains an inverse power probability prediction model based on the feature matrix and the probability label sequence.
[0131] The probability calibration and optimization module is used to calibrate and optimize the inverse power probability prediction model, and outputs prediction results based on the relevant data of the prediction period of the input inverse power probability prediction model.
[0132] In one specific embodiment, the system includes:
[0133] The data alignment and cleaning module is used to acquire historical operating data and forecast period basic data of the target distribution network, and to perform time alignment and data cleaning on photovoltaic output, load power, and grid connection point power data to obtain photovoltaic output time-series data. Load time series data and grid connection point power data ;
[0134] Get , , Set alignment reference time With uniform sampling interval Map timestamps to discrete indices :
[0135]
[0136] in, For timestamps, For discrete indexes, For floor operation, To align with the reference time, To standardize the sampling interval, the data is aggregated by index, and missing data is filled in and anomalies are removed. , , .
[0137] The Season and Workday Labeling Module is used to generate season labels. With weekday / weekend tags and with , , The fusion forms the sample feature vector Construct the feature matrix With probability label sequence ;
[0138] According to month Generate seasonal tags :
[0139]
[0140] in, For seasonal labels, For the floor operator, For the sample Month; Generate weekday tags based on weekday attribute (Take 1 for weekdays and 0 for weekends), and combine it with power characteristics to form Stacking and .
[0141] The probability prediction model training module is used to build an inverse power probability prediction model. The model is trained using historical samples to obtain the initial training model, and the initial value of the probability of inverse power is output for the samples in the prediction period. ;
[0142] Model building Output initial probability values:
[0143]
[0144] in, The initial value of the inverse power probability. For sample feature vectors, These are the model parameters; the initial training model is obtained by training with historical samples.
[0145] The probability calibration optimization module is used to introduce distribution difference constraints under different seasons and day types. After performing probability calibration and parameter optimization, a well-trained inverse power probability prediction model is obtained, and the probability curve of inverse power occurrence during the prediction period is output. It also generates high-risk periods and their probability levels.
[0146] according to Grouping, performing probability calibration, and optimizing parameters to obtain the final probability. Set threshold High-risk indication quantity obtained:
[0147]
[0148] in, The probability of the final inverse power occurring. The high-risk threshold For high-risk indicators, For indicator functions; merge continuous The interval is used to identify high-risk periods, and the mean or maximum probability of that interval is output as the probability level.
[0149] Those skilled in the art will understand that, besides implementing the system and its various devices, modules, and units provided by this invention in the form of purely computer-readable program code, the same functions can be achieved entirely through logical programming of the method steps, making the system and its various devices, modules, and units of this invention function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, the system and its various devices, modules, and units provided by this invention can be considered as a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered as structures within the hardware component; alternatively, the devices, modules, and units for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0150] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.
Claims
1. A method for probabilistic prediction of photovoltaic inverse power under different seasonal and weekday characteristics, characterized in that, include: Step S1: Obtain historical operating data and forecast period basic data of the target distribution network and perform preprocessing; Step S2: Perform feature annotation on the preprocessed data, construct multivariate fusion samples, and further obtain the feature matrix and probability label sequence; The samples are labeled with seasonal and weekday features to construct a multi-source fusion sample containing seasonal and weekday / weekend labels, and a feature matrix and probability label sequence are formed. Based on the sample index Extracting the corresponding date information by month With week attribute Map months to season tags Its formula is: in, For the sample Seasonal tags; This is the floor operator; For the sample The month; based on the weekday attribute Determine weekday / weekend tags Of which, 1 is taken on weekdays and 0 is taken on weekends; , Photovoltaic power output timing Load timing With grid connection point power The fusion forms the sample feature vector The samples are stacked in order to form a feature matrix. Simultaneously, construct probability label sequences that correspond one-to-one with the samples. ; Step S3: Construct and train an inverse power probability prediction model based on the feature matrix and probability label sequence; include: Step S3.1: Construct an inverse power probability learning objective based on the relative relationship between photovoltaic output and load, establish an inverse power probability prediction model, and use historical samples to perform initial training on the inverse power probability prediction model; Step S3.2: Introduce distribution difference constraints or calibration mechanisms under different seasons and day types to perform probability calibration and parameter optimization on the initially trained inverse power probability prediction model to obtain the trained inverse power probability prediction model. Step S3.2 includes: Samples were categorized by season label With weekday tags Grouping the data, establishing probability calibration parameters for each group, and setting initial probability values for the output of the initially trained model. Perform calibration and minimize the calibration error on the calibration dataset to determine the calibration parameters; The formula for within-group probability calibration is: in, For the sample The calibrated inverse power probability; This is a sigmoid mapping function used to map real numbers to... ; The uncalibrated inverse power probability is the output of the model during initial training. This represents the log-odds ratio corresponding to the uncalibrated probability. Indicates sample The season it belongs to—day type group; Grouping The temperature parameter is used to adjust the sharpness / smoothness of the probability distribution; Grouping The bias parameter is used to correct for systematic overestimation or underestimation at the grouping level; It is the natural logarithm function; Based on the completion of probability calibration, the model parameters are further optimized and updated. Optimization is stopped when the validation set loss converges or the difference in loss between adjacent rounds is less than a preset threshold, and the trained inverse power probability prediction model is obtained. Step S4: Input the relevant data for the prediction period into the trained inverse power probability prediction model and output the prediction results.
2. The photovoltaic inverse power probability prediction method based on different seasonal and weekday characteristics according to claim 1, characterized in that, The preprocessing includes time alignment and data cleaning of the historical operating data and forecast period basic data of the target distribution network to obtain photovoltaic output time series data, load time series data, and power direction related data at the grid connection point.
3. The photovoltaic inverse power probability prediction method based on different seasonal and weekday characteristics according to claim 2, characterized in that, Step S1 includes: Obtain the raw measurement value of the photovoltaic side active power at the target identification point. Raw measured values of active power on the load side and the original measured values of active power at the grid connection point ,in For the first Timestamp of each record; set alignment reference time With uniform sampling interval Map timestamps to discrete alignment indices Its formula is: in, For timestamps Aligned discrete indexes; This is the floor operator; To align with the reference time; To standardize the sampling interval; This is the original timestamp; The data is recorded with sequence numbers; the original data is aggregated based on the same index, and missing and outlier values are processed to obtain the aligned and cleaned photovoltaic power output time series. Load timing With grid connection point power .
4. The photovoltaic inverse power probability prediction method based on different seasonal and weekday characteristics according to claim 1, characterized in that, Step S3.1 includes: With sample feature vector Construct an inverse power probability prediction model for the input. Initial value of the probability of outputting inverse power Its formula is: in, For the sample The initial value of the probability of the inverse power occurring; This is an inverse power probability prediction model; These are model parameters; The input feature vector integrates power features, seasonal labels, and weekday labels; the probabilistic learning objective is... Powered by photovoltaics With load The relative size relationships and their continuous structure make Characterize the probability of inverse power occurring and use it for supervised training; The training process of the inverse power probability prediction model includes: The feature matrix of historical samples With probability label sequence For training data, adjust the model parameters. Perform iterative updates; upon completion of training, obtain the initially trained inverse power probability prediction model, and output the initial sequence of inverse power occurrence probabilities for historical or validation samples. .
5. The photovoltaic inverse power probability prediction method based on different seasonal and weekday characteristics according to claim 1, characterized in that, Step S4 includes: The inverse power probability prediction model is trained by inputting seasonal and weekday characteristics, meteorological forecasts, and load forecasts for the forecast period. The model outputs an inverse power occurrence probability curve and generates specific time periods and their probability levels within the forecast period.
6. A photovoltaic inverse power probability prediction system with different seasonal and weekday characteristics, characterized in that, include: The data alignment and cleaning module is used to acquire historical operating data and forecast period basic data of the target distribution network and perform preprocessing. The seasonal and weekday labeling module is used to label the preprocessed data with features, construct multivariate fusion samples, and further obtain the feature matrix and probability label sequence. The samples are labeled with seasonal and weekday features to construct a multi-source fusion sample containing seasonal and weekday / weekend labels, and a feature matrix and probability label sequence are formed. Based on the sample index Extracting the corresponding date information by month With week attribute Map months to season tags Its formula is: in, For the sample Seasonal tags; This is the floor operator; For the sample The month; based on the weekday attribute Determine weekday / weekend tags Of which, 1 is taken on weekdays and 0 is taken on weekends; , Photovoltaic power output timing Load timing With grid connection point power The fusion forms the sample feature vector The samples are stacked in order to form a feature matrix. Simultaneously, construct probability label sequences that correspond one-to-one with the samples. ; The probability prediction model training module constructs and trains an inverse power probability prediction model based on the feature matrix and the probability label sequence. include: Based on the relative relationship between photovoltaic output and load, an inverse power probability learning objective is constructed, an inverse power probability prediction model is established, and the inverse power probability prediction model is initially trained using historical samples. By introducing distribution difference constraints or calibration mechanisms under different seasons and day types, the initially trained inverse power probability prediction model is probabilistically calibrated and its parameters optimized to obtain the fully trained inverse power probability prediction model, including: Samples were categorized by season label With weekday tags Grouping the data, establishing probability calibration parameters for each group, and setting initial probability values for the output of the initially trained model. Perform calibration and minimize the calibration error on the calibration dataset to determine the calibration parameters; The formula for within-group probability calibration is: in, For the sample The calibrated inverse power probability; This is a sigmoid mapping function used to map real numbers to... ; The uncalibrated inverse power probability is the output of the model during initial training. This represents the log-odds ratio corresponding to the uncalibrated probability. Indicates sample The season it belongs to—day type group; Grouping The temperature parameter is used to adjust the sharpness / smoothness of the probability distribution; Grouping The bias parameter is used to correct for systematic overestimation or underestimation at the grouping level; It is the natural logarithm function; Based on the completion of probability calibration, the model parameters are further optimized and updated. Optimization is stopped when the validation set loss converges or the difference in loss between adjacent rounds is less than a preset threshold, and the trained inverse power probability prediction model is obtained. The probability calibration and optimization module is used to calibrate and optimize the inverse power probability prediction model, and outputs prediction results based on the relevant data of the prediction period of the input inverse power probability prediction model.
Citation Information
Patent Citations
Reverse power protection monitoring method and system for grid-connected photovoltaic power station
CN120955785A
Power grid photovoltaic output and load sequence modeling method, system and device and storage medium
CN121618626A