A method for optimizing operation of public buildings
By establishing a multi-objective public building economic optimization operation model and genetic algorithm optimization solution, controlling HVAC and electric vehicle charging, the impact of uncertainty in electric vehicle charging load on public buildings and power grids is solved, and energy efficiency improvement and power grids are achieved Improved stability.
Patent Information
- Application Number
- CN202210434029.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-24
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2042-04-24
AI Technical Summary
Due to the uncertainty of electric vehicle charging load, electricity consumption demand fluctuates in public buildings, affecting the stability and economic benefits of the power grid and distribution network.
Establish a multi-objective public building economy optimization operation model, control the output flow of the HVAC system fan and the charging power of electric vehicles, and combine genetic algorithms to optimize and solve it, so as to realize indirect control of the charging of the power grid and electric vehicles, and reduce the impact of uncertainty. And improve wind power utilization rate.
Through optimized operation methods, the energy cost of public buildings is reduced, the energy utilization rate is improved, the investment cost of energy storage equipment is reduced, and the stability of the power grid and the economic benefits of public buildings are improved.
Smart Images

Figure CN114819334B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of power system energy dispatching, and in particular to a method for optimizing operation of a public building. Background Art
[0002] With the rapid development of my country's economy, the number of public buildings has increased rapidly, and the proportion of public building energy consumption in the total social energy consumption has also increased. At the same time, with the full promotion and popularization of electric vehicles, the charging load of electric vehicles will become one of the main loads of public buildings. Due to the uncertainty of electric vehicle charging time, charging requirements, charging power, etc., the electricity demand of public buildings faces greater volatility and uncertainty, affecting the economic benefits of public buildings. The simultaneous connection of a large number of electric vehicle charging loads to the grid has an impact on the grid load and distribution network scheduling. Summary of the invention
[0003] The present invention provides a method for optimizing the operation of a public building, which is helpful for energy conservation and emission reduction of the public building, improving the utilization rate of energy and stabilizing the operation of the power grid.
[0004] The present invention provides a method for optimizing operation of a public building, comprising the following steps:
[0005] Step S1: Obtain relevant data required for calculation;
[0006] Step S2: Establish a multi-objective economic optimization operation model for public buildings with the goal of minimizing the system operation cost, electric vehicle charging cost, and indoor temperature cost and maximizing the public building benefits;
[0007] Step S3: Optimize and solve the economic optimization operation model of public buildings in step S2 to determine the optimal output result.
[0008] The beneficial effects of the present invention are: utilizing the heat storage characteristics of public buildings themselves, and under the premise of meeting the temperature comfort of the public building environment, the fan output flow of the HVAC system is controlled to provide power dispatch flexibility. At the same time, by controlling the clearing market price, indirect control of the charging power of electric vehicles is achieved, reducing the impact of electric vehicle charging uncertainty on the operational stability of public buildings. At the same time, by rolling optimization of the output results, the utilization rate of wind power is improved, saving the high investment cost of energy storage equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 is a flow chart of the method of the present invention;
[0010] Figure 2 is a flow chart of the solution model of the present invention;
[0011] Figure 3It is a schematic diagram of the Order-Based Crossover (OBX) crossover method adopted in the present invention. DETAILED DESCRIPTION
[0012] like Figure 1 As shown, the present invention discloses a method for optimizing operation of a public building, comprising the following steps:
[0013] Step S1: Obtain relevant data required for calculation; relevant data include electric vehicle power supply, HVAC system fan power, electric vehicle charging incentive power, power purchase power, power sales power, actual output and expected output of wind turbines; electric vehicle charging income, public building power sales income, public building power purchase cost, electric vehicle incentive cost, public building non-electricity purchase cost; trading market clearing price; HVAC system fan output flow; indoor temperature. Relevant data also include the number of electric vehicles, rated charging power, response slope, maximum response power, battery level, battery capacity, arrival time, departure time; rated power of public building HVAC system, upper and lower limits of air supply flow, upper and lower limits of temperature, identification parameters of buildings, and optimal temperature; electric vehicle charging market clearing price, temperature deviation penalty coefficient, power purchase deviation penalty coefficient, and time-of-use electricity price.
[0014] Step S2: Establish a multi-objective economic optimization operation model for public buildings with the goal of minimizing the system's operating cost, electric vehicle charging cost, and indoor temperature cost and maximizing the public building's benefits.
[0015] In step S2, the charging income, electricity sales income, electricity purchase cost from the power grid, non-electric energy purchase cost, electricity purchase deviation penalty cost, temperature deviation penalty cost and other costs of electric vehicles are minimized, and the public building income is maximized as the optimization target. The optimization process is divided into two stages, namely the day-ahead electricity purchase stage and the real-time control stage. In the day-ahead electricity purchase stage, the maximum income is used as the objective function, and in the implementation control stage, the minimum cost is used as the objective function. The objective functions are as follows:
[0016] (I) The objective function of the day-ahead power purchase planning stage is as follows:
[0017]
[0018] In the formula, π ω is the probability of occurrence of different wind power scenarios, is the charging income of electric vehicles, is the revenue from electricity sales, is the cost of purchasing electricity from the grid, is the cost of purchasing non-electric energy, is the penalty cost for power purchase deviation, is the temperature deviation penalty cost, which is calculated as follows:
[0019] 1. Electric vehicle charging benefits
[0020] In this embodiment, the charging income of the electric vehicle is mainly composed of two parts, one is the basic charging fee of the electric vehicle, and the other is the reward cost of the electric vehicle participating in the power response regulation. The objective function is:
[0021]
[0022] Where, θ is the charging price of electric vehicles; p v,t,ω is the charging power of electric vehicle v in scenario ω at time t; is the clearing price of the electric vehicle charging transaction market under scenario ω at time t; is the reduced power of electric vehicle v under scenario ω at time t.
[0023] 2. Revenue from electricity sales
[0024] In this embodiment, when the charging power of electric vehicles, the air supply fan power of the HVAC system and the fixed power of public buildings are less than the output of wind power, the public buildings sell electricity to the grid; otherwise, the public buildings sell 0 electricity to the grid. The objective function is as follows:
[0025]
[0026] In the formula, is the price of electricity sold by public buildings to the grid at time t, is the power of the HVAC system air supply fan at time t under scenario ω; is the wind power output at time t under scenario ω; is the fixed energy consumption of public buildings at time t.
[0027] 3. Cost of purchasing electricity from the power grid
[0028] In this embodiment, when the charging power of electric vehicles, the air supply fan power of the HVAC system and the fixed power of public buildings are greater than the output of wind power, the public buildings purchase electricity from the grid; otherwise, the public buildings purchase electricity from the grid is 0. The objective function is as follows:
[0029]
[0030] In the formula, is the price of purchasing electricity from the grid at time t.
[0031] 4. Cost of purchasing non-electric energy
[0032] Purchase non-electric energy for heating and cooling. The objective function is as follows:
[0033]
[0034] In the formula, β h The price of purchasing heating energy; is the heating power of public buildings under scenario ω at time t; β c The price of purchasing cooling energy; is the cooling power of public buildings under scenario ω at time t.
[0035] 5. Penalty cost for power purchase deviation
[0036] Due to the deviation of wind power output and the uncertainty of electric vehicle charging, there is a direct deviation between the planned power purchase and the actual power purchase. The objective function is as follows:
[0037]
[0038] In the formula, γ is the penalty coefficient for power purchase deviation; is the planned electricity purchase amount at time t.
[0039] 6. Temperature deviation penalty cost
[0040] During working hours, the indoor ambient temperature of public buildings deviates from the set optimal temperature. The deviation between the actual temperature and the optimal temperature is as follows:
[0041]
[0042] In the formula, α T is the temperature deviation penalty coefficient; T t,ω is the indoor ambient temperature of the public building under the scenario ω at time t; T con is the optimum temperature set.
[0043] (II) Determine the constraints of the model for the day-ahead power purchase planning stage
[0044] 1. HVAC system status constraints for public buildings
[0045] In the HVAC system of public buildings, the indoor ambient temperature is determined by the indoor ambient temperature at the previous moment, the HVAC system input and other temperature interferences, and the expression is:
[0046]
[0047]
[0048] Where, Ω is the wind power scenario set; T c is the forecast period; x ω,t is the output vector under the scenario ω at time t; d ω,t is the temperature disturbance under the scenario ω at time t; A, B, E, D are matrices composed of building identification parameters; T ω,tis the indoor ambient temperature in the scenario ω at time t; u ω,t The input quantity of the HVAC system is the supply fan flow rate, and its upper and lower limit constraints are as follows:
[0049]
[0050] In the formula, u t and are the lower and upper limits of the HVAC system input at time t.
[0051] The upper and lower limits of the indoor ambient temperature are as follows:
[0052]
[0053] In the formula, T t and are the lower and upper temperature limits of the indoor environment at time t respectively.
[0054] 2. Electric vehicle charging power constraints
[0055] The actual charging power constraints for electric vehicles are as follows:
[0056]
[0057] Where C is the electric vehicle collection; P t,ω,v is the charging power of electric vehicle v in scenario ω at time t; P rated is the rated charging power of the electric vehicle; is the charging reduction power of electric vehicle v at time t under the scenario ω under the clearing price of the electric vehicle charging market. It is mainly constrained by the clearing price of the electric vehicle charging market. The expression is as follows:
[0058]
[0059] In the formula, k v,t The inverse of the slope of the response curve set for electric vehicle owners; is the clearing price of the electric vehicle charging market under scenario ω at time t; is the maximum charging reduction power of electric vehicle v under scenario ω at time t.
[0060] 3. Electric vehicle battery level constraints
[0061] The battery level of an electric vehicle represents the percentage of the current electric vehicle battery's rated capacity, and its constraints are as follows:
[0062]
[0063] In the formula, is the minimum battery level of the electric vehicle v at time t; is the maximum battery level of the electric vehicle v at time t; SOC t,ω, v is the battery level of electric vehicle v in scenario ω at time t, which is determined by the charge at the previous moment, and its constraints are as follows:
[0064]
[0065] In the formula, B v is the battery capacity of the electric vehicle v; Q t,ω,v is the charge amount of the electric vehicle at time t, constrained by its actual charging power, and the expression is as follows:
[0066]
[0067] And Q t,ω,v ≥0, indicating that the discharge of electric vehicles is not considered.
[0068] (III) The objective function of the real-time control stage is as follows:
[0069]
[0070] In the formula, is the cost of purchasing electricity from the grid at time t, is the cost of purchasing non-electric energy at time t, is the penalty cost for power purchase deviation at time t, is the penalty cost of temperature deviation at time t, is the charging benefit of the electric vehicle at time t, is the revenue from selling electricity to the grid at time t, πω is the probability of occurrence of different wind power scenarios, is the cost of purchasing electricity from the grid under the scenario ω within the forecast period, is the cost of purchasing non-electric energy under the scenario ω within the forecast period, is the penalty cost of power purchase deviation under scenario ω within the forecast period, is the penalty cost of temperature deviation under scenario ω within the forecast period, is the charging benefit of electric vehicles under the scenario ω within the forecast period, is the revenue from selling electricity to the grid under the scenario ω within the forecast time period.
[0071] 1. Cost of purchasing electricity from the power grid
[0072] The cost of purchasing electricity from the power grid is divided into two parts: one is the cost of purchasing electricity at the current time t, and the other is the cost of purchasing electricity for the predicted time period T p The objective function is as follows:
[0073]
[0074]
[0075] In the formula, and They are the electricity purchase price at time t and the electricity purchase price at the forecast time τ respectively; is the air supply fan power of the HVAC system at time t, is the air supply fan power in the wind power scenario ω at the forecast time τ; p v,t is the charging power of electric vehicle v at time t, is the charging power of electric vehicle v under the wind power scenario ω at the forecast time τ; is the actual output of wind power at time t, is the wind power output under the wind power scenario ω at the prediction time τ; and They are the fixed energy consumption of public buildings at time t and the fixed energy consumption of public buildings at predicted time τ respectively.
[0076] 2. Cost of purchasing non-electric energy
[0077] The objective functions of the current time and forecast time period of the non-electric energy cost are as follows:
[0078]
[0079]
[0080] In the formula, and They are the heating and cooling power of the HVAC system at time t; and are the heating and cooling powers of the HVAC system under the wind power scenario ω at the prediction time τ respectively.
[0081] 3. Penalty cost for power purchase deviation
[0082] Since there is a deviation between the power purchase amount predicted in the day-ahead power purchase stage and the actual power purchase amount in the real-time control stage, the power purchase deviation penalty cost objective function is as follows:
[0083]
[0084]
[0085] In the formula, and are the power purchase quantities of the day-ahead power purchase plan at time t and the forecast time τ, respectively.
[0086] 4. Temperature deviation penalty cost
[0087] During working hours, the indoor ambient temperature of public buildings deviates from the set optimal temperature. The deviation between the actual temperature and the optimal temperature is as follows:
[0088]
[0089]
[0090] Where, T t and are the indoor ambient temperature at time t and the predicted time τ respectively; T con The optimal indoor ambient temperature set during working hours.
[0091] 5. Benefits of charging electric vehicles
[0092] In this embodiment, the objective function of the charging of the electric vehicle is as follows:
[0093]
[0094]
[0095] In the formula, is the charging power of the electric vehicle at the predicted time τ; is the clearing price of the electric vehicle charging transaction market at the predicted time τ; is the power reduction of the electric vehicle at the predicted time τ.
[0096] 6. Revenue from selling electricity to the power grid
[0097] In this embodiment, when the charging power of electric vehicles, the air supply fan power of the HVAC system and the fixed power of public buildings are less than the output of wind power, the public buildings sell electricity to the grid; otherwise, the public buildings sell 0 electricity to the grid. The objective function is as follows:
[0098]
[0099]
[0100] In the formula, is the electricity price sold to the grid at the predicted time τ.
[0101] 4. Determine the constraints of the real-time control stage model
[0102] 1. HVAC system status constraints for public buildings
[0103] In the HVAC system of public buildings, the indoor ambient temperature is determined by the indoor ambient temperature at the previous moment, the HVAC system input and other temperature interferences, and the expression is:
[0104] xt+1 =Ax t +Bu t +Ed t
[0105]
[0106] T t =Dx t
[0107]
[0108] In the formula, A collection of wind power scenarios; is the output vector of the prediction time τ under the wind power scenario ω; is the temperature disturbance predicted at time τ in the wind power scenario ω; A, B, E, D are matrices composed of building identification parameters; is the indoor ambient temperature at time τ predicted in the wind power scenario ω; The input quantity for the HVAC system to predict the time τ under the wind power scenario ω is the air supply fan flow rate, and its upper and lower limit constraints are as follows:
[0109]
[0110]
[0111] In the formula, u τ and are the lower and upper limits of the HVAC system input at the prediction time τ, respectively.
[0112] The upper and lower limits of the indoor ambient temperature are as follows:
[0113]
[0114]
[0115] In the formula, T τ and are the lower and upper limits of the indoor environment temperature at the prediction time τ, respectively.
[0116] 2. Electric vehicle charging power constraints
[0117] The actual charging power constraints for electric vehicles are as follows:
[0118]
[0119]
[0120] In the formula, is the charging power of electric vehicle v at predicted time τ under wind power scenario ω; To predict the charging curtailment power of electric vehicle v at time τ in the wind power scenario ω under the clearing price of the electric vehicle charging market, it is mainly constrained by the clearing price of the electric vehicle charging market. The expression is as follows:
[0121]
[0122]
[0123] In the formula, k v,τ The inverse of the slope of the response curve set for the prediction time τ EV v; To predict the clearing price of electric vehicle charging market at time τ under wind power scenario ω; is the maximum charging curtailment power of the electric vehicle v at the predicted time τ under the wind power scenario ω.
[0124] 3. Electric vehicle battery level constraints
[0125] The battery level of an electric vehicle represents the percentage of the current electric vehicle battery's rated capacity, and its constraints are as follows:
[0126]
[0127]
[0128] In the formula, To predict the battery level of electric vehicle v at time τ in the wind power scenario ω, it is determined by the charge amount at the previous moment, and its constraints are as follows:
[0129]
[0130]
[0131] In the formula, is the charging amount of electric vehicle v at the predicted time τ under the wind power scenario ω, constrained by its actual charging power, and the expression is as follows:
[0132]
[0133]
[0134] And Q t,v ≥0, Indicates that the discharge of electric vehicles is not considered.
[0135] Step S3, optimizing and solving the optimization model by genetic algorithm to determine the optimal output result, specifically including the steps of:
[0136] The solution model algorithm proposed in this example is an elite genetic algorithm improved from the genetic algorithm. It improves the search efficiency by retaining excellent individuals and increasing the invasion of new foreign individuals. It is a global adaptive probabilistic search algorithm. The quasi-random Halton sequence is used to generate the initial population composed of a set of individuals (initial solutions). The individual is a chromosome composed of binary gene coding. The initial population is constructed by continuous selection, crossover and mutation, using bionic genetics to construct a new population. The parent is selected according to the individual's adaptability, and the individual with the highest fitness is retained. Through continuous iteration, the best individual in the population is constantly approaching the optimal solution.
[0137] The solution process is mainly divided into two steps: solving the day-ahead power purchase plan and solving the control decision (HVAC system output and electric vehicle charging transaction market clearing price). The flowchart of the solution using the elite genetic algorithm is shown in the attached figure. Figure 2 as shown.
[0138] The elite genetic algorithm mainly has the following steps:
[0139] Step 1: Set initial parameters
[0140] The collective data set is encoded and the initial parameters are set. The parameters set mainly include the number of individuals in the population, the probability of crossover and mutation, the termination condition, the number of elite individuals retained, the number of new individuals invading, etc. In the stage of formulating the day-ahead power purchase plan, in addition to the planned power purchase population, two populations are also included: the hourly power of the HVAC system corresponding to the 10 wind power scenarios and the clearing price of the electric vehicle charging transaction market.
[0141] Step 2: Population initialization
[0142] The present invention adopts direct binary coding, and each individual is composed of a chromosome composed of an 11-bit binary gene. The initial population is generated by using a random Halton sequence, so that the individuals in the generated population have low differences, reduced randomness, and improved uniformity. The initial population is generated in the power purchase plan stage: 100 (number of individuals in the population) * 10 (number of wind power scenarios) * 24 (control time domain) * chromosomes composed of HVAC system air supply flow, 100 (number of individuals in the population) * 24 (control time domain) * chromosomes composed of planned power purchase population and 100 (number of individuals in the population) * 10 (number of wind power scenarios) * 24 (control time domain) * chromosomes composed of electric vehicle charging transaction market clearing price.
[0143] Step 3: Calculate individual fitness value
[0144] When searching for the optimal electricity purchase plan and control decision for public buildings, the objective function F is set N The inverse of is the fitness function Z N ,Right now
[0145]
[0146] Step 4: Elite Retention
[0147] The individuals are arranged according to their fitness values, and the best individuals are directly retained as offspring in the next generation, skipping the selection operator. This step speeds up the search efficiency of the genetic algorithm.
[0148] Step 5. Select the parent
[0149] The excellent individuals are selected by the selection operator to enter the crossover mutation stage. The present invention adopts the roulette algorithm to select the fittest in the population, and the fitness values of the objective function are accumulated and normalized. Individuals are selected in a random probability manner, and the probability of an individual in the population being selected as a parent is proportional to its fitness value, which means that the higher the fitness value of the individual, the greater the probability of being a parent. The steps of the roulette algorithm are:
[0150] (1) Calculate the chromosomes in the population and The appropriate value:
[0151]
[0152] (2) Calculate the sum of fitness values of chromosomes in the population:
[0153]
[0154] (3) Calculate the selection probability of chromosomes in the population:
[0155] k p =eval(Z p ) / S p=1,2,......,P
[0156] (4) Calculate the selection probability of chromosomes in the population:
[0157]
[0158] (5) Randomly generate a probability number r in the interval [0,1]. If r < q1, select the first chromosome. and If r>q1, then select the qth chromosome so that q p-1 <r<q k Established.
[0159] Step 6, crossover update individuals. The present invention adopts the crossover method of Order-Based Crossover (OBX), and each chromosome randomly crosses and recombine with another chromosome. The parent chromosome undergoes gene recombination through the crossover operator to produce offspring, which improves the diversity and randomness of the population individuals, thereby improving the efficiency of searching for the optimal solution. A pair of chromosomes is selected as the parent through the selection operator, and genes in the parent chromosome X are randomly selected, and the selected genes are inherited to the offspring chromosomes. The gene position remains unchanged, and the remaining genes of the parent X are inherited to the offspring at the corresponding position. The gene is inherited from the parent chromosome Y to the offspring chromosome and The location of the gene vacancy, such as Figure 3 .
[0160] Step 7: Mutation update individual. The mutation operator uses random single-point mutation to change the gene value at the corresponding position. First, set the mutation probability p of the chromosome m . Generate a random probability r. When p m <r, the mth gene of the chromosome does not mutate; when p m When >r, the mth gene undergoes genetic mutation and changes the original gene code. The specific process of mutation can be described as: binary code 0 mutates to 1, and code 1 mutates to 0. Improving the algorithm's global search capability through gene mutation can prevent the problem of falling into the local optimal solution and shorten the solution time.
[0161] Step 8: Add new individuals. After crossover mutation, simulate the invasion of foreign individuals in nature, add randomly initialized individuals as offspring for iteration, which can solve the problem of local optimality.
[0162] Step 9: Determine whether the criteria are met. If so, terminate and derive the optimal day-ahead electricity purchase plan, the clearing price of the electric vehicle charging transaction market, and the HVAC system control decision; otherwise, return to step 2.
[0163] Step 10, optimal solution decoding. After the iteration is completed, the binary gene code of the optimal solution is converted into the corresponding decimal value according to the upper and lower limits of the day-ahead power purchase plan, the power consumption of electric vehicle charging, and the power consumption of the HVAC system. The steps are as follows: The value range of the 11-bit binary is 0 to 2047. According to the upper and lower limits of the variables, the optimal chromosome can be converted into a decimal to obtain the optimal solution, such as the day-ahead power purchase plan, the HVAC system control decision, and the clearing price of the electric vehicle charging trading market.
[0164] In summary, the present invention predicts the output of wind power and the charging demand of electric vehicles in the next 24 hours, and sends the 24-hour electricity purchase plan to the power grid. In the real-time stage, according to the actual output of wind power, the power of the HVAC system of public buildings and the actual charging demand of electric vehicles, the model predictive control is adopted to perform rolling optimization on the output results according to the output of wind power, the power of the HVAC system of public buildings and the charging power of electric vehicles in the next 4 hours. By adjusting the charging power of electric vehicles and the power of the HVAC system, the present invention reduces the impact of wind power uncertainty and electric vehicle charging uncertainty on the power grid and reduces the impact on the operational stability of public buildings.
[0165] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A method for optimizing the operation of a public building, characterized in that: The steps include: Step S1: Obtain relevant data required for calculation; Step S2: Establish a multi-objective economic optimization operation model for public buildings with the goal of minimizing the system operation cost, electric vehicle charging cost, and indoor temperature cost and maximizing the public building benefits; Step S3: Optimize and solve the economic optimization operation model of public buildings in step S2 to determine the optimal output result; In step S2, the charging income of electric vehicles, the income from electricity sales, the cost of purchasing electricity from the power grid, the cost of purchasing non-electric energy, the penalty cost of electricity purchase deviation, and the penalty cost of temperature deviation are selected as the minimum cost and the maximum income of public buildings as the optimization objectives, and a multi-objective public building economic optimization operation model is established; In step S2, the optimization process is divided into two stages, including the day-ahead power purchase stage and the real-time control stage. In the day-ahead power purchase stage, the maximum benefit is taken as the objective function, and in the implementation control stage, the minimum cost is taken as the objective function. The objective functions are as follows: The objective function of the day-ahead power purchase planning stage is as follows: In the formula, π ω is the probability of occurrence of different wind power scenarios, is the charging income of electric vehicles, is the revenue from electricity sales, is the cost of purchasing electricity from the grid, is the cost of purchasing non-electric energy, is the penalty cost for power purchase deviation, is the temperature deviation penalty cost; The objective function of the real-time control stage is as follows: In the formula, is the cost of purchasing electricity from the grid at time t, is the cost of purchasing non-electric energy at time t, is the penalty cost for power purchase deviation at time t, is the penalty cost of temperature deviation at time t, is the charging benefit of the electric vehicle at time t, is the revenue from selling electricity to the grid at time t, π ω is the probability of occurrence of different wind power scenarios, is the cost of purchasing electricity from the grid under the scenario ω within the forecast period, is the cost of purchasing non-electric energy under the scenario ω within the forecast period, is the penalty cost of power purchase deviation under scenario ω within the forecast period, is the penalty cost of temperature deviation under scenario ω within the forecast period, is the charging benefit of electric vehicles under the scenario ω within the forecast period, The revenue from selling electricity to the grid under the scenario ω within the forecast period; The constraints include: public building HVAC system status constraints, electric vehicle charging power constraints, and electric vehicle battery level constraints.
2. The method for optimizing operation of a public building according to claim 1, characterized in that: In step S1, the relevant data include electric vehicle power supply, HVAC system fan power, electric vehicle charging incentive power, power purchase power, power sales power, actual output and expected output of wind turbines; electric vehicle charging income, public building power sales income, public building power purchase cost, electric vehicle incentive cost, public building non-electricity purchase cost; trading market clearing price; HVAC system fan output flow; indoor temperature.
3. The method for optimizing operation of a public building according to claim 1, characterized in that: In step S3, the public building economic optimization operation model of step S2 is optimized and solved by a genetic algorithm to determine the optimal output result.
4. The method for optimizing operation of a public building according to claim 1, characterized in that: The state constraints of the HVAC system of the public building include upper and lower limit constraints of indoor temperature and input quantity constraints of the HVAC system.
5. The method for optimizing operation of a public building according to claim 1, characterized in that: In step S3, the optimization solution includes the following steps: Step 1, set initial parameters: encode the collective number set and set initial parameters, including the number of individuals in the population, crossover and mutation probabilities, termination conditions, the number of elite individuals to be retained, and the number of new individuals to invade; in the stage of formulating the day-ahead power purchase plan, in addition to the planned power purchase population, two populations are also included: the hourly power of the HVAC system corresponding to the 10 wind power scenarios and the clearing price of the electric vehicle charging trading market; Step 2, population initialization: direct binary coding is used, and each individual is composed of a chromosome consisting of an 11-bit binary gene; the initial population is generated by a random Halton sequence, so that the individuals in the generated population have low differences, reduced randomness, and improved uniformity; the initial population is generated in the power purchase plan stage: 100 (number of individuals in the population) * 10 (number of wind power scenarios) * 24 (control time domain) * chromosomes composed of HVAC system air flow, 100 (number of individuals in the population) * 24 (control time domain) * chromosomes composed of planned power purchase population and 100 (number of individuals in the population) * 10 (number of wind power scenarios) * 24 (control time domain) * chromosomes composed of electric vehicle charging transaction market clearing price; Step 3: Calculate individual fitness values: When searching for the optimal electricity purchase plan and control decision for public buildings, set the objective function F N The inverse of is the fitness function Z N ; Step 4, elite retention: Arrange according to the size of individual fitness values, and the best individuals are directly retained in the next generation of population as offspring, skipping the selection operator; Step 5, select the parent generation: select excellent individuals through the selection operator to enter the crossover mutation stage, adopt the roulette algorithm to eliminate the fittest in the population, accumulate the fitness values of the objective function obtained, and normalize them; select individuals in a random probability manner, and the probability of an individual in the population being selected as a parent generation is proportional to its fitness value, which means that the higher the fitness value of the individual, the greater the probability of being a parent generation; Step 6: Crossover update individuals: Adopt the crossover method of Order-Based Crossover, and each chromosome randomly crosses and recombine with another chromosome; the parent chromosome undergoes gene recombination through the crossover operator to produce offspring; select a pair of chromosomes as the parent through the selection operator, randomly select genes from the parent chromosome X, and pass the selected genes to the offspring chromosomes The gene position remains unchanged, and the remaining genes of the parent X are inherited to the offspring at the corresponding position. The gene is inherited from the parent chromosome Y to the offspring chromosome and The location of the gene vacancy; Step 7: Mutation update individual: The mutation operator uses random single-point mutation to change the gene value at the corresponding position. First, set the mutation probability p of the chromosome m , generates a random probability r, when p m <r, the mth gene of the chromosome does not mutate; when p m >r, the mth gene undergoes genetic mutation, changing the original gene code; the specific process of mutation can be described as: binary code 0 mutates to 1, and code 1 mutates to 0; Step 8, adding new individuals: after crossover mutation, simulate the invasion of foreign individuals in nature, add randomly initialized individuals as offspring for iteration; Step 9: Determine whether the criteria are met. If the criteria are met, terminate and derive the optimal day-ahead power purchase plan, the clearing price of the electric vehicle charging transaction market, and the HVAC system control decision; otherwise, return to step 2; Step 10, optimal decoding: After the iteration is completed, the binary genetic code of the optimal solution is converted into a corresponding decimal value according to the upper and lower limits of the day-ahead power purchase plan, the charging power consumption of the electric vehicle, and the power consumption of the HVAC system.
6. The method for optimizing operation of a public building according to claim 5, characterized in that: In step 5, the roulette algorithm includes: (1) Calculate the chromosomes in the population and The appropriate value: (2) Calculate the sum of fitness values of chromosomes in the population: (3) Calculate the selection probability of chromosomes in the population: k p =eval(Z p ) / S p=1,2,......,P (4) Calculate the selection probability of chromosomes in the population: (5) Randomly generate a probability number r in the interval [0, 1]. If r < q1, select the first chromosome. and If r>q1, then select the qth chromosome so that q p-1 <r<q k Established.
7. The method for optimizing operation of a public building according to claim 1, characterized in that: In step S2, during the day-ahead electricity purchase planning phase, the charging income of the electric vehicle is Revenue from electricity sales Cost of purchasing electricity from the grid Cost of purchasing non-electric energy Power purchase deviation penalty cost Temperature deviation penalty cost The objective function is as follows: (1) Benefits of charging electric vehicles Where, θ is the charging price of electric vehicles; p v,t,ω is the charging power of electric vehicle v in scenario ω at time t; is the clearing price of the electric vehicle charging transaction market under scenario ω at time t; is the reduced power of electric vehicle v under scenario ω at time t; (2) Revenue from electricity sales In the formula, is the price of electricity sold by public buildings to the grid at time t, is the power of the HVAC system air supply fan at time t under scenario ω; is the wind power output at time t under scenario ω; is the fixed energy consumption of public buildings at time t; (3) Cost of purchasing electricity from the power grid In the formula, is the price of purchasing electricity from the grid at time t; (4) Cost of purchasing non-electric energy In the formula, β h The price of purchasing heating energy; is the heating power of public buildings under scenario ω at time t; β c The price of purchasing cooling energy; is the cooling power of public buildings under scenario ω at time t; (5) Power purchase deviation penalty cost In the formula, γ is the penalty coefficient for power purchase deviation; is the planned power purchase amount at time t; (6) Temperature deviation penalty cost In the formula, α T is the temperature deviation penalty coefficient; T t,ω is the indoor ambient temperature of the public building under the scenario ω at time t; T con is the optimum temperature set.
8. The method for optimizing operation of a public building according to claim 1, characterized in that: In step S2, in the real-time control stage, the cost of purchasing electricity from the power grid at time t of the electric vehicle is Cost of purchasing non-electric energy at time t The penalty cost of power purchase deviation at time t Temperature deviation penalty cost at time t Charging revenue of electric vehicles at time t Revenue from selling electricity to the grid at time t The cost of purchasing electricity from the grid during the forecast period Cost of purchasing non-electric energy during the forecast period The penalty cost of power purchase deviation during the forecast period Temperature deviation penalty cost during the forecast period Charging benefits of electric vehicles during the forecast period Revenue from selling electricity to the grid during the forecast period (1) Cost of purchasing electricity from the power grid In the formula, and They are the electricity purchase price at time t and the electricity purchase price at the forecast time τ respectively; is the air supply fan power of the HVAC system at time t, is the air supply fan power in the wind power scenario ω at the forecast time τ; p v,t is the charging power of electric vehicle v at time t, is the charging power of electric vehicle v under the wind power scenario ω at the forecast time τ; is the actual output of wind power at time t, is the wind power output under the wind power scenario ω at the prediction time τ; and They are the fixed energy consumption of public buildings at time t and the fixed energy consumption of public buildings at prediction time τ; (2) Cost of purchasing non-electric energy In the formula, and They are the heating and cooling power of the HVAC system at time t; and are the heating and cooling powers of the HVAC system under the wind power scenario ω at the prediction time τ; (3) Power purchase deviation penalty cost In the formula, and are the power purchase amount of the day-ahead power purchase plan at time t and the forecast time τ respectively; (4) Temperature deviation penalty cost Where, T t and are the indoor ambient temperature at time t and the predicted time τ respectively; T con The optimum indoor ambient temperature set during working hours; (5) Electric vehicle charging benefits The objective function of charging for electric vehicles is as follows: In the formula, is the charging power of the electric vehicle at the predicted time τ; is the clearing price of the electric vehicle charging transaction market at the predicted time τ; is the power reduction of the electric vehicle at the predicted time τ; (6) Revenue from selling electricity to the power grid In the formula, is the electricity price sold to the grid at the predicted time τ.
