Machine Learning-Based Virtual Power Plant Load Forecasting Management Method and System
By using the grid frequency as a time reference in a virtual power plant, the time offset of load data is synchronously collected and corrected, solving the time misalignment problem caused by asynchronous collection and achieving high-precision load forecasting and improved robustness.
Patent Information
- Application Number
- CN202611588675.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-14
- Publication Date
- 2026-11-10
AI Technical Summary
In virtual power plant load forecasting, existing technologies struggle to achieve accurate time alignment in asynchronously acquired multi-node load data, leading to distortion of the physical characteristics of the load sequence, affecting forecast accuracy, and exhibiting low robustness. In particular, they lack stable identification and degradation mechanisms in heterogeneous node and non-equidistant sampling scenarios.
By synchronously collecting load data and power grid frequency data at each edge node, using the power grid frequency as the physical time reference, calculating the time offset to correct the local collection time, constructing a multi-node load matrix, and using a machine learning prediction model to perform load prediction, a stable abnormal window and low-confidence sampling point identification mechanism are established.
This approach improves the accuracy and physical realism of multi-node load alignment without increasing network time-synchronization signaling resource consumption, thereby enhancing the accuracy of virtual power plant aggregated load prediction and system robustness.
Smart Images

Figure CN123073735A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system load forecasting technology, specifically to a virtual power plant load forecasting management method and system based on machine learning. Background Technology
[0002] In virtual power plant load forecasting management, load data is usually collected and uploaded asynchronously by multiple edge nodes. The communication links, clock states and sampling arrival delays of each node are different, which makes it easy for the load sequences of different nodes to be misaligned on the time axis.
[0003] Currently, virtual power plant load forecasting typically uses local timestamps or simple interpolation to align multi-node data. If higher alignment accuracy is required, an additional network time synchronization mechanism or complex synchronous acquisition process needs to be introduced.
[0004] However, when performing multi-node load alignment using the above methods, it often relies on communication time synchronization signaling, which can easily increase the system's communication resource consumption. Furthermore, when link jitter or clock drift exists, it is still difficult to accurately restore the true correspondence between sampling times, resulting in a problem of inconsistent time bases. At the same time, simple interpolation or resampling can change the original load value, easily smoothing out the true load spikes, causing the physical characteristics of the load sequence to be distorted, which in turn affects the training and output accuracy of subsequent prediction models. Moreover, when facing heterogeneous nodes and non-equal interval sampling scenarios, the existing processing methods lack stable identification and degradation mechanisms for abnormal windows and low-confidence sampling points, resulting in low robustness. Summary of the Invention
[0005] The purpose of this invention is to construct a virtual power plant load forecasting management method and system based on machine learning, which avoids increasing the system communication resource consumption due to reliance on communication time synchronization signaling, and avoids the distortion of the physical characteristics of the load sequence caused by changing the original load value through simple interpolation or resampling. It also makes it easier to use grid frequency fluctuations as a physical time reference to achieve accurate time alignment of load data of multiple edge nodes, and establishes a stable identification and degradation mechanism for abnormal windows and low-confidence sampling points, thereby effectively improving the accuracy of virtual power plant aggregated load forecasting and system robustness.
[0006] The objective of this invention can be achieved through the following technical solutions:
[0007] At each edge node, load data and power grid frequency data are continuously collected according to a preset sampling period to form load sequences and power grid frequency sequences.
[0008] The local acquisition time corresponding to each sampling point in the node identifier, load sequence, and power grid frequency sequence is encapsulated into a data frame and uploaded to the cloud server; the reference frequency sequence and its sampling period generated and maintained by the cloud server based on the frequency sampling data of the power grid master station are obtained.
[0009] For each edge node, the matching relationship between the power grid frequency sequence and the reference frequency sequence is determined, and the matching path is determined based on the matching relationship. The reference sequence index difference between the reference index of the sampling point of each edge node mapped on the reference sequence time axis and the reference frequency sequence index determined based on the matching path is also determined.
[0010] Multiply the index difference of the reference sequence by the sampling period of the reference frequency sequence to obtain the time offset of each sampling point;
[0011] The aligned load sequence is obtained by correcting only the local acquisition time corresponding to each sampling point without changing the original load value corresponding to the load data; a multi-node load matrix is constructed based on the aligned load sequence of multiple edge nodes according to the time dimension and node dimension; the multi-node load matrix is input into the trained machine learning prediction model to obtain the virtual power plant load prediction result for the future target time period.
[0012] Preferably, the load sequence has a uniformly set load sampling period, the load sequence includes the active load value of each sampling point, and the grid frequency sequence includes the frequency value collected at the same sampling time as the active load value. Preferably, when determining the matching path based on the matching relationship between the grid frequency sequence and the reference frequency sequence, the absolute difference between the frequency values of each candidate index pair in the grid frequency sequence collected by the edge node and the reference frequency sequence is calculated as the path cost.
[0013] Among the candidate paths that allow adjacent indices to increase and satisfy the boundary conditions of monotonicity, continuity, and alignment of the first and last endpoints, the candidate path with the minimum cumulative path cost is determined as the matching path.
[0014] Preferably, only the local acquisition time corresponding to each sampling point is corrected without changing the original load value. When the aligned load sequence is obtained, the local acquisition time of each sampling point is added to the corresponding time offset to obtain the corrected acquisition time.
[0015] When adjacent sampling points in the load sequence have the same time offset, the corresponding load values are merged into the same time slice according to the preset aggregation rules, which include summation or averaging.
[0016] When the time offsets of adjacent sampling points in the load sequence are different, the original load value is directly retained according to the corrected acquisition time of each sampling point.
[0017] Preferably, the method further includes: when the absolute value of the time offset of any sampling point is greater than the allowable time offset value, the sampling point is determined as a low confidence sampling point; when the absolute value of the time offset is not greater than the allowable time offset value, the sampling point is determined as a confidence sampling point; the allowable time offset value is preset according to a preset sampling period.
[0018] When the cumulative path cost corresponding to an edge node exceeds the matching cost limit, the current time offset is replaced with the average time offset within the most recent historical time window that was not identified as a low-confidence sampling point and whose cumulative path cost does not exceed the matching cost limit. Alternatively, when constructing the multi-node load matrix, the load sequence corresponding to the edge node is multiplied by an attenuation coefficient, where the attenuation coefficient is greater than... and less than When the cumulative path cost corresponding to the edge node is not greater than the matching cost limit, the current time offset is retained.
[0019] Preferably, the trained machine learning prediction model is trained in the following way: a training sample is constructed using the historically aligned load sequence and the historical true load value of the future target period, and the training sample is divided into a training set and a validation set; a training loss function is constructed based on the prediction error of the training sample and the time offset of each sampling point in the training sample; the weight coefficients in the training loss function are determined according to the performance of the validation set, and the trained machine learning prediction model is trained using the training set.
[0020] A machine learning-based virtual power plant load forecasting management system is used to execute the above methods. The system includes:
[0021] The data acquisition module, deployed at each edge node, is used to continuously acquire load data and power grid frequency data at each edge node according to a preset sampling period, forming load sequences and power grid frequency sequences.
[0022] The upload module communicates with the acquisition module and is used to encapsulate the node identifier, the local acquisition time corresponding to each sampling point, the load sequence and the power grid frequency sequence into data frames and upload them to the cloud server.
[0023] The alignment module, deployed on a cloud server, is used to obtain the reference frequency sequence and its sampling period generated and maintained by the cloud server based on the frequency sampling data of the power grid master station, determine the matching relationship between the power grid frequency sequence and the reference frequency sequence, determine the matching path based on the matching relationship, determine the reference sequence index difference between the reference index corresponding to each edge node sampling point and the index of the matched reference frequency sequence, and multiply the reference sequence index difference by the sampling period of the reference frequency sequence to obtain the time offset of each sampling point.
[0024] The reconstruction module, deployed on a cloud server, is used to correct only the local acquisition time corresponding to each sampling point without changing the original load value, so as to obtain the aligned load sequence.
[0025] The building module, deployed on a cloud server, is used to construct a multi-node load matrix based on the aligned load sequence of multiple edge nodes according to the time dimension and the node dimension.
[0026] The prediction module, deployed on a cloud server, is used to input the multi-node load matrix into the trained machine learning prediction model to obtain the virtual power plant load prediction results for the future target time period.
[0027] Preferably, the alignment module includes: a frequency difference calculation unit, used to calculate the absolute difference of frequency values for each candidate index pair in the two sequences; and a path determination unit, used to determine a matching path from candidate paths that meet preset constraints, using the absolute difference of frequency values as the path cost.
[0028] The offset determination unit is used to multiply the reference sequence index difference corresponding to each sampling point in the matching path with the sampling period of the reference frequency sequence to determine the time offset.
[0029] Preferably, the system further includes an evaluation module, deployed on a cloud server, used to determine the offset stability based on the time offset changes of adjacent sampling points of the same edge node, and to directly use the offset stability as the health of the communication link delay.
[0030] The beneficial effects of this invention are:
[0031] This invention synchronously collects load data and grid frequency data at each edge node according to a preset sampling period, and encapsulates the node identifier, local acquisition time, load sequence, and frequency sequence into data frames and uploads them to the cloud. This preserves the original sampling information of multiple nodes without increasing the network time synchronization signaling resource consumption, laying a complete data foundation for subsequent unified alignment and predictive modeling. By obtaining the reference frequency sequence maintained in the cloud and using the matching relationship between the frequency sequences to determine the matching path, and then calculating the time offset of each sampling point, only the local acquisition time is corrected without changing the original load value. The sampling time sequence can be reconstructed using the grid frequency as a physical time reference, thereby avoiding the smooth distortion of the real load peak caused by simple interpolation or resampling, and improving the accuracy and physical authenticity of multi-node load alignment. Attached Figure Description
[0032] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0033] Figure 1This is a flowchart illustrating the machine learning-based virtual power plant load forecasting and management method proposed in an embodiment of this application.
[0034] Figure 2 This is a structural diagram of the machine learning-based virtual power plant load forecasting management system in the embodiments of this application. Detailed Implementation
[0035] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0036] Please see Figure 1 A virtual power plant load forecasting and management method based on machine learning, the method includes: continuously collecting load data and grid frequency data at each edge node according to a preset sampling period to form load sequence and grid frequency sequence;
[0037] The local acquisition time corresponding to each sampling point in the node identifier, load sequence, and power grid frequency sequence is encapsulated into a data frame and uploaded to the cloud server; the reference frequency sequence and its sampling period generated and maintained by the cloud server based on the frequency sampling data of the power grid master station are obtained.
[0038] For each edge node, the matching relationship between the power grid frequency sequence and the reference frequency sequence is determined, and the matching path is determined based on the matching relationship. The reference sequence index difference between the reference index of the sampling point of each edge node mapped on the reference sequence time axis and the reference frequency sequence index determined based on the matching path is also determined.
[0039] Multiply the index difference of the reference sequence by the sampling period of the reference frequency sequence to obtain the time offset of each sampling point;
[0040] Only the local acquisition time corresponding to each sampling point is corrected without changing the original load value corresponding to the load data to obtain the aligned load sequence;
[0041] A multi-node load matrix is constructed based on the aligned load sequence of multiple edge nodes, according to the time dimension and the node dimension.
[0042] By inputting the multi-node load matrix into the trained machine learning prediction model, the virtual power plant load prediction results for the future target period are obtained.
[0043] This embodiment establishes a virtual power plant load forecasting and management method based on machine learning. This method uses grid frequency fluctuations as a physical time reference and achieves time alignment of load data from multiple edge nodes without increasing the network time synchronization signaling resource consumption, thereby improving the accuracy of virtual power plant aggregated load forecasting.
[0044] Step 1: Synchronous acquisition of load and frequency sequences at edge nodes. Data acquisition terminal equipment is configured at each edge node of the virtual power plant system; edge nodes include, but are not limited to, heterogeneous terminals such as distributed photovoltaic power generation sites, energy storage devices, flexible load entities, and charging facilities.
[0045] Each edge node Driven by a local clock, and following a uniformly set sampling period Perform continuous sampling; in the first At each sampling moment, two types of physical quantities are recorded simultaneously:
[0046] Active load value , representing a node In the Instantaneous power consumption or output at each sampling point, in kW; grid frequency value. , representing a node In the The local power grid frequency measured at each sampling point, in Hz;
[0047] After continuous sampling within a preset time window, edge nodes Forming a load sequence With frequency sequence ,in The total number of sampling points within a single sampling window; sampling period. The preferred setting is between 1 and 15 seconds, used to capture frequency fluctuation characteristics and maintain a preset communication bandwidth load;
[0048] Step 2: Constructing and Uploading Data Frames to Cloud Edge Nodes. This involves encapsulating the collected load and frequency sequences; specifically, constructing data frames. This data frame contains the following four types of information: node identifier This is used to uniquely identify the edge node's identity within the virtual power plant system;
[0049] Local collection time Record the start time of the sampling window; this timestamp is generated by the node's local clock; load sequence Frequency sequence ;
[0050] Local collection time It is only used for data indexing and coarse-grained time-series sorting, and not as a benchmark for subsequent time alignment. Since each edge node uses different communication links such as fourth-generation mobile communication technology, fiber optics, and narrowband IoT to upload data, link latency fluctuations and node local clock drift will cause differences in the time when data frames from different nodes arrive at the cloud. Therefore, relying on local timestamps cannot achieve accurate time alignment.
[0051] Step 3: Generate and maintain the reference frequency sequence in the cloud. The cloud server pre-establishes the reference frequency sequence. The reference sequence originates from the high-precision frequency monitoring device at the power grid master station. This device possesses a strict time synchronization mechanism to ensure accurate sampling timing. The accuracy;
[0052] The sampling period of the reference frequency sequence is It is preferable to set the sampling accuracy to be the same as or higher than the sampling period of the edge nodes;
[0053] For all nodes within the same interconnected power grid, the power grid frequency fluctuations are consistent across the entire network at the same physical moment; therefore, this reference sequence serves as a unified time base for subsequent matching and alignment of the frequency sequences of each edge node.
[0054] Step 4: Determine the matching path and index difference based on dynamic time warping for each edge node. The cloud has its frequency sequence With reference frequency sequence The dynamic time warping algorithm is executed; this algorithm solves the time misalignment problem caused by communication delay by calculating the optimal matching path between sequences.
[0055] Furthermore, the specific implementation process of dynamic time warping is as follows: Define the local distance metric function:
[0056]
[0057] in, These are the frequency values of the edge nodes. This is a reference frequency value; the distance function measures the degree of difference between two frequency sampling points.
[0058] Construct the cumulative path cost matrix; for the edge node frequency sequence The Each sampling point and reference frequency sequence The Calculate the local distance using 1 sampling point. ;
[0059] Using a dynamic programming strategy, the matching path that minimizes the cumulative path cost is found, while satisfying the constraints of monotonicity, continuity, and alignment of the first and last endpoints. ;
[0060] Among them, the monotonicity constraint requires matching index pairs in the path. Monotonically increasing along the time axis; the continuity constraint requires that no more than a preset number of sampling points can be skipped between adjacent matching points; the first and last endpoint alignment boundary condition requires that the first and last sampling points of the edge node sequence must be matched to the areas near the start and end of the reference sequence, respectively.
[0061] Determine the optimal matching path Then, extract each sampling point along the path. Corresponding reference sequence index When the sampling period of the edge node is the same as the sampling period of the reference frequency sequence and the starting point of the sampling window is the same, the reference sequence index difference can be directly written as... ;
[0062] When the sampling periods of the two are different or the starting points of the sampling windows are inconsistent, the reference index of the edge node sampling point on the time axis of the reference sequence shall be used. That is, the reference sequence sampling point index corresponding to each edge node sampling point is used as the comparison benchmark, and the reference sequence index difference is calculated:
[0063]
[0064] in, Obtained by mapping from the start position of the sampling time window;
[0065] Step 5: Calculate the time offset of each sampling point based on the reference sequence index difference. Sampling period of the reference frequency sequence Calculate the time offset of each sampling point of the edge node. The specific calculation formula is as follows:
[0066]
[0067] This time offset represents the edge node's... The local acquisition time of each sampling point is relative to its ideal position on the reference time axis;
[0068] A positive offset indicates that the matched reference time is later than the base time obtained by mapping the local acquisition time, that is, the sampling point lags behind the reference time axis; a negative offset indicates that the matched reference time is earlier than the base time, that is, the sampling point is ahead of the reference time axis.
[0069] Step Six: Correct the sampling time and generate the aligned load sequence based on the calculated time offset. The local acquisition time for each sampling point is corrected without changing the original load value; the corrected acquisition time The calculation is as follows:
[0070]
[0071] in, For the edge node Local acquisition timestamps for each sampling point; this step only corrects the time axis coordinates, load value. It remains unchanged, denoted as ;
[0072] To achieve a unified time grid, linear or spline interpolation is performed on the load values, which smooths out the actual load spikes and distorts the transient characteristics. This invention preserves the original load values, avoids introducing interpolation data distortion, and ensures the physical authenticity of the load sequence.
[0073] Furthermore, two situations may occur during the time correction process: Situation 1: When the time offset of adjacent sampling points in the original sampling sequence is the same, the corrected acquisition time will overlap; in this case, the corresponding load values will be merged into the same time slice according to the preset aggregation rules.
[0074] The aggregation rule can be either summation or averaging, depending on the cumulative nature of the load physical quantity; for example, a summation rule is used for power loads, while an averaging rule is used for density-related indicators.
[0075] Scenario 2: When the time offsets of adjacent sampling points in the original sampling sequence are different, the corrected acquisition time is non-uniformly distributed; in this case, the corrected acquisition time for each sampling point is used. Retain the original load value directly This forms an aligned load sequence with non-equidistant sampling; after the above processing, the edge nodes... The aligned load sequence is obtained, denoted as ;
[0076] Step 7: Construct a multi-node load matrix. The cloud server collects the aligned load sequences of all edge nodes within the virtual power plant system; assuming the virtual power plant aggregates... Each edge node is used to construct a multi-node load matrix based on the time dimension and the node dimension. ;
[0077] Specifically, a unified time grid is determined; since the load sequence after alignment of each node may have non-equidistant sampling, it is necessary to project the corrected acquisition time of all nodes onto a unified time axis.
[0078] A unified sampling time step principle or a fixed time window binning strategy can be used to discretize the continuous time axis into bins of length . time step sequence ;
[0079] For each time step With each edge node From the aligned load sequence Extracting the time step The load value within the corresponding time window; if there are multiple sampling points within the time window, they are merged according to the aggregation rules; if there are no sampling points, forward or backward filling is performed based on the load values of adjacent time steps;
[0080] Finally, construct a multi-node feature tensor. The tensor's first line, number Each channel represents an edge node. The load value at time step , the first The column represents all edge nodes at time step The univariate load feature distribution, this three-dimensional tensor structure is used to match the channel requirements of the temporal convolutional layers of the subsequent graph network;
[0081] Step 8: Input the machine learning prediction model and output the load prediction results to construct the multi-node load matrix. Input the trained machine learning prediction model Predictive Model The input is the historical load matrix, and the output is the load forecast result for the future target period;
[0082] Specifically, the length of the prediction model's receiving time window is... Historical load matrix Through feature extraction and temporal modeling mechanisms within the model, the future is output. Load forecast values at each time step ;in, Indicates the future number The total load forecast of the virtual power plant at each time step or the load forecast vector of each edge node;
[0083] Predictive Model Spatiotemporal graph convolutional networks, temporal convolutional networks, lightweight transformer models, or combinations thereof can be employed. During model training, training samples are constructed using historically aligned load sequences and actual load values for future target time periods. Model parameters are optimized by minimizing the prediction error loss function. ;
[0084] Since the present invention has completed the time alignment of the load sequence during the feature construction stage, the multi-node load matrix input to the prediction model is... With a unified time base, it avoids the interference of false multi-peak phenomena caused by timestamp misalignment with model learning; therefore, the prediction model can accurately capture the real fluctuation pattern of load and improve the accuracy of short-term load forecasting.
[0085] This method does not rely on network time synchronization signaling and does not introduce interpolation artifacts. It effectively solves the problem of load sequence time misalignment under heterogeneous communication conditions and significantly improves the load forecasting and management capabilities of virtual power plants.
[0086] In a preferred embodiment of the present invention, the load sequence has a uniformly set load sampling period, the load sequence includes the active load value of each sampling point, and the power grid frequency sequence includes the frequency value collected at the same sampling time as the active load value.
[0087] Determine the matching relationship between the power grid frequency sequence and the reference frequency sequence, and determine the matching path based on the matching relationship, including: constructing each candidate index pair between the power grid frequency sequence collected by the edge node and the reference frequency sequence, and calculating the absolute difference between the frequency values of each candidate index pair as the path cost;
[0088] Among the candidate paths that allow adjacent indices to increase and satisfy the boundary conditions of monotonicity, continuity, and alignment of the first and last endpoints, the candidate path with the minimum cumulative path cost is determined as the matching path.
[0089] In this embodiment, the load sequence and frequency sequence of each edge node have a uniformly set sampling period for synchronous sampling. ;
[0090] The virtual power plant system is uniformly configured to issue a unified sampling period configuration parameter to all edge nodes during the deployment phase, controlling different nodes to collect data at the same time interval under the drive of the local clock;
[0091] Each sampling point in the load sequence records the active load value. This active load value reflects the power consumption or output of the edge node at the sampling time;
[0092] Active load is an indicator that characterizes the energy consumption of a power system, and the active load value serves as a data input feature for load forecasting and demand response scheduling.
[0093] Each sampling point in the frequency sequence records the power grid frequency value. The frequency value and the active load value are collected at the same sampling time; this synchronous acquisition mechanism ensures a strict time correspondence between the load value and the frequency value, establishing a reliable physical basis for subsequent time alignment based on the frequency sequence.
[0094] Grid frequency fluctuations are a physical representation of the power generation and load balance in a power system. Within the same interconnected grid, frequency fluctuations are consistent across the entire grid, meaning that the frequency values measured by nodes at different geographical locations at the same physical time should be the same or highly correlated. Therefore, frequency sequences can be used as a time reference to recover time misalignments caused by communication delays.
[0095] The matching path determination process of dynamic time warping. The core objective of the dynamic time warping algorithm is to determine the matching path in the frequency sequence of edge nodes. With reference frequency sequence Find the optimal matching path between the two sequences; this matching path describes the correspondence between each sampling point in the two sequences and derives the time offset.
[0096] Based on the index comparability matching logic, when the sampling period of the reference frequency sequence... Sampling period of edge nodes When they are different, the reference sequence is first divided into candidate time ranges corresponding to the sampling windows of the edge nodes according to the timestamps of the reference frequency sequence, and the index of the reference sequence is retained in the dynamic time warping. ; not to and These are directly regarded as labels representing the same physical time.
[0097] For the edge node The ideal reference position for each sampling point is determined according to the starting position of the sampling time window. ,in This is the baseline index of the sampling point calculated on the time axis of the reference sequence according to the sampling period;
[0098] If the two sequences have the same sampling period and the starting point of the sampling window is the same. If the sampling periods are different or the window start points are inconsistent, the timestamp of the reference sequence shall be used to determine the time. The reference sequence index difference is represented as the difference between the matching index and the baseline index.
[0099] Candidate index pairs and local path costs for edge node frequency sequences With reference frequency sequence Define candidate index pairs ,in The sampling point index for the edge node sequence. The sampling point index for the reference sequence;
[0100] For each candidate index pair The absolute difference between frequency values is calculated as the local path cost: This local cost function is used to characterize the edge node. The frequency value of the sampling point and the reference sequence The degree of difference between the frequency values of each sampling point;
[0101] The local cost function is used to characterize the association probability of sampling points at the same physical moment; candidate index pairs are established within the range where the time windows of the two sequences intersect, and the maximum allowable search range is set according to the timestamp of the reference sequence, filtering out sampling points that are separated by more than the time search range and whose frequency value difference is less than the preset difference threshold;
[0102] Cumulative path cost and constraint matching path Defined as an ordered sequence of candidate index pairs: ,in Path length; cumulative cost of matching paths The sum of all local costs along the path:
[0103]
[0104] The goal of dynamic time warping is to find the path with the minimum cumulative cost among all feasible matching paths. : However, not all combinations of candidate index pairs constitute a valid matching path; a matching path must satisfy the following constraints:
[0105] Constraint 1: Monotonicity Constraint; the index values of adjacent index pairs in the path must be monotonically increasing, i.e., if and For adjacent index pairs in the path, then the following must be satisfied: and ; forming a unidirectional time axis distribution;
[0106] Constraint 2: Continuity constraint; the index difference between adjacent index pairs in the path cannot be too large, i.e. and ,in and The maximum jump window is preset;
[0107] This constraint limits the number of sampling points in the matching path, generating a matching mapping relationship with local continuity; and The time search range is determined according to the maximum allowable clock offset and the sampling period of the two sequences, and the corresponding time search range does not exceed the maximum communication delay preset within a sampling window.
[0108] First, calculate the maximum communication delay based on historical normal data, then round up to the reference sequence sampling point number to obtain... And converted according to the same time range to obtain ;
[0109] Constraint 3: First and last endpoint alignment boundary condition; the starting index pair of the path must be close to the start of the sequence, i.e. Should meet and The terminating index pair of the path must be close to the end of the sequence, i.e. Should meet and The above boundary conditions are used to align the endpoints of the global time range of the two sequences.
[0110] Specifically, the start and end positions are both limited to a preset time search range. When a candidate path cannot meet the boundary condition, the candidate path is discarded and the corresponding data window is marked as a failed match. The path is not used to generate a time offset.
[0111] Dynamic programming is used to find the optimal matching path; a cumulative cost matrix is defined. ,in Indicates starting from the origin To the current index pair The minimum cumulative cost; the recurrence relation is:
[0112]
[0113] The above formula represents the arrival index pair The optimal path can be derived from three predecessor index pairs: diagonal predecessor... The two corresponding sequences advance synchronously, with the horizontal lead. Pause before the corresponding edge sequence, vertical precursor Pause at the leading edge of the corresponding reference sequence;
[0114] Select the predecessor with the minimum cumulative cost for transfer; for predecessors that do not meet the continuity constraint or time search range constraint, set their cumulative cost to an unselectable state and do not participate in the minimum value comparison;
[0115] Initialize boundary conditions Initialize along the matrix boundaries according to continuity constraints; fill the cumulative cost matrix. Finally obtained That is, the minimum cumulative cost from the starting point to the ending point;
[0116] By backtracking the cumulative cost matrix From the finish line Starting from the beginning, trace back along the predecessor path that minimizes cumulative cost. To obtain the optimal matching path ;
[0117] When an edge node sampling point corresponds to multiple reference sequence indices in the path, the midpoint of the timestamps of these reference sequence indices is taken as the matching reference time for that sampling point, and a unique matching index is determined accordingly. ;
[0118] When multiple edge node sampling points correspond to the same reference sequence index, the matching relationship of each sampling point is retained, and the overlapping time slices are processed according to the preset aggregation rules in the subsequent time correction stage.
[0119] Extracting the reference sequence index difference in the optimal matching path Above, for each sampling point of the edge node sequence Extract its corresponding reference sequence index The sampling point is mapped to a reference time axis based on the local acquisition time, using a reference index. As an ideal reference position, calculate the reference sequence index difference:
[0120]
[0121] in, The sampling time is determined by the local acquisition time of the edge node sampling points, the start time of the reference sequence, and the sampling period of the reference sequence; when the sampling periods of the two sequences are the same and the starting points of the sampling windows are consistent. ;
[0122] This index difference reflects the edge node's... The offset of the corresponding position of each sampling point in the reference sequence relative to its ideal reference position; a positive index difference indicates that the sampling of the edge node lags behind the reference sequence, and a negative index difference indicates that the sampling of the edge node leads the reference sequence;
[0123] The index difference is used to calculate the time offset only when the matching path satisfies the monotonicity, continuity, and boundary conditions and the cumulative path cost does not exceed the preset matching cost limit; otherwise, the current data window is marked as a low confidence window and processed according to the exception handling strategy of Example 3.
[0124] In a preferred embodiment of the present invention, the aligned load sequence is obtained by correcting only the local acquisition time corresponding to each sampling point without changing the original load value, including: adding the local acquisition time of each sampling point to the corresponding time offset to obtain the corrected acquisition time;
[0125] When adjacent sampling points in the load sequence have the same time offset, the corresponding load values are merged into the same time slice according to the preset aggregation rules, which include summation or averaging.
[0126] When the time offsets of adjacent sampling points in the load sequence are different, the original load value is directly retained according to the corrected acquisition time of each sampling point.
[0127] The method also includes: when the absolute value of the time offset of any sampling point is greater than the allowable time offset value, the sampling point is determined as a low confidence sampling point; when the absolute value of the time offset is not greater than the allowable time offset value, the sampling point is determined as a confidence sampling point; the allowable time offset value is preset according to a preset sampling period.
[0128] When the cumulative path cost corresponding to an edge node exceeds the matching cost limit, the current time offset is replaced with the average time offset within the most recent historical time window that was not identified as a low-confidence sampling point and whose cumulative path cost does not exceed the matching cost limit. Alternatively, when constructing the multi-node load matrix, the load sequence corresponding to the edge node is multiplied by an attenuation coefficient, where the attenuation coefficient is greater than... and less than When the cumulative path cost corresponding to an edge node is not greater than the matching cost limit, retain the current time offset.
[0129] The matching cost limit is determined based on the cumulative path cost statistics of nodes that have not been judged as low-confidence sampling points in the past.
[0130] The trained machine learning prediction model is trained as follows: training samples are constructed using historically aligned load sequences and historical true load values for future target periods, and the training samples are divided into training and validation sets; a training loss function is constructed based on the prediction error of the training samples and the time offset of each sampling point in the training samples; the weight coefficients in the training loss function are determined according to the performance of the validation set, and the trained machine learning prediction model is trained using the training set.
[0131] Time correction and reconstruction of the load sequence, calculation of the corrected acquisition time to obtain the time offset of each sampling point. Then, for edge nodes Local collection time at each sampling point Corrections were made; the corrected data collection time. The calculation is as follows:
[0132]
[0133] Corrected collection time This represents the physical time corresponding to the sampling point after correction according to the reference frequency sequence. Through this correction process, the time misalignment caused by the local clock deviation of the edge node and the difference in data upload timing is eliminated, so that the load data of different nodes are aligned to a unified physical time reference.
[0134] The sign of the time offset is determined according to the time axis of the reference sequence: a positive time offset indicates that the matching reference time is later than the base time mapped by the local acquisition time, and the local acquisition time is moved backward during correction; a negative time offset indicates that the matching reference time is earlier than the base time, and the local acquisition time is moved forward during correction.
[0135] The cloud maintains a processing state for each edge node, consisting of a sampling window, frequency matching results, and a load sequence. When a data frame arrives, it first enters the waiting-to-match state. Only when the load sequence and frequency sequence lengths are consistent, the sampling time is within the coverage range of the reference frequency sequence, and the sequence verification passes, does it transition to the matching state.
[0136] Otherwise, it will enter the pending completion state; the pending completion state only waits for subsequent data frames of the same node. If the waiting time exceeds two sampling windows and the data is still not completed, the window will enter the low confidence state and its time offset will be prohibited from participating in historical statistics.
[0137] The window that has been matched is moved to the state of waiting to be reconstructed. After time correction and time slice projection are completed, it is moved to the trainable state or the online prediction state.
[0138] Each edge node sets up a sliding buffer with a length of two sampling windows in the cloud; new data frames enter the buffer according to the local acquisition time. When the buffer length exceeds the set length, the earliest window that has been matched and written to the unified timeline is removed first.
[0139] Windows that are in a state of pending matching or pending completion are not removed prematurely; the cloud processes the same sliding window sequentially on a node-by-node basis, and windows on different nodes are allowed to be processed in parallel; when the number of windows to be processed exceeds the concurrency limit, the reception of low-priority historical data is suspended, and the windows required for online prediction are processed first to avoid data transmission occupying real-time processing resources.
[0140] In applications where adjacent sampling points have the same time offset, since the communication link delay may remain stable within a short time window, the dynamic time warping algorithm may determine the same time offset for multiple consecutive sampling points.
[0141] When adjacent sampling points have the same time offset, their corrected acquisition times are still arranged sequentially according to the original sampling interval, and do not automatically form completely identical timestamps just because the time offsets are the same.
[0142] The processing logic for merging the corresponding load values into the same time slice is as follows: when constructing a unified time grid, the corrected acquisition time is projected onto the corresponding preset time slice;
[0143] Specifically, based on the start time of the unified time grid, the time intervals are divided into left-closed and right-open intervals according to the preset time slice width.
[0144] For adjacent sampling points with the same time offset, if their corrected acquisition times fall within the same time interval, they are merged according to the preset aggregation rules; if they fall within different time intervals, they are retained in their respective time slices and their corresponding values remain independent.
[0145] Aggregation rules include summation or averaging, and are pre-fixed based on the physical properties of the load value during system deployment; summation is used when the load value represents the accumulative power or energy contributed by different loads within the same time slice; arithmetic average is used when the load value represents the repeated sampling or average power of the same node in the same time slice.
[0146] For the instantaneous sampled values of active load at the same edge node in this embodiment, the arithmetic mean is preferred; for the load contribution of multiple accumulative branches at the same node, summation is used; once the aggregation rule is selected, it remains consistent during the model training and prediction phases.
[0147] Handling Different Time Offsets Between Adjacent Sampling Points: When the time offsets between adjacent sampling points in the original sampling sequence are different, the corrected acquisition time may be non-uniformly distributed.
[0148] At this point, the corrected sampling time for each sampling point is used. Retain the original load value directly No interpolation or smoothing is performed on the original load values; when constructing a unified time grid in the future, the unique time slice to which each sampling point belongs is still determined according to the aforementioned left-closed and right-open time interval;
[0149] When there are multiple sampling points in the same time slice, a pre-fixed aggregation rule is used; when there are no sampling points, the filling rule described in Example 1 is used.
[0150] For time slices without sampling points, first check whether there are effective load values in both the time slices before and after the time slice; if there are effective load values in both, use the effective value with the smallest time span to fill the time slice.
[0151] When the distances are the same, the forward value is used; when only one side has a valid value, the valid value on that side is used to fill continuously, and the number of consecutive missing time slices does not exceed two.
[0152] When the number of consecutive missing time slices is greater than two, the corresponding node window is marked as low confidence and the average node load of the most recent confident historical window is used to complete the downgrade input, blocking the long-term missing data source from participating in the calculation of normal load;
[0153] The low-confidence sampling point identification and processing mechanism determines the low-confidence sampling point by determining that if the absolute value of the time offset of a sampling point is greater than the allowable time offset value during the dynamic time warping process, it indicates that there is a significant deviation between the local acquisition time of the sampling point and the matching reference time. This deviation may be caused by instantaneous failure of the communication link, local noise interference of the frequency sequence, or abnormal jump of the edge node clock.
[0154] To identify such abnormal sampling points, a time offset tolerance value is set. When the absolute value of the time offset is greater than At that time, any sampling point is determined as a low-confidence sampling point; the allowable time offset is preset according to the load sampling period, preferably 10% to 30% of the load sampling period, for example, 20% of the load sampling period;
[0155] This ratio remains constant throughout the training, validation and prediction of the same model; if the absolute value of the time offset is not greater than this allowable value, it means that the time correction of the sampling point is within the system's allowable range; if it exceeds this allowable value, it means that the matching position may be affected by noise, clock jumps or link anomalies, and a replacement or weighting strategy needs to be adopted.
[0156] For low-confidence determinations, a point-to-window control sequence is adopted; the cloud first compares the absolute value of the time offset point by point. This establishes the credibility status of the sampling points; then, it counts the number of low-credibility sampling points and the average path cost in the current window.
[0157] When the number of low-confidence sampling points does not exceed 10% of the total number of sampling points in the window, only the low-confidence sampling points are replaced with historical offsets; when it exceeds 10%, the entire window is switched to a low-confidence state and the window is not used to update the matching cost limit and training sample quality statistics.
[0158] In addition to low-confidence determination at the sampling point level, the anomaly detection of cumulative path cost of edge nodes also evaluates the overall matching quality of edge nodes.
[0159] edge nodes Cumulative path cost It reflects the overall matching degree between its frequency sequence and the reference frequency sequence; the cumulative path cost is a non-negative number, the smaller the value, the higher the matching degree between the two sequences, and the larger the value, the lower the reliability of the matching result;
[0160] Set matching cost limit ,when Greater than When the correlation between the frequency sequence of the current time window of the edge node and the reference frequency sequence is lower than a preset threshold, it is determined that the correlation is lower than a preset threshold.
[0161] The cumulative path cost used for threshold statistics and comparison is determined by dividing the cumulative cost of the matched paths by the number of candidate index pairs. An average path cost per matching point is generated to eliminate the dimensional influence of path length differences. In this embodiment, the cumulative path cost referred to thereafter refers to this standardized average path cost.
[0162] The matching cost limit is determined based on the statistical average path cost of historically trusted nodes. Specifically, the most recent thirty complete historical time windows are selected, and the windows containing low-confidence sampling points and matching failures are removed. The sample mean of the remaining average path cost is then calculated. with sample standard deviation And set the matching cost limit according to the following formula:
[0163]
[0164] When there are fewer than ten valid historical windows, the matching cost limit calculated from at least ten valid historical windows is used. When there are no historical statistical results that meet the conditions during the system initialization phase, the initial limit calculated on the normal operation records of similar edge nodes before deployment is used. This ensures that the matching cost limit has a unique data range and determination method.
[0165] The processing strategy for low-confidence sampling points and abnormal nodes is as follows: For a single low-confidence sampling point, the time offset replacement strategy is preferred; specifically, from the five most recent historical time windows of the same edge node, the corresponding sampling positions that have not been judged as low-confidence and whose average path cost in the window is not greater than the matching cost limit are selected.
[0166] When there are two or more reliable offsets, their arithmetic mean is used to replace the current time offset. When there is only one reliable offset, the reliable offset is used. When there is no reliable offset, the current time offset is retained and the sampling point is added to the quality mask.
[0167] For abnormal nodes where the average path cost of the current window is greater than the matching cost limit, if there are reliable offsets that meet the above conditions in the last five historical time windows, then the current window is replaced with the average of the historical reliable offsets.
[0168] When there is no trusted offset, the load sequence of the edge node is downweighted when constructing the multi-node load matrix; the above two strategies are executed in a fixed order of first replacing and then downweighting when there is no trusted historical record, and they are not applied to the same node window at the same time.
[0169] When using a weight reduction strategy, the attenuation coefficient is determined according to the degree to which the average path cost of the current window exceeds the matching cost limit: 0.8 when the excess ratio is no more than 25%, 0.6 when it is greater than 25% but no more than 50%, and 0.4 when it is greater than 50%.
[0170] When the matching cost limit is 0, no division comparison is performed. If the current average path cost is also 0, it is considered normal. If the current average path cost is greater than 0, 0.4 is directly taken. This ensures that the attenuation coefficient is always greater than 0 and less than 1, and avoids division by zero when the matching cost limit is 0.
[0171] The training method for machine learning prediction models: The initial training data for building machine learning prediction models comes from historical records saved on the cloud server of the virtual power plant, reference frequency sampling data of the power grid master station, and the actual active load values for future target time periods recorded by the metering system.
[0172] First, frequency matching, time correction, and time slice aggregation are performed on the historical record frames according to the methods described in Examples 1 and 2 to obtain the historically aligned multi-node load matrix; then, based on the prediction starting point... The measurement values at each time step are used as supervision labels; the labels are automatically associated by the measurement system according to the node identifier and the actual collection time, and are processed as input labels for continuous numerical regression.
[0173] The training data should ideally cover a continuous twelve months and include at least weekdays, rest days, and load variations in spring, summer, autumn, and winter.
[0174] Training samples are generated using a sliding time window, with each sample containing a length of [length missing]. Historical load matrix, future The true load matrix for each time step, the time offset of each historical sampling point, and the low-confidence marker;
[0175] The sliding step size is set to a uniform time step, and the number of effective training samples generated is no less than 10,000; if there are fewer than 10,000, historical records are accumulated before the initial training is performed.
[0176] Before training, the samples were divided into training, validation, and test sets in chronological order, with proportions of 70%, 15%, and 15% respectively, and the time ranges of adjacent sets did not overlap; data quality checks included:
[0177] The node identifier can be associated with the reference frequency sequence, the load value and frequency value have valid values, the proportion of missing time slices in a single sample window does not exceed 1%, and there are no more than three consecutive missing time slices;
[0178] A small number of missing time slices are handled according to the filling rules in Example 1; samples exceeding the quality limit are not included in training; when the load value exceeds the rated range of the metering equipment, it is determined to be an invalid value and is not replaced by the truncated value.
[0179] The training set, validation set, and test set are all normalized using the load scale obtained from the training set statistics. Specifically, for each node, the mean and standard deviation of the training set load values are recorded, and the load value is subtracted from the mean and then divided by the standard deviation. When the standard deviation of a node is less than the preset minimum scale of 0.001, the divisor is fixed at 0.001. The validation set, test set, and online prediction data only use this set of training set statistics and do not recalculate the normalization parameters.
[0180] The training objective of building a prediction model by training a loss function is to reduce the deviation between the predicted value and the true value, while ensuring that the quality of time alignment directly affects the model parameter update.
[0181] For each historical sampling point in the training sample, the quality weight is first determined based on the absolute value of the time offset: when the time offset is 0, the quality weight is 1;
[0182] When the absolute value of the time offset increases from 0 to the allowable time offset, the quality weight decreases linearly from 1 to 0.5 according to the corresponding ratio; when the allowable time offset is exceeded or the value is marked as low confidence, the quality weight is 0.1.
[0183] The quality weight of a training sample is the arithmetic mean of the quality weights of all its historical sampling points, ranging from 0.1 to 1; the absolute error between the model output and the future true load value is calculated position by position; the training loss function is determined according to the following formula:
[0184]
[0185] in, For the first The sample quality weights of each training sample. and The first Nodes in training samples In the future The predicted load value and the actual load value at each time step. For the number of nodes, To predict the number of time steps, and These are non-negative weighting coefficients; The preset global effective sample base weight constant, An adaptive adjustment coefficient configured based on the sample time offset;
[0186] In the above formula , This represents the total number of valid training samples participating in this round of model training; due to The dynamic weighting coefficients that constitute the prediction error term map the time offset and include it in the gradient calculation for updating the model parameters;
[0187] In this embodiment, a spatiotemporal graph convolutional network is specifically used as the machine learning prediction model. Each edge node is treated as a node in the graph, and the connection relationship between nodes is determined according to the electrical topology adjacency relationship of the virtual power plant.
[0188] A connection is established between two edge nodes if they belong to the same power distribution area or have a direct electrical connection; otherwise, no connection is established, and a self-connection is added to each node. The adjacency matrix is symmetrically normalized according to the connectivity of each node, and the specific calculation formula is as follows:
[0189]
[0190] in, It is an adjacency matrix that includes self-connections. The corresponding diagonal matrix is input into the graph information aggregation layer after normalization calculation.
[0191] The spatiotemporal graph convolutional network consists of two temporal convolutional layers, one graph information aggregation layer, and one output layer. The first and second temporal convolutional layers both use convolutional kernels with a length of 3 and a stride of 1, with 32 and 64 output channels, respectively. Zeros are padded at both ends of the temporal dimension to maintain the temporal length. After each convolutional layer, a linear rectified activation function and random deactivation with a dropout rate of 0.2 are used. No pooling layer is set.
[0192] The graph information aggregation layer has 64 input and output feature channels. It aggregates the features of adjacent nodes according to the normalized adjacency matrix, and the aggregation weights are updated during training.
[0193] The output layer uses a fully connected mapping to map the 64-dimensional aggregated features of each node to the future... The predicted values at each time step are finally output. Multiply The prediction matrix; the total load prediction result of the virtual power plant is obtained by summing the prediction values of each node at the same future time step;
[0194] Weighting coefficient and Determined through the validation set; fixed. Set to 1, The values were set to 0.25, 0.5, 1, and 2 respectively, and the model was trained on the training set. The model with the smallest mean absolute percentage error on the validation set was selected. ;
[0195] When multiple values correspond to the same error, the smaller value is selected; when calculating the average absolute percentage error, the evaluation position where the absolute value of the actual load is less than 0.001 uses 0.001 as the lower limit of the denominator to avoid division by zero or abnormal amplification when the actual load is 0 or close to 0.
[0196] The model uses an adaptive moment estimation optimizer with an initial learning rate of 0.001, a batch size of 64, a weight decay coefficient of 0.0001, and a maximum training duration of 200 epochs. The learning rate is multiplied by 0.5 every 20 epochs, and remains constant after decreasing to a minimum of 0.00001. The validation set loss is calculated after each epoch of training, and the model stops early if it does not decrease for 15 consecutive epochs, while retaining the model parameters of the epoch with the lowest validation set loss.
[0197] The validation set is only used for selection. 1. Determine the stopping round and save the model, which will not participate in gradient updates; the test set is only used for final performance evaluation; after determining the weight coefficients, train the model on the complete training set with the same network structure and training parameters.
[0198] When making online predictions, the input matrix should be constructed using the same time correction, time slice aggregation, anomaly handling, and normalization rules as during the training phase. The time slice width, aggregation rules, node order, or normalization statistics should not be changed.
[0199] Once the online window has been reconstructed, if there are any unprocessed pending states or the number of low-confidence nodes exceeds 10% of the total number of nodes, the model update will be paused and the model parameters with the lowest loss from the most recent validation set will be used.
[0200] If there are only no more than 10% of low-confidence nodes, the input matrix is weighted according to the corresponding attenuation coefficient and the prediction continues. After the prediction result is output, when the next unified time step is reached and the actual load value is associated, the prediction error of this window is written into the subsequent verification statistics, but the current prediction result is not directly changed.
[0201] Please see Figure 2 A machine learning-based virtual power plant load forecasting and management system, comprising:
[0202] The data acquisition module, deployed at each edge node, is used to continuously acquire load data and power grid frequency data at each edge node according to a preset sampling period, forming load sequences and power grid frequency sequences.
[0203] The upload module communicates with the acquisition module and is used to encapsulate the node identifier, the local acquisition time corresponding to each sampling point, the load sequence and the power grid frequency sequence into data frames and upload them to the cloud server.
[0204] The alignment module, deployed on a cloud server, is used to obtain the reference frequency sequence and its sampling period generated and maintained by the cloud server based on the frequency sampling data of the power grid master station, determine the matching relationship between the power grid frequency sequence and the reference frequency sequence, determine the matching path based on the matching relationship, determine the reference sequence index difference between the reference index corresponding to each edge node sampling point and the index of the matched reference frequency sequence, and multiply the reference sequence index difference by the sampling period of the reference frequency sequence to obtain the time offset of each sampling point.
[0205] The reconstruction module, deployed on a cloud server, is used to correct only the local acquisition time corresponding to each sampling point without changing the original load value, so as to obtain the aligned load sequence.
[0206] The building module, deployed on a cloud server, is used to construct a multi-node load matrix based on the aligned load sequence of multiple edge nodes according to the time dimension and the node dimension.
[0207] The prediction module, deployed on a cloud server, is used to input the multi-node load matrix into the trained machine learning prediction model to obtain the virtual power plant load prediction results for the future target time period.
[0208] In a preferred embodiment of the present invention, the alignment module includes: a frequency difference calculation unit, used to calculate the absolute difference of frequency values for each candidate index pair in the two sequences;
[0209] The path determination unit is used to determine the matching path from candidate paths that meet preset constraints, using the absolute difference of frequency values as the path cost.
[0210] The offset determination unit is used to multiply the reference sequence index difference corresponding to each sampling point in the matching path with the sampling period of the reference frequency sequence to determine the time offset.
[0211] The system also includes an evaluation module, deployed on a cloud server, which is used to determine the offset stability based on the time offset changes of adjacent sampling points of the same edge node, and directly use the offset stability as the health of the communication link delay.
[0212] The system's acquisition module simultaneously acquires load values and grid frequency values at edge nodes with a uniform sampling period, while the upload module triggers uploads based on the completion rate of the sampling window.
[0213] After receiving the data in the cloud, the sequence length and time coverage are first verified. Data that passes the verification enters the alignment module, while data that fails the verification enters the data to be completed queue. After the data to be completed times out, it enters the low-confidence processing path.
[0214] The alignment module sequentially performs candidate index cost calculation, constrained path search, and index difference conversion through its internal frequency difference calculation unit, path determination unit, and offset determination unit. The reconstruction module only updates the sampling time coordinates. The construction module then performs time slice projection, aggregation, or missing padding. The prediction module receives a matrix with a fixed node order and a fixed time length.
[0215] The evaluation module determines the communication link delay stability score of the edge node based on the time offset and uses the communication link delay stability score as the communication link delay health. Specifically, the evaluation module calculates the offset stability according to the time offset change of adjacent sampling points of the same edge node and uses the offset stability as the communication link delay health.
[0216] When the offset change within a continuous window does not exceed one reference sampling period, the stability score is recorded as 100; when it exceeds one sampling period but does not exceed two sampling periods, the stability score is recorded as 50; when it exceeds two sampling periods or when three consecutive sampling points change, the stability score is recorded as 0.
[0217] When the stability score decreases for two consecutive windows, the communication link delay health is marked as degraded, and the data frame belonging to that node is directly inserted into the head of the low-trust processing queue in the system's pending processing queue to increase the priority of that node entering the low-trust processing path.
[0218] The degradation is lifted when stability is restored and the stability condition is met for three consecutive windows. This state only affects data processing routing and node weighting, and does not change the original load value or the time correction result of the completed window.
[0219] Based on this, a spatiotemporal graph convolutional network with a defined number of layers, channels, convolutional kernels, training data requirements, and optimization parameters is used to achieve virtual power plant load prediction for future target time periods.
Claims
1. A virtual power plant load forecasting and management method based on machine learning, characterized in that, The method includes: continuously collecting load data and power grid frequency data at each edge node according to a preset sampling period to form a load sequence and a power grid frequency sequence; The node identifier, the load sequence, and the local acquisition time corresponding to each sampling point in the power grid frequency sequence are encapsulated into a data frame and uploaded to the cloud server; the reference frequency sequence and its sampling period generated and maintained by the cloud server based on the power grid master station frequency sampling data are obtained. For each edge node, the matching relationship between the power grid frequency sequence and the reference frequency sequence is determined, and the matching path is determined according to the matching relationship. The reference sequence index difference between the reference index of the sampling point of each edge node mapped on the reference sequence time axis and the reference frequency sequence index determined based on the matching path is also determined. Multiply the reference sequence index difference by the sampling period of the reference frequency sequence to obtain the time offset of each sampling point; Only the local acquisition time corresponding to each sampling point is corrected without changing the original load value corresponding to the load data to obtain the aligned load sequence; A multi-node load matrix is constructed based on the aligned load sequence of multiple edge nodes, according to the time dimension and the node dimension. The multi-node load matrix is input into the trained machine learning prediction model to obtain the virtual power plant load prediction results for the future target time period.
2. The virtual power plant load forecasting and management method based on machine learning according to claim 1, characterized in that, The load sequence has a uniformly set load sampling period, the load sequence includes the active load value of each sampling point, and the power grid frequency sequence includes the frequency value collected at the same sampling time as the active load value.
3. The virtual power plant load forecasting and management method based on machine learning according to claim 1, characterized in that, Determining the matching relationship between the power grid frequency sequence and the reference frequency sequence, and determining the matching path based on the matching relationship, includes: Construct candidate index pairs between the power grid frequency sequence collected by the edge node and the reference frequency sequence, and calculate the absolute difference between the frequency values of each candidate index pair as the path cost; Among the candidate paths that allow adjacent indices to increase and satisfy the conditions of monotonicity, continuity, and alignment of the first and last endpoints, the candidate path with the minimum cumulative path cost is determined as the matching path.
4. The virtual power plant load forecasting and management method based on machine learning according to claim 1, characterized in that, By correcting only the local acquisition time corresponding to each sampling point without changing the original load value, the aligned load sequence is obtained, including: Add the local acquisition time of each sampling point to the corresponding time offset to obtain the corrected acquisition time; When the time offset of adjacent sampling points in the load sequence is the same, the corresponding load values are merged into the same time slice according to a preset aggregation rule, which includes summation or averaging. When the time offsets of adjacent sampling points in the load sequence are different, the original load value is directly retained according to the corrected acquisition time of each sampling point.
5. The virtual power plant load forecasting and management method based on machine learning according to claim 3, characterized in that, The method further includes: When the absolute value of the time offset of any sampling point is greater than the allowable time offset value, the sampling point is determined to be a low-confidence sampling point; when the absolute value of the time offset is not greater than the allowable time offset value, the sampling point is determined to be a reliable sampling point; the allowable time offset value is preset according to the preset sampling period. When the cumulative path cost corresponding to an edge node exceeds the matching cost limit, the current time offset is replaced by the average time offset within the most recent historical time window that was not identified as a low-confidence sampling point and whose cumulative path cost does not exceed the matching cost limit. Alternatively, when constructing the multi-node load matrix, the load sequence corresponding to the edge node is multiplied by an attenuation coefficient, where the attenuation coefficient is greater than... and less than When the cumulative path cost corresponding to the edge node is not greater than the matching cost limit, the current time offset is retained. The matching cost limit is determined based on the cumulative path cost statistics of nodes that have not been judged as low-confidence sampling points in the past.
6. The virtual power plant load forecasting and management method based on machine learning according to claim 1, characterized in that, The trained machine learning prediction model was obtained through the following method: Training samples are constructed using historically aligned load sequences and historical real load values for future target periods, and these training samples are divided into training sets and validation sets. A training loss function is constructed based on the prediction error of the training samples and the time offset of each sampling point in the training samples; the weight coefficients in the training loss function are determined according to the performance of the validation set, and the trained machine learning prediction model is trained using the training set.
7. A machine learning-based virtual power plant load forecasting and management system, used to execute the machine learning-based virtual power plant load forecasting and management method according to any one of claims 1 to 6, characterized in that, The system includes: The data acquisition module, deployed at each edge node, is used to continuously acquire load data and power grid frequency data at each edge node according to a preset sampling period, forming load sequences and power grid frequency sequences. The upload module is communicatively connected to the acquisition module and is used to encapsulate the node identifier, the local acquisition time corresponding to each sampling point, the load sequence and the power grid frequency sequence into a data frame and upload it to the cloud server. The alignment module, deployed on the cloud server, is used to obtain the reference frequency sequence and its sampling period generated and maintained by the cloud server based on the frequency sampling data of the power grid master station, determine the matching relationship between the power grid frequency sequence and the reference frequency sequence, determine the matching path based on the matching relationship, determine the reference sequence index difference between the reference index corresponding to each edge node sampling point and the index of the matched reference frequency sequence, and multiply the reference sequence index difference by the sampling period of the reference frequency sequence to obtain the time offset of each sampling point. The reconstruction module, deployed on the cloud server, is used to correct only the local acquisition time corresponding to each sampling point without changing the original load value, so as to obtain the aligned load sequence. The building module, deployed on the cloud server, is used to construct a multi-node load matrix based on the aligned load sequence of multiple edge nodes according to the time dimension and the node dimension. The prediction module, deployed on the cloud server, is used to input the multi-node load matrix into the trained machine learning prediction model to obtain the virtual power plant load prediction results for the future target time period.
8. The machine learning-based virtual power plant load forecasting management system according to claim 7, characterized in that, The alignment module includes: The frequency difference calculation unit is used to calculate the absolute difference of frequency values for each candidate index pair in the two sequences. The path determination unit is used to determine a matching path from candidate paths that meet preset constraints, using the absolute difference of the frequency values as the path cost. The offset determination unit is used to multiply the reference sequence index difference corresponding to each sampling point in the matching path with the sampling period of the reference frequency sequence to determine the time offset.
9. The machine learning-based virtual power plant load forecasting management system according to claim 7, characterized in that, The system also includes: The evaluation module, deployed on the cloud server, is used to determine the offset stability based on the time offset changes of adjacent sampling points of the same edge node, and directly use the offset stability as the health of the communication link delay.
