Optimal dynamic electricity price demand response method based on two-layer master-slave game model
Through the dual-layer master-slave game model and non-invasive load monitoring technology, combined with NSGA-II and SMS-EMOA algorithms, dynamic electricity prices are formulated to achieve multi-objective optimization on the power supply side and demand side, which solves the limitations of pricing strategies in the existing technology, and achieves efficient formulation of electricity prices and carbon emission reduction.
Patent Information
- Application Number
- CN202211061474.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-08-31
AI Technical Summary
The existing pricing strategy cannot consider multiple goals on the power supply side and demand side at the same time, and the existing optimization algorithm solves the time complexity and space complexity, making it difficult to obtain the optimal solution in a short time, and at the same time, the construction method of user power dissatisfaction is difficult to achieve scale and customization.
The optimal dynamic electricity price demand response method based on the two-layer master-slave game model is adopted, and the user-side electrical information is obtained through non-invasive load monitoring, and a multi-objective optimization model is constructed on the power supply side by combining NSGA-II and SMS-EMOA algorithms, and dynamic electricity prices are formulated to achieve profit maximization, social welfare maximization and carbon emission minimization, and random forests are used for mapping estimation of the response scheme.
With almost no loss of user comfort, peak cutting and valley filling and carbon emission reduction have been achieved, improving the efficiency and effectiveness of electricity price setting.
Smart Images

Figure CN115310717B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of power system operator pricing in the power market, and in particular relates to the situation where one power system operator has multiple users. Background Art
[0002] In the growing electricity market, thanks to advanced measurement technology, communication technology and automatic control technology, demand response is an important means to solve the growing demand for electricity and maintain the balance of supply and demand in the power system. Generally speaking, demand response is divided into incentive-based demand response and price-based demand response. Price-based demand response refers to providing a dynamic electricity price setting strategy to encourage the load to move from peak time periods to valley time periods. Dynamic electricity prices refer to electricity price strategies that change significantly over time and are usually used in demand response. In order to obtain the optimal dynamic electricity price, analytical models, evolutionary algorithms, etc. are often used to formulate dynamic electricity prices. However, due to its limitations, the current pricing strategy cannot perfectly solve the pricing problem that considers multiple factors. The main difficulties it faces are as follows:
[0003] (1) Pricing strategies cannot be applied to situations where multiple objectives on both the power supply side and the demand side are considered simultaneously. Currently, existing pricing strategies only consider situations where both the power supply side and the demand side have a single objective or one of them has multiple objectives. When considering that both the power supply side and the demand side have mutually constrained objectives, such as the power supply side's objectives of maximizing revenue, maximizing social welfare, and minimizing carbon emissions, and the demand side's objectives of minimizing electricity costs and electricity dissatisfaction, existing pricing strategies cannot solve the problem. Moreover, according to the existing optimization model, both the power supply side and the demand side use evolutionary algorithms to solve the problem. The time complexity and space complexity of the solution are very large, and it is impossible to obtain the optimal solution in a short time.
[0004] (2) In existing research, the method used to construct user electricity dissatisfaction is mostly through user questionnaires, that is, the usage time of each appliance is determined by asking users about the allowed planning time range of each appliance. This method makes it difficult to achieve scalability and customization of the pricing mechanism.
[0005] (3) Among the currently used multi-objective optimization algorithms, only evolutionary algorithms based on crowding or evolutionary algorithms based on hypervolume are considered. In actual applications, evolutionary algorithms based on crowding can quickly improve the hypervolume value (hypervolume is mainly used to evaluate search results) in the early stages of the iteration process, but in the later stages, the hypervolume value increases slowly and fluctuates. While evolutionary algorithms based on hypervolume can steadily improve the hypervolume value, their disadvantage is that the improvement speed is slow. Therefore, combining the advantages of the two algorithms, we initially apply the evolutionary algorithm based on crowding, and when the current maximum hypervolume value has not increased for a period of time, we apply the evolutionary algorithm based on hypervolume. Summary of the Invention
[0006] In response to the above-mentioned existing technologies, the present invention provides an optimal dynamic electricity price demand response method based on a two-tier master-slave game model. The electricity price determined by this method effectively reduces peak load and valley load, reducing carbon emissions with little loss of user comfort.
[0007] In order to solve the above technical problems, the present invention proposes an optimal dynamic electricity price demand response method based on a two-layer master-slave game model, comprising the following steps:
[0008] Step 1: Feature extraction on the demand side based on non-intrusive load monitoring: Using historical electricity measurement data as input, a non-intrusive load monitoring (NILM) model is trained and load decomposition is performed. Based on the load decomposition results, the operating time, frequency, and time period distribution information of each appliance are derived. Based on this load decomposition, user preferences and response potential for each load are calculated, and the user's appliance operation probability distribution and load inflexibility are obtained. The operating power of each appliance, the obtained probability distribution, and the load inflexibility are uploaded to the power supply side of the power system via the communication architecture.
[0009] Step 2: Based on the two-layer optimization model, the optimal dynamic electricity price is determined on the power supply side according to the above-mentioned extracted features to achieve demand response with optimal dynamic price: the two-layer optimization model includes an upper layer and a lower layer, and the initialization electricity price and the features extracted on the demand side in step 1 are used as inputs of the two-layer optimization model; first, the lower layer formulates a demand response electrical appliance operation plan as the lower layer response plan based on the initialization electricity price with the aim of minimizing electricity costs and discomfort, and passes it to the upper layer after updating; the upper layer formulates a dynamic electricity price based on the updated lower layer response plan with the aim of maximizing profits, maximizing social welfare and minimizing carbon emissions, and passes the formulated dynamic electricity price to the lower layer; the upper and lower layers of the two-layer optimization model are continuously iterated until the preset maximum number of iterations is reached, at which time the two-layer optimization model outputs dynamic electricity price candidates; finally, the TOPSIS algorithm is used to select the optimal dynamic electricity price, and demand response based on the optimal dynamic electricity price is executed according to the selected optimal dynamic electricity price.
[0010] Furthermore, the optimal dynamic electricity price demand response method of the present invention includes:
[0011] The specific steps of step one are as follows:
[0012] Step 1-1) Load decomposition based on non-intrusive load monitoring
[0013] First, given a household and All electrical appliances in home m are Based on non-intrusive load monitoring and load decomposition, the rated power and time distribution of working status of each electrical appliance are obtained;
[0014] for electrical appliances The state matrix S a Defined as:
[0015]
[0016] In formula (1), each column represents the time of day Where T represents all time periods of a day, and each row represents each day Where D represents the total number of days counted;
[0017] Step 1-2) Quantify the daily distribution of appliance usage in the user's home using user preferences
[0018] User preferences are expressed as:
[0019]
[0020] In formula (2), represents the preference of appliance a at time t. The preference vector is calculated for each appliance without resolution limitation;
[0021] Steps 1-3) use load inflexibility as an indicator to quantify the load demand response potential
[0022] Load inflexibility is defined as the ratio of frequency to period, and the quantification of load inflexibility and user preference are combined to represent the usage habits of appliances;
[0023] Define the frequency of user using appliance a as
[0024]
[0025] In formula (3), π a is the total number of times that appliance a runs. The on-time of appliance a in a day is expressed as:
[0026]
[0027] When calculating the life cycle of an appliance, the input includes the start time e of the appliance a. a , the number of electrical appliances A m and threshold τ; first the length is A m The period vector b is initialized to a 0 vector; the upper limit of a period is set to D / 2. For each appliance a, the appliance on-time vector is divided into D / i vectors of length i, where i is a candidate period value;
[0028] Let c represent the number of vectors that are enabled and define the first The cycle candidate i is the usage cycle b of appliance a a For each appliance a, repeat the above steps to determine the usage cycle b of appliance a a You can get the usage cycle of all electrical appliances;
[0029] For all appliances with a usage cycle of 0, the usage cycle is set to D. For appliances with a usage cycle other than 0, no processing is done; the load inflexibility is defined as
[0030]
[0031] The obtained load inflexibility is normalized to 0-1.
[0032] The specific steps of step 2 are as follows:
[0033] Step 2-1) Developing the optimal dynamic electricity price based on each user's lower-level response plan includes:
[0034] Step 2-1-1) One by N p The electricity price population consists of are randomly assigned, and the electricity demands of all users are stored in the set As the input of the upper layer of the two-layer optimization model, Obtained from the optimization results of the lower layer of the two-layer optimization model;
[0035] Parameter initialization, set δ,i←0, and Profit, social welfare, and carbon emission targets are then calculated:
[0036]
[0037]
[0038]
[0039] In formulas (6) to (8), o pro o wel o emi represent profit target, social welfare target and carbon emission target respectively, y t represents the electricity price, C t (L t ) represents the cost function, L t represents the total power consumption at time t, represents the carbon emission coefficient;
[0040] Step 2-1-2) Calculate the population using the NSGA-II algorithm The congestion and non-dominated sorting are obtained and In each iteration, δ←0 is assigned and NSGA-II is used to generate a new population;
[0041] First, according to and From the population by binary selection Select the parent population and utilizes simulated binary crossbar
[0042] And use simulated binary crossover and polynomial mutation to generate offspring population And meet the following conditions:
[0043]
[0044] In formula (9), C t (L t ) is the cost function, α t >0,β t , ρ t ≥0;y min 、y max Represent the upper and lower limits of electricity prices, R max Indicates the maximum value of the set benefit;
[0045] Step 2-1-3) Get the optimization results of the lower layer After that, the upper layer updates the upper layer target according to formula (6), formula (7) and formula (8); the new population is updated as and and update the new population and After that, the population is screened by the elite selection strategy; if the super volume value of the new population or or or So quilt Replace, and set i to 0; otherwise, i←i+1; repeat steps 2-1-2) and 2-1-3); until i≥μ, where μ is the set threshold, set δ to 1, execute step 2-1-4), and the algorithm switches to SMS-EMOA;
[0046] Step 2-1-4) In the SMS-EMOA algorithm, first, under the constraints of the constraint condition of formula (9), a child individual q is generated by simulating binary crossover and polynomial mutation. The lower layer formulates a response strategy based on the generated individual, and the upper layer updates the target value according to the updated response strategy. The Reduce algorithm in SMS-EMOA is executed on the union of q and q; the above steps 2-1-2) to 2-1-4) are iterated continuously until the preset maximum number of iterations is reached, thereby obtaining the optimal dynamic electricity price;
[0047] Step 2-2) Formulate a lower-level response plan based on dynamic electricity pricing, including:
[0048] Step 2-2-1) Get the upper level electricity price strategy offspring population The total training set of the lower-level random forest algorithm and by Calculate the threshold θ, When the multi-objective optimization algorithm is executed to calculate the electricity price strategy Calculate the corresponding optimal response plan for each electricity price vector;
[0049] Step 2-2-2) Lower-level response solution set Random assignment is performed according to the following constraints:
[0050]
[0051] In formula (10), This is the minimum power consumption per day that is preset to ensure the quality of life. is the contract power, and is the minimum and maximum running time of a day in the past D days; and δ and i are initialized to 0;
[0052] Step 2-2-3) Calculate the electricity cost and electricity discomfort target for the lower layer according to the following formula:
[0053]
[0054]
[0055] In formulas (11) and (12), o bill and o dis They are the electricity cost and discomfort targets for the lower tier;
[0056] Calculate the non-dominated sorting and congestion sum of the lower layer; set After that, NSGA-II and SMS-EMOA are used to perform multi-objective optimization algorithms. For each generation, if δ is 0, NSGA-II is used to perform multi-objective optimization algorithms. After being selected by the competition selection algorithm, the offspring population It is generated by two-point crossover and simple mutation. And the offspring whose peak-to-valley difference is larger than the peak-to-valley difference of the parent individual that generated the offspring are deleted. Then calculate the objective function of the lower layer and Next calculate and Finally, the new population is selected according to the elite selection algorithm. or or but quilt Replace, and set i to 0, otherwise i←i+1, until i≥μ, where μ is the set threshold, set δ to 1, execute step 2-2-4), and the algorithm switches to SMS-EMOA;
[0057] Step 2-2-4) From Randomly select two individuals as parents and generate a child individual H through two-point crossover and simple mutation until the peak-to-valley difference of the child is no greater than that of the parent; then calculate H and The union is the target of the new population o bill and o dis Finally, the Reduce algorithm in SMS-EMOA is used to delete the worst solution; then the TOPSIS algorithm is used to select the worst solution in the population. Select an optimal solution and pass it to the upper layer as the best response strategy; and use the population Update the total training set once Use random forest to predict the optimal response plan;
[0058] Step 2-2-5) First, Randomly select θ individuals as the training data set, and then select As a sub-training data set, the set of on-off states of each appliance of each user at each moment is used as an estimate of the mapping from the dynamic electricity price space to the response plan space. Once the mapping is trained, the forest algorithm can obtain the response plan of each appliance of each user at each moment, as shown in the following formula:
[0059]
[0060] In formula (13), It is the predicted on / off state of appliance a of user m at time t; and the predicted individuals with confidence greater than 0.8 are added to the training data set;
[0061] Step 2-3) Iterate steps 2-1) and 2-2) until the preset maximum number of iterations is reached to obtain dynamic electricity price candidates. Then, the TOPSIS algorithm is used to select the optimal dynamic electricity price, and a price-based demand response plan is implemented according to the selected optimal dynamic electricity price.
[0062] Compared with the prior art, the present invention has the following beneficial effects:
[0063] This invention provides a model and method for setting dynamic electricity prices on the power supply side. First, non-intrusive load monitoring technology is used to obtain information such as the rated power and usage characteristics of user-side appliances. Secondly, a two-layer, multi-objective optimization master-slave game model is constructed on the power supply side to determine dynamic electricity prices. In this model, the upper layer aims to maximize profit, maximize social welfare, and minimize carbon emissions. Based on the response plan updated by the lower layer, a dynamic electricity price is set using a combination of NSGA-II and SMS-EMOA. The lower layer aims to minimize electricity costs and discomfort. Based on the dynamic electricity price updated by the upper layer, a response plan is set using a combination of NSGA-II and SMA-EMOA. When a certain number of individuals are generated, a random forest algorithm is used to estimate the mapping from the dynamic electricity price space to the response plan space. Testing and analysis on the REFIT dataset demonstrate that the electricity price set by this method, using this two-layer optimization model to implement price-based demand response, effectively achieves peak load shifting and valley filling, reducing carbon emissions with little loss of user comfort. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 This is the architecture and process of the optimal dynamic electricity price demand response method based on a two-layer master-slave game model of the present invention. DETAILED DESCRIPTION
[0065] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but the following embodiments are by no means intended to limit the present invention in any way.
[0066] Aiming at the master-slave game model presented by the interaction mode between the power supply side and the demand side, the present invention designs a pricing strategy of a double-layer multi-objective master-slave game model in the optimal dynamic electricity price demand response method based on the double-layer master-slave game model. Figure 1 The architecture of the dual-layer, multi-objective master-slave game model consists of two modules: a feature extraction module on each user side and a dual-layer optimization model module on the power supply side. Each user module executes in parallel, while the user-side and power supply-side modules execute sequentially to achieve dynamic electricity pricing.
[0067] The feature extraction module uses historical electricity measurement data as input, trains a non-intrusive load monitoring (NILM) model, and performs load decomposition. Based on the load decomposition results, it derives information such as the operating time, frequency, and time period distribution of each appliance. Based on this information, it calculates the user preference and response potential of each load. The obtained appliance operation probability distribution and load inflexibility are used as parameters of the user satisfaction model. Finally, the load decomposition results and satisfaction model are transmitted to the power supply side.
[0068] The two-layer optimization model module takes the initial electricity price, the user's load decomposition results, and the satisfaction model as input. The lower layer first formulates a response plan based on the initial electricity price to minimize electricity costs and minimize dissatisfaction. The response plan is then passed to the upper layer. The upper layer then formulates a dynamic electricity price based on the updated response plan to maximize revenue, maximize social welfare, and minimize carbon emissions, and passes it to the lower layer. The upper and lower layers iterate continuously until the termination condition is reached, and output dynamic electricity pricing strategy candidates. Finally, the optimal dynamic electricity price is selected and distributed to the user.
[0069] Based on the above framework, the present invention provides an optimal dynamic electricity price demand response method, which mainly includes:
[0070] Step 1: Extract features on the demand side based on non-intrusive load monitoring:
[0071] Using historical electricity measurement data as input, a non-intrusive load monitoring (NILM) model is trained and load decomposition is performed. Based on the load decomposition results, the operating time, frequency, and time period distribution of each appliance are derived. Based on this information, user preferences and response potential for each load are calculated, and the user's appliance operation probability distribution and load inflexibility are obtained. The operating power of each appliance, the obtained probability distribution, and the load inflexibility are uploaded to the power supply side of the power system via a communication architecture.
[0072] Step 2: Based on the two-layer optimization model, the optimal dynamic electricity price is determined on the power supply side according to the above-mentioned extracted features to achieve demand response with optimal dynamic price: the two-layer optimization model includes an upper layer and a lower layer, and the initialization electricity price and the features extracted on the demand side in step 1 are used as inputs of the two-layer optimization model; first, the lower layer formulates a demand response electrical appliance operation plan as the lower layer response plan based on the initialization electricity price with the aim of minimizing electricity costs and discomfort, and passes it to the upper layer after updating; the upper layer formulates a dynamic electricity price based on the updated lower layer response plan with the aim of maximizing profits, maximizing social welfare and minimizing carbon emissions, and passes the formulated dynamic electricity price to the lower layer; the upper and lower layers of the two-layer optimization model are continuously iterated until the preset maximum number of iterations is reached, at which time the two-layer optimization model outputs dynamic electricity price candidates; finally, the TOPSIS algorithm is used to select the optimal dynamic electricity price, and demand response based on the optimal dynamic electricity price is executed according to the selected optimal dynamic electricity price.
[0073] The method of the present invention is described in detail as follows in conjunction with the main modules within the above framework:
[0074] (1) Feature extraction
[0075] This module performs feature extraction based on non-intrusive load monitoring and mainly includes the following three steps.
[0076] 1) Load decomposition based on non-intrusive load monitoring
[0077] First, given a household and All electrical appliances in home m are Based on non-intrusive load monitoring and load decomposition, the rated power and working state time distribution of each appliance are obtained. electrical appliances The state matrix S a Defined as:
[0078]
[0079] In formula (1), each column represents the time of day Where T represents all time periods of a day, and each row represents each day Where D represents the total number of days counted;
[0080] 2) Quantification of user preferences
[0081] In order to learn the distribution of appliance usage throughout the day, the present invention uses user preferences to quantify the distribution of appliance usage in the user's home throughout the day. User preferences can be expressed as:
[0082]
[0083] Where, represents the preference of appliance a at time t. Therefore, the preference vector can be calculated for each appliance without resolution limitation.
[0084] 3) Quantification of load inflexibility
[0085] In order to quantify the load demand response potential and the dissatisfaction caused to users by shifting the operation time of the appliance, the present invention uses load inflexibility as an indicator to quantify the load demand response potential. Load inflexibility is defined as the ratio of frequency to period. The quantification of load inflexibility, together with user preferences, represents the usage habits of appliances. For some appliances that are used less frequently or irregularly, those that are used frequently and have regular usage habits have greater inflexibility. We define the frequency of user use of appliance a as
[0086]
[0087] Where, π a is the total number of times appliance a runs. The time appliance a is turned on in a day is as follows:
[0088]
[0089] Next, calculate the life cycle of the appliance. Based on whether there is a cycle, determine whether its operation is regular or random. When calculating the life cycle of an appliance, input the start time e of the appliance a. a , the number of electrical appliances A m and threshold τ; first the length is A m The cycle vector b is initialized to 0 vector; the upper limit of a cycle is set to D / 2, and for each appliance a, the appliance start-up time vector is divided into D / i vectors of length i, where i is the cycle candidate value; in the present invention, the number of vectors that are turned on and running is represented by c, and the first one is defined The cycle candidate i is the usage cycle b of appliance a a For each appliance a, repeat the above steps to determine the usage cycle b of appliance a. a The usage cycles of all appliances can be obtained. Then, it is defined that appliances for which accurate cycles can be calculated are used regularly, while appliances for which cycles cannot be calculated are used irregularly. The shorter the cycle, the greater the discomfort caused to the user by changing the operating time of the appliance. In the following calculations, for all appliances with a usage cycle of 0, the usage cycle is set to D, and appliances with a usage cycle other than 0 are not processed; the load inflexibility is defined as
[0090]
[0091] The resulting load inflexibility is then normalized to a value between 0 and 1. Thus, higher frequencies and shorter periods generate a greater load inflexibility.
[0092] (2) Two-layer optimization model
[0093] The module formulates dynamic electricity prices on the power supply side based on the acquired characteristic information, which mainly includes the following two steps.
[0094] 1) Formulate the optimal dynamic electricity price based on each user’s lower-level response plan
[0095] Step 1: A by N p The electricity price population consisting of individuals is randomly assigned, and the electricity demands of all users are stored in the set As the input of the upper layer of the two-layer optimization model, The optimization result of the lower layer of the two-layer optimization model is obtained. Next, the parameters are initialized, and δ,i←0 is set, and The profit, social welfare and carbon emission targets are then calculated using the following formula:
[0096]
[0097]
[0098]
[0099] In the formula, o pro o wel o emi represent profit target, social welfare target and carbon emission target respectively, y t represents the electricity price, C t (L t ) represents the cost function, L t represents the total power consumption at time t, Represents the carbon emission factor.
[0100] Step 2: Calculate the population using the NSGA-II algorithm The congestion and non-dominated sorting are obtained and In each iteration, δ←0 is assigned and NSGA-II is used to generate a new population. First, according to and From the population by binary selection Select the parent population And use simulated binary crossover and polynomial mutation to generate offspring population And meet the following conditions:
[0101]
[0102] Among them, C t (L t ) is the cost function, where the parameters meet the condition α t >0,β t , ρ t ≥0,y min y max Represent the upper and lower limits of electricity prices, R max Indicates the maximum value of the set benefit.
[0103] Step 3: Get the optimization results of the lower layer After that, the upper layer can update the upper layer target according to formula (6)(7)(8). The new population is updated as and and update the new population and After that, the population is screened by the elite selection strategy. If the super volume value of the new population
[0104] or
[0105] or
[0106] or
[0107] So quilt Replace it, and set i to 0. Otherwise, i←i+1. Repeat steps 2 and 3 until i ≥ μ, where μ is the set threshold. Set δ to 1 and the algorithm switches to SMS-EMOA.
[0108] Step 4: In the SMS-EMOA algorithm, first, under the constraint of the constraint condition (9), a child individual q is generated by simulating binary crossover and polynomial mutation. The lower layer formulates a response strategy based on the generated individual, and the upper layer updates the target value according to the updated response strategy. The Reduce algorithm in SMS-EMOA is executed on the union of q and q. The above process is iterated continuously until the termination condition is reached, that is, the number of iterations reaches the preset maximum number of iterations, thereby obtaining the optimal dynamic electricity price.
[0109] 2) Development of lower-level response plans based on dynamic electricity pricing
[0110] This step is responsible for formulating the optimal response plan for the known electricity price strategy. The specific steps are as follows:
[0111] Step 1: Get the upper level electricity price strategy child population The total training set of the lower-level random forest algorithm And the threshold θ, given by Calculated. When the multi-objective optimization algorithm is executed according to For each electricity price vector in , the corresponding optimal response plan is calculated.
[0112] Step 2: Lower-level response plan collection Random assignment is performed according to the following constraints:
[0113]
[0114] Where, This is the minimum power consumption per day that is preset to ensure the quality of life. is the contract power, and is the minimum and maximum running time of a day in the past D days. And δ and i are initialized to 0.
[0115] Step 3: Calculate the electricity cost and electricity discomfort target for the lower layer according to the following formula:
[0116]
[0117]
[0118] In the formula, o bill and o dis They are the electricity cost and discomfort targets for the lower tier, respectively.
[0119] And calculate the non-dominated sorting and congestion degree of the lower layer. After that, similar to the optimization steps in the upper layer, NSGA-II and SMS-EMOA are used to perform the multi-objective optimization algorithm. For each generation, if δ is 0, NSGA-II is used to perform the multi-objective optimization algorithm. The difference from the upper layer optimization process is that in the parent population After being selected by the competition selection algorithm, the offspring population It is generated by two-point crossover and simple mutation. And the offspring whose peak-to-valley difference is larger than the peak-to-valley difference of the parent individual that generated the offspring are deleted. Then calculate the objective function of the lower layer and Next calculate and Finally, the new population is selected according to the elite selection algorithm. or or but quilt Instead, i is set to 0, otherwise i←i+1, if i≥μ, δ is set to 1 in the present invention, and the algorithm switches to SMS-EMOA.
[0120] Step 4: From Randomly select two individuals as parents and generate a child individual H through two-point crossover and simple mutation until the peak-to-valley difference of the child is no greater than that of the parent. Then calculate H and The union is the target of the new population o bill and o dis Finally, the Reduce algorithm in SMS-EMOA is used to delete the worst solution. Then the TOPSIS algorithm is used to Select an optimal solution and pass it to the upper layer as the best response strategy. renew once Random forest is used to predict the optimal response plan.
[0121] Step 5: First, Randomly select θ individuals as the training data set, and then select As a sub-training dataset, the set of on / off states of each appliance for each user at each moment is used as an estimate of the mapping from the dynamic electricity price space to the response plan space. Once the mapping is trained, the random forest algorithm can obtain the response plan for each appliance for each user at each moment, as shown in the following formula:
[0122]
[0123] Where, It is the predicted on / off state of appliance a of user m at time t. And the predicted individuals with confidence greater than 0.8 are added to the training dataset.
[0124] 3) Continuously iteratively execute the above steps of 1) formulating the optimal dynamic electricity price based on the lower-level response plan of each user and 2) formulating the lower-level response plan based on the dynamic electricity price until a preset maximum number of iterations is reached, and a dynamic electricity price candidate is obtained. Then, the TOPSIS algorithm is used to select the optimal dynamic electricity price, and a price-based demand response plan is executed according to the selected optimal dynamic electricity price.
[0125] Although the present invention has been described above in conjunction with the accompanying drawings, the present invention is not limited to the above-mentioned specific embodiments. The above-mentioned specific embodiments are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can make many variations without departing from the purpose of the present invention, and these are all protected by the present invention.
Claims
1. An optimal dynamic electricity price demand response method based on a two-layer master-slave game model, characterized in that: The following steps are involved: Step 1: Extract features on the demand side based on non-intrusive load monitoring: Using historical electricity measurement data as input, a non-intrusive load monitoring (NILM) model is trained and load decomposition is performed. Based on the load decomposition results, the operating time, frequency, and time period distribution of each appliance are derived. Based on this information, user preferences and response potential for each load are calculated, and the user's appliance operation probability distribution and load inflexibility are obtained. The operating power of each appliance, the obtained probability distribution, and the load inflexibility are uploaded to the power supply side of the power system via a communication architecture. Step 2: Based on the two-layer optimization model, the optimal dynamic electricity price is determined on the power supply side according to the above-mentioned extracted features to achieve demand response with optimal dynamic price: the two-layer optimization model includes an upper layer and a lower layer, and the initialization electricity price and the features extracted on the demand side in step 1 are used as inputs of the two-layer optimization model; first, the lower layer formulates a demand response electrical appliance operation plan as the lower layer response plan based on the initialization electricity price with the aim of minimizing electricity costs and discomfort, and passes it to the upper layer after updating; the upper layer formulates a dynamic electricity price based on the updated lower layer response plan with the aim of maximizing profits, maximizing social welfare and minimizing carbon emissions, and passes the formulated dynamic electricity price to the lower layer; the upper and lower layers of the two-layer optimization model are continuously iterated until the preset maximum number of iterations is reached, at which time the two-layer optimization model outputs dynamic electricity price candidates; finally, the TOPSIS algorithm is used to select the optimal dynamic electricity price, and demand response based on the optimal dynamic electricity price is executed according to the selected optimal dynamic electricity price.
2. The optimal dynamic electricity price demand response method according to claim 1, characterized in that: The specific steps of step one are as follows: Step 1-1) Load decomposition based on non-intrusive load monitoring First, given a household and All electrical appliances in home m are Based on non-intrusive load monitoring and load decomposition, the rated power and time distribution of working status of each electrical appliance are obtained; for electrical appliances The state matrix S a Defined as: In formula (1), each column represents the time of day Where T represents all time periods of a day, and each row represents each day Where D represents the total number of days counted; Step 1-2) Quantify the daily distribution of appliance usage in the user's home using user preferences User preferences are expressed as: In formula (2), represents the preference of appliance a at time t. The preference vector is calculated for each appliance without resolution limitation; Steps 1-3) use load inflexibility as an indicator to quantify the load demand response potential Load inflexibility is defined as the ratio of frequency to period, and the quantification of load inflexibility and user preference are combined to represent the usage habits of appliances; Define the frequency of user using appliance a as In formula (3), π a is the total number of times that appliance a runs. The on-time of appliance a in a day is expressed as: When calculating the life cycle of an appliance, the input includes the start time e of the appliance a. a , the number of electrical appliances A m and threshold τ; first the length is A m The period vector b is initialized to a 0 vector; the upper limit of a period is set to D / 2. For each appliance a, the appliance on-time vector is divided into D / i vectors of length i, where i is a candidate period value; Let c represent the number of vectors that are enabled and define the first The cycle candidate i is the usage cycle b of appliance a a For each appliance a, repeat the above steps to determine the usage cycle b of appliance a a You can get the usage cycle of all electrical appliances; For all appliances with a usage cycle of 0, the usage cycle is set to D, and no processing is done for appliances with a usage cycle other than 0; Load inflexibility is defined as The obtained load inflexibility is normalized to 0-1.
3. The optimal dynamic electricity price demand response method according to claim 1, characterized in that: The specific steps of step 2 are as follows: Step 2-1) Developing the optimal dynamic electricity price based on each user's lower-level response plan includes: Step 2-1-1) One by N p The electricity price population consists of are randomly assigned, and the electricity demands of all users are stored in the set As the input of the upper layer of the two-layer optimization model, Obtained from the optimization results of the lower layer of the two-layer optimization model; Parameter initialization, set δ,i←0, and Profit, social welfare, and carbon emission targets are then calculated: In formulas (6) to (8), o pro o wel o emi represent profit target, social welfare target and carbon emission target respectively, y t represents the electricity price, C t (L t ) represents the cost function, L t represents the total power consumption at time t, represents the carbon emission coefficient; Step 2-1-2) Calculate the population using the NSGA-II algorithm The congestion and non-dominated sorting are obtained and In each iteration, δ←0 is assigned and NSGA-II is used to generate a new population; First, according to and From the population by binary selection Select the parent population And use simulated binary crossover and polynomial mutation to generate offspring population And meet the following conditions: In formula (9), C t (L t ) is the cost function, α t >0,β t , ρ t ≥0;y min 、y max Represent the upper and lower limits of electricity prices, R max Indicates the maximum value of the set benefit; Step 2-1-3) Get the optimization results of the lower layer After that, the upper layer updates the upper layer target according to formula (6), formula (7) and formula (8); the new population is updated as and and update the new population and After that, the population is screened by the elite selection strategy; if the super volume value of the new population or or or So quilt Replace, and set i to 0; otherwise, i←i+1; repeat steps 2-1-2) and 2-1-3); until i≥μ, where μ is the set threshold, set δ to 1, execute step 2-1-4), and the algorithm switches to SMS-EMOA; Step 2-1-4) In the SMS-EMOA algorithm, first, under the constraints of the constraint condition of formula (9), a child individual q is generated by simulating binary crossover and polynomial mutation. The lower layer formulates a response strategy based on the generated individual, and the upper layer updates the target value according to the updated response strategy. The Reduce algorithm in SMS-EMOA is executed on the union of q and q; the above steps 2-1-2) to 2-1-4) are iterated continuously until the preset maximum number of iterations is reached, thereby obtaining the optimal dynamic electricity price; Step 2-2) Formulate a lower-level response plan based on dynamic electricity pricing, including: Step 2-2-1) Get the upper level electricity price strategy offspring population The total training set of the lower-level random forest algorithm and by Calculate the threshold θ, When the multi-objective optimization algorithm is executed to optimize the electricity price strategy Calculate the corresponding optimal response plan for each electricity price vector; Step 2-2-2) Lower-level response solution set Random assignment is performed according to the following constraints: In formula (10), This is the minimum power consumption per day that is preset to ensure the quality of life. is the contract power, and is the minimum and maximum running time of a day in the past D days; and δ and i are initialized to 0; Step 2-2-3) Calculate the electricity cost and electricity discomfort target for the lower layer according to the following formula: In formulas (11) and (12), o bill and o dis They are the electricity cost and discomfort targets for the lower tier; Calculate the non-dominated sorting and congestion sum of the lower layer; set Finally, NSGA-II and SMS-EMOA are used to perform multi-objective optimization algorithms. For each generation, if δ is 0, NSGA-II is used to perform multi-objective optimization algorithms. After being selected by the competition selection algorithm, the offspring population It is generated by two-point crossover and simple mutation, and the offspring whose peak-to-valley difference is larger than the peak-to-valley difference of the parent individual that generated the offspring are deleted, and then the objective function of the lower layer is calculated and Next calculate and Finally, the new population is selected according to the elite selection algorithm. If the excess volume value or or but quilt Replace, and set i to 0, otherwise i←i+1, until i≥μ, where μ is the set threshold, set δ to 1, execute step 2-2-4), and the algorithm switches to SMS-EMOA; Step 2-2-4) From Randomly select two individuals as parents and generate a child individual H through two-point crossover and simple mutation until the peak-to-valley difference of the child is no greater than that of the parent; then calculate H and The union is the target of the new population o bill and o dis Finally, the Reduce algorithm in SMS-EMOA is used to delete the worst solution; then the TOPSIS algorithm is used to select the worst solution in the population. Select an optimal solution and pass it to the upper layer as the best response strategy; and use the population Update the total training set once Use random forest to predict the optimal response plan; Step 2-2-5) First, Randomly select θ individuals as the training data set, and then select As a sub-training data set, the set of on-off states of each appliance of each user at each moment is used as an estimate of the mapping from the dynamic electricity price space to the response plan space. Once the mapping is trained, the forest algorithm can obtain the response plan of each appliance of each user at each moment, as shown in the following formula: In formula (13), It is the predicted on / off state of appliance a of user m at time t; and the predicted individuals with confidence greater than 0.8 are added to the training data set; Step 2-3) Iterate steps 2-1) and 2-2) until the preset maximum number of iterations is reached to obtain dynamic electricity price candidates. Then, the TOPSIS algorithm is used to select the optimal dynamic electricity price, and a price-based demand response plan is implemented according to the selected optimal dynamic electricity price.
Citation Information
Patent Citations
Power distribution network voltage control method based on master-slave game
CN113783187A
Flexible manufacturing workshop demand response scheduling method based on hierarchical game
CN114118805A