Electric energy optimization control method and system of building energy system, electronic equipment and medium
By acquiring energy data from building energy systems, constructing utility functions, and using reinforcement learning models to determine optimal control behavior, the problem of insufficient description of power exchange relationships in multiple building energy systems is solved, and efficient power optimization control is achieved.
Patent Information
- Application Number
- CN202510747578.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-10-31
AI Technical Summary
Existing self-learning optimization control methods are difficult to establish suitable energy management models, cannot describe the power exchange relationship between multiple building energy systems, and are difficult to train high-dimensional neural networks, leading to method failure.
By acquiring energy data from building energy systems, including real-time electricity prices, residential load, and battery energy storage, a utility function is constructed. Then, a reinforcement learning model is used to determine the optimal control behavior, avoiding the need to directly train high-dimensional neural networks and optimizing energy exchange relationships.
Accurately describing the power exchange relationship between the power grid and multiple residential areas improves the system's trainability and practicality, reduces computational complexity, and enhances energy utilization efficiency and system stability.
Smart Images

Figure CN120879697A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power optimization control technology, and in particular to a power optimization control method, system, electronic device and medium for building energy systems. Background Technology
[0002] Existing self-learning optimization control methods for building energy systems are designed for the optimization and management of electricity in a single building energy system.
[0003] However, for energy optimization problems involving multiple building energy systems, existing self-learning optimization control methods struggle to establish suitable energy management models and cannot describe the energy exchange relationships between multiple building energy systems. Furthermore, existing self-learning optimization control methods typically require training neural networks to obtain the optimal control method for the system. The high dimensionality of the states and control of multiple building energy systems makes training neural networks difficult, rendering existing methods ineffective. Summary of the Invention
[0004] This invention provides a method, system, electronic device, and medium for optimizing and controlling the electrical energy of a building energy system, in order to address the deficiencies in energy optimization of multiple building energy systems in the prior art.
[0005] This invention provides a method for optimizing and controlling the electrical energy of a building energy system, comprising the following steps: Acquire energy data corresponding to the building energy system; the energy data includes real-time electricity price, residential area load, and battery energy storage; the building energy system is a system in which energy interaction occurs between a power grid and multiple residential areas. Based on the energy data and control behavior, the optimal control behavior corresponding to the utility function is determined; the utility function is constructed based on the total amount of electricity from the power grid in the residential area and the real-time electricity price.
[0006] According to the present invention, a method for optimizing the control of electrical energy in a building energy system is provided, wherein the control behavior is obtained from a set of feasible controls; The process of determining the optimal control behavior corresponding to the utility function based on the energy data and control behavior includes: The energy data and the control behavior are input into a reinforcement learning model to obtain the optimal value of the utility function output by the evaluation neural network in the reinforcement learning model, and the optimal control behavior is determined based on the optimal value.
[0007] According to the present invention, a method for optimizing the control of electrical energy in a building energy system, wherein the optimal control behavior corresponding to the utility function is determined based on the energy data and control behavior, the method further includes: When the optimal control behavior is battery discharge behavior and the remaining battery capacity is less than or equal to the first total charge and discharge power, the charge and discharge power corresponding to the optimal control behavior is determined to be the remaining battery capacity, and the output power ratio is 0; the first total charge and discharge power is the maximum total charge and discharge power of each housing unit battery. When the optimal control behavior is battery discharge behavior and the remaining battery charge is greater than the first total charge and discharge power, the charge and discharge power corresponding to the optimal control behavior is determined to be the first total charge and discharge power, and the output energy ratio is 0.
[0008] According to the present invention, a method for optimizing and controlling the electrical energy of a building energy system, the method further includes: When the optimal control behavior is battery discharge behavior and the total first charge and discharge power is less than or equal to the total electrical energy required by the load of each house unit, the charge and discharge power corresponding to the optimal control behavior is determined to be the total first charge and discharge power, and the output power ratio is 0. When the optimal control behavior is battery discharge behavior and the total first charge and discharge power is greater than the total electrical energy required by the load of each housing unit, the charge and discharge power corresponding to the optimal control behavior is determined to be the second charge and discharge power, and the output electrical energy ratio is determined to be the third charge and discharge power. The range of the second charging and discharging power is from the total electrical energy required by the load of each housing unit to the total first charging and discharging power. The value range of the third charging and discharging power is from 0 to a preset threshold; the preset threshold is determined based on the total first charging and discharging power and the total electrical energy required by the load of each housing unit.
[0009] According to the present invention, a method for optimizing and controlling the electrical energy of a building energy system, the method further includes: When the optimal control behavior is battery charging behavior and the maximum supplied power is less than or equal to the absolute value of the second total charging and discharging power, the charging and discharging power corresponding to the optimal control behavior is determined to be the opposite value of the maximum supplied power, and the output power ratio is 0; the second total charging and discharging power is the minimum total charging and discharging power of each housing unit battery. When the optimal control behavior is battery charging behavior and the maximum supplied power is greater than the absolute value of the second total charging and discharging power, the charging and discharging power corresponding to the optimal control behavior is determined to be the second total charging and discharging power, and the output power ratio is 0.
[0010] According to the present invention, a method for optimizing and controlling the electrical energy of a building energy system, the method further includes: When the optimal control behavior is the battery idle mode, the charging and discharging power corresponding to the optimal control behavior is determined to be 0, and the output energy ratio is determined to be 0.
[0011] The present invention also provides an energy optimization control system for a building energy system, comprising the following units: The acquisition unit is used to acquire energy data corresponding to the building energy system; the energy data includes real-time electricity price, residential area load, and battery energy storage; the building energy system is a system in which energy interaction occurs between a power grid and multiple residential areas. The determining unit is used to determine the optimal control behavior corresponding to the utility function based on the energy data and control behavior; the utility function is constructed based on the total amount of electricity from the power grid in the residential area and the real-time electricity price.
[0012] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the power optimization control method for any of the building energy systems described above.
[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the power optimization control method for a building energy system as described above.
[0014] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the power optimization control method for any of the building energy systems described above.
[0015] This invention provides a method, system, electronic device, and medium for optimizing the control of building energy systems. The method acquires energy data corresponding to the building energy system, including real-time electricity prices, residential load, and battery energy storage. The building energy system is a system where energy interacts between a power grid and multiple residential areas. Based on the energy data and control behavior, the optimal control behavior corresponding to the utility function is determined. The utility function is constructed based on the total amount of electricity from the power grid in the residential areas and the real-time electricity price. On the one hand, by constructing a building energy system based on the energy interaction between the power grid and multiple residential areas, the energy exchange relationship between the power grid and multiple residential areas can be accurately described, overcoming the shortcomings of existing methods in model building. On the other hand, by optimizing the utility function to determine the optimal control behavior, the complexity of directly training high-dimensional neural networks is avoided, thereby improving the system's trainability and practicality. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating the power optimization control method for building energy systems provided by the present invention.
[0018] Figure 2 This is a schematic diagram of the building energy system provided by the present invention.
[0019] Figure 3 This is a schematic diagram of the self-learning optimization control structure provided by the present invention.
[0020] Figure 4 This is a schematic diagram of the self-learning optimization control process provided by the present invention.
[0021] Figure 5 This is a simulation diagram of the building energy system provided by the present invention.
[0022] Figure 6 This is a schematic diagram of the load of each housing unit in the residential area 1 provided by the present invention.
[0023] Figure 7 This is a schematic diagram of the load of each housing unit in the residential area 2 provided by the present invention.
[0024] Figure 8 This is a schematic diagram of the electricity price of a week provided by the present invention.
[0025] Figure 9 This is a schematic diagram of the optimal control curve for residential area 1 provided by the present invention.
[0026] Figure 10 This is a schematic diagram of the optimal control curve for residential area 2 provided by the present invention.
[0027] Figure 11 This is a schematic diagram of the structure of the power optimization control system for the building energy system provided by the present invention.
[0028] Figure 12 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0030] The terms "first," "second," etc., used in this invention are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and that the objects distinguished by "first," "second," etc., are generally of the same class.
[0031] Figure 1 This is a flowchart illustrating the power optimization control method for building energy systems provided by the present invention, as shown below. Figure 1 As shown, the method includes steps 110 and 120.
[0032] Step 110: Obtain energy data corresponding to the building energy system; the energy data includes real-time electricity price, residential area load and battery energy storage; the building energy system is a system in which energy interacts between a power grid and multiple residential areas.
[0033] Specifically, energy data corresponding to the building's energy system is acquired. This energy data includes real-time electricity prices, residential load, and battery energy storage. Real-time electricity prices refer to the unit price at which electricity is purchased from or sold to the grid within a specific time step t. Residential load refers to the load at which the first unit of electricity is loaded within a specific time step t. The electricity demand of a residential area. Battery energy storage refers to the storage of energy within a specific time step t. The electrical status of the battery storage system in a residential area.
[0034] Here, the building energy system is a system that allows energy exchange between a power grid and multiple residential areas. Figure 2 This is a schematic diagram of the building energy system provided by the present invention, such as... Figure 2 As shown, the building energy system includes one power grid (used to supply electricity to the residential energy system) and N residential areas. Residential Areas include Each housing unit comprises one energy management unit, loads (lights, television, etc.), and one battery (the models can be identical or different). For each housing unit, the battery can be charged from the grid through the energy management unit and can release electrical energy to supply the loads. The loads can use electrical energy from the grid or the battery; these relationships are described by the solid black line. For the building energy system under study, residential areas can release electrical energy to supply the needs of energy management units in other residential areas; these relationships are described by the dashed red line.
[0035] for Figure 2 The described building energy system considers residential areas For housing units The battery system model is described as follows: (1) In the formula, Indicates the battery's time The amount of electricity, measured in kWh. The charging and discharging power of the battery, measured in kW. This refers to the battery's charge and discharge efficiency. , and These represent battery discharge, charging, and idle states, respectively. The battery's charge / discharge efficiency can be expressed as... (2) In the formula, This refers to the battery's rated output power. In practice, the energy storage and charge / discharge power of a battery are constrained within certain ranges to avoid excessive charging and discharging affecting battery life. Therefore, for batteries... The following constraints need to be considered. (3) (4) In the formula, and Batteries Maximum and minimum energy storage, and For batteries Maximum and minimum charge / discharge power. For residential areas. Each housing unit All energy supplied by the grid and batteries must meet the load demand, and the load balance equation can be given as follows: (5) In the formula, Indicates the electrical energy required by the load. Electricity from the power grid. Residential area. Energy optimization problems are highly nonlinear, nonanalytic optimization control problems. To achieve dimensionality reduction of the system, we define... , , , , .definition , At this point, the battery system model can be obtained as follows: (6) in, Indicates residential area The rated output power of the batteries in each housing unit; Indicates residential area The minimum rated output power of each housing unit; Indicates residential area In the context of housing units, the minimum total battery capacity is required. Indicates residential area In the context of the best-case scenario, the minimum total battery capacity of each housing unit is determined. Indicates residential area Number of housing units in the middle; Indicates residential area The maximum total battery capacity of each housing unit; Indicates residential area In the worst-case scenario, the maximum total battery capacity of each housing unit is stored. Residential area In the worst-case scenario, the total maximum charge and discharge power of the batteries in each housing unit is considered. Residential area The total electrical energy required by each housing unit; Residential area In this context, the total amount of electricity generated comes from the power grid; express Time Residential Area Battery capacity, express Time Residential Area Battery capacity, This indicates the battery's charging and discharging power.
[0036] The battery's charge / discharge efficiency can be expressed as: (7) Based on the above analysis, the residential area can be... of Each housing unit is abstracted as one. For a residential area... The battery needs to transmit some energy to meet the needs of the residential area. The demand, among which Indicates that the residential area is available for use. A collection of residential areas from which electrical energy is transmitted. Defined from residential areas. To the residential area The ratio of output electrical energy is ,in And for ,have It is possible to obtain information about residential areas. The following load balance equations exist: (8) in, Residential area The total electrical energy required by each housing unit; Residential area In this context, the total amount of electricity generated comes from the power grid; Indicates a residential area In the middle, the charging and discharging power of the batteries in each housing unit, Indicates time From the residential area To the residential area The ratio of electrical energy output. Indicates time From the residential area To the residential area The ratio of electrical energy output. Indicates a residential area The charging and discharging power of the batteries in each housing unit is shown in the figure.
[0037] Step 120: Based on the energy data and control behavior, determine the optimal control behavior corresponding to the utility function; the utility function is constructed based on the total amount of electricity from the power grid in the residential area and the real-time electricity price.
[0038] Specifically, after obtaining energy data, the optimal control behavior corresponding to the utility function can be determined based on the energy data and control behavior. The utility function is constructed based on the total amount of electricity from the grid in the residential area and the real-time electricity price. The formula for the utility function is as follows: in, Represents the utility function. Represents energy data, Indicates real-time electricity price. Indicates control behavior. , Indicates the load of the residential area. Both refer to battery energy storage. This indicates the total amount of electricity generated by the power grid in a residential area.
[0039] The method provided in this invention acquires energy data corresponding to a building energy system. This energy data includes real-time electricity prices, residential area load, and battery energy storage. The building energy system is a system where energy interacts between a power grid and multiple residential areas. Based on the energy data and control behavior, the optimal control behavior corresponding to the utility function is determined. The utility function is constructed based on the total amount of electricity from the power grid in the residential area and the real-time electricity price. On the one hand, by constructing a building energy system based on the energy interaction between the power grid and multiple residential areas, the energy exchange relationship between the power grid and multiple residential areas can be accurately described, overcoming the shortcomings of existing methods in model building. On the other hand, by optimizing the utility function to determine the optimal control behavior, the complexity of directly training a high-dimensional neural network is avoided, thereby improving the trainability and practicality of the system.
[0040] Based on the above embodiments, the control behavior is obtained from the set of feasible controls; Step 120 includes: Step 121: Input the energy data and the control behavior into the reinforcement learning model to obtain the optimal value of the utility function output by the evaluation neural network in the reinforcement learning model, and determine the optimal control behavior based on the optimal value.
[0041] Specifically, the research objective of this invention is: for residential areas Given real-time electricity price and residential load Design the optimal control sequence and optimal output power ratio This minimizes the total electricity cost for the following residential energy needs: (9) in, This represents the total electricity cost for residential energy. Indicates the discount factor. This represents the total amount of electricity generated from the power grid in a residential area. This indicates the real-time electricity price.
[0042] Next, we will introduce a self-learning optimization control method. First, we will briefly introduce self-learning optimization control, considering the following system: (10) In the formula, For system status, For system control, t Represents the time point. The performance index function is defined as: (11) in, Represents a performance metric function. Represents the utility function, i.e. In this embodiment of the invention, Indicates total residential energy consumption (electricity cost) .
[0043] According to the Bellman optimality criterion, the optimal performance index function can be obtained by the following formula: (12) The optimal control law can be written as: (13) Figure 3 This is a schematic diagram of the self-learning optimization control structure provided by the present invention, as shown below. Figure 3 As shown, self-learning optimization control is an effective method for solving optimization problems of complex dynamic systems. The evaluation neural network and the execution neural network are used to approximate the optimal performance index function and the optimal control law, respectively. For the optimal control problem (10)-(13), self-learning optimization control trains the neural network by minimizing the following error: (14) When the error is zero, we can obtain: (15) Based on the above analysis, the evaluation neural network can be trained using the forward time method. The execution neural network can be minimized. Come and train.
[0044] In this embodiment of the invention, the control behavior is obtained from a set of feasible controls. Figure 4 This is a flowchart illustrating the self-learning optimization control provided by the present invention, as shown below. Figure 4 As shown, the system state is defined as follows: First, the feasible control set can be determined. After that, for each , with parameters The input is a neural network, and the output can be obtained from the evaluation network. The system employs control behavior... This can be achieved by minimizing the output value of the judging neural network. Note that the above process requires a well-trained judging neural network, the training process of which is shown in Algorithm 1: Algorithm 1: Evaluating Neural Network Training Algorithms initialization: Given two evaluation neural networks with the same weights Given a positive number and Iteration: 1: Data collection Among them, control behavior Random selection 2: From the Internet Obtain At this time, the network Can be trained using the Levenberg-Marquardt algorithm 3: Order 4: Repeat steps 2 and 3. Second-rate 5: Repeat steps 2-4. Second-rate 6: Return the optimal network weights Accordingly, the pseudocode for the self-learning optimization control algorithm of the building energy system is as follows: Algorithm 2: Self-learning optimization control algorithm for building energy systems initialization: for Given real-time electricity price Residential area load and battery energy storage Iteration: 1: Collect energy data Randomly select control behavior The utility function is calculated as follows: 2: Train the evaluation neural network based on Algorithm 1 3: Apply the successfully trained evaluation neural network to Figure 4 The self-learning optimization control optimization process shown in the diagram 4: In the set Select the control that minimizes the output of the evaluation neural network. 5: Return the optimal value of the utility function and determine the optimal control behavior based on the optimal value. .
[0045] It should be noted that the energy data corresponding to the building energy system is obtained in the embodiments of the present invention. The energy data includes real-time electricity price, residential area load and battery energy storage. The building energy system is a system in which energy interacts between a power grid and multiple residential areas. Thus, multiple energy management models for building energy systems are given, and a system dimensionality reduction scheme is proposed to make neural network training feasible.
[0046] The method provided in this invention enables the evaluation neural network to automatically learn and adapt to complex nonlinear relationships, thereby more accurately evaluating the utility function values under different control behaviors. This allows the system to better cope with dynamically changing energy markets and load demands. Traditional optimization methods require significant computational resources to solve complex optimization problems, while the evaluation neural network can learn the pattern of the optimal solution through the training process, thus quickly providing the optimal control behavior during actual operation, greatly reducing computational complexity.
[0047] Based on the above embodiments, step 120 further includes: When the optimal control behavior is battery discharge behavior and the remaining battery capacity is less than or equal to the first total charge and discharge power, the charge and discharge power corresponding to the optimal control behavior is determined to be the remaining battery capacity, and the output power ratio is 0; the first total charge and discharge power is the maximum total charge and discharge power of each housing unit battery. When the optimal control behavior is battery discharge behavior and the remaining battery charge is greater than the first total charge and discharge power, the charge and discharge power corresponding to the optimal control behavior is determined to be the first total charge and discharge power, and the output energy ratio is 0.
[0048] Specifically, the optimal control behavior is battery discharge behavior, and the remaining battery capacity is less than or equal to the first total charge and discharge power. In the case of ), the charging and discharging power corresponding to the optimal control behavior is determined to be the remaining power, and the output power ratio is 0.
[0049] Here, the optimal control behavior is the battery discharge behavior, that is... The remaining battery power is The first total charge / discharge power is the maximum total charge / discharge power of each housing unit battery, expressed as: .
[0050] The optimal control behavior is battery discharge behavior, and the remaining battery capacity is greater than the total first charge and discharge power. In the case of ), the charging and discharging power corresponding to the optimal control behavior is determined to be the first total charging and discharging power, and the output energy ratio is 0.
[0051] The method provided in this invention ensures that the battery operates within a safe range by precisely controlling the charging and discharging power, while maximizing the utilization of the battery's remaining capacity. This helps improve the overall energy efficiency of the system. Furthermore, when the remaining battery capacity is insufficient to support the maximum charging and discharging power, the power is set to the remaining capacity, avoiding unnecessary energy waste. This strategy ensures that the battery operates within a safe range while maximizing the utilization of the battery's remaining capacity, thereby improving the system's energy efficiency, stability, and reliability.
[0052] Based on the above embodiments, the method further includes: When the optimal control behavior is battery discharge behavior and the total first charge and discharge power is less than or equal to the total electrical energy required by the load of each house unit, the charge and discharge power corresponding to the optimal control behavior is determined to be the total first charge and discharge power, and the output power ratio is 0. When the optimal control behavior is battery discharge behavior and the total first charge and discharge power is greater than the total electrical energy required by the load of each housing unit, the charge and discharge power corresponding to the optimal control behavior is determined to be the second charge and discharge power, and the output electrical energy ratio is determined to be the third charge and discharge power. The range of the second charging and discharging power is from the total electrical energy required by the load of each housing unit to the total first charging and discharging power. The value range of the third charging and discharging power is from 0 to a preset threshold; the preset threshold is determined based on the total first charging and discharging power and the total electrical energy required by the load of each housing unit.
[0053] Specifically, the optimal control behavior is battery discharge behavior, and the total first charge and discharge power is less than or equal to the total electrical energy required by the load of each housing unit. In the case of optimal control behavior, the charging and discharging power corresponding to the first total charging and discharging power is determined. And the output power ratio is 0.
[0054] Here, the optimal control behavior is the battery discharge behavior, that is... The total first charge and discharge power is expressed as The total electrical energy required by each housing unit is expressed as follows: .
[0055] When the optimal control behavior is battery discharge, and the total first charge / discharge power is greater than the total electrical energy required by the load of each house unit, the charge / discharge power corresponding to the optimal control behavior is determined as the second charge / discharge power, and the output energy ratio is determined as the third charge / discharge power. The value range of the second charge / discharge power is from the total electrical energy required by the load of each house unit to the total first charge / discharge power, i.e., the value range of the second charge / discharge power is... .
[0056] Here, the value of the third charging and discharging power ranges from 0 to a preset threshold. The preset threshold is determined based on the total first charging and discharging power and the total electrical energy required by the load of each house unit. The formula for the preset threshold is as follows: .
[0057] Based on the above embodiments, the method further includes: When the optimal control behavior is battery charging behavior and the maximum supplied power is less than or equal to the absolute value of the second total charging and discharging power, the charging and discharging power corresponding to the optimal control behavior is determined to be the opposite value of the maximum supplied power, and the output power ratio is 0; the second total charging and discharging power is the minimum total charging and discharging power of each housing unit battery. When the optimal control behavior is battery charging behavior and the maximum supplied power is greater than the absolute value of the second total charging and discharging power, the charging and discharging power corresponding to the optimal control behavior is determined to be the second total charging and discharging power, and the output power ratio is 0.
[0058] Specifically, the optimal control behavior is battery charging behavior, and the maximum supplied power is less than or equal to the absolute value of the second total charging and discharging power. In the case of [condition], the optimal control behavior is determined to be the opposite of the maximum supplied power, and the output power ratio is 0. The second total charging and discharging power is the minimum total charging and discharging power of each housing unit battery.
[0059] Here, the optimal control behavior is the battery charging behavior, that is... The absolute value of the second total charging and discharging power is expressed as: The maximum power supply is expressed as The opposite value of the maximum available power is represented as .
[0060] The optimal control behavior is battery charging behavior, and the maximum supplied power is greater than the absolute value of the second total charging and discharging power. In the case of ), the charging and discharging power corresponding to the optimal control behavior is determined to be the second total charging and discharging power, and the output energy ratio is 0.
[0061] Based on the above embodiments, the method further includes: When the optimal control behavior is the battery idle mode, the charging and discharging power corresponding to the optimal control behavior is determined to be 0, and the output energy ratio is determined to be 0.
[0062] Specifically, when the optimal control behavior is the battery idle mode, the charging and discharging power corresponding to the optimal control behavior is determined to be 0, and the output energy ratio is determined to be 0.
[0063] Here, the optimal control behavior is the battery idle mode, i.e. Charging and discharging power The output power ratio is 0. It is 0.
[0064] In summary, firstly, regarding residential areas... ,Battery In time There are 3 modes, namely This is the battery discharge mode. This is the battery idle mode. This is the battery charging mode. The simplified process described above can be used to charge the battery. charging and discharging power The constraints are in three modes. On the other hand, for Output power ratio exist Under certain constraints, it can be divided into a suitable number of modes, for example... At this time, for residential areas ,like Or 1, i.e., battery When in idle or charging state, the output energy ratio is... , .like Then the battery In discharge state, the output energy ratio The selectable range is determined by the load balancing equation (8) and the following equation. (16) In the formula ,and Based on the above analysis, in time Feasible control set This can be confirmed. Therefore, the continuous control space of the residential area system is transformed into a discrete control space.
[0065] Table 1. System Control Behavior Relationships and Adjustment Schemes Based on the above analysis, the discrete control behavior needs to be given. and charging / discharging power The correspondence between these is established to meet the actual battery management requirements. Furthermore, the output energy ratio... Adjustments are needed based on actual electricity demand. Table 1 shows the system control behavior relationships and adjustment schemes. For residential areas... ,load Priority is higher than load When optimal control behavior Battery analysis is required. Remaining battery power .like This means the battery The electrical energy cannot meet the load. The required discharge power Should be and The minimum value. At this time, the battery... No additional electricity supply to residential areas The electricity demand, i.e. .like This means the battery The electrical energy can meet the load. The required discharge power Should be Furthermore, in Under the conditions, ;exist Under these conditions, the battery Can supply residential areas The maximum electricity demand can be met by supplying a maximum amount of electricity. ,therefore When optimal control behavior Charging and discharging power Output power ratio When optimal control behavior Charging and discharging power for and Maximum value, output power ratio .
[0066] Based on any of the above embodiments Figure 5 This is a simulation diagram of the building energy system provided by the present invention, such as... Figure 5 As shown, to evaluate the performance of the proposed solution, the present invention and related works are implemented and compared. These solutions are implemented using Matlab. Consider as follows... Figure 4 The building energy system is shown. Residential area 1 contains 5 housing units, and residential area 2 contains 6 housing units, i.e. , Residential area 1 can supply power to residential area 2. The battery parameters for each unit in residential area 1 are as follows: Therefore, the five housing units in residential area 1 can be abstracted into one housing unit, and the battery parameters of this housing unit are: The battery parameters for each housing unit in Residential Area 2 are as follows: Therefore, the six housing units in residential area 2 can be abstracted into one housing unit, and the battery parameters of this housing unit are: Figure 6 This is a schematic diagram of the load of each housing unit in residential area 1 provided by the present invention. Figure 7 This is a schematic diagram of the load of each housing unit in residential area 2 provided by the present invention, as shown below. Figure 6 and Figure 7 The figure shows the load of each housing unit in residential area 1 and residential area 2 over a week. Figure 8 This is a schematic diagram of the grid electricity price for one week provided by the present invention, with attenuation factor. .
[0067] Figure 9 This is a schematic diagram of the optimal control curve for residential area 1 provided by the present invention. Figure 10 This is a schematic diagram of the optimal control curve for residential area 2 provided by the present invention, as shown below. Figure 9 and Figure 10 As shown, in order to effectively utilize electrical energy, the proposed self-learning optimization control method is applied to the above system, and the optimal control curves for residential area 1 and residential area 2 can be obtained. Figure 9 and Figure 10 It is evident that in residential area 1, charging typically occurs from 11:00 PM to 3:00 AM, when electricity prices and load demand are relatively low, while discharging occurs from 5:00 AM to 8:00 PM, when electricity prices and load demand are relatively high. In residential area 2, charging typically occurs from 1:00 AM to 4:00 AM, when electricity prices and load demand are relatively low, while discharging occurs from 7:00 AM to 8:00 PM, when electricity prices and load demand are relatively high. Furthermore, due to... Figure 9 As shown by the green line, residential area 1 typically supplies electricity to residential area 2 when the electricity price and load of residential area 2 are higher, and the remaining electricity in residential area 2 is lower. The above experimental results verify the effectiveness of the proposed method.
[0068] The following describes the power optimization control system for the building energy system provided by the present invention. The power optimization control system for the building energy system described below can be referred to in correspondence with the power optimization control method for the building energy system described above.
[0069] Based on any of the above embodiments, the present invention provides an energy optimization and control system for a building energy system. Figure 11 This is a schematic diagram of the structure of the power optimization control system for the building energy system provided by the present invention, as shown below. Figure 11As shown, the system includes: The acquisition unit 1110 is used to acquire energy data corresponding to the building energy system; the energy data includes real-time electricity price, residential area load and battery energy storage; the building energy system is a system in which energy interaction occurs between a power grid and multiple residential areas. The determining unit 1120 is used to determine the optimal control behavior corresponding to the utility function based on the energy data and control behavior; the utility function is constructed based on the total amount of electricity from the power grid in the residential area and the real-time electricity price.
[0070] The system provided in this invention acquires energy data corresponding to a building energy system. This energy data includes real-time electricity prices, residential area load, and battery energy storage. The building energy system is a system where energy interacts between a power grid and multiple residential areas. Based on the energy data and control behavior, the optimal control behavior corresponding to the utility function is determined. The utility function is constructed based on the total amount of electricity from the power grid in the residential area and the real-time electricity price. On the one hand, by constructing a building energy system based on the energy interaction between the power grid and multiple residential areas, the energy exchange relationship between the power grid and multiple residential areas can be accurately described, overcoming the shortcomings of existing methods in model building. On the other hand, by optimizing the utility function to determine the optimal control behavior, the complexity of directly training a high-dimensional neural network is avoided, thereby improving the system's trainability and practicality.
[0071] Based on any of the above embodiments, the control behavior is obtained from a set of feasible controls; The determining unit 1120 is specifically used for: The energy data and the control behavior are input into a reinforcement learning model to obtain the optimal value of the utility function output by the evaluation neural network in the reinforcement learning model, and the optimal control behavior is determined based on the optimal value.
[0072] Based on any of the above embodiments, a first determining unit is further included, the first determining unit being specifically used for: When the optimal control behavior is battery discharge behavior and the remaining battery capacity is less than or equal to the first total charge and discharge power, the charge and discharge power corresponding to the optimal control behavior is determined to be the remaining battery capacity, and the output power ratio is 0; the first total charge and discharge power is the maximum total charge and discharge power of each housing unit battery. When the optimal control behavior is battery discharge behavior and the remaining battery charge is greater than the first total charge and discharge power, the charge and discharge power corresponding to the optimal control behavior is determined to be the first total charge and discharge power, and the output energy ratio is 0.
[0073] Based on any of the above embodiments, a second determining unit is further included, the second determining unit being specifically used for: When the optimal control behavior is battery discharge behavior and the total first charge and discharge power is less than or equal to the total electrical energy required by the load of each house unit, the charge and discharge power corresponding to the optimal control behavior is determined to be the total first charge and discharge power, and the output power ratio is 0. When the optimal control behavior is battery discharge behavior and the total first charge and discharge power is greater than the total electrical energy required by the load of each housing unit, the charge and discharge power corresponding to the optimal control behavior is determined to be the second charge and discharge power, and the output electrical energy ratio is determined to be the third charge and discharge power. The range of the second charging and discharging power is from the total electrical energy required by the load of each housing unit to the total first charging and discharging power. The value range of the third charging and discharging power is from 0 to a preset threshold; the preset threshold is determined based on the total first charging and discharging power and the total electrical energy required by the load of each housing unit.
[0074] Based on any of the above embodiments, a third determining unit is further included, wherein the third determining unit is specifically used for: When the optimal control behavior is battery charging behavior and the maximum supplied power is less than or equal to the absolute value of the second total charging and discharging power, the charging and discharging power corresponding to the optimal control behavior is determined to be the opposite value of the maximum supplied power, and the output power ratio is 0; the second total charging and discharging power is the minimum total charging and discharging power of each housing unit battery. When the optimal control behavior is battery charging behavior and the maximum supplied power is greater than the absolute value of the second total charging and discharging power, the charging and discharging power corresponding to the optimal control behavior is determined to be the second total charging and discharging power, and the output power ratio is 0.
[0075] Based on any of the above embodiments, a fourth determining unit is further included, wherein the fourth determining unit is specifically used for: When the optimal control behavior is the battery idle mode, the charging and discharging power corresponding to the optimal control behavior is determined to be 0, and the output energy ratio is determined to be 0.
[0076] Figure 12 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 12As shown, the electronic device may include a processor 1210, a communications interface 1220, a memory 1230, and a communication bus 1240, wherein the processor 1210, communications interface 1220, and memory 1230 communicate with each other via the communication bus 1240. The processor 1210 can call logical instructions in the memory 1230 to execute a power optimization control method for a building energy system. This method includes: acquiring energy data corresponding to the building energy system; the energy data includes real-time electricity prices, residential area load, and battery energy storage; the building energy system is a system where a power grid and multiple residential areas interact with each other; and determining the optimal control behavior corresponding to a utility function based on the energy data and control behavior; the utility function is constructed based on the total amount of electricity from the power grid in the residential area and the real-time electricity price.
[0077] Furthermore, the logical instructions in the aforementioned memory 1230 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0078] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the power optimization control method for a building energy system provided by the above methods. The method includes: acquiring energy data corresponding to the building energy system; the energy data includes real-time electricity price, residential area load, and battery energy storage; the building energy system is a system in which a power grid and multiple residential areas interact with each other; determining the optimal control behavior corresponding to the utility function based on the energy data and control behavior; the utility function is constructed based on the total amount of electricity from the power grid in the residential area and the real-time electricity price.
[0079] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements an energy optimization control method for a building energy system provided by the methods described above. This method includes: acquiring energy data corresponding to the building energy system; the energy data including real-time electricity price, residential load, and battery energy storage; the building energy system being a system of energy interaction between a power grid and multiple residential areas; determining the optimal control behavior corresponding to a utility function based on the energy data and control behavior; the utility function being constructed based on the total amount of electricity from the power grid in the residential area and the real-time electricity price.
[0080] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0081] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for optimizing and controlling the electrical energy of a building energy system, characterized in that, include: Acquire energy data corresponding to the building energy system; the energy data includes real-time electricity price, residential area load, and battery energy storage. The building energy system is a system that allows energy exchange between a power grid and multiple residential areas; Based on the energy data and control behavior, determine the optimal control behavior corresponding to the utility function; The utility function is constructed based on the total amount of electricity from the grid in the residential area and the real-time electricity price.
2. The method for optimizing and controlling the electrical energy of a building energy system according to claim 1, characterized in that, The control behavior is obtained from the set of feasible controls; The process of determining the optimal control behavior corresponding to the utility function based on the energy data and control behavior includes: The energy data and the control behavior are input into a reinforcement learning model to obtain the optimal value of the utility function output by the evaluation neural network in the reinforcement learning model, and the optimal control behavior is determined based on the optimal value.
3. The method for optimizing and controlling the electrical energy of a building energy system according to claim 1, characterized in that, The step of determining the optimal control behavior corresponding to the utility function based on the energy data and control behavior further includes: When the optimal control behavior is battery discharge behavior and the remaining battery capacity is less than or equal to the first total charge and discharge power, the charge and discharge power corresponding to the optimal control behavior is determined to be the remaining battery capacity, and the output power ratio is 0; the first total charge and discharge power is the maximum total charge and discharge power of each housing unit battery. When the optimal control behavior is battery discharge behavior and the remaining battery charge is greater than the first total charge and discharge power, the charge and discharge power corresponding to the optimal control behavior is determined to be the first total charge and discharge power, and the output energy ratio is 0.
4. The method for optimizing and controlling the electrical energy of a building energy system according to claim 3, characterized in that, The method further includes: When the optimal control behavior is battery discharge behavior and the total first charge and discharge power is less than or equal to the total electrical energy required by the load of each house unit, the charge and discharge power corresponding to the optimal control behavior is determined to be the total first charge and discharge power, and the output power ratio is 0. When the optimal control behavior is battery discharge behavior and the total first charge and discharge power is greater than the total electrical energy required by the load of each housing unit, the charge and discharge power corresponding to the optimal control behavior is determined to be the second charge and discharge power, and the output electrical energy ratio is determined to be the third charge and discharge power. The range of the second charging and discharging power is from the total electrical energy required by the load of each housing unit to the total first charging and discharging power. The value range of the third charging and discharging power is from 0 to a preset threshold; the preset threshold is determined based on the total first charging and discharging power and the total electrical energy required by the load of each housing unit.
5. The method for optimizing and controlling the electrical energy of a building energy system according to claim 4, characterized in that, The method further includes: When the optimal control behavior is battery charging behavior and the maximum supplied power is less than or equal to the absolute value of the second total charging and discharging power, the charging and discharging power corresponding to the optimal control behavior is determined to be the opposite value of the maximum supplied power, and the output power ratio is 0; the second total charging and discharging power is the minimum total charging and discharging power of each housing unit battery. When the optimal control behavior is battery charging behavior and the maximum supplied power is greater than the absolute value of the second total charging and discharging power, the charging and discharging power corresponding to the optimal control behavior is determined to be the second total charging and discharging power, and the output power ratio is 0.
6. The method for optimizing and controlling the electrical energy of a building energy system according to claim 5, characterized in that, The method further includes: When the optimal control behavior is the battery idle mode, the charging and discharging power corresponding to the optimal control behavior is determined to be 0, and the output energy ratio is determined to be 0.
7. A power optimization control system for a building energy system, characterized in that, include: The acquisition unit is used to acquire energy data corresponding to the building energy system; the energy data includes real-time electricity price, residential area load, and battery energy storage. The building energy system is a system that allows energy exchange between a power grid and multiple residential areas; The determining unit is used to determine the optimal control behavior corresponding to the utility function based on the energy data and control behavior. The utility function is constructed based on the total amount of electricity from the grid in the residential area and the real-time electricity price.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the power optimization control method for the building energy system as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the power optimization control method for the building energy system as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the power optimization control method for the building energy system as described in any one of claims 1 to 6.