Micro-grid optimization scheduling method, device, equipment, medium and product

By collecting microgrid operating status data in real time and using random forest regression model and reverse learning particle swarm optimization algorithm, real-time optimization scheduling of microgrid is achieved, solving the problem of difficult real-time scheduling and high operating costs in the existing technology, and realizing the Quick response and minimum operating cost effects.

CN119518898APending Publication Date: 2025-02-25LANZHOU JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411639702.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

Existing microgrid operation optimization technologies are difficult to achieve real-time scheduling, especially when facing multiple load types and energy types, resulting in high operating costs and difficult to respond quickly.

Method used

A microgrid optimization scheduling method is adopted to collect microgrid operating status data in real time, and the target energy storage power is evaluated using a random forest regression model, and combined with the reverse learning particle swarm optimization algorithm, the objective function is constructed to minimize power costs for scheduling.

Benefits of technology

Real-time optimization and scheduling of microgrid operations is realized, which meets the requirements of fast response and lowest operating costs, and reduces the overall power cost of microgrid operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0005138146110000021
    Figure BDA0005138146110000021
  • Figure BDA0005138146110000031
    Figure BDA0005138146110000031
  • Figure BDA0005138146110000033
    Figure BDA0005138146110000033
Patent Text Reader

Abstract

The invention discloses a micro-grid optimization scheduling method, device, equipment, medium and product, and relates to the field of micro-grid operation, the method comprises the following steps: micro-grid operation state data at the current moment is collected, and the operation state data comprises wind power, load power, photovoltaic power and external grid power; inputting the operation state data into a random forest regression model for evaluation to obtain target energy storage power at the current moment; wherein the random forest regression model is obtained by training a plurality of decision trees through historical sample data, the historical sample data comprises historical operation state data and a corresponding label, and the label is the optimal energy storage power; and performing optimization scheduling on the micro-grid according to the target energy storage power. According to the invention, the operation strategy of the micro-grid can be optimized in real time, and the requirements of quick response and lowest operation cost of the micro-grid are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of microgrid operation, and in particular to a microgrid optimization scheduling method, device, equipment, medium and product. Background Art

[0002] There are many types of loads such as commercial loads, industrial loads and residential loads, as well as various energy types in the power load data. When scheduling a microgrid, it is often necessary to regulate a large amount of data and parameters. The microgrid operation optimization technology in related technologies mostly adopts intelligent optimization algorithms, which have a large number of variables, parameters and constraints, making it difficult to achieve real-time scheduling. Summary of the invention

[0003] The purpose of this application is to provide a microgrid optimization scheduling method, device, equipment, medium and product, which can optimize the microgrid operation strategy in real time to meet the requirements of rapid response and minimum microgrid operation cost.

[0004] To achieve the above objectives, this application provides the following solutions:

[0005] In a first aspect, the present application provides a microgrid optimization scheduling method, comprising:

[0006] Collecting the current microgrid operating status data, wherein the operating status data includes wind power, load power, photovoltaic power and external grid power;

[0007] The operating status data is input into a random forest regression model for evaluation to obtain the target energy storage power at the current moment; wherein the random forest regression model is obtained by training multiple decision trees with historical sample data, and the historical sample data includes historical operating status data and corresponding labels, and the labels are optimal energy storage power;

[0008] The microgrid is optimally dispatched according to the target energy storage power.

[0009] Furthermore, before collecting the microgrid operation status data at the current moment, it also includes:

[0010] Construct the overall structure of the microgrid, load and renewable energy models, and the charging and discharging state model of the energy storage unit; wherein the energy storage unit is a plurality of batteries;

[0011] Constructing an objective function based on the overall structure of the microgrid, the load and renewable energy model, and the charging and discharging state model of the energy storage unit, wherein the objective function aims to minimize the cumulative power cost of the current regulation of the microgrid operation;

[0012] The historical wind power, historical load power, historical photovoltaic power and historical external grid power in the historical sample data are used as input, and the reverse learning particle swarm optimization algorithm is used to solve the objective function to obtain the optimal energy storage power.

[0013] Furthermore, the overall structure of the microgrid is expressed as:

[0014] P G +P W +P PV =P L +P BT ;

[0015] The constraints of the overall structure of the microgrid are: 1≤t≤N d ;

[0016] Among them, P W is wind power, P L is the load power, P BT is the energy storage power, P PV is the photovoltaic power, P G is the external grid power, t is the dispatching times, N d is the total number of dispatches;

[0017] The expressions of load and renewable energy model are:

[0018] P Δ,t =P RE,t -P L,t -P BT,t ;

[0019] Among them, P Δ,t represents the unbalanced power during the tth scheduling, P RE,t is the renewable energy power generation at the tth dispatch, which includes wind power and photovoltaic power, P L,t is the load power at the tth dispatch, P BT,t is the energy storage power at the tth dispatch;

[0020] The charging and discharging state model of the energy storage unit includes the energy process and depth of charging and discharging:

[0021] Depth of charge and discharge D OD The definition is as follows: min =(1-D OD )·S max ;

[0022] The energy process of charging and discharging is: S t =S t-1 +ΔS t-1 ;

[0023] ΔSt-1 = k·P BT,t-1 ·Δt / E N ;

[0024]

[0025]

[0026] The charging and discharging constraints of the energy storage unit are:

[0027] S min ≤S t ≤S max ;

[0028] Among them, S min is the minimum charge and discharge power, S max is the maximum charge and discharge power; S t is the battery state of charge at the tth dispatch, S t-1 is the battery state of charge at the t-1th scheduling, ΔS t-1 represents the change of battery state of charge during the t-1th scheduling, P BT,t-1 is the battery power at the t-1th scheduling, Δt is the length of a scheduling period, E N is the rated capacity of the battery, k is the battery operating efficiency, α D is the battery discharge efficiency parameter, P max,D is the maximum discharge power of energy storage, P max,C is the maximum charging power of energy storage, P BT is the energy storage power, For all, P BT <0 is the discharge state, P BT >0 is charging state, α C is the battery charging efficiency parameter, and ρ is the converter efficiency parameter.

[0029] Furthermore, the objective function is expressed as:

[0030]

[0031] Among them, M is the total number of dispatches, p b,t is the actual electricity purchase price at the tth dispatch, P Δ,b,t To purchase grid power from the external grid, p s,t is the actual electricity selling price at the tth dispatch, P Δ,s,t is the grid power sold to the external grid, when P Δ,t >0, P Δ,t =P Δ,s,t , when P Δ,t When P < 0 Δ,t =P Δ,b,t.

[0032] Furthermore, before the operating status data is input into the random forest regression model to obtain the target energy storage power at the current moment, the method further includes:

[0033] Collect historical operation status data during the operation of the microgrid; wherein the historical operation status data includes historical wind power, historical load power, historical photovoltaic power and historical external grid power; various data in the historical operation status data are unbalanced data, and the unbalanced data includes minority class data and majority class data, and the difference between the minority class data and the typical data is greater than a first preset value, and the difference between the majority class data and the typical data is less than a second preset value;

[0034] The unbalanced data is processed by using the rusboost algorithm to obtain balanced data, wherein the ratio of minority class data to majority class data in the balanced data is 1:1;

[0035] The balance data and the corresponding optimal energy storage power are used as the historical sample data.

[0036] Furthermore, the microgrid optimization scheduling method also includes: deploying the random forest regression model on an edge computing device, the edge computing device continuously collects new data to obtain a new sample data set, and uses the new sample data set to train multiple decision trees again to update the random forest regression model.

[0037] In a second aspect, the present application provides a microgrid optimization scheduling device, comprising:

[0038] A data acquisition module is used to collect the current microgrid operating status data, wherein the operating status data includes wind power, load power, photovoltaic power and external grid power;

[0039] An evaluation module, used for inputting the operating status data into a random forest regression model for evaluation to obtain the target energy storage power at the current moment; wherein the random forest regression model is obtained by training multiple decision trees with historical sample data, the historical sample data includes historical operating status data and corresponding labels, and the label is the optimal energy storage power;

[0040] The scheduling module is used to schedule the microgrid according to the target energy storage power.

[0041] In a third aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned microgrid optimization scheduling method.

[0042] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned microgrid optimization scheduling method.

[0043] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the above-mentioned microgrid optimization scheduling method when executed by a processor.

[0044] According to the specific embodiments provided in this application, this application discloses the following technical effects:

[0045] The present application provides a microgrid optimization scheduling method, device, equipment, medium and product. By real-time collection of microgrid operating status data at the current moment, a random forest regression model is used to evaluate the target energy storage power at the current moment to obtain the target energy storage power at the current moment. The random forest regression model is trained using historical operating status data and the corresponding optimal energy storage power. Therefore, the target energy storage power evaluated by the random forest regression model is the optimal energy storage power with the lowest power cost for microgrid operation. Scheduling according to the optimal energy storage power can achieve the lowest microgrid operating cost, thereby achieving real-time and optimal regulation of microgrid operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0047] Figure 1 This is an application environment diagram of a microgrid optimization scheduling method in one embodiment of the present application;

[0048] Figure 2 A schematic diagram of a flow chart of a microgrid optimization scheduling method provided in one embodiment of the present application;

[0049] Figure 3 A schematic diagram of the process of a reverse learning particle swarm optimization algorithm in one embodiment of the present application;

[0050] Figure 4 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0052] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0053] The microgrid optimization scheduling method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send the current microgrid operating status data to the server 104. After the server 104 receives the current microgrid operating status data, for the current microgrid operating status data, the server 104 inputs the current microgrid operating status data into the random forest regression model for evaluation, obtains the target energy storage power at the current moment, and optimizes the microgrid according to the target energy storage power. The server 104 can feed back the obtained operating status data to the terminal 102. In addition, in some embodiments, the microgrid optimization scheduling method can also be implemented by the server 104 or the terminal 102 alone, such as the terminal 102 can directly process the current microgrid operating status data, or the server 104 can obtain the current microgrid operating status data from the data storage system and process the current microgrid operating status data.

[0054] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or may be a cloud server.

[0055] In an exemplary embodiment, Figure 2 As shown, a microgrid optimization scheduling method is provided, which is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. In the embodiment of the present application, the method is applied to Figure 1 The server 104 in the example is used as an example to illustrate, including the following steps 201 to 203. Among them:

[0056] Step 201, collecting the microgrid operating status data at the current moment, wherein the operating status data includes wind power, load power, photovoltaic power and external grid power.

[0057] Step 202, input the operating status data into a random forest regression model for evaluation to obtain the target energy storage power at the current moment; wherein the random forest regression model is obtained by training multiple decision trees with historical sample data, and the historical sample data includes historical operating status data and corresponding labels, and the label is the optimal energy storage power.

[0058] Step 203: Optimize and dispatch the microgrid according to the target energy storage power.

[0059] By implementing the above steps 201 to 203, the microgrid operation strategy can be optimized in real time to meet the requirements of rapid response and minimum microgrid operation cost.

[0060] Before step 201, steps 21 to 23 are also included:

[0061] Step 21, constructing the overall structure of the microgrid, load and renewable energy models and the charging and discharging state model of the energy storage unit; wherein the energy storage unit is a plurality of batteries.

[0062] The overall structure of the microgrid is expressed as:

[0063] P G +P W +P PV =P L +P BT ;

[0064] The constraints of the overall structure of the microgrid are: 1≤t≤N d ;

[0065] Among them, P W is wind power, P L is the load power, P BT is the energy storage power, P PV is the photovoltaic power, P G is the external grid power, t is the dispatching times, N d is the total number of dispatches.

[0066] In this embodiment, the scheduling is performed every 30 minutes, so N d The value is 48, and can also be set according to the specific situation.

[0067] The expressions of load and renewable energy model are:

[0068] P Δ,t =P RE,T -P L,t -PBT,t ;

[0069] Among them, P Δ,t represents the unbalanced power during the tth scheduling, P RE,t is the renewable energy power generation at the tth dispatch, which includes wind power and photovoltaic power, P L,t is the load power at the tth dispatch, P BT,t is the energy storage power at the tth dispatch.

[0070] The charging and discharging state model of the energy storage unit includes the energy process and depth of charging and discharging:

[0071] Depth of charge and discharge D OD The definition is as follows: min =(1-D OD )·S max ;

[0072] The energy process of charging and discharging is: S t =S t-1 +ΔS t-1 ;

[0073] ΔS t-1 = k·P BT,t-1 ·Δt / E N ;

[0074]

[0075] The charging and discharging constraints of the energy storage unit are:

[0076] S min ≤S t ≤S max ;

[0077] Among them, S min is the minimum charge and discharge power, S max is the maximum charge and discharge power; S t is the battery state of charge at the tth scheduling, S t-1 is the battery state of charge at the t-1th scheduling, ΔS t-1 represents the change of battery state of charge during the t-1th scheduling, P BT,T-1 is the battery power at the t-1th scheduling, Δt is the length of a scheduling period, E N is the rated capacity of the battery, k is the battery operating efficiency, α D is the battery discharge efficiency parameter, P max,D is the maximum discharge power of energy storage, P max,C is the maximum charging power of energy storage, P BT is the energy storage power, P BT <0 is the discharge state, PBT >0 is charging state, α C is the battery charging efficiency parameter, and ρ is the converter efficiency parameter.

[0078] Step 22, constructing an objective function based on the overall structure of the microgrid, the load and renewable energy model, and the charging and discharging state model of the energy storage unit, wherein the objective function aims to minimize the cumulative power cost of the current regulation of the microgrid operation.

[0079] The expression of the objective function is:

[0080]

[0081] Among them, M is the total number of dispatches, p b,t is the actual electricity purchase price at the tth dispatch, P Δ,b,t To purchase grid power from the external grid, p s,t is the actual electricity selling price at the tth dispatch, P Δ,s,t is the grid power sold to the external grid, when P Δ,t >0, P Δ,t =P Δ,s,t , when P Δ,t When P < 0 Δ,t =P Δ,b,t .

[0082] Step 23, taking the historical wind power, historical load power, historical photovoltaic power and historical external grid power in the historical sample data as input, solving the objective function using the reverse learning particle swarm optimization algorithm to obtain the optimal energy storage power.

[0083] like Figure 3 As shown, the reverse learning particle swarm optimization algorithm solves the objective function to obtain the optimal energy storage power, including steps 31 to 37:

[0084] Step S31, initialization: Initialize the particle population, including particle position, velocity, and individual optimal position p best and the global optimal position g best , p best and g best is the energy storage power P BT .

[0085] Step S32, evaluation: calculate the fitness value of each particle, that is, the objective function value.

[0086] Step S33, update the individual optimal and global optimal particles:

[0087] If the fitness value of the current particle is better than p best , then update p best .

[0088] If the fitness value of the current particle is better than g best , then update g best .

[0089] Step S34, update the speed of each particle:

[0090] v(t 1 +1)=ω×v(t 1 )+c 1 × 1 ×(p best -x(t 1 ))+c 2 × 2 ×(g best -x(t 1 ));

[0091] In the formula, t 1 is the current iteration number, v(t 1 +1) is the particle at t 1 +1 iteration speed, ω is the inertia weight, v(t 1 ) is the particle at t 1 The speed of the iteration, c 1 and c 2 is the acceleration coefficient, representing the individual learning factor and the social learning factor, r 1 and r 2 is a random number in the interval [0,1], x(t 1 ) is the particle at t 1 The position of the iteration.

[0092] Step S35, update the position of each particle according to the velocity: x(t 1 +1) = x(t 1 )+v(t 1 +1)

[0093] Step S36: If the particle falls into a local optimum, that is, g best If there is no update for many consecutive generations, reverse learning is performed. A direction is randomly selected and the particle position is moved in the opposite direction for a certain distance with a certain probability.

[0094] Step S37, determine whether the stop iteration criterion is met, if not, execute steps S32 to S36, recalculate the fitness value of the particle after reverse learning, and re-update p according to the fitness value. best and g best .

[0095] If yes, the iteration is terminated and the optimal solution g is output best , that is, the optimal energy storage power.

[0096] In an exemplary embodiment, step 202 further includes steps 41 to 43:

[0097] Step 41, collecting historical operating status data during the operation of the microgrid, wherein the historical operating status data includes historical wind power, historical load power, historical photovoltaic power and historical external grid power; various data in the historical operating status data are unbalanced data, and the unbalanced data include minority class data and majority class data, and the difference between the minority class data and the typical data is greater than a first preset value, and the difference between the majority class data and the typical data is less than a second preset value.

[0098] Step 42, using the rusboost algorithm to process the unbalanced data to obtain balanced data, wherein the ratio of minority class data to majority class data in various data in the balanced data is 1:1, specifically including steps 421 to 426:

[0099] Step 421, select 70% of each data in the historical running status data as training samples to obtain a training data set D, D = {(x 1 ,y 1 ) , (x 2 ,y 2 ),…,(x m ,y m )}, where x i The feature vector of the i-th training sample, y i represents the label of the i-th training sample, for example, x 1 is the characteristic vector of historical wind power, then y 1 Specifically, the label of historical wind power is power supply, the label of historical load power is consumption, the label of historical photovoltaic power is power supply, and the label of historical external power grid power is large power grid.

[0100] Let the number of iterations be T, and assign an initial weight w to each sample t , all weights are equal initially, that is, w t =1 / m, t represents the current number of iterations.

[0101] Step S422: randomly undersample the training data D to obtain a sample subset D t ; According to the current sample weight w t , for D t The samples in are weighted sampled to obtain the weighted sample subset D' t ;

[0102] Step S423, using D' t Train a weak learner (such as a decision tree), denoted by h t, the goal of the weak learner is to minimize the weighted error. The steps are as follows:

[0103] 1) Training set D' t There are G features, and g features are randomly selected from all the features to participate in the calculation of node splitting selection.

[0104] 2) The Classification And Regression Tree (CART) algorithm is used to split nodes and generate a decision tree without pruning.

[0105] Calculate h t The error ε on D t , and according to the error ε t Determine the weak learner h of the tth iteration t , where the error ε t The calculation formula is:

[0106]

[0107] Among them, ∑ i () represents the sum of all possible values ​​of t, w t (i) is the weight of the i-th sample, I is the indicator function, when y i ≠h t (x i ) is 1, otherwise it is 0.

[0108] Step S424, according to the error ε t Update the sample weight w t :

[0109] w t+1 (i) = w t (i)·exp(α t ·I(y i ≠h t (x i )));

[0110]

[0111] Among them, w t+1 (i) is the weight of the i-th sample after update, w t (i) is the weight of the i-th sample before updating, α t is a weak learner h t The weight of I is the indicator function. i ≠h t (x i ) takes the value of 1, otherwise it takes the value of 0, and exp represents the natural exponential function;

[0112] Step S425: weight all samples w t+1 (i) Normalize so that the sum is 1, train the weak learner for t+1 iterations based on the training set with adjusted weights, and obtain the weak learner h t+1 .

[0113] When ε t The iteration is completed when the preset value is small, and T weak learners are obtained.

[0114] Step S426, combining T weak learners into a strong learner H, usually using weighted majority voting or weighted averaging:

[0115] H(x)=sign(∑ t α t ·h t (x));

[0116] Among them, H(x) is the output result, that is, the balanced data, and sign is the sign function.

[0117] Step 43: Use the balance data and the corresponding optimal energy storage power as the historical sample data.

[0118] The training process of the random forest regression model in step 202 includes steps 51 and 52:

[0119] Step 51, extract balanced data samples from the balanced data to construct multiple balanced training sets Q, and use the qth balanced training set Q q Train the qth decision tree to get the decision tree M q , q∈1,2,…,k, and finally k decision trees are obtained.

[0120] Balanced training set Q q :{(x' 1 ,y' 1 )},{(x' 2 ,y' 2 )},…,{(x j ',y j ')},…,{(x' H ,y' H )},j∈1,2,…,H, the jth balanced training sample x j 'Including historical wind power, historical load power, historical photovoltaic power and historical external grid power, the jth balance training sample x j 'The corresponding label y j ' is the optimal energy storage power.

[0121] Step 52: All decision trees M 1 ,M 2 ,…,M KThe random forest regression model is obtained by integration.

[0122] The integrated random forest regression model is deployed on the edge computing device. The edge computing device continuously collects new data to obtain a new sample data set, and uses the new sample data set to train multiple decision trees again, update the random forest regression model, and improve the generalization ability of the random forest regression model.

[0123] Based on the same inventive concept, the embodiment of the present application also provides a microgrid optimization scheduling device for implementing the microgrid optimization scheduling method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more microgrid optimization scheduling device embodiments provided below can refer to the limitations of the microgrid optimization scheduling method above, and will not be repeated here.

[0124] In an exemplary embodiment, a microgrid optimization scheduling device is provided, comprising:

[0125] The data acquisition module is used to collect the microgrid operating status data at the current moment, and the operating status data includes wind power, load power, photovoltaic power and external grid power.

[0126] An evaluation module is used to input the operating status data into a random forest regression model for evaluation to obtain the target energy storage power at the current moment; wherein the random forest regression model is obtained by training multiple decision trees with historical sample data, and the historical sample data includes historical operating status data and corresponding labels, and the labels are optimal energy storage power.

[0127] The scheduling module is used to schedule the microgrid according to the target energy storage power.

[0128] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 4As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store microgrid operating status data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a microgrid optimization scheduling method is implemented.

[0129] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0130] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0131] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0132] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0133] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0134] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0135] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0136] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0137] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A microgrid optimization scheduling method, characterized in that: The microgrid optimization scheduling method comprises: Collecting the current microgrid operating status data, wherein the operating status data includes wind power, load power, photovoltaic power and external grid power; The operating status data is input into a random forest regression model for evaluation to obtain the target energy storage power at the current moment; wherein the random forest regression model is obtained by training multiple decision trees with historical sample data, and the historical sample data includes historical operating status data and corresponding labels, and the labels are optimal energy storage power; The microgrid is optimally dispatched according to the target energy storage power.

2. The microgrid optimization scheduling method according to claim 1, characterized in that: Before collecting the current microgrid operating status data, it also includes: Construct the overall structure of the microgrid, load and renewable energy models, and the charging and discharging state model of the energy storage unit; wherein the energy storage unit is a plurality of batteries; Constructing an objective function based on the overall structure of the microgrid, the load and renewable energy model, and the charging and discharging state model of the energy storage unit, wherein the objective function aims to minimize the cumulative power cost of the current regulation of the microgrid operation; The historical wind power, historical load power, historical photovoltaic power and historical external grid power in the historical sample data are used as input, and the reverse learning particle swarm optimization algorithm is used to solve the objective function to obtain the optimal energy storage power.

3. The microgrid optimization scheduling method according to claim 2 is characterized in that: The overall structure of the microgrid is expressed as: P G +P W +P PV =P L +P BT ; The constraints of the overall structure of the microgrid are: 1≤t≤N d ; Among them, P W is wind power, P L is the load power, P BT is the energy storage power, P PV is the photovoltaic power, P G is the external grid power, t is the dispatching times, N d is the total number of dispatches; The expressions of load and renewable energy model are: P Δ,t =P RE,t -P L,t -P BT,t ; Among them, P Δ,t represents the unbalanced power during the tth scheduling, P RE,t is the renewable energy power generation at the tth dispatch, which includes wind power and photovoltaic power, P L,t is the load power at the tth dispatch, P BT,t is the energy storage power at the tth dispatch; The charging and discharging state model of the energy storage unit includes the energy process and depth of charging and discharging: Depth of charge and discharge D OD The definition is as follows: min =(1-D OD )·S max ; The energy process of charging and discharging is: S t =S t-1 +ΔS t-1 ; ΔS t-1 =k·P BT,t-1 ·Δt / E N ; The charging and discharging constraints of the energy storage unit are: S min ≤S t ≤S max ; Among them, S min is the minimum charge and discharge power, S max is the maximum charge and discharge power; S t is the battery state of charge at the tth dispatch, S t-1 is the battery state of charge at the t-1th scheduling, ΔS t-1 represents the change of battery state of charge during the t-1th scheduling, P BT,t-1 is the battery power at the t-1th scheduling, Δt is the length of a scheduling period, E N is the rated capacity of the battery, k is the battery operating efficiency, α D is the battery discharge efficiency parameter, P max,D is the maximum discharge power of energy storage, P max,C is the maximum charging power of energy storage, P BT is the energy storage power, P BT <0 is the discharge state, P BT >0 is charging state, α C is the battery charging efficiency parameter, and ρ is the converter efficiency parameter.

4. The microgrid dispatching method according to claim 3, characterized in that: The expression of the objective function is: Among them, M is the total number of dispatches, p b,t is the actual electricity purchase price at the tth dispatch, P Δ,b,t To purchase grid power from the external grid, p s,t is the actual electricity selling price at the tth dispatch, P Δ,s,t is the grid power sold to the external grid, when P Δ,t >0, P Δ,t =P Δ,s,t , when P Δ,t When P < 0 Δ,t =P Δ,b,t .

5. The microgrid optimization scheduling method according to claim 2, characterized in that: Before inputting the operating status data into the random forest regression model to obtain the target energy storage power at the current moment, the method further includes: Collect historical operation status data during the operation of the microgrid; wherein the historical operation status data includes historical wind power, historical load power, historical photovoltaic power and historical external grid power; various data in the historical operation status data are unbalanced data, and the unbalanced data includes minority class data and majority class data, and the difference between the minority class data and the typical data is greater than a first preset value, and the difference between the majority class data and the typical data is less than a second preset value; The unbalanced data is processed by using a rusboost algorithm to obtain balanced data, wherein the ratio of minority class data to majority class data in the balanced data is 1:1; The balance data and the corresponding optimal energy storage power are used as the historical sample data.

6. The microgrid optimization scheduling method according to claim 1, characterized in that: The microgrid optimization scheduling method also includes: deploying the random forest regression model on an edge computing device, the edge computing device continuously collects new data to obtain a new sample data set, and uses the new sample data set to train multiple decision trees again to update the random forest regression model.

7. A microgrid optimization dispatching device, characterized in that: The microgrid optimization dispatching device comprises: A data acquisition module is used to collect the current microgrid operating status data, wherein the operating status data includes wind power, load power, photovoltaic power and external grid power; An evaluation module, used for inputting the operating status data into a random forest regression model for evaluation to obtain the target energy storage power at the current moment; wherein the random forest regression model is obtained by training multiple decision trees with historical sample data, the historical sample data includes historical operating status data and corresponding labels, and the label is the optimal energy storage power; The scheduling module is used to schedule the microgrid according to the target energy storage power.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the microgrid optimization scheduling method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the microgrid optimization scheduling method described in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the microgrid optimization scheduling method described in any one of claims 1 to 6 is implemented.