Family flexibility resource joint monitoring method considering influence of meteorological factors

Through the joint monitoring method of family flexibility resources that consider meteorological factors, using correlation analysis and multi-task learning, combined with Transformer encoder and timing convolutional neural network, the problem of difficulty in monitoring complex family flexibility resources in the existing technology is solved, and the effect of precise monitoring and reduction of computational complexity is achieved.

CN119519117AActive Publication Date: 2025-02-25SOUTH CHINA UNIV OF TECH

Patent Information

Application Number
CN202411509884.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-02-25
Estimated Expiration
2044-10-28

AI Technical Summary

Technical Problem

The prior art is difficult to accurately and efficiently monitor complex home flexibility resources, especially when considering the influence of complex bus power and non-electrical factors in scenarios where multiple flexibility resources operate together.

Method used

A joint monitoring method for household flexibility resources that considers the influence of meteorological factors is proposed. Through correlation analysis and multi-task learning, comprehensively consider the correlation between environmental factors and flexibility resources, a joint monitoring model for household flexibility resources is constructed, and a Transformer encoder and timing convolutional neural network are used for monitoring.

Benefits of technology

Accurate monitoring of multiple flexible resources in complex electric use scenarios is achieved, which enhances the universality of the model in different families and reduces the computational complexity of monitoring multiple targets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119519117A_ABST
    Figure CN119519117A_ABST
Patent Text Reader

Abstract

The invention discloses a family flexibility resource joint monitoring method considering the influence of meteorological factors, and the method comprises the steps: collecting bus power data in a real family electricity scene, the single power data of each flexibility resource, and candidate meteorological factor data in a corresponding time period, and carrying out the preprocessing, and obtaining clean data; according to the clean data, calculating a correlation coefficient between family flexibility resource operation and candidate meteorological factors, screening out key meteorological factors having great influence on the flexibility resource operation, and combining the key meteorological factors with bus power data into a multi-dimensional feature vector; performing model training by taking the multi-dimensional feature vectors as input and the preprocessed single power data as labels; in practical application, bus power data collected in real time and key meteorological factors screened out in the corresponding time period are input into a trained model, and meanwhile multiple pieces of accurate flexible resource monomer power data are obtained. According to the invention, accurate monitoring of a plurality of flexible resources in a complex power consumption scene can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of flexibility resource monitoring, and in particular to a joint monitoring method for household flexibility resources taking into account the influence of meteorological factors. Background Art

[0002] In recent years, with the large-scale use of renewable energy, the volatility and intermittency of its power generation have brought major challenges to the real-time distribution network operation. To meet these challenges, it has become increasingly important to enhance the flexibility of the load side. In this context, demand response is essential to encourage users to adjust flexibility resources to maintain the balance of power grid supply and demand. However, due to the hidden nature of flexibility resources, the power grid cannot directly perceive their operating status, making it difficult to assess the user's regulation potential. Therefore, accurate monitoring of flexibility resources within the home is an important prerequisite for formulating precise response plans.

[0003] Although existing studies have provided some preliminary solutions for monitoring flexibility resources, it is still very difficult to accurately and efficiently monitor complex household flexibility resources. First, most of the current monitoring studies on household adjustable electrical appliances and behind-the-meter photovoltaics adopt a single-task learning paradigm, training models independently for each monitoring target. This not only leads to a significant increase in computational complexity when monitoring multiple flexibility resources, but also fails to consider the correlation between these flexibility resources, and cannot effectively handle the complex bus power in the scenario where multiple flexibility resources operate together. Secondly, most studies ignore the complex impact of non-electrical factors on the output of household adjustable electrical appliances and behind-the-meter photovoltaics. Even when considered, the selection of non-electrical factors often relies on subjective judgment, making it difficult to accurately reflect and mine the operating characteristics of flexibility resources. Finally, the existing non-intrusive load monitoring methods based on multi-task learning still fail to consider the dual impact of the randomness, volatility and negative power characteristics of photovoltaics and the complex usage behavior of household appliances, resulting in a decrease in the monitoring performance of flexibility resources. To date, no research has developed a multi-task learning framework that can jointly monitor adjustable electrical appliances and distributed generation equipment in the home. Summary of the invention

[0004] The purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art and proposes a joint monitoring method for household flexibility resources taking into account the influence of meteorological factors. The method comprehensively considers the correlation between environmental factors and flexibility resources, as well as the correlation between these resources through correlation analysis and multi-task learning. It aims to handle the complex usage patterns of household adjustable electrical appliances and the high volatility of rooftop photovoltaics, enhance the versatility of the model in different households, reduce the computational complexity of monitoring multiple targets, and ultimately achieve accurate monitoring of multiple flexibility resources in complex electricity usage scenarios.

[0005] To achieve the above object, the technical solution provided by the present invention is: a joint monitoring method of household flexibility resources considering the influence of meteorological factors, comprising the following steps:

[0006] 1) Collect bus power data in real household power consumption scenarios, single power data of each flexibility resource, and candidate meteorological factor data of the corresponding time period and pre-process them to obtain clean data;

[0007] 2) Based on the clean data preprocessed in step 1), the correlation coefficient between the operation of household flexibility resources and the candidate meteorological factors is calculated. According to the calculation results, the key meteorological factor data with a great impact on the operation of flexibility resources is screened out, and the data is combined with the bus power data in step 1) into a multidimensional feature vector as the input of the subsequent model;

[0008] 3) Based on the idea of ​​multi-task learning, the Transformer encoder and the time series convolutional neural network are introduced to build a joint monitoring model for household flexibility resources. The multi-dimensional feature vector constructed in step 2) is used as input and the single power data preprocessed in step 1) is used as a label to perform model training and obtain a trained model;

[0009] 4) In practical applications, the real-time collected bus power data and the key meteorological factor data of the corresponding time period screened out in step 2) are combined into a multi-dimensional feature vector and input into the trained model, and multiple accurate flexible resource single power data are obtained at the same time.

[0010] Further, in step 1), the flexibility resources refer to household adjustable electrical appliances and distributed power generation equipment whose operation behaviors can be adjusted by users according to the actual needs of the power grid. The household adjustable electrical appliances include temperature-controlled loads and movable loads. The temperature-controlled loads include heat pumps and air conditioners, and the movable loads include washing machines and dishwashers; the distributed power generation equipment includes rooftop photovoltaics and micro fans; the bus power data refers to the power data at the entrance of the household user's meter; the single power data of each flexibility resource refers to the power data of each flexibility resource when it is running alone; the above two types of power data are collected by the intelligent measurement terminal, and the sampling period is T sample , the sampling time is T, the intelligent measurement terminal includes an intelligent meter; the candidate meteorological data refers to the meteorological data of the corresponding time obtained from the meteorological station where the home is located;

[0011] The preprocessing includes outlier detection and normalization processing; the calculation of the outlier detection criterion abn is shown in the following formula:

[0012] abn=I(|z λ+1 -z λ |>thed),λ=1,2,...,w

[0013] Where I(·) is an indicator function that returns 1 if the condition in the brackets is met, otherwise it returns 0; w is the number of sampling points; z λ+1 With z λ They represent the λ+1th and λth power sampling points in a single piece of data respectively; thed represents the threshold of the absolute difference value of adjacent power sampling points; abn is the outlier detection criterion. If abn is equal to 1, it is determined that there is an outlier, and the piece of data is deleted and supplemented by interpolation. If abn is equal to 0, it means there is no outlier, and the piece of data is retained.

[0014] The normalization process refers to the use of the Z-score method for standardization. This method calculates the sample and its mean and variance to obtain the standardized sample data. The specific formula is as follows:

[0015]

[0016] In the formula, X and X norm are the sample data before and after standardization; μ represents the sample mean; σ represents the sample variance.

[0017] Further, in step 2), the correlation coefficient is used to quantitatively characterize the degree of association between the operation of household flexibility resources and meteorological factors, and the correlation coefficients that can be selected include the Maximum Information Coefficient (MIC) and the Spearman correlation coefficient (Spearman);

[0018] MIC is a non-parametric method for measuring the linear and nonlinear relationship between two variables. The core idea is to find a variable segmentation method that can maximize information to reveal the maximum correlation between two variables. It has high sensitivity for mining the potential correlation between variables and is suitable for discovering various types of relationships between variables, including linear and nonlinear relationships. Its value range is 0 to 1, where 0 indicates no relationship, 1 indicates complete correlation, and greater than 0.5 indicates a strong correlation between the two variables. The calculation formula is as follows:

[0019]

[0020] Where B represents the 0.6 power of the data volume; a and b represent the division of the two-dimensional space composed of variables m and n into a rows and b columns respectively; p(m,n) represents the joint probability function of variables m and n; p(m) and p(n) represent the boundary probability density functions of variables m and n;

[0021] Spearman is used to measure the rank correlation between two variables. Its calculation is based on the order and ranking of the variable observations. It is suitable for evaluating the monotonic relationship between two variables, especially when there is an order relationship between the variables but the specific function form is unknown or complex. Its value range is -1 to 1, where 1 indicates that the two variables are completely monotonically positively correlated, 0 indicates that there is no monotonic relationship between the two variables, and -1 indicates that the two variables are completely monotonically positively correlated. Its absolute value greater than 0.5 indicates that there is a strong correlation between the two variables. Its calculation formula is as follows:

[0022]

[0023] In the formula, d represents the difference between the ranks of two variables after sorting; N represents the number of samples;

[0024] The specific process of calculating the correlation coefficient is as follows:

[0025] First, based on the clean data preprocessed in step 1), the number of times each appliance in the household is turned on every hour of every day during the sampling period is counted. Then, the kernel density estimation is used to fit the usage probability curve of each appliance every hour of the day.

[0026] Secondly, MIC and Spearman are used to calculate the correlation coefficient between each candidate meteorological factor and the utilization probability curve of all flexibility resources, and the calculation results are recorded. In this way, not only the nonlinear relationship of the electrical appliance operation mode can be captured, but also the potential impact of meteorological factors on flexibility resources can be effectively measured, thus providing a reliable basis for subsequent model input;

[0027] Then, based on the calculated correlation coefficient, each candidate meteorological factor is screened: the number of absolute values ​​of the correlation coefficients between each candidate meteorological factor and all flexibility resources exceeding a predetermined threshold is counted, and the number reflects the degree of association between the candidate meteorological factor and multiple flexibility resources. The larger the number, the higher the degree of association between the candidate meteorological factor and multiple flexibility resources.

[0028] Next, the candidate meteorological factors are sorted from high to low according to the relevance to the flexibility resources, the meteorological factors with low relevance to the flexibility resources are filtered out, and those meteorological factors with high relevance among multiple target resources are retained as key meteorological factors;

[0029] Finally, the screened key meteorological factor data are combined with the bus power data obtained in step 1) to form a multidimensional input vector, providing high-quality input data for subsequent model training. In this way, the model can better capture the dynamic characteristics and external influences of flexibility resources, thereby improving the accuracy and robustness of monitoring.

[0030] Further, in step 3), the multi-task learning idea refers to using a single model to simultaneously learn multiple related tasks, which has the advantage of being able to utilize the correlation between tasks to improve the overall performance of the model and reduce the complexity of the model; the household flexibility resource joint monitoring model is composed of a shared feature extraction module, a gating network and a tower layer network, and its working principle is: first, the shared feature extraction module is used to extract relevant feature information across monitoring tasks; then, the gating network reasonably distributes the extracted relevant feature information to the parallel tower layer networks to generate monitoring results for different flexibility resources; the shared feature extraction module is composed of multiple expert networks, and the expert network is from The correlation information across monitoring tasks is learned from different angles. First, the input vector of the model consists of bus power data and meteorological factor data. Then, the expert network consists of a one-dimensional convolutional neural network and multiple Transformer encoders, where the one-dimensional convolutional neural network uses a 1×1 convolution kernel for point-by-point convolution to better represent the time series input. Subsequently, the Transformer encoder consists of a multi-head attention mechanism, residual connection, and feedforward neural network to explore the potential correlation and global shared information between multiple tasks. The multi-head attention mechanism enables the model to capture multiple complex associations at the same time, as shown in the following formula:

[0031]

[0032] MH(Q,K,V)=Concat(head1,head2,...,head u ,...,head h )W O

[0033] Where Q, K, and V represent query, key, and value, respectively; Attention(Q, K, V) represents the calculation formula of the dot product attention score; Softmax represents the activation function; d represents the scaling factor; head u represents the u-th dot product attention score; Respectively represent the weight matrices corresponding to Q, K, and V; Concat represents the concatenation operation; W O represents the output weight matrix; MH(Q,K,V) represents the output result of multi-head attention;

[0034] Each Transformer encoder layer contains a feedforward neural network, which is used to perform nonlinear transformation and mapping on the features of each position in the sequence. The feedforward neural network consists of two fully connected layers, with nonlinear transformation performed through an activation function in the middle. This design enables the model to better capture the local features of each position in the sequence and enhances the representation ability of the model. The calculation process is shown in the following formula.

[0035] y linear=Linear2(ReLU(Linear1(MH(Q,K,V))))

[0036] In the formula, y linear and MH(Q,K,V) represent the output and input of the feedforward neural network respectively; Linear1(·) and Linear2(·) represent two fully connected layers respectively; ReLU(·) represents the activation function;

[0037] In the Transformer encoder, the multi-head attention mechanism and feedforward neural network contain a residual connection and layer normalization operation; the residual connection is used to pass the input directly to the multi-head attention mechanism and feedforward neural network output, thereby alleviating the gradient vanishing problem when training deep models; layer normalization is used to normalize the output of the multi-head attention mechanism and feedforward neural network, which helps to accelerate the training process of the model; in order to achieve adaptive weighting of all expert network output features for each flexibility resource monitoring task, a gated network is introduced into the model. The gated network consists of a fully connected layer and a softmax activation function, which can learn the weighted coefficients of each expert network output according to the characteristics of the input data; the output of the gated network is expressed by the following formula.

[0038]

[0039] In the formula, x is the input of the model; is the weight coefficient matrix of the i-th expert network for the k-th subtask; softmax represents the activation function; W ki is the transformation matrix of the i-th expert network in the gating network for the k-th subtask; n expert is the number of expert networks in the model; k is the number of the electrical power decomposition task; f i (x) is the output of the i-th expert network; G k (x) is n expert The weighted sum of the outputs of the expert networks for task k is the input of the tower network for the corresponding task;

[0040] The tower network provides a dedicated branch for each resource monitoring task, which can capture the distribution features related to a specific task from the shared features in a personalized way. The tower network consists of a temporal convolutional neural network (TCN), a one-dimensional convolutional neural network, and a fully connected layer.

[0041] First, TCN extracts medium- and long-term dependencies from shared features. Through causal convolution and dilated convolution, TCN can expand the receptive field, enabling the model to focus on a wider range of historical information, thereby more effectively extracting temporal patterns in power data. This design enables the model to better cope with the diverse characteristics of different flexibility resources and monitor them according to the specific needs of each resource. The calculation formula is shown in the following formula.

[0042]

[0043] In the formula, H κ (t) is the time series of the κth layer, h(·) is the activation function, * is the convolution operation, ω κ,i is the weight of the i-th convolution kernel of the κ-th layer, k is the width of the convolution kernel, indicating that the input of the κ-th layer is obtained by convolution operation on the output of the κ-1-th layer at k moments; D is the expansion factor, indicating the number of steps across time steps; H κ-1 (td×i) is the value of the κ-1th layer time series at different time steps;

[0044] Then, the local connectivity of the one-dimensional convolutional neural network is used to capture fine-grained temporal changes and enhance the model's ability to focus on specific patterns within a short time window. Finally, quantile regression is applied in the fully connected layer to obtain the final monitoring results. Quantile regression can comprehensively describe the conditional distribution of different quantiles and effectively capture the diverse distribution caused by subtle changes in household appliance usage patterns and photovoltaic output fluctuations in complex power data.

[0045] In addition, by outputting multiple quantile values, the model can reveal the potential uncertainty in the changes of flexibility resources and provide data support for the formulation of refined demand response strategies; the output of the tower network is defined as follows:

[0046]

[0047] In the formula, h k (·) is the kth tower network; is the jth quantized value τ in the kth tower network j The corresponding predicted value.

[0048] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0049] 1. The present invention proposes a new model input feature analysis and screening method. Combining multiple correlation evaluation indicators, the correlation between candidate environmental factors and various flexibility resources is comprehensively evaluated, and environmental factors that are highly correlated with multiple flexibility resources are screened out, thereby ensuring the effectiveness and versatility of the selected factors in various electricity usage scenarios.

[0050] 2. The present invention constructs a joint monitoring model for household flexibility resources based on multi-task learning. First, the shared feature extraction module based on the Transformer encoder deeply mines the cross-task common temporal features in the input electrical and environmental data. Then, the gated network and tower layer network are used to personalize the specific task features and capture the long-term and short-term changes of the corresponding flexibility resources, thereby improving the monitoring accuracy of flexibility resources.

[0051] 3. This paper proposes a novel method for monitoring household flexibility resources. Through correlation analysis and multi-task learning, the correlation between environmental factors and flexibility resources, as well as the correlation between these resources, is fully considered. It is designed to handle the complex usage patterns of adjustable appliances and the high volatility of rooftop photovoltaics, enhance the versatility of the model in different households, and reduce the computational complexity of the model when it is actually applied.

[0052] In summary, the present invention provides a new solution to the problem that it is difficult to accurately monitor household flexibility resources in complex electricity usage scenarios. It has practical application value and is worthy of promotion. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 Flow chart of the method of the present invention.

[0054] Figure 2 Structural diagram of the joint monitoring model for household flexibility resources.

[0055] Figure 3 This is the expert network structure diagram.

[0056] Figure 4 This is the tower layer network structure diagram. DETAILED DESCRIPTION

[0057] The present invention is further described in detail below in conjunction with embodiments and drawings, but the embodiments of the present invention are not limited thereto.

[0058] Example 1

[0059] like Figure 1 As shown, this embodiment discloses a joint monitoring method for household flexibility resources considering the influence of meteorological factors, including the following steps:

[0060] Step 1: Collect bus power data in real household electricity consumption scenarios, single power data of each flexibility resource, and candidate meteorological factor data of the corresponding time period, and pre-process them to obtain clean data. Flexibility resources refer to household adjustable appliances and distributed power generation equipment whose operating behaviors can be adjusted by users according to the actual needs of the power grid. Household adjustable appliances include but are not limited to temperature-controlled loads such as heat pumps and air conditioners, and movable loads such as washing machines and dishwashers. Distributed power generation equipment includes but is not limited to rooftop photovoltaics, micro fans, etc. Bus power data refers to the power data at the entrance of household users' electricity meters; the single power data of each flexibility resource refers to the power data when each flexibility resource is running alone. The above two types of power data are collected by smart measurement terminals such as smart meters, and the sampling period is T sample , the sampling time is T. The candidate meteorological data refers to the meteorological data of the corresponding time obtained from the meteorological station where the home is located. sample Take 1 minute.

[0061] The preprocessing includes outlier detection and normalization processing; the calculation of the outlier detection criterion abn is shown in the following formula:

[0062] abn=I(|z λ+1 -z λ |>thed),λ=1,2,...,w

[0063] Where I(·) is an indicator function that returns 1 if the condition in the brackets is met, otherwise it returns 0; w is the number of sampling points; z λ+1 With z λ They represent the λ+1th and λth power sampling points in a single piece of data respectively; thed represents the threshold of the absolute difference value of adjacent power sampling points; abn is the outlier detection criterion. If abn is equal to 1, it is determined that there is an outlier, and the piece of data is deleted and supplemented by interpolation. If abn is equal to 0, it means there is no outlier, and the piece of data is retained.

[0064] Normalization refers to the use of the Z-score method for standardization. This method calculates the sample with its mean and variance to obtain the standardized sample data. The specific formula is as follows:

[0065]

[0066] Among them, X and X norm are the sample data before and after standardization; μ represents the sample mean; σ represents the sample variance.

[0067] Step 2: Based on the data preprocessed in step 1, calculate the correlation coefficient between the operation of household flexibility resources and the candidate meteorological factors. According to the calculation results, select the key meteorological factors that have a greater impact on the operation of flexibility resources, and merge them with the bus power data in step 1 into a multidimensional feature vector as the model input. The correlation coefficient is used to quantitatively characterize the degree of association between the operation of household flexibility resources and meteorological factors. The correlation coefficients that can be selected include but are not limited to the Maximum Information Coefficient (MIC) and the Spearman correlation coefficient.

[0068] MIC is a non-parametric method for measuring the linear and nonlinear relationship between two variables. The core idea is to find a variable segmentation method that can maximize information to reveal the maximum correlation between two variables. It has high sensitivity for mining the potential correlation between variables and is suitable for discovering various types of relationships between variables, including linear and nonlinear relationships. Its value range is 0 to 1, where 0 means no relationship, 1 means perfect correlation, and greater than 0.5 means there is a strong correlation between the two variables. Its calculation formula is as follows:

[0069]

[0070] Among them, B represents the 0.6 power of the data volume; a and b represent dividing the two-dimensional space composed of variables m and n into a rows and b columns respectively; p(m,n) represents the joint probability function of variables m and n; p(m) and p(n) represent the boundary probability density functions of variables m and n.

[0071] Spearman is used to measure the rank correlation between two variables. Its calculation is based on the order and ranking of the variable observations. It is suitable for evaluating the monotonic relationship between two variables, especially when there is an order relationship between the variables but the specific function form is unknown or complex. Its value range is -1 to 1, where 1 indicates that the two variables are completely monotonically positively correlated, 0 indicates that there is no monotonic relationship between the two variables, and -1 indicates that the two variables are completely monotonically positively correlated. Its absolute value greater than 0.5 indicates that there is a strong correlation between the two variables. Its calculation formula is as follows:

[0072]

[0073] Among them, d i represents the difference between the ranks of two variables after sorting; N represents the number of samples. The specific process of calculating the correlation coefficient is as follows. First, combined with the data preprocessed in step 1, the number of times each appliance in the household is turned on every hour of every day during the sampling period is counted. Then, the kernel density estimation is used to fit the usage probability curve of each appliance every hour of the day.

[0074] Secondly, MIC and Spearman are used to calculate the correlation coefficient between each candidate meteorological factor and the probability curve of all flexible resource use, and the calculation results are recorded. In this way, not only can the nonlinear relationship of the electrical operation mode be captured, but also the potential impact of meteorological factors on flexible resources can be effectively measured, thus providing a reliable basis for subsequent model input.

[0075] Then, based on the calculated correlation coefficient, each candidate meteorological factor is further screened. Specifically, the number of absolute values ​​of the correlation coefficients between each candidate meteorological factor and all flexibility resources that exceed the predetermined threshold is counted. This number reflects the degree of association between the candidate meteorological factor and multiple flexibility resources. The larger the number, the higher the degree of association between the candidate meteorological factor and multiple flexibility resources. In this embodiment, the predetermined threshold is 0.5.

[0076] Next, these candidate meteorological factors are sorted from high to low according to their relevance to flexibility resources. This step can effectively filter out meteorological factors with low relevance to flexibility resources and retain those meteorological factors with high relevance among multiple target resources as key meteorological factors.

[0077] Finally, the selected key meteorological factor data are combined with the bus power data obtained in step 1 to form a multidimensional input vector, which provides high-quality input data for subsequent model training. In this way, the model can better capture the dynamic characteristics and external influences of flexibility resources, thereby improving the accuracy and robustness of monitoring.

[0078] Step 3: Based on the idea of ​​multi-task learning, the Transformer encoder and time-series convolutional neural network are innovatively introduced to build a joint monitoring model for household flexibility resources. The multi-dimensional feature vector constructed in step 2 is used as input and the single power data preprocessed in step 1 is used as a label to train the model. The joint monitoring model for household flexibility resources consists of a shared feature extraction module, a gating network, and a tower layer network. The specific structure is as follows: Figure 2 Its working principle is that, first, the model extracts relevant feature information across monitoring tasks through a shared feature extraction module; then, the gating network reasonably distributes this information to the parallel tower layer networks to generate monitoring results of different flexibility resources.

[0079] (1) Shared feature extraction module

[0080] The shared feature extraction module consists of multiple expert networks, which learn the correlation information across monitoring tasks from different perspectives. First, the input vector of the model consists of bus power data and meteorological factor data. Then, the expert network consists of a one-dimensional convolutional neural network and multiple Transformer encoders. The specific structure is as follows: Figure 3 As shown in the figure, the one-dimensional convolutional neural network uses a 1×1 convolution kernel for point-by-point convolution to better represent the time series input. Subsequently, the Transformer encoder consists of a multi-head attention mechanism, residual connections, and a feedforward neural network to explore the potential correlations and global shared information between multiple tasks.

[0081] 1) Multi-head attention mechanism

[0082] The multi-head attention mechanism enables the model to capture multiple complex relationships at the same time, as shown in the following formula.

[0083]

[0084] MH(Q,K,V)=Concat(head1,head2,...,head u ,...,head h )W O

[0085] Where Q, K, and V represent query, key, and value, respectively; Attention(Q, K, V) represents the calculation formula of the dot product attention score; Softmax represents the activation function; d represents the scaling factor; head u represents the u-th dot product attention score; Respectively represent the weight matrices corresponding to Q, K, and V; Concat represents the concatenation operation; W O Represents the output weight matrix; MH(Q,K,V) represents the output result of multi-head attention.

[0086] 2) Feedforward Neural Network

[0087] Each Transformer encoder layer contains a feedforward neural network, which is used to perform nonlinear transformation and mapping on the features of each position in the sequence. The feedforward neural network usually consists of two fully connected layers, with nonlinear transformation performed through an activation function in the middle. This design enables the model to better capture the local features of each position in the sequence and enhances the representation ability of the model. The calculation process of this part is shown in the following formula.

[0088] y linear =Linear2(ReLU(Linear1(MH(Q,K,V))))

[0089] In the formula, y linear and MH(Q, K, V) represent the output and input of the feedforward neural network respectively; Linear1(·) and Linear2(·) represent two fully connected layers respectively; ReLU(·) represents the activation function.

[0090] 3) Residual connection and layer normalization

[0091] In the Transformer encoder, a residual connection and layer normalization operation are included after the multi-head attention mechanism and feedforward neural network. The residual connection is used to pass the input directly to the multi-head attention mechanism and feedforward neural network output, thereby alleviating the gradient vanishing problem when training deep models. Layer normalization is used to normalize the output of the multi-head attention mechanism and feedforward neural network, which helps to speed up the model training process.

[0092] (2) Gated Network

[0093] In order to achieve adaptive weighting of all expert network output features for each flexible resource monitoring task, a gating network is introduced into the model. The gating network consists of a fully connected layer and a softmax activation function. Its main function is to learn the weighting coefficients of each expert network output according to the characteristics of the input data.

[0094] The output of the gating network can be expressed as follows.

[0095]

[0096] In the formula, x is the input of the model; is the weight coefficient matrix of the i-th expert network for the k-th subtask; softmax represents the activation function; W ki is the transformation matrix of the i-th expert network in the gating network for the k-th subtask; n expert is the number of expert networks in the model; k is the number of the electrical power decomposition task; f i (x) is the output of the i-th expert network; G k (x) is n expert The weighted sum of the outputs of the expert networks for task k is the input of the tower network for the corresponding task;

[0097] (3) Tower Network

[0098] The tower network provides a dedicated branch for each resource monitoring task, which can capture the distribution features related to a specific task from the shared features in a personalized way. The tower network consists of a temporal convolutional neural network (TCN), a one-dimensional convolutional neural network, and a fully connected layer. The specific structure is as follows: Figure 4 shown.

[0099] First, TCN extracts medium- and long-term dependencies from shared features. Through causal convolution and dilated convolution, TCN is able to expand the receptive field, allowing the model to focus on a wider range of historical information, thereby more effectively extracting temporal patterns in power data. This design allows the model to better cope with the diverse characteristics of different flexibility resources and monitor them according to the specific needs of each resource. Its calculation formula is shown below.

[0100]

[0101] Among them, H κ (t) is the time series of the κth layer, h(·) is the activation function, * is the convolution operation, ω κ,i is the weight of the i-th convolution kernel of the κ-th layer, k is the width of the convolution kernel, indicating that the input of the κ-th layer is obtained by convolution operation on the output of the κ-1-th layer at k moments; D is the expansion factor, indicating the number of steps across time steps; H κ-1 (td×i) is the value of the κ-1th layer time series at different time steps.

[0102] Then, the local connectivity of the one-dimensional convolutional neural network is used to capture fine-grained temporal changes and enhance the model's ability to focus on specific patterns within a short time window. Finally, quantile regression is applied in the fully connected layer to obtain the final monitoring results. Unlike traditional regression methods, quantile regression can fully describe the conditional distribution of different quantiles and can effectively capture the diverse distribution caused by subtle changes in household appliance usage patterns and photovoltaic output fluctuations in complex power data.

[0103] In addition, by outputting multiple quantile values, the model can reveal the potential uncertainty in the changes of flexibility resources and provide data support for the formulation of refined demand response strategies. The output of the tower network is defined as follows:

[0104]

[0105] Among them, h k (·) is the kth tower network; is the jth quantized value τ in the kth tower network j The corresponding predicted value;

[0106] Step 4: In actual applications, the real-time collected bus power data and the key meteorological factor data of the corresponding time period selected in step 2 are combined into a multi-dimensional feature vector and input into the trained model to obtain multiple accurate flexible resource single power data at the same time.

[0107] Example 2

[0108] Referring to Table 1, Table 2, Table 3, Table 4 and Table 5, which are the second embodiment of the present invention, based on Embodiment 1, in order to verify its beneficial effects, an experimental effect description is provided.

[0109] Prior to this, to further illustrate the effectiveness of the invention, this embodiment integrates two public data sets, AMPds2 and UK-dale, photovoltaic simulation data and meteorological data, to construct an experimental data set and conduct tests. To simplify the description, the household in the AMPds2 data set is marked as A1, and the households 1, 2 and 5 in the UK-dale data set are marked as U1, U2 and U5 respectively. The heat pump, washing machine, dryer and dishwasher in household A1, and the all-in-one washing and drying machine and dishwasher in households U1, U2 and U5 are selected as experimental electrical appliances. To unify with the all-in-one washing and drying machine in the UK-dale data, the power data of the washing machine and dryer in the AMPds2 data set are added and merged, and are referred to as washing machines for short.

[0110] The photovoltaic power generation data in this embodiment is derived from the photovoltaic geographic information system. During the simulation, the photovoltaic system installation location is set in the downtown area where the corresponding family is located. The simulation parameters are shown in Table 1. The meteorological data is derived from the historical weather database. The A1 family data is from the Canadian Environment and Climate Change Department (ECCC), and the U1, U2, and U3 family data are from VisualCrossing. Meteorological factors include temperature, dew point temperature, humidity, solar radiation, solar altitude angle, etc.

[0111] Table 1 Photovoltaic simulation parameters

[0112]

[0113]

[0114] Then, the original data is processed, and abnormal data such as power data with negative values ​​and temperature exceeding the threshold are regarded as missing data, and forward filling is adopted to ensure the continuity of the time series. In order to unify the time scale, the power data, meteorological data and photovoltaic power data in the UK-dale data set are resampled to 1 minute resolution and aligned with the time axis. In addition, the photovoltaic power in the data set of this embodiment is a negative value, and its absolute value is equal to the photovoltaic power value. The bus data of each household in this embodiment is obtained by adding the bus power and photovoltaic power of the corresponding household in the public data set.

[0115] Table 2 Correlation index between household A1 meteorological factors and electrical appliance usage habits

[0116]

[0117] Furthermore, in terms of screening key meteorological factors, in this embodiment, the kernel density estimation is first used to obtain the probability distribution of the use of each appliance in household A1 and household U1, and then the MIC and Spearman correlation coefficients between the appliances of the two households and meteorological factors such as temperature, dew point temperature, humidity, solar radiation, and solar altitude angle are calculated. The calculation results are shown in Tables 2 and 3.

[0118] Table 3 Correlation index between household U1 meteorological factors and electrical appliance usage habits

[0119]

[0120] The number of correlation indicators with absolute values ​​greater than 0.5 in Tables 2 and 3 is statistically analyzed, and the results are shown in Table 4.

[0121] Table 4 Statistics of correlation indicators between meteorological characteristics and adjustable resources

[0122]

[0123] From the above, we can find that the correlation between temperature, solar radiation, solar altitude angle and photovoltaic power generation and electrical appliance use is relatively large. In addition, the MIC and Spearman correlation coefficients between solar radiation and solar altitude angle are calculated to be 0.9999 and 0.9660 respectively. The correlation between the two is very high and the change trend is basically the same. Therefore, considering the correlation between the external meteorological characteristics and the adjustable resources, and in order to reduce the impact of redundant feature information on model performance, temperature and solar radiation are selected as the input features of the model together with bus power data.

[0124] Further, in terms of test accuracy, for family A1, the data of the whole year of 2013 was selected for training (the ratio of training set to validation set was 9:1), and the data from January 1, 2014 to March 31, 2014 was selected for testing. For families U1, U2, and U3, the data from November 2012 to November 2014, February 2013 to October 2013, and June 2014 to November 2014 were selected, respectively, wherein the first 80% of the data from each family was used for training (the ratio of training set to validation set was 9:1), and the last 20% of the data was used for testing. In addition, in this embodiment, the models SGN-Conv, MTL-S2P, and MAT-Conv with excellent monitoring performance in existing studies were selected for comparison with the proposed model Ours.

[0125] Furthermore, in terms of test indicators, mean absolute error (MAE), signal aggregate error (SAE), and F1 score (F1 Score, denoted as F1) are selected as evaluation indicators. The calculation formula is shown below.

[0126]

[0127] Where N represents the number of samples; y c and v represents the true value; and Represents the predicted value; M represents the number of batches into which the data set is divided; period represents the size of the time step in each batch; Precision represents the accuracy, Recall is the recall rate, TP is a true positive, FP is a false positive, and FN is a false negative.

[0128] Furthermore, Table 5 shows the monitoring performance of the proposed model for household flexibility resources. The experimental results show that the proposed model achieves the best performance in all household monitoring tasks. In particular, in the heat pump monitoring task of household A1, the proposed model reduces MAESAE by 34.39% and 24.69% respectively compared with the second-performing MAT-Conv model, significantly improving the monitoring accuracy. In addition, in the photovoltaic monitoring tasks of households U1, U2 and U5, the model also achieved significant advantages over the SGN-Conv model, with MAE, SAE and F1-score increased by 48.53%, 59.20% and 6.43% respectively, verifying the effectiveness and stability of the proposed model.

[0129] Table 5 Monitoring accuracy performance test results

[0130]

[0131] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. A joint monitoring method for household flexibility resources considering the influence of meteorological factors, characterized in that: The following steps are involved: 1) Collect bus power data in real household power consumption scenarios, single power data of each flexibility resource, and candidate meteorological factor data of the corresponding time period and pre-process them to obtain clean data; 2) Based on the clean data preprocessed in step 1), the correlation coefficient between the operation of household flexibility resources and the candidate meteorological factors is calculated. According to the calculation results, the key meteorological factor data with a great impact on the operation of flexibility resources is screened out, and the data is combined with the bus power data in step 1) into a multidimensional feature vector as the input of the subsequent model; 3) Based on the idea of ​​multi-task learning, the Transformer encoder and the time series convolutional neural network are introduced to build a joint monitoring model for household flexibility resources. The multi-dimensional feature vector constructed in step 2) is used as input and the single power data preprocessed in step 1) is used as a label to perform model training and obtain a trained model; 4) In practical applications, the real-time collected bus power data and the key meteorological factor data of the corresponding time period screened out in step 2) are combined into a multi-dimensional feature vector and input into the trained model, and multiple accurate flexible resource single power data are obtained at the same time.

2. A method for joint monitoring of household flexibility resources considering the influence of meteorological factors according to claim 1, characterized in that: In step 1), the flexibility resources refer to household adjustable appliances and distributed power generation equipment whose operation behavior can be adjusted by users according to the actual needs of the power grid. The household adjustable appliances include temperature-controlled loads and movable loads. The temperature-controlled loads include heat pumps and air conditioners, and the movable loads include washing machines and dishwashers; the distributed power generation equipment includes rooftop photovoltaics and micro fans; the bus power data refers to the power data at the entrance of the household user's meter; the single power data of each flexibility resource refers to the power data of each flexibility resource when it is running alone; the above two types of power data are collected by the intelligent measurement terminal, and the sampling period is T sample , the sampling time is T, the intelligent measurement terminal includes an intelligent meter; the candidate meteorological data refers to the meteorological data of the corresponding time obtained from the meteorological station where the home is located; The preprocessing includes outlier detection and normalization processing; the calculation of the outlier detection criterion abn is shown in the following formula: abn=(I|z λ+1 -z λ |>thed),λ=1,2,...,w Where I(.) is the indicator function, which returns 1 if the condition in the brackets is met, otherwise it returns 0; w is the number of sampling points; z λ+1 With z λ Respectively represent the λ+1th and λth power sampling points in a single piece of data; thed represents the threshold of the absolute difference value of adjacent power sampling points; abn is the outlier detection criterion. If abn is equal to 1, it is determined that there is an outlier, and the fragment data is deleted and supplemented by interpolation. If abn is equal to 0, it means there is no outlier, and the fragment data is retained; The normalization process refers to the use of the Z-score method for standardization. This method calculates the sample and its mean and variance to obtain the standardized sample data. The specific formula is as follows: In the formula, X and X norm are the sample data before and after standardization; μ represents the sample mean; σ represents the sample variance.

3. A method for joint monitoring of household flexibility resources considering the influence of meteorological factors according to claim 2, characterized in that: In step 2), the correlation coefficient is used to quantitatively characterize the degree of correlation between the operation of household flexibility resources and meteorological factors. The selectable correlation coefficients include the maximum information coefficient MIC and the Spearman correlation coefficient Spearman; MIC is a non-parametric method for measuring the linear and nonlinear relationship between two variables. The core idea is to find a variable segmentation method that can maximize information to reveal the maximum correlation between two variables. It has high sensitivity for mining the potential correlation between variables and is suitable for discovering various types of relationships between variables, including linear and nonlinear relationships. Its value range is 0 to 1, where 0 indicates no relationship, 1 indicates complete correlation, and greater than 0.5 indicates a strong correlation between the two variables. The calculation formula is as follows: Where B represents the 0.6 power of the data volume; a and b represent the division of the two-dimensional space composed of variables m and n into a rows and b columns respectively; p(m,n) represents the joint probability function of variables m and n; p(m) and p(n) represent the boundary probability density functions of variables m and n; Spearman is used to measure the rank correlation between two variables. Its calculation is based on the order and ranking of the variable observations. It is suitable for evaluating the monotonic relationship between two variables, especially when there is an order relationship between the variables but the specific function form is unknown or complex. Its value range is -1 to 1, where 1 indicates that the two variables are completely monotonically positively correlated, 0 indicates that there is no monotonic relationship between the two variables, and -1 indicates that the two variables are completely monotonically positively correlated. Its absolute value greater than 0.5 indicates that there is a strong correlation between the two variables. Its calculation formula is as follows: In the formula, d represents the difference between the ranks of two variables after sorting; N represents the number of samples; The specific process of calculating the correlation coefficient is as follows: First, based on the clean data preprocessed in step 1), the number of times each appliance in the household is turned on every hour of every day during the sampling period is counted. Then, the kernel density estimation is used to fit the usage probability curve of each appliance every hour of the day. Secondly, MIC and Spearman are used to calculate the correlation coefficient between each candidate meteorological factor and the utilization probability curve of all flexibility resources, and the calculation results are recorded. In this way, not only the nonlinear relationship of the electrical appliance operation mode can be captured, but also the potential impact of meteorological factors on flexibility resources can be effectively measured, thus providing a reliable basis for subsequent model input; Then, based on the calculated correlation coefficient, each candidate meteorological factor is screened: the number of absolute values ​​of the correlation coefficients between each candidate meteorological factor and all flexibility resources exceeding a predetermined threshold is counted, and the number reflects the degree of association between the candidate meteorological factor and multiple flexibility resources. The larger the number, the higher the degree of association between the candidate meteorological factor and multiple flexibility resources. Next, the candidate meteorological factors are sorted from high to low according to the relevance to the flexibility resources, the meteorological factors with low relevance to the flexibility resources are filtered out, and those meteorological factors with high relevance among multiple target resources are retained as key meteorological factors; Finally, the screened key meteorological factor data are combined with the bus power data obtained in step 1) to form a multidimensional input vector, providing high-quality input data for subsequent model training. In this way, the model can better capture the dynamic characteristics and external influences of flexibility resources, thereby improving the accuracy and robustness of monitoring.

4. A method for joint monitoring of household flexibility resources considering the influence of meteorological factors according to claim 3, characterized in that: In step 3), the multi-task learning idea refers to using a single model to learn multiple related tasks at the same time. Its advantage is that it can utilize the correlation between tasks to improve the overall performance of the model and reduce the complexity of the model. The household flexibility resource joint monitoring model consists of a shared feature extraction module, a gating network and a tower layer network. Its working principle is: first, the shared feature extraction module is used to extract relevant feature information across monitoring tasks; then, the gating network reasonably distributes the extracted relevant feature information to the parallel tower layer network to generate monitoring results of different flexibility resources; The shared feature extraction module is composed of multiple expert networks, which learn the correlation information across monitoring tasks from different perspectives. First, the input vector of the model consists of bus power data and meteorological factor data. Then, the expert network consists of a one-dimensional convolutional neural network and multiple Transformer encoders, wherein the one-dimensional convolutional neural network uses a 1×1 convolution kernel for point-by-point convolution to better represent the time series input. Subsequently, the Transformer encoder is composed of a multi-head attention mechanism, residual connection, and feedforward neural network to explore the potential correlation and global shared information between multiple tasks. The multi-head attention mechanism enables the model to capture multiple complex relationships at the same time, as shown in the following formula: MH(Q,K,V)=Concat(head1,head2,...,head u ,...,head h )W O Where Q, K, and V represent query, key, and value, respectively; Attention(Q, K, V) represents the calculation formula of the dot product attention score; Softmax represents the activation function; d represents the scaling factor; head u represents the u-th dot product attention score; Respectively represent the weight matrices corresponding to Q, K, and V; Concat represents the concatenation operation; W O represents the output weight matrix; MH(Q,K,V) represents the output result of multi-head attention; Each Transformer encoder layer contains a feedforward neural network, which is used to perform nonlinear transformation and mapping on the features of each position in the sequence. The feedforward neural network consists of two fully connected layers, with nonlinear transformation performed through an activation function in the middle. This design enables the model to better capture the local features of each position in the sequence and enhances the representation ability of the model. The calculation process is shown in the following formula. y linear =Linear2(ReLU(Linear1(MH(Q,K,V)))) In the formula, y linear and MH(Q,K,V) represent the output and input of the feedforward neural network respectively; Linear1(·) and Linear2(·) represent two fully connected layers respectively; ReLU(·) represents the activation function; In the Transformer encoder, the multi-head attention mechanism and feedforward neural network contain a residual connection and layer normalization operation; the residual connection is used to pass the input directly to the multi-head attention mechanism and feedforward neural network output, thereby alleviating the gradient vanishing problem when training deep models; layer normalization is used to normalize the output of the multi-head attention mechanism and feedforward neural network, which helps to accelerate the training process of the model; in order to achieve adaptive weighting of all expert network output features for each flexibility resource monitoring task, a gated network is introduced into the model. The gated network consists of a fully connected layer and a softmax activation function, which can learn the weighted coefficients of each expert network output according to the characteristics of the input data; the output of the gated network is expressed by the following formula. In the formula, x is the input of the model; is the weight coefficient matrix of the i-th expert network for the k-th subtask; softmax represents the activation function, W ki is the transformation matrix of the i-th expert network in the gating network for the k-th subtask; n expert is the number of expert networks in the model; k is the number of the electrical power decomposition task; f i (x) is the output of the i-th expert network; G k (x) is n expert The weighted sum of the outputs of the expert networks for task k is the input of the tower network for the corresponding task; The tower-layer network provides a dedicated branch for each resource monitoring task, which can capture the distribution features related to a specific task from the shared features in a personalized way. The tower-layer network consists of a temporal convolutional neural network (TCN), a one-dimensional convolutional neural network, and a fully connected layer. First, TCN extracts medium- and long-term dependencies from shared features. Through causal convolution and dilated convolution, TCN can expand the receptive field, enabling the model to focus on a wider range of historical information, thereby more effectively extracting temporal patterns in power data. This design enables the model to better cope with the diverse characteristics of different flexibility resources and monitor them according to the specific needs of each resource. The calculation formula is shown in the following formula. In the formula, H κ (t) is the time series of the κth layer, h(·) is the activation function, * is the convolution operation, ω κ,i is the weight of the i-th convolution kernel of the k-th layer, k is the width of the convolution kernel, indicating that the input of the κ-th layer is obtained by convolution operation on the output of the κ-1-th layer at k moments; D is the expansion factor, indicating the number of steps across time steps; H κ-1 (td×i) is the value of the κ-1th layer time series at different time steps; Then, the local connectivity of the one-dimensional convolutional neural network is used to capture fine-grained temporal changes and enhance the model's ability to focus on specific patterns within a short time window. Finally, quantile regression is applied in the fully connected layer to obtain the final monitoring results. Quantile regression can comprehensively describe the conditional distribution of different quantiles and effectively capture the diverse distribution caused by subtle changes in household appliance usage patterns and photovoltaic output fluctuations in complex power data. In addition, by outputting multiple quantile values, the model can reveal the potential uncertainty in the changes of flexibility resources and provide data support for the formulation of refined demand response strategies; the output of the tower network is defined as follows: In the formula, h k (·) is the kth tower network; is the jth quantized value τ in the kth tower network j The corresponding predicted value.

Citation Information

Patent Citations

  • Intelligent caching method for multi-task optimization

    CN114490447A

  • Abnormality detection and root cause analysis method and system for industrial time series data

    CN116611013A

  • Wind-light-load power short-term prediction method based on multi-task progressive learning

    CN117421971A

  • Methods and systems for machine-learning for prediction of grid carbon emissions

    US20220358606A1

Cited By

  • Element determination method and device for price difference direction prediction of electric power spot market

    CN121352866A