Intelligent dispatching system for electricity utilization of intelligent building

By using the time-frequency attention autoencoder to predict electricity consumption in the smart building electricity dispatch system, and constructing the total electricity bill and user satisfaction model, dynamically optimizing the electricity distribution plan solves the problem of low prediction accuracy and low accuracy of the existing system. This solves the problem of unoptimized distribution plans and achieves more efficient power management.

CN119338054APending Publication Date: 2025-01-21HANGZHOU FANDI NETWORK TECH
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202411365338.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The existing smart building electricity scheduling system ignores the real-time fluctuations of electricity when predicting electricity consumption, resulting in low prediction accuracy and not fully considering the impact of peak and valley electricity prices, and there is a lot of room for optimization of the allocation plan.

Method used

An intelligent dispatching system for electricity consumption in smart buildings is designed. Through the timing module, edge collection module, summary module, sharing module, prediction module and optimization dispatch module, a time-frequency attention autoencoder is used to predict electricity consumption and construct a total The electricity bill model and user satisfaction model are dynamically solved through optimization algorithms to obtain tomorrow's optimal distribution plan.

Benefits of technology

It achieves more accurate power consumption prediction, takes into account the impact of peak and valley electricity prices, optimizes the power distribution plan, and takes into account both electricity expenses and user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119338054A_ABST
    Figure CN119338054A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent scheduling system for power utilization of an intelligent building. The intelligent scheduling system comprises a timing module, an edge acquisition module, a summarizing module, a sharing module, a prediction module and an optimization scheduling module, the timing module divides continuous time periods; the edge acquisition module acquires the electricity utilization vector of each user on the current day in a single time period; the gathering module gathers the electricity utilization vectors of all users in the single time period on the day to obtain the total electricity utilization vector in the single time period on the day; the sharing module is used for storing the total electricity utilization set of the day; the prediction module obtains a total electricity utilization set of the current day, and generates a predicted total electricity utilization set of the angelica keiskei day by adopting a pre-trained time-frequency attention auto-encoder; and the optimization scheduling module constructs an optimization problem by taking minimization of the electricity charge of the angelica keiskei and maximization of the electricity utilization satisfaction as targets, and adopts an optimization algorithm to solve and obtain an optimal allocation scheme of the angelica keiskei.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electricity dispatching, and in particular to an intelligent electricity dispatching system for a smart building. Background Art

[0002] Smart buildings can integrate structures, systems, services, management and their optimal combination, making the buildings safe, convenient, efficient and energy-saving. Among them, the power supply and dispatch system is one of the key technical supports for smart buildings. It adopts advanced computer control technology, management software and energy-saving system programs to comprehensively coordinate the power supply of buildings, so as to achieve a comfortable environment in the building, and also achieve the purpose of energy saving, saving maintenance and management workload and reducing expenses.

[0003] The invention patent with the existing publication number CN107844922A proposes a residential electricity dispatching system based on a cloud computing platform, including a power distribution and dispatching system, a cloud computing platform, and multiple residential community power consumption systems. The multiple residential community power consumption systems are used to count the total power consumption of each residential community each month, and the total building power consumption management is used to manage the power consumption of each building in the same residential community. The cloud computing platform is used to collect the total power consumption of each residential community each month and make corresponding regular predictions. The power distribution and dispatching system distributes electricity according to the power consumption patterns of each month.

[0004] When analyzing electricity consumption patterns, existing technologies only consider the trend changes or periodic characteristics of electricity consumption over time, ignoring the real-time fluctuations in electricity. There is still room for improvement in prediction accuracy. At the same time, existing technologies directly allocate electricity based on prediction results, which can only improve user satisfaction, and do not consider the impact of peak and valley electricity prices. The allocation plan can still be further optimized. Summary of the invention

[0005] The purpose of the present invention is to provide an intelligent electricity dispatching system for smart buildings, which takes into account the trend changes of electricity consumption in the time domain and the fluctuation changes in the frequency domain, obtains more accurate prediction results, and constructs optimization problems to achieve a dynamic electricity dispatching solution that takes into account both costs and user satisfaction.

[0006] The technical solution to achieve the purpose of the present invention is:

[0007] An intelligent dispatching system for electricity consumption in a smart building, comprising a timing module, an edge acquisition module, a summary module, a sharing module, a prediction module and an optimization dispatching module;

[0008] The timing module divides M consecutive time periods into {[t0, t1),…,[t M-1 ,t M )}, where node t0 = 00:00, node t M =24:00, node tv→p Represents the valley-peak switching node, node t p→v Represents the peak-valley switching node;

[0009] The edge acquisition module is in the mth period [t m-1 ,t m ) Collect the nth user u on that day n Electricity consumption vector Sent to the data summary module, m = 1, 2, ..., M, n = 1, 2, ..., N;

[0010] The aggregation module aggregates the power consumption vectors of N users in the mth period of the day and obtains the power consumption vectors of the mth period of the day [t m-1 ,t m )'s total power consumption vector Q 0 (m) and sent to the shared module, m = 1, 2, ..., M;

[0011] The sharing module converts the total power consumption vector Q 0 (m) Enter the total electricity consumption of the day 0 When the total power consumption vectors of M time periods are all placed, the total power consumption vector Q of the day is stored. 0 And forwarded to the prediction module;

[0012] The prediction module obtains the total electricity consumption of the day Q 0 , using the pre-trained time-frequency attention autoencoder to generate tomorrow's predicted total electricity consumption And send it to the optimization scheduling module;

[0013] Optimize the scheduling module to minimize tomorrow's electricity bill Ex 1 and maximize electricity satisfaction Sa 1 To achieve the electricity dispatching goal, we construct an optimization problem P(1), and use the optimization algorithm to solve the optimization problem P(1) to obtain the optimal allocation plan for tomorrow.

[0014] Furthermore, the edge collection module includes 2N smart meters. Each user is equipped with two smart meters, a rigid meter and a flexible meter. The rigid meter is only connected to the rigid device of a single user to collect the data of a single user w in a single period of time. R The power consumption of a rigid device is added with a rigid marker R to generate a rigid power consumption vector. Similarly, the flexible meter collects the power consumption of a single user w in a single period of time. A The power consumption of the flexible devices is added with the flexible marker A to generate the flexible power consumption vector. Therefore, the mth period of the day [t m-1 ,t m ) The nth user u n Electricity consumption vector Total W = w R +wA dimensions, including the rigid power vector and flexible power consumption vector Among them, rigid equipment refers to electrical appliances that require long-term stable power supply, and flexible equipment refers to electrical appliances that can move freely during operation.

[0015] Furthermore, the aggregation module obtains the mth time period [t m-1 ,t m ) and sum to obtain the power consumption vector of N users in the mth period [t m-1 ,t m )'s total power consumption vector Q 0 (m) = [Q 0,R (m),Q 0,A (m)], where Q 0,R (m) and Q 0,A (m) are the total rigid power consumption and total flexible power consumption in the mth period of the day respectively.

[0016] Furthermore, the pre-training of the time-frequency attention autoencoder includes the following specific steps;

[0017] A prediction data set is constructed based on the historical total electricity consumption set and divided into a training set and a test set. The historical total electricity consumption set is constructed from the total electricity consumption set of each day before the current day.

[0018] Select the Adam algorithm to train the time-frequency attention autoencoder, set the initial learning rate, and define the loss function refers to the prediction accuracy of the time-frequency attention autoencoder, where Q k (m) and are the total electricity consumption vector and the predicted total electricity consumption vector in the mth period of the kth day before the current day, respectively, and K is the number of samples in the training set;

[0019] The training set is input in batches, and the hyperparameters of the time-frequency attention autoencoder are adjusted after each round of training until the loss function Loss converges. The hyperparameters are fixed and tested based on the test set.

[0020] Furthermore, the time-frequency attention autoencoder is based on the total electricity consumption of the day Q 0 Generate tomorrow's forecast total electricity consumption Including time domain enhancer, frequency domain enhancer, trend embedder, LSTM-Attention and nonlinear restorer;

[0021] Define the total variable electricity consumption Q for the day 0,V Used to uniformly describe the rigid total electricity consumption of the day 0,R and flexible total power collection Q 0,A , V∈{R,A};

[0022] The time domain enhancer focuses on the variable total power consumption of the day. 0,V The time series variation trend is used to generate the time domain enhancement set

[0023] The frequency domain enhancer focuses on the variable total power consumption of the day. 0,V The non-stable fluctuations of

[0024] The trend embedder combines frequency domain enhancement Project and embed the temporal enhancement set Generate the time-frequency fusion set Z for the day 0,V ;

[0025] The LSTM-Attention device processes the time-frequency fusion set Z of the day through multiple LSTM hidden layers. 0,V , through the attention layer to generate tomorrow's predicted time-frequency fusion set

[0026] The nonlinear restorer combines tomorrow's forecast time-frequency fusion set Restore to the variable total electricity consumption of the day Q 0,V The feature space in which it is located generates the predicted variable total electricity consumption set for tomorrow

[0027] Furthermore, the time domain enhancer generates a time domain enhancement set The specific steps include:

[0028] Construct a time vector t(τ)=[1,τ,…,τ η ], where τ is the normalized relative time vector and η is the control constant;

[0029] The total variable electricity consumption of the day is Q 0,V Input MLP to fit the time trend change and output the time trend set

[0030] Learning the temporal trend set through the Dense layer The time trend distribution of , respectively, is generated through the linear layer and the Softplus activation function to generate the time domain mean of the time trend distribution and time domain standard deviation

[0031] Set the basic distribution ζ through the time domain mean and time domain standard deviation Adjust the basic distribution ζ to approximate the time trend distribution, and obtain the time domain enhanced set by resampling

[0032] Furthermore, the frequency domain enhancer generates a frequency domain enhanced set The specific steps include:

[0033] Fast Fourier transform is used to process the variable total power consumption of the day. 0,V , construct the amplitude set g with the absolute value of the amplitude of the fast Fourier transform result 0,V ;

[0034] Get the amplitude set g 0,V The maximum amplitude max(g 0,V ), randomly generate fluctuation sets And calculate the volatility scale set Thus generating a high frequency enhancement set

[0035] Get the amplitude set g 0,V The minimum amplitude min(g 0,V ) Generate low frequency enhancement set And superimpose high frequency enhancement set Generate frequency domain enhancement set

[0036] Furthermore, the trend embedder constructs the time-frequency fusion set Z for the day 0,V The specific steps include:

[0037] Get the time domain enhancement set The first-order difference vector

[0038] The first-order difference of the mth period After nonlinear transformation, the embedding direction of the mth time period is generated

[0039] The frequency domain samples of the mth period In the embedding direction Embed the time domain samples of the mth period Get the time-frequency fusion sample Z of the mth period 0,V (m), thus constructing the time-frequency fusion set Z of the day 0,V .

[0040] Furthermore, the LSTM-Attention device is constructed by L hidden LSTM layers and attention layers to process the time-frequency fusion set Z of the day. 0,V , generate tomorrow's predicted time-frequency fusion set The specific steps include:

[0041] Randomly generate the 0th order hidden state h0 and the time-frequency fusion set Z of the day 0,V Combine and construct 0-order superposition information x0;

[0042] The 0th order superposition information x0 is input into the hidden LSTM layer to obtain the 1st order hidden state h1, which is then combined with the time-frequency fusion set Z of the day. 0,V Combine and construct the first-order superposition information x1 and input it into the hidden LSTM layer. Repeat this step L times until the L-order hidden state h is obtained. L ;

[0043] The constructed hidden state set H = {h1,…,h L} Input the attention layer, calculate the attention scores respectively, and obtain the attention score set S = {s1,…,s L};

[0044] The attention score set S = {s1,…,s L}After the alignment operation, we get the attention weight set A={a1,…,a L}, thereby generating tomorrow's predicted time-frequency fusion set

[0045] Furthermore, the l-th order hidden state h l The hidden LSTM layer outputs the l+1th order hidden state h l+1 The specific steps include:

[0046] The forget gate receives the l-order superposition information x l , determine the l-order cell state C through the Sigmoid function l The l-th order reserved vector f l ;

[0047] The input gate accepts l-order superposition information x l , the l-order activation vector is generated by the Sigmoid function, and the l-order updated cell state is further generated by the Tanh function Combined with the l-order cell state C l The reserved information f l ·C l and l-th order update cell state Activation information Generate l+1 order cell state C l+1 ;

[0048] The output gate receives the l-order superposition information x l , generate the l+1 order output control vector O through the Sigmoid function l+1 , through the l+1 order output control vector O l+1 Generate l+1 order hidden state h l+1 .

[0049] Furthermore, the optimization scheduling module constructs the optimization problem P(1) including the following specific steps:

[0050] Constructing the total electricity cost model for tomorrow 1 The specific formula is as follows

[0051]

[0052] in, and fe(m) are the pre-allocated electricity and electricity price for the mth period tomorrow respectively;

[0053] Constructing the electricity satisfaction model of tomorrow 1 The specific formula is as follows

[0054]

[0055] Among them, γ(m) is the time period level of the mth time period;

[0056] Introduce the harmonic coefficient λ to set the optimization target Minmiseλ·Ex 1 -(1-λ)·Sa 1 ;

[0057] Set constraints st for the optimization target and construct the optimization problem P(1), which is as follows:

[0058]

[0059] in, is the pre-allocated power in the mth period, Q 1,R (m) is the rigid total electricity demand in the mth period, Q 1,A (m) is the total flexible electricity demand in the mth period.

[0060] Specifically, the optimization problem P(1) is solved iteratively through the optimization algorithm to obtain the optimal allocation plan for tomorrow The specific steps include:

[0061] Select an optimization algorithm. Since the optimization problem P(1) is a QP problem with excellent solvability, almost all optimization algorithms can solve it. Here, we take the PSO algorithm as an example to explain the subsequent steps.

[0062] A batch of search points are randomly generated in the M-dimensional space. The i-th search point changes its initial spatial position x i (0) Determine the optimal position x for the individual i,best ;

[0063] All search points substitute their initial spatial positions into the optimization problem P(1) to calculate the initial scores, and broadcast their initial scores and initial spatial positions. The initial spatial position with the smallest initial score is selected as the group's optimal position x best ;

[0064] Randomly assign an initial search direction to the search point and set the individual experience factor h1 and the group experience factor h2;

[0065] The i-th search point is along the initial search direction v i (0) Move once and reach spatial position x i (1) and calculate a score i (1) Based on a score i (1) Is it less than the initial score? i (0) Decide whether to update the individual's best position x i,best And broadcast a score Score i (1) and a spatial position x i (1) Further update the group's optimal position x based on the scores and spatial positions of the remaining search points best ;

[0066] The i-th search point determines a search direction v i (1), a search direction v i (1) The optimal allocation plan for the i-th search point tomorrow is informed possible location;

[0067] All search points are repeatedly moved, individual best positions are updated, group best positions are updated, and search directions are updated several times until the individual best positions of search points exceeding a certain ratio threshold are consistent with the group best positions and no longer change with iterations, and the optimal allocation plan for tomorrow is obtained.

[0068] Compared with the prior art, the present invention has the following significant advantages:

[0069] 1. The time domain enhancer and frequency domain enhancer are used to focus on the change trend and random fluctuation of the total power consumption respectively, and the trend embedder is used to fuse the time domain and frequency domain data. The combination of multi-layer LSTM and Attention mechanism is adopted to achieve a more accurate total power consumption prediction;

[0070] 2. Considering peak and valley electricity prices and rigid and flexible electricity consumption, a total electricity cost model is established, a user satisfaction model is constructed, and an optimization problem P(1) is generated that takes both costs and user satisfaction into consideration. The optimization problem P(1) is solved iteratively through the optimization algorithm to obtain the optimal allocation plan for tomorrow. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 It is a schematic diagram of an intelligent dispatching system for electricity consumption in a smart building;

[0072] Figure 2 This is the time-frequency attention autoencoder model diagram;

[0073] Figure 3 This is the LSTM hidden layer model diagram;

[0074] Figure 4 This is the workflow diagram for the optimized scheduling module. DETAILED DESCRIPTION

[0075] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0076] The embodiment provided by the present invention: a smart building electricity intelligent dispatching system, comprising a timing module, an edge acquisition module, a summary module, a sharing module, a prediction module and an optimization dispatching module;

[0077] The timing module divides M consecutive time periods into {[t0, t1),…,[t M-1 ,t M )}, where node t0 = 00:00, node t M = 24:00, and there must be a node t v→p and t p→v Represent the valley-peak switching node and the peak-valley switching node, that is, the time period Peak time, time period It is the valley period;

[0078] The edge acquisition module is in the mth period [t m-1 ,t m ) Collect the nth user u on that day n Electricity consumption vector Sent to the data summary module, m = 1, 2, ..., M, n = 1, 2, ..., N;

[0079] The aggregation module aggregates N users u1,u2,…,u on the same day N The mth period [t m-1 ,t m )'s power consumption vector Get the mth period of the day [t m-1 ,t m )'s total power consumption vector Q 0 (m) = [Q 0,R (m),Q 0,A (m)] and sent to the shared module, where Q 0,R (m) and Q 0,A (m) are the mth time period of the day [t m-1 ,t m )’s rigid total power consumption and flexible total power consumption, m = 1, 2, …, M;

[0080] The sharing module receives the mth period of the day [t m-1 ,tm )'s total power consumption vector Q 0 (m), and put the total electricity consumption of the day into Q 0 , until the total power consumption vector Q in the Mth period of the day 0 (M) is inserted to store the total electricity consumption of the day. 0 = {Q 0 (1),…,Q 0 (M)} and forwarded to the prediction module;

[0081] The prediction module obtains the total electricity consumption of the day Q 0 = {Q 0,R ,Q 0,A}, where Q 0,R = {Q 0,R (1),…,Q 0,R (M)} is the total rigid power consumption, Q 0,A = {Q 0,A (1),…,Q 0,A (M)} is the flexible total power consumption set, and the pre-trained time-frequency attention autoencoder is used to generate the predicted total power consumption set for tomorrow And send tomorrow's forecast total electricity consumption To the optimization scheduling module;

[0082] The optimization scheduling module obtains the predicted total electricity consumption for tomorrow To minimize tomorrow's electricity charges Ex 1 and maximize electricity satisfaction Sa 1 For the power dispatching goal, we construct the optimization problem P(1), solve the optimization problem P(1) iteratively through the optimization algorithm, and obtain the optimal allocation plan for tomorrow.

[0083] Furthermore, the edge collection module includes 2N smart meters, the nth user u n There are two smart meters, a rigid meter and a flexible meter. The rigid meter is only connected to the rigid equipment. m-1 ,t m ) Collection R The power consumption of each rigid device is added with a rigid marker R to generate a rigid power consumption vector The flexible meter is in the mth period of the day [t m-1 ,t m ) Collect w A The power consumption of each flexible device is calculated and the flexible marker A is added to generate the flexible power consumption vector Therefore, the mth period of the day [t m-1 ,t m ) The nth user u n Electricity consumption vector By rigid power vector and flexible power consumption vector Composition, total W = w R +w A dimensions, the specific form is as follows

[0084]

[0085] in, represents the nth user u n w R The power consumption of rigid equipment, represents the nth user u n w A The power consumption of flexible devices. Rigid devices refer to electrical appliances that can directly affect the user's normal life and require long-term stable power supply, such as refrigerators and electric lights. Flexible devices refer to electrical appliances that can be moved freely during operation, such as electric water heaters and electric kettles. The user's electrical equipment will be defined as rigid equipment or flexible equipment before it is incorporated into the system.

[0086] Furthermore, the aggregation module obtains N users u1, u2, ..., u N The mth period [t m-1 ,t m )'s power consumption vector Sum and get the N users u1,u2,…,u on that day N The mth period [t m-1 ,t m )'s total power consumption vector Q 0 (m) = [Q 0,R (m),Q 0,A (m)], where Q 0,R (m) is the rigid total power consumption in the mth period of the day, Q 0,A (m) is the total flexible electricity consumption in the mth period of the day,

[0087] Furthermore, the pre-training of the time-frequency attention autoencoder includes the following specific steps;

[0088] Construct a forecast data set based on the historical total electricity consumption set, which is constructed from the total electricity consumption set of each day before the current day;

[0089] Divide the prediction data set into training set and test set;

[0090] Select the Adam algorithm to train the time-frequency attention autoencoder, set the initial learning rate, and define the loss function Loss to refer to the prediction accuracy of the time-frequency attention autoencoder. The specific formula is as follows

[0091]

[0092] in, is the total electricity consumption vector in the mth period on the kth day before the current day, is the predicted total electricity consumption vector for the kth day before the current day in the mth period generated by the time-frequency attention autoencoder, and K is the number of samples in the training set;

[0093] Input the training set in batches. After each round of training, adjust the hyperparameters of the time-frequency attention autoencoder in the direction of the decrease of the loss function Loss until the loss function Loss converges, indicating that the prediction accuracy of the time-frequency attention autoencoder has reached the optimal level. Then fix the hyperparameters of the time-frequency attention autoencoder.

[0094] Input the test set, substitute the output of the time-frequency attention autoencoder and the total power consumption vector in the test set into the loss function, determine whether the loss is greater than or equal to the qualified threshold, if so, judge it as unqualified, appropriately adjust the initial learning rate and hyperparameters of the time-frequency attention autoencoder, input the test set again for testing, until the test is qualified, and the pre-training is completed.

[0095] Furthermore, the time-frequency attention autoencoder is based on the total electricity consumption of the day Q 0 Generate tomorrow's forecast total electricity consumption Including time domain enhancer, frequency domain enhancer, trend embedder, LSTM-Attention and nonlinear restorer;

[0096] Define the total variable electricity consumption Q for the day 0,V Used to uniformly describe the rigid total electricity consumption of the day 0,R and flexible total power collection Q 0,A , V∈{R,A};

[0097] The time domain enhancer processes the variable total power consumption of the day 0,V , focus on variable total power consumption Q 0,V The time series variation trend of

[0098] The frequency domain enhancer process converts the variable total power consumption of the day into Q 0,V , focus on variable total power consumption Q 0,V The non-stable fluctuation of

[0099] The trend embedder combines frequency domain enhancement Projection to time domain enhancement set The space where the time domain enhancement set is located Generate the time-frequency fusion set Z for the day 0,V ;

[0100] The LSTM-Attention device processes the time-frequency fusion set Z of the day through multiple LSTM hidden layers. 0,V , the predicted time-frequency fusion set for tomorrow is generated through the attention layer

[0101] The nonlinear restorer combines tomorrow's forecast time-frequency fusion set Restore to the variable total electricity consumption of the day Q 0,V The feature space in which it is located is used to obtain the predicted variable total electricity consumption set for tomorrow The specific formula is as follows

[0102]

[0103] Among them, W r and b r are the learnable restoration weight matrix and restoration bias vector, V∈{R,A}, respectively, to construct the predicted total electricity consumption set for tomorrow

[0104] Furthermore, the time domain enhancer obtains the time domain enhancement set The specific steps include:

[0105] Construct a time vector t(τ)=[1,τ,…,τ η ], where τ = [0, 1, 2, …, M-1] / M is the normalized relative time vector and η is the control constant;

[0106] The total variable electricity consumption of the day is Q 0,V = {Q 0,V (1),…,Q 0,V (M)} is input into MLP, MLP replaces the polynomial coefficient vector θ to fit the time trend change, and the MLP output is the time trend set Among them, the time trend of the mth period The specific calculation formula is as follows

[0107]

[0108] Among them, θ i and τ i denote the i-th element in the polynomial coefficient vector θ and the normalized relative time vector τ, respectively. i =(i-1) / M, m=1,2,…,M;

[0109] Using Dense layer to learn time trend set The time trend distribution of , respectively, is generated through the linear layer and the Softplus activation function to generate the time domain mean of the time trend distribution and time domain standard deviation

[0110] Set the basic distribution ζ to the standard normal distribution and use the time domain mean and time domain standard deviation Adjust the basic distribution ζ to approximate the time trend distribution, and further obtain the time domain enhanced set by resampling The specific formula is as follows

[0111]

[0112] Among them, Samp M (·) represents M resampling operations, represents the Hadamard product.

[0113] Furthermore, the frequency domain enhancer obtains the frequency domain enhancement set The specific steps include:

[0114] Fast Fourier transform is used to process the variable total power consumption of the day. 0,V = {Q 0,V (1),…,Q 0,V (M)}, obtain the absolute value of the amplitude of the fast Fourier transform result to construct the amplitude set g 0,V = {g 0,V (1),…,g 0,V (M)}, where the amplitude g of the mth period 0,V (m) = abs(FFT(Q 0,V (m))), abs(·) and FFT(·) represent the operations of taking the absolute value and taking the fast Fourier transform amplitude, respectively;

[0115] Based on the amplitude set g 0,V The maximum amplitude max(g 0,V ) Generate a wave set Among them, the fluctuation term corresponding to the mth period is

[0116] Get the volatility scale set Among them, the fluctuation scale corresponding to the mth period is Thus generating a high frequency enhancement set

[0117] Based on the amplitude set g 0,V The minimum amplitude min(g 0,V ) Generate low frequency enhancement set Low frequency enhancement set Each low-frequency enhancement term is ε min(g 0,V ), where ε is the preset optimal empirical value;

[0118] Superimpose high frequency enhancement set and low frequency enhancement set Generate frequency domain enhancement set

[0119] Furthermore, the trend embedder obtains the time-frequency fusion set Z of the day 0,V The specific steps include:

[0120] Get the time domain enhancement set The first-order difference vector Among them, the first-order difference of the mth period The calculation formula is as follows

[0121]

[0122] in, The time domain enhancement set The time domain samples of the mth time period and the m-1th time period;

[0123] The first-order difference of the mth period After nonlinear transformation, the embedding direction of the mth time period is generated The specific formula is as follows

[0124]

[0125] Among them, w e and b e are the learnable weight vector and bias vector respectively;

[0126] Frequency domain enhancement set The frequency domain samples of the mth period in In the embedding direction Embed the time domain samples of the mth period Get the time-frequency fusion sample Z of the mth period 0,V (m), the specific formula is as follows

[0127]

[0128] Among them, w J and b J are respectively the learnable embedding weight vector and embedding bias, m = 1, 2, ..., M, so as to obtain the time-frequency fusion set Z of the day 0,V = {Z 0,V (1),…,Z 0,V (M)}.

[0129] Furthermore, the LSTM-Attention device is constructed by L hidden LSTM layers and attention layers to process the time-frequency fusion set Z of the day. 0,V , generate tomorrow's predicted time-frequency fusion set The specific steps include:

[0130] Randomly generate the 0th order hidden state h0 and the time-frequency fusion set Z of the day 0,V Combine and construct the 0th order superposition information x0=[h0,Z 0,V ];

[0131] The 0th order superposition information x0 is input into the hidden LSTM layer composed of the forget gate, input gate and output gate to obtain the 1st order hidden state h1, which is then combined with the time-frequency fusion set Z of the day. 0,V Combine and construct the first-order superposition information x1=[h1,Z 0,V ] and input the hidden LSTM layer, repeat this step L times until the L-order hidden state h is obtained L ;

[0132] The hidden state set H = {h1,…,h L} Input the attention layer, calculate the attention scores respectively, and obtain the attention score set S = {s1,…,s L}, l-th order hidden state h l The corresponding l-order attention score s l The specific calculation formula is as follows

[0133] s l =tanh(w s ·h l +b s ),

[0134] Among them, w s and b s are the learnable score weight vector and score bias, l=1,2,…,L respectively;

[0135] The attention score set S = {s1,…,s L}After the alignment operation, we get the attention weight set A={a1,…,a L}, l-th order attention score s l The corresponding l-order attention weight a l =Softmax(s l ), l = 1, 2, ..., L;

[0136] Superimpose l-order hidden state h l and the l-th-order attention weight a l The product of generates tomorrow's predicted time-frequency fusion set

[0137] Furthermore, the l-th order hidden state h l The hidden LSTM layer outputs the l+1th order hidden state h l+1 The specific steps include:

[0138] The forget gate receives the l-order superposition information xl =[h l ,Z 0,V ], determine the l-order cell state C through the Sigmoid function l The l-th order reserved vector f l =Sigmoid(W f ·x l +b f ), l-th order reserved vector f l Determines the l-order cell state C l Which information is retained? f and b f are the learnable forget weight matrix and forget bias vector respectively;

[0139] The input gate accepts l-order superposition information x l =[h l ,Z 0,V ], generate the l-order activation vector i through the Sigmoid function l =Sigmoid(W i ·x l +b i ), the activation vector i of order l l Select l-th order to update the cell state Which information is activated in i and b i are the learnable activation weight matrix and activation bias vector respectively;

[0140] The input gate further updates the l-order cell state C through the Tanh function l Generate l-order updated cell state Among them, W c and b c are the learnable forget weight matrix and forget bias vector respectively;

[0141] The input gate combines the l-order cell state C l The reserved information f l ·C l and l-th order update cell state Activation information Generate l+1 order cell state

[0142] The output gate receives the l-order superposition information x l =[h l ,Z 0,V ], and generate the l+1 order output control vector O through the Sigmoid function l+1 =Sigmoid(W o ·x l +b o), where W o and b o are the learnable forget weight matrix and forget bias vector, respectively, and the l+1-order output control vector O l+1 Generate l+1 order hidden state h l+1 =O l+1 Tanh (C l+1 ).

[0143] Furthermore, the optimization scheduling module constructs the optimization problem P(1) including the following specific steps:

[0144] Consider the mth period tomorrow [t m-1 ,t m ) and the pre-allocated electricity price fe(m) Sum the electricity charges of M time periods to construct the total electricity charge model for tomorrow Ex 1 The specific formula is as follows

[0145]

[0146] Among them, the unit price of electricity fe(m) needs to be based on the mth period [t m-1 ,t m ) is determined by the peak period or valley period, as follows

[0147]

[0148] Among them, fe p and fe v They are peak electricity prices and valley electricity prices. The forecast includes the total flexible electricity consumption Model Ex based on the total electricity cost of tomorrow 1 It can be seen that when the total pre-allocated electricity tomorrow is equal to the predicted total electricity consumption, the predicted flexible total electricity consumption should be collected as much as possible. The total electricity cost can be reduced to the greatest extent by shifting the flexible total electricity consumption in the peak period to the valley period.

[0149] Consider the time period level γ(m) and the distribution difference of the mth time period To build tomorrow's electricity satisfaction model Sa 1 The specific formula is as follows

[0150]

[0151] Among them, the time period level γ(m) indicates the influence of the mth time period on electricity satisfaction, which is determined by the electricity preference of N users in the building. The specific formula is as follows

[0152]

[0153] Among them, n (m) is the electricity preference of the nth user for the mth time period, which can be obtained through previous user surveys or existing data analysis methods. The higher the sum of the electricity preference of N users in the mth time period, the more N users pay attention to the electricity experience in the mth time period, and the time period level γ(m) also increases accordingly. The influence of the mth period on the electricity satisfaction degree also increases. Therefore, based on the electricity satisfaction model Sa 1 It can be seen that only by reducing the allocation difference of the high time period level to 0 as much as possible and achieving sufficient power supply in the user's preferred time period can the electricity satisfaction be maximized;

[0154] The electricity dispatching objectives include the first objective and the second objective. The first objective is to minimize the total electricity cost model Ex tomorrow. 1 The second goal is to maximize tomorrow's electricity satisfaction model Sa 1 Since the off-peak hours with low electricity prices are usually in the middle of the night, users often do not prefer off-peak hours. The first and second objectives constitute a non-cooperative game. Considering only one objective for power pre-allocation will inevitably lead to poor results for the other objective. Therefore, the introduction of the harmonic coefficient λ constructs the optimization objective as Minmiseλ·Ex 1 -(1-λ)·Sa 1 , where the harmonic coefficient λ determines the influence ratio of the first and second objectives in the optimization objective, which can be set according to actual needs. The optimal allocation plan for tomorrow is solved by the optimization algorithm in the subsequent During the iteration process, is always fixed, 0≤λ≤1;

[0155] Since rigid equipment requires long-term stable power supply, the optimization target needs to set the constraint condition st(1). The constraint condition st(1) represents the pre-allocated power in the mth period tomorrow. At least the predicted rigid total electricity demand in the mth period must be met That is, st(1) m=1,2,…,M;

[0156] To ensure that all N users in the building can meet tomorrow’s total electricity demand, the optimization objective needs to set the constraint condition st(2). The constraint condition st(2) indicates that the sum of the pre-allocated electricity in the M time periods tomorrow should not be less than the predicted total electricity demand, but it is not necessary to ensure that the flexible total electricity demand Q in the mth time period is met in the mth time period. 1,A (m), that is, st(2) m=1,2,…,M;

[0157] Combining the optimization objective, constraints st(1) and constraints st(2), we construct the optimization problem P(1), which is as follows:

[0158]

[0159] Based on the optimization problem P(1), we can know that when the optimization algorithm is iterated to make the first and second objectives reach Nash equilibrium, the pre-allocation scheme is This is the optimal allocation plan for tomorrow At this point, the optimization goal is minimized, that is, minimizing tomorrow's total electricity cost model Ex 1 At the same time, it maximizes tomorrow's electricity satisfaction model Sa 1 , the optimal allocation plan for tomorrow Any changes may only unilaterally increase the benefits of the first or second goal, but will not improve the benefits of the optimization goal.

[0160] Furthermore, the optimization problem P(1) is solved by the optimization algorithm to obtain the optimal allocation plan for tomorrow. The specific steps include:

[0161] Select an optimization algorithm. The selection of an optimization algorithm should be based on the problem type, data nature, data scale, algorithm complexity, interpretability requirements, algorithm performance, and resource constraints. Since the optimization problem P(1) is a QP problem with excellent solvability, almost all optimization algorithms can solve it. Here, the PSO algorithm is used as an example to explain the subsequent steps.

[0162] Since the ultimate goal is to obtain the optimal allocation plan for tomorrow Therefore, the solution vector space is M-dimensional, and the optimal allocation plan for tomorrow is Keeping the same, a batch of search points are randomly generated in the M-dimensional space, and the initial spatial position x of the i-th search point is i (0) = [x i,1 (0),…,x i,M (0)] represents a random allocation scheme, which assigns the initial spatial position x i (0) Determine the individual optimal position x of the i-th search point i,best ;

[0163] All search points substitute their initial spatial positions into the optimization problem P(1) to calculate the initial scores, and broadcast their initial scores and initial spatial positions. The initial spatial position of the search point with the smallest initial score is selected as the group's optimal position x best , taking the i-th search point as an example, the initial spatial position x i (0) Substitute into the optimization problem P (1) to obtain the initial score Score i(0), broadcast initial score Score i (0) and the initial spatial position x i (0), obtain the initial scores and initial spatial positions of the remaining search points, and determine the initial spatial position with the smallest initial score as the group's optimal position x best ;

[0164] Randomly assign an initial search direction to the search point. The initial search direction of the i-th search point Among them, v i,j (0) represents the speed at which the i-th search point advances in the j-th dimension;

[0165] Set the individual experience factor h1 and the group experience factor h2. The individual experience factor h1 and the group experience factor h2 respectively indicate the individual learning ability of a single search point and the group learning ability of all search points for finding the optimal allocation plan for tomorrow. the extent of the impact;

[0166] The i-th search point is along the initial search direction v i (0) Move once and reach spatial position x i (1) = x i (0)+v i (0), the spatial position x i (1) Substitute into the optimization problem P(1) and calculate the score Score i (1) Determine a score i (1) Is it less than the initial score? i (0), if it is less than, update the individual best position x i,best is a spatial position x i (1) Broadcast a score at the same time i (1) and a spatial position x i (1), otherwise no operation is performed, and the scores and spatial positions of the remaining search points are further obtained, and the spatial position with the smallest score is selected to update the group's optimal position x best ;

[0167] The i-th search point learns the individual optimal position x based on the individual experience factor h1 and the group experience factor h2 i,best and the optimal position of the group x best The location of the next move is used to determine the search direction v required for the next move. i (1) = v i (0)+h1×rand(·)×(x i,best -x i (1))+h2×rand(·)×(x best -x i(1)), where rand(.) is used to generate a random number between 0 and 1, and the search direction v is searched once. i (1) The optimal allocation plan for the i-th search point tomorrow is informed possible location;

[0168] All search points repeat the four steps of moving, updating the individual best position, updating the group best position, and updating their own search direction several times until the individual best position of the search points exceeding a certain ratio threshold is consistent with the group best position and no longer changes with iterations. Then the group best position x best This is the optimal allocation plan for tomorrow

[0169] The present invention discloses an intelligent dispatching system for electricity consumption in a smart building. The prediction module adopts a pre-trained time-frequency attention autoencoder, pays attention to the time variation trend and random fluctuation of the total electricity consumption set of the day, accurately predicts the predicted total electricity consumption set of tomorrow, improves the robustness of the system, and optimizes the dispatching module to construct a total electricity cost model and a user satisfaction model, collaboratively considers minimizing the electricity cost and maximizing the electricity satisfaction, constructs an optimization problem, and adopts an optimization algorithm to dynamically solve and obtain the optimal allocation plan for tomorrow.

[0170] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A smart building electricity intelligent dispatching system, characterized in that: Includes prediction module and optimization scheduling module; The prediction module obtains the total electricity consumption set of the day, uses the pre-trained time-frequency attention autoencoder, generates the predicted total electricity consumption set for tomorrow and sends it to the optimization scheduling module; The optimization scheduling module introduces a harmonic coefficient to balance the first objective and the second objective to generate an optimization objective, sets constraints to construct an optimization problem, and uses an optimization algorithm to achieve Nash equilibrium of the optimization objective to obtain the optimal allocation plan for tomorrow.

2. The intelligent building electricity intelligent dispatching system according to claim 1, characterized in that: The time-frequency attention autoencoder generates a predicted total electricity consumption set for tomorrow based on the total electricity consumption set for the day, including a time domain enhancer, a frequency domain enhancer, a trend embedder, an LSTM-Attention device and a nonlinear restorer; The time domain enhancer focuses on the time series variation trend of the variable total power consumption set of the day and generates a time domain enhancement set; The frequency domain enhancer focuses on the unstable fluctuation of the variable total power consumption set of the day and generates a frequency domain enhancement set; The trend embedder projects and embeds the frequency domain enhancement set into the time domain enhancement set to generate a time-frequency fusion set for the day; The LSTM-Attention device processes the time-frequency fusion set of the day through multiple LSTM hidden layers, and generates the predicted time-frequency fusion set of tomorrow through the attention layer; The nonlinear restorer restores tomorrow's predicted time-frequency fusion set to the feature space where the variable total power consumption set of the day is located, and obtains tomorrow's predicted variable total power consumption set.

3. The intelligent building electricity intelligent dispatching system as claimed in claim 2, characterized in that: The time domain enhancer generates a time domain enhancement set, comprising the following specific steps: Construct a time vector and input the variable total electricity consumption set of the day into the MLP to generate a time trend set; The time trend set is passed through a Dense layer to learn the time trend distribution, and a linear layer and a Softplus function are used to generate a time domain mean and a time domain standard deviation; A basic distribution is set, the basic distribution is adjusted by the time domain mean and the time domain standard deviation, and a time domain enhancement set is generated by resampling.

4. The intelligent building electricity intelligent dispatching system as claimed in claim 2, characterized in that: The frequency domain enhancer generates a frequency domain enhancement set, comprising the following specific steps: The variable total power consumption set of the day is processed by fast Fourier transform, and an amplitude set is constructed by using the absolute value of the amplitude of the fast Fourier transform result; Obtaining the maximum amplitude of the amplitude set, randomly generating a fluctuation set and calculating a fluctuation scale set, thereby generating a high-frequency enhancement set; The minimum amplitude of the amplitude set is obtained to generate a low-frequency enhancement set, and the high-frequency enhancement set is superimposed to generate a frequency domain enhancement set.

5. The intelligent building electricity intelligent dispatching system as claimed in claim 2, characterized in that: The trend embedder constructs the time-frequency fusion set of the day including the following specific steps: Obtaining a first-order difference vector of the time domain enhancement set; The first-order difference of the m-th time period is transformed nonlinearly to generate the embedding direction of the m-th time period; The frequency domain samples of the mth period are embedded into the time domain samples of the mth period in the embedding direction to obtain the time-frequency fusion samples of the mth period and construct the time-frequency fusion set of the day.

6. The intelligent building electricity intelligent dispatching system as claimed in claim 2, characterized in that: The LSTM-Attention device is constructed by L hidden LSTM layers and an attention layer. It processes the time-frequency fusion set of the day and generates the predicted time-frequency fusion set of tomorrow, including the following specific steps: Randomly generate a 0th order hidden state, and combine it with the time-frequency fusion set of the day to construct 0th order superposition information; Input the 0th order superposition information into the hidden LSTM layer to obtain the 1st order hidden state, combine it with the time-frequency fusion set of the day again to construct the 1st order superposition information, input it into the hidden LSTM layer again, and repeat this step L times until the Lth order hidden state is obtained; Construct a hidden state set and input it into the attention layer, calculate the attention score, and obtain the attention score set; The attention score set is subjected to an alignment operation to obtain an attention weight set, thereby generating tomorrow's predicted time-frequency fusion set.

7. The intelligent building electricity intelligent dispatching system according to claim 1, characterized in that: The optimization scheduling module constructs the optimization problem P(1) including the following specific steps: Modeling tomorrow's total electricity bill and fe(m) are the pre-allocated electricity and electricity price for the mth period tomorrow respectively; Constructing a model of tomorrow's electricity consumption satisfaction γ(m) is the time period level of the mth time period; Introduce the harmonic coefficient λ to construct the optimization objective Minmiseλ·Ex 1 -(1-λ)·Sa 1 ; Set constraints st for the optimization goal and construct the optimization problem P(1), which is as follows: in, is the pre-allocated power in the mth period, Q 1,R (m) is the rigid total electricity demand in the mth period, Q 1,A (m) is the total flexible electricity demand in the mth period.

8. A smart building electricity intelligent dispatching system as described in any one of claims 1 to 7, characterized in that: It also includes a timing module, an edge acquisition module, a summary module, and a sharing module; The timing module divides the continuous time periods into valley-peak switching nodes and peak-valley switching nodes; The edge collection module collects the power consumption vectors of all users on the day in a single period and sends them to the data summary module; The aggregation module aggregates the power consumption vectors of all users in a single period of the day, obtains the total power consumption vector of the single period of the day and sends it to the sharing module; The sharing module places the total power consumption vector of the day into the total power consumption set of the day. When the total power consumption vectors of all time periods are all placed, the total power consumption set of the day is stored and forwarded to the prediction module.

9. The intelligent building electricity intelligent dispatching system according to claim 8, characterized in that: The edge acquisition module includes 2N smart meters. The power consumption vector of a single user in a single period of the day is W=w R +w A dimensions, including w R The rigid power consumption vector and w A The flexible power consumption vector is composed of the power consumption of flexible devices. Rigid devices refer to electrical appliances that require long-term stable power supply, and flexible devices refer to electrical appliances that can be freely moved during operation.

10. The intelligent building electricity intelligent dispatching system according to claim 8, characterized in that: The aggregation module obtains the power consumption vector of N users in the mth period of the day, and sums them up to obtain the total power consumption vector Q of N users in the mth period of the day. 0 (m) = [Q 0,R (m),Q 0,A (m)], where Q 0,R (m) is the rigid total power consumption in the mth period of the day, Q 0,A (m) is the total flexible electricity consumption in the mth period of the day,

Citation Information

Patent Citations

  • Cloud computing platform-based residential electricity dispatching system

    CN107844922A

  • Time series data self-adaptive segmentation, dimension reduction and characterization method based on wavelet transformation and application

    CN109918417A

  • Residential daily electrical load prediction method and equipment

    CN111193254A

  • Household energy intelligent optimization method based on information interaction

    CN111340270A

  • Multi-scale regional photovoltaic output prediction method and system based on sequence coding reconstruction

    CN114662807A