Charging pile power consumption scheduling method, system and equipment based on micro-grid and medium

By collecting data in the microgrid and optimizing the power scheduling of charging piles using deep reinforcement learning algorithms, the problems of load fluctuations and power supply uncertainty during peak periods of microgrids are solved, and stability and economy are improved.

CN120525232APending Publication Date: 2025-08-22SHANDONG ARTAPLAY INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510516985.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-08-22

AI Technical Summary

Technical Problem

The load fluctuations in the microgrid during peak hours lead to voltage instability, and the uncertainty of power supply capacity depends on weather conditions increases the cost of purchasing power on the main network, weakening the economic advantages.

Method used

By collecting state data, using deep reinforcement learning algorithms to predict load demand and green energy power generation power, optimize charging pile power regulation, energy storage control and main network switching, the goal is to minimize the main grid electricity price, and generate billing data to regulate the charging pile load.

Benefits of technology

The stability of the microgrid and the operating cost reduction have been achieved. The load changes are promptly responded to prediction data, the charging pile power is reasonably dispatched, and the charging charging standards are optimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120525232A_ABST
    Figure CN120525232A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and particularly provides a micro-grid-based charging pile power consumption scheduling method, system and device and a medium, and the method comprises the steps: defining state data, a load demand and green energy generation power as a state space, and defining an action space comprising a charging pile power adjustment instruction, energy storage charging and discharging control, and a main network change-over switch; the optimal charging power of the charging pile is solved based on the state space and the action space by using a reinforcement learning algorithm with the purpose of minimizing the electricity price of the main network as the target; and sending the optimal charging power to the user side, and generating billing data based on a difference value between the charging power selected by the user and the optimal charging power. According to the method, the power generation condition and the power consumption condition are comprehensively considered through the deep reinforcement learning model, reasonable dispatching of main network switching, the energy storage system and the charging pile power is achieved, the corresponding charging charging standard is further generated based on the charging pile power to regulate and control the charging pile load, the stability of the micro-grid is improved, and the operation cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of data processing technology, and in particular relates to a method, system, device and medium for scheduling power consumption of charging piles based on a microgrid. Background Art

[0002] To effectively reduce operating costs, public charging stations generally integrate renewable energy generation equipment (such as photovoltaic panels and wind turbines) and energy storage systems (such as lithium-ion batteries) to create microgrid systems, achieving energy self-sufficiency and flexible allocation. However, in practice, this model faces two challenges. First, to improve user experience, most charging stations default to maximum charging power. This can maintain a stable balance during low-demand periods. However, during peak hours (such as holidays and evenings in commercial areas), a large number of charging stations operating simultaneously at maximum power can instantly increase the load on the microgrid, leading to voltage fluctuations and even equipment overload, threatening system stability. Furthermore, microgrids rely on weather conditions and energy storage reserves, making their power supply uncertain. If renewable energy generation is insufficient or energy storage is depleted, charging stations must urgently switch to the main grid to ensure continuous charging service. This temporary switch not only increases the cost of purchasing electricity from the main grid but can also further increase operating expenses due to peak and valley electricity prices, undermining the economic advantages of microgrids. Summary of the Invention

[0003] In view of the above-mentioned deficiencies in the prior art, the present invention provides a method, system, device and medium for scheduling power consumption of charging piles based on a microgrid to solve the above-mentioned technical problems.

[0004] In a first aspect, the present invention provides a method for scheduling charging pile electricity consumption based on a microgrid, comprising: Collect status data, including the real-time load of the charging pile, the charge state of the energy storage system, the power generation power of the new energy power generation equipment, the main grid electricity price and weather forecast data; Predict load demand based on the real-time load of charging piles, and predict green energy power generation based on weather forecast data and the power generation of new energy power generation equipment; The state data, load demand, and green energy generation power are defined as a state space, and the action space is defined to include charging pile power adjustment instructions, energy storage charge and discharge control, and main grid switching; With the goal of minimizing the main grid electricity price, a reinforcement learning algorithm is used to solve the optimal charging power of the charging pile based on the state space and the action space; The optimal charging power is sent to the user end, and billing data is generated based on the difference between the charging power selected by the user and the optimal charging power.

[0005] In an optional embodiment, predicting green energy power generation based on weather forecast data and power generation of new energy power generation equipment includes: The weather forecast data for the next hour and the power generation power of the new energy power generation equipment in the past 24 hours are input into a pre-trained prediction model, wherein the pre-trained prediction model includes an ARIMA sub-model and a Transformer; and the green energy power generation power generated by the pre-trained prediction model is obtained.

[0006] In an optional embodiment, the state data, load demand, and green energy generation power are defined as a state space, and the action space is defined to include charging pile power adjustment instructions, energy storage charge and discharge control, and main grid switching, including: State Space :

[0007] in, is the load power at the current moment, is the state of charge of the energy storage system, is the power generation capacity of new energy power generation equipment, The main grid electricity price, For weather forecast data, For the predicted load demand, is the predicted green energy power generation capacity; Action Space :

[0008] in, is the charging pile power adjustment value; is the energy storage charging and discharging power; Toggle the switch for the main network. 0 means disconnect, 1 means connect.

[0009] In an optional embodiment, with the goal of minimizing the main grid electricity price, a reinforcement learning algorithm is used to solve the optimal charging power of the charging pile based on the state space and the action space, including: The objective function is:

[0010] is the main grid electricity price during period t, is the amount of electricity purchased from the main grid during period t, is the constraint violation penalty coefficient; Setting constraints, including charging pile load constraints, energy storage system constraints, green power supply constraints, and power balance constraints; Setting up the reward function for a deep reinforcement learning model :

[0011] Train a deep reinforcement learning model to determine the optimal action value in the action space based on the state space, objective function, constraints, and reward function.

[0012] In an optional embodiment, setting the constraint condition includes: Charging pile load constraints:

[0013] in, is the load demand of the i-th charging pile, N is the number of charging piles, is the minimum power of a single charging pile, The maximum power of a single charging pile; Energy storage system constraints:

[0014]

[0015] in, is the charge and discharge power, is the maximum discharge power, is the maximum charging power, is the minimum state of charge, is the maximum state of charge; Green electricity supply constraints:

[0016] in, is the predicted maximum power generation; Power balance constraints:

[0017] The total load power of the charging pile must be equal to the sum of green power output, energy storage output and main grid purchased power.

[0018] In an optional embodiment, training a deep reinforcement learning model to determine the optimal action value in the action space based on the state space, objective function, constraints, and reward function includes: Inputting the current state space into a deep reinforcement learning model, the deep reinforcement learning model comprising a policy network and a value network, wherein the policy network generates an action based on the current state space and constraints, and the value network generates an action value based on the current state space and the reward value of the action; the value network updates the parameters of the policy network using gradient ascent based on the action value until the action value regenerated by the updated policy network is maximized; Output the action corresponding to the maximized action value as the optimal action value; The optimal charging pile power adjustment amount in the optimal action value is added to the current charging pile power to obtain the optimal total charging power.

[0019] In an optional embodiment, the optimal charging power is sent to the user terminal, and billing data is generated based on the difference between the charging power selected by the user and the optimal charging power, including: Calculate the optimal charging power for each charging pile based on the optimal total charging power and the number of charging piles in the charging state; Set multiple charging power levels and set the corresponding billing standard for each charging power level based on the difference between each charging power level and the optimal charging power; Sending the plurality of charging power levels and corresponding charging standards to the user terminal, and receiving the charging power level selected by the user terminal; Adjust the charging power of the corresponding charging pile to the charging power level selected by the user, and install the corresponding billing standard and charging time to generate billing data.

[0020] In a second aspect, the present invention provides a charging pile power dispatching system based on a microgrid, comprising: An acquisition module is used to collect status data, including the real-time load of the charging pile, the charge state of the energy storage system, the power generation power of the new energy power generation equipment, the main grid electricity price and weather forecast data; The prediction module is used to predict the load demand based on the real-time load of the charging pile and the green energy power generation based on weather forecast data and the power generation of new energy power generation equipment; A definition module is used to define the state data, load demand and green energy generation power as a state space, and define an action space including charging pile power adjustment instructions, energy storage charge and discharge control, and main grid switching; A solution module, configured to solve the optimal charging power of the charging pile based on the state space and the action space using a reinforcement learning algorithm with the goal of minimizing the main grid electricity price; The scheduling module is used to send the optimal charging power to the user end and generate billing data based on the difference between the charging power selected by the user and the optimal charging power.

[0021] According to a third aspect, a device is provided, comprising: A memory, used to store a microgrid-based charging pile power scheduling program; The processor is configured to implement the steps of the microgrid-based charging pile power scheduling method provided in the first aspect when executing the microgrid-based charging pile power scheduling program.

[0022] In a fourth aspect, a computer-readable medium is provided, on which a microgrid-based charging pile power scheduling program is stored. When the microgrid-based charging pile power scheduling program is executed by a processor, the steps of the microgrid-based charging pile power scheduling method provided in the first aspect are implemented.

[0023] The beneficial effects of the present invention are that the method, system, equipment and medium for scheduling charging piles based on microgrids provided by the present invention predict the power generation and power demand of the microgrid, introduce the predicted data when performing scheduling using a deep reinforcement learning model, and achieve timely response to future scenarios. The deep reinforcement learning model comprehensively considers the power generation and power consumption conditions, solves the optimal charging power with the goal of minimizing costs, and realizes reasonable scheduling of main grid switching, energy storage systems and charging pile power. It further generates corresponding charging charging standards based on the charging pile power to regulate the charging pile load, further improving the stability of the microgrid and reducing operating costs.

[0024] In addition, the present invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0026] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.

[0027] Figure 2 FIG. 4 is a schematic block diagram of a system according to an embodiment of the present invention.

[0028] Figure 3 A schematic structural diagram of a device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0031] The key terms appearing in the present invention are explained below.

[0032] DDPG (Deep Deterministic Policy Gradient) is a deep reinforcement learning algorithm that combines the Actor-Critic structure with deep neural networks and is specifically designed to solve reinforcement learning problems in continuous action spaces. The algorithm principles include: ‌Actor-Critic Architecture‌: Policy network (‌Actor network‌): Responsible for generating actions based on the current state. It is a deterministic policy network that directly outputs a continuous action value.

[0033] Value Network (Critic Network): Responsible for evaluating the quality of the selected action, that is, calculating the value or expected return of the action and outputting a Q value.

[0034] ‌Replay Buffer‌: Stores information such as the state, action, reward, next state, etc. during the interaction between the agent and the environment.

[0035] During training, a batch of experiences is randomly sampled from the experience pool to update the network, breaking the data correlation, improving data utilization, and making training more stable.

[0036] Target Networks Target networks are set up for both actors and critics, and their parameters are slowly updated from the corresponding main networks.

[0037] Using the target network when calculating target values, etc., makes the training process more stable, avoids excessive fluctuations in value estimates, and helps convergence.

[0038] The microgrid-based charging pile power scheduling method provided in the embodiment of the present invention is executed by a computer device. Accordingly, the microgrid-based charging pile power scheduling system runs in the computer device.

[0039] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention. Figure 1 The execution entity can be a microgrid-based charging pile power dispatching system. According to different needs, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0040] like Figure 1 As shown, the method includes: S1. Collect status data, including the real-time load of the charging pile, the charge state of the energy storage system, the power generation power of the new energy power generation equipment, the main grid electricity price and weather forecast data; S2. Forecast load demand based on the real-time load of the charging piles, and forecast green energy power generation based on weather forecast data and the power generation of new energy power generation equipment; S3 defines the state data, load demand and green energy power generation power as a state space, and defines the action space including charging pile power adjustment instructions, energy storage charge and discharge control, and main grid switching; S4. With the goal of minimizing the main grid electricity price, using a reinforcement learning algorithm to solve the optimal charging power of the charging pile based on the state space and the action space; S5. Send the optimal charging power to the user end, and generate billing data based on the difference between the charging power selected by the user and the optimal charging power.

[0041] In an embodiment of the present invention, based on step S1, a possible embodiment will be given below to illustrate its specific implementation scheme in a non-limiting manner.

[0042] Real-time load collection of charging piles: High-precision current transformers and voltage sensors are installed in the power conversion circuit within the charging pile. The current transformer accurately measures the current during charging, while the voltage sensor monitors the output voltage in real time. By multiplying the data collected by these two sensors, the real-time power of the charging pile is obtained, which is then converted into the real-time load. For example, if the rated power of the charging pile is 100kW and the current measured power is 60kW, the real-time load is 60%.

[0043] For data transmission, the RS-485 communication interface transmits data collected by the sensors to the local controller of the charging station. RS-485 has strong anti-interference capabilities and long transmission distances, making it suitable for use in industrial environments like charging stations. After preliminary data processing and packaging, the local controller uploads real-time load data to the data center via an Ethernet interface or 4G communication module.

[0044] Energy storage system charge status collection: The state of charge (SOC) of energy storage systems is measured using the ampere-hour integration method combined with the open-circuit voltage method. The ampere-hour integration method estimates the remaining battery charge by integrating the battery's charge and discharge currents, but this method is subject to cumulative errors. Therefore, the open-circuit voltage method is combined with the open-circuit voltage method. The SOC value obtained by the ampere-hour integration method is calibrated based on a pre-established table of open-circuit voltage and SOC.

[0045] The corresponding measurement circuits and algorithms are integrated into the energy storage system's battery management system (BMS). The BMS communicates with the energy storage system's individual battery modules via the CAN (Controller Area Network) bus, acquiring data such as each module's voltage, current, and temperature. The BMS then transmits the calculated SOC data to the data center via Ethernet or wireless communication modules.

[0046] Power generation collection of new energy power generation equipment: For photovoltaic power generation equipment, a power sensor is installed at the output of the PV array to measure the DC power output of the PV array in real time. For wind power generation equipment, the wind turbine's speed and torque are measured and the power generated is calculated using the power calculation formula P = T × ω (where P is power, T is torque, and ω is angular velocity).

[0047] Renewable energy generation equipment is typically equipped with a Supervisory Control and Data Acquisition (SCADA) system. Data collected by power sensors is transmitted to the SCADA system, which processes, stores, and analyzes the data. The generated power data from the renewable energy generation equipment is then transmitted to a data center via a dedicated communication network, such as fiber optic or wireless communications.

[0048] Main grid electricity price collection: Establish a data interface with the electricity supplier's billing system. This typically uses a standard electricity market data exchange protocol, such as the Common Information Model (CIM) in the IEC 61970 standard, for data exchange. This interface allows for real-time access to electricity price information for different periods of time on the main grid.

[0049] After the data is acquired, it is encrypted and securely authenticated, and then transmitted to the data center via a dedicated network or virtual private network (VPN) to ensure the accuracy and security of the electricity price data.

[0050] Weather forecast data collection: Web crawlers are used to obtain weather forecast data from professional meteorological websites or APIs provided by weather data providers. Web crawlers extract the required weather information, such as temperature, humidity, wind speed, and sunshine duration, from web pages according to predetermined rules and frequencies. For APIs, HTTP requests are sent to the specified URL and the returned data is parsed according to the format specified by the API.

[0051] The collected data is cleaned and pre-processed locally to remove invalid or erroneous data. It is then transmitted to the data center via the network and stored in the corresponding database table for subsequent use.

[0052] In an embodiment of the present invention, based on step S2, a possible embodiment will be given below to illustrate its specific implementation scheme in a non-limiting manner.

[0053] The weather forecast data for the next hour and the power generation power of the new energy power generation equipment in the past 24 hours are input into a pre-trained prediction model, wherein the pre-trained prediction model includes an ARIMA sub-model and a Transformer; and the green energy power generation power generated by the pre-trained prediction model is obtained.

[0054] In a specific example, the following steps are included: S201.Data processing flow 1. Data Source Historical data: Renewable energy power generation (photovoltaic / wind power): past 24 hours, with a time resolution of 15 minutes.

[0055] Weather data: historical irradiance (W / m²), temperature (°C), wind speed (m / s), cloud cover (%).

[0056] Forecast data: Weather forecast for the next hour (15-minute temporal resolution), sourced from the Meteorological Bureau API or the WRF model.

[0057] 2. Data cleaning and preprocessing Missing value handling: Missing power generation: fill in with linear interpolation.

[0058] Missing weather data: Fill in the gaps based on data from neighboring weather stations, or use KNN interpolation.

[0059] Outlier handling: Negative or over-limit power generation: Set to the previous moment value or threshold cutoff.

[0060] Weather data anomalies: Filter according to physical laws (e.g. irradiance is 0 at night).

[0061] 3. Feature Engineering Time features: extract hours, whether it is a weekday, and holiday flags.

[0062] Weather characteristics: Irradiance lag term (past 3 time points).

[0063] The interaction term (product) between temperature and irradiance.

[0064] Target variable: current power generation (for supervised learning).

[0065] S202. Model Architecture and Fusion Strategy 1. ARIMA sub-model (capturing linear trends) The ARIMA (p, d, q) model transforms non-stationary series into stationary series through differencing (d-order) and uses autoregression (p-order) and moving average (q-order) for modeling.

[0066]

[0067]

[0068] During the training process, the input is: the power generation sequence of the past 24 hours (96 time points); the output is: the baseline prediction of the power generation in the next hour (linear component).

[0069] 2. Transformer model (capturing nonlinearity and long-term dependencies) The complex relationship between weather and power generation is captured through the self-attention mechanism to process multivariate time series.

[0070] Input: Historical power generation + future weather forecast (embedded as a vector sequence).

[0071] Encoder-Decoder Structure: Encoder: Extract historical sequence features.

[0072] Decoder: Generates 1-hour-future forecasts.

[0073] 3. Model Fusion Method Weighted average method:

[0074] The weight w is determined by grid search on the validation set (e.g. w = 0.3).

[0075] Residual learning method: Use ARIMA to predict the baseline value and Transformer to predict the residual (actual value - ARIMA predicted value).

[0076] Final prediction: ARIMA output + Transformer residual prediction.

[0077] In an embodiment of the present invention, based on step S3, a possible embodiment will be given below to illustrate its specific implementation scheme in a non-limiting manner.

[0078] State Space :

[0079] in, is the load power at the current moment, is the state of charge of the energy storage system, is the power generation capacity of new energy power generation equipment, The main grid electricity price, For weather forecast data, For the predicted load demand, is the predicted green energy power generation capacity; Action Space :

[0080] in, is the charging pile power adjustment value; is the energy storage charging and discharging power; Toggle the switch for the main network. 0 means disconnect, 1 means connect.

[0081] In an embodiment of the present invention, based on step S4, a possible embodiment will be given below to illustrate its specific implementation scheme in a non-limiting manner.

[0082] The objective function is:

[0083] is the main grid electricity price during period t, is the amount of electricity purchased from the main grid during period t, is the constraint violation penalty coefficient; Set up constraints: Charging pile load constraints:

[0084] in, is the load demand of the i-th charging pile, N is the number of charging piles, is the minimum power of a single charging pile, The maximum power of a single charging pile; Energy storage system constraints:

[0085]

[0086] in, is the charge and discharge power, is the maximum discharge power, is the maximum charging power, is the minimum state of charge, is the maximum state of charge; Green electricity supply constraints:

[0087] in, is the predicted maximum power generation; Power balance constraints:

[0088] The total load power of the charging pile must be equal to the sum of green power output, energy storage output and main grid purchased power.

[0089] Setting up the reward function for a deep reinforcement learning model :

[0090] Train a deep reinforcement learning model to determine the optimal action value in the action space based on the state space, objective function, constraints, and reward function: Inputting the current state space into a deep reinforcement learning model, the deep reinforcement learning model comprising a policy network and a value network, wherein the policy network generates an action based on the current state space and constraints, and the value network generates an action value based on the current state space and the reward value of the action; the value network updates the parameters of the policy network using gradient ascent based on the action value until the action value regenerated by the updated policy network is maximized; Output the action corresponding to the maximized action value as the optimal action value; The optimal charging pile power adjustment amount in the optimal action value is added to the current charging pile power to obtain the optimal total charging power.

[0091] Specifically, during the model training phase: 1.1 Model Initialization Initialize the deep reinforcement learning model, including the policy network and the value network. The policy network is used to generate actions based on the current state and constraints, and the value network is used to evaluate the value of actions.

[0092] Randomly initialize the parameters of the policy network and value network.

[0093] 1.2 State input and action generation: Select a state space sample at the current moment from the training set and input it into the policy network.

[0094] The policy network generates an action based on the input state space and predefined constraints. For example, when generating a charging pile power adjustment instruction, it is necessary to ensure that the adjustment amount is within the allowable range.

[0095] 1.3 Action value calculation: The current state space and the generated action are input into the value network.

[0096] The value network calculates the value of an action based on the input state and action, combined with a reward function. The reward function can be designed based on the objective function and constraints to guide the model toward minimizing the main grid electricity price.

[0097] 1.4 Policy network parameter update: The value network updates the policy network's parameters using a gradient ascent method based on the calculated action values. The goal of gradient ascent is to continuously increase the value of actions generated by the policy network.

[0098] Repeat steps 1.2 - 1.4 until the action value regenerated by the updated policy network is maximized.

[0099] Optimal action value determination and application stage: 2.1 Optimal Action Value Output After model training and optimization are completed, the state space of the test set is input into the trained model.

[0100] The model generates actions based on the input state space and calculates the value of the actions. The action that maximizes the action value is output as the optimal action value.

[0101] 2.2 Calculation of optimal total charging power The optimal charging pile power adjustment amount is extracted from the optimal action value.

[0102] The optimal charging pile power adjustment amount is added to the current charging pile power to obtain the optimal total charging power.

[0103] 2.3 Application and Feedback The optimal total charging power is sent to the user end, and billing data is generated based on the user's selection and actual charging situation.

[0104] Collect data from actual applications, such as actual main grid electricity prices and user satisfaction, as feedback information for further optimization of the model.

[0105] In an embodiment of the present invention, based on step S5, a possible embodiment will be given below to illustrate its specific implementation scheme in a non-limiting manner.

[0106] S501. Calculate the optimal charging power of each charging pile based on the optimal total charging power and the number of charging piles in the charging state.

[0107] Obtain the optimal total charging power (P total ), and query the number n of charging piles in charging state in real time through the charging pile management system.

[0108] Assuming that each charging pile has the same charging capacity and priority, the optimal charging power of each charging pile is calculated by an average distribution method.

[0109] Average distribution method: the optimal charging power of each charging pile (P i-avg ) is calculated as: P i-avg =P total / n.

[0110] S502. Set multiple charging power levels, and set the billing standard corresponding to each charging power level according to the difference between each charging power level and the optimal charging power.

[0111] According to the technical specifications and market demand of the charging pile, multiple charging power levels are set, such as P level1 ,P level2 ,…,P levelm , where m is the number of charging power levels.

[0112] The billing rate is typically related to the difference between the charging power level and the optimal charging power. A smaller difference indicates that the user's selected charging power is closer to the optimal charging power, resulting in less impact on overall system efficiency. Therefore, a lower billing rate can be set. Conversely, a larger difference results in a higher billing rate. Billing rates can be determined using either a linear or nonlinear approach.

[0113] Assume the basic billing unit price is , the quadratic coefficient is a, then the billing standard corresponding to each charging power level is The calculation formula is:

[0114] in, is the power of level i, The optimal charging power of the charging pile.

[0115] S503: Send the plurality of charging power levels and corresponding charging standards to the user terminal, and receive the charging power level selected by the user terminal.

[0116] The charging power level and corresponding billing standard are sent to the user-side application in a structured data format (such as JSON) through a network communication protocol (such as HTTP, MQTT, etc.).

[0117] User interaction: After receiving the data, the client application displays it to the user in a user-friendly interface. The user can select the appropriate charging power level based on their needs and economic considerations. The selection result is sent back to the charging pile management system via the same network communication protocol.

[0118] S504. Adjust the charging power of the corresponding charging pile to the charging power level selected by the user, and install the corresponding billing standard and charging time to generate billing data.

[0119] Power regulation: After receiving the charging power level selected by the user, the charging pile management system sends a control command to the corresponding charging pile to adjust its charging power to the user's selected level. During the adjustment process, the response time and stability of the charging pile need to be considered to ensure a safe and reliable charging process.

[0120] Charging time recording: The time starts from the moment the charging station starts charging at the power level selected by the user until the charging is completed. The charging time can be recorded by the clock module inside the charging station or the system timestamp.

[0121] Billing data generation: Calculate the cost of this charging session based on the billing standard corresponding to the charging power level selected by the user and the actual charging time.

[0122] In addition, this application also sets up a deployment rule base as a backup strategy. When the DRL action violates the hard constraint or the charging power selected by the user exceeds the optimal total charging power by a large margin, the load exceeds the power supply capacity of the microgrid and switches to rule control, which will switch to the main grid.

[0123] In some embodiments, the microgrid-based charging pile power dispatching system may include multiple functional modules composed of computer program segments. The computer program of each program segment in the microgrid-based charging pile power dispatching system may be stored in a memory of a computer device and executed by at least one processor to perform (see Figure 1 (Description) The function of charging pile power scheduling based on microgrid.

[0124] In this embodiment, the microgrid-based charging pile power dispatching system can be divided into multiple functional modules according to the functions it performs, such as Figure 2As shown. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can perform fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0125] An acquisition module is used to collect status data, including the real-time load of the charging pile, the charge state of the energy storage system, the power generation power of the new energy power generation equipment, the main grid electricity price and weather forecast data; The prediction module is used to predict the load demand based on the real-time load of the charging pile and the green energy power generation based on weather forecast data and the power generation of new energy power generation equipment; A definition module is used to define the state data, load demand and green energy generation power as a state space, and define an action space including charging pile power adjustment instructions, energy storage charge and discharge control, and main grid switching; A solution module, configured to solve the optimal charging power of the charging pile based on the state space and the action space using a reinforcement learning algorithm with the goal of minimizing the main grid electricity price; The scheduling module is used to send the optimal charging power to the user end and generate billing data based on the difference between the charging power selected by the user and the optimal charging power.

[0126] Figure 3 The microgrid-based charging pile power scheduling method provided for the embodiment of the present application can be applied to equipment. Those skilled in the art will understand that the device structure involved in the embodiment of the present invention does not constitute a limitation on the device, and the device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. In an embodiment of the present invention, the device includes but is not limited to a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of the present application described and / or required herein.

[0127] The device 300 may include a processor 310, a memory 320, and a communication unit 330. These components communicate via one or more buses. Those skilled in the art will appreciate that the server structure shown in the figure does not limit the present invention. The server structure may be a bus structure or a star structure, and may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0128] The memory 320 can be used to store execution instructions of the processor 310. The memory 320 can be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk. When the execution instructions in the memory 320 are executed by the processor 310, the device 300 can perform some or all of the steps in the above-described method embodiments.

[0129] The processor 310 is the control center of the storage device, which uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device and / or processes data by running or executing software programs and / or modules stored in the memory 320, and calling data stored in the memory. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 310 can only include a central processing unit (CPU). In an embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.

[0130] The communication unit 330 is configured to establish a communication channel so that the storage device can communicate with other devices, receive user data sent by other devices, or send user data to other devices.

[0131] The present invention also provides a computer medium, wherein the computer medium may store a program that, when executed, may include some or all of the steps of each embodiment provided by the present invention. The medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0132] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software and a necessary general-purpose hardware platform. Based on this understanding, the technical solutions in the embodiments of the present invention, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a medium such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, among other media capable of storing program code, and includes instructions for causing a computer device (which can be a personal computer, a server, or a second device, a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention.

[0133] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.

[0134] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or modules, and can be electrical, mechanical or other forms.

[0135] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected to achieve the purpose of the present embodiment according to actual needs.

[0136] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0137] Although the present invention has been described in detail with reference to the accompanying drawings and in conjunction with preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, persons of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and such modifications or substitutions shall be within the scope of the present invention. Any changes or substitutions that can be easily conceived by persons skilled in the art within the technical scope disclosed in the present invention shall be within the scope of protection of the present invention.

Claims

1. A method for dispatching electricity consumption of charging piles based on microgrid, characterized in that: include: Collect status data, including the real-time load of the charging pile, the charge state of the energy storage system, the power generation power of the new energy power generation equipment, the main grid electricity price and weather forecast data; Predict load demand based on the real-time load of charging piles, and predict green energy power generation based on weather forecast data and the power generation of new energy power generation equipment; The state data, load demand, and green energy generation power are defined as a state space, and the action space is defined to include charging pile power adjustment instructions, energy storage charge and discharge control, and main grid switching; With the goal of minimizing the main grid electricity price, a reinforcement learning algorithm is used to solve the optimal charging power of the charging pile based on the state space and the action space; The optimal charging power is sent to the user end, and billing data is generated based on the difference between the charging power selected by the user and the optimal charging power.

2. The method according to claim 1, characterized in that Predict green energy power generation based on weather forecast data and the power generation of new energy power generation equipment, including: The weather forecast data for the next hour and the power generation power of the new energy power generation equipment in the past 24 hours are input into a pre-trained prediction model, wherein the pre-trained prediction model includes an ARIMA sub-model and a Transformer; and the green energy power generation power generated by the pre-trained prediction model is obtained.

3. The method according to claim 1, characterized in that The state data, load demand, and green energy generation power are defined as a state space. The action space is defined to include charging pile power adjustment instructions, energy storage charge and discharge control, and main grid switching, including: State Space : in, is the load power at the current moment, is the state of charge of the energy storage system, is the power generation capacity of new energy power generation equipment, The main grid electricity price, For weather forecast data, For the predicted load demand, is the predicted green energy power generation capacity; Action Space : in, is the charging pile power adjustment value; is the energy storage charging and discharging power; Toggle the switch for the main network. 0 means disconnect, 1 means connect.

4. The method according to claim 3, characterized in that With the goal of minimizing the main grid electricity price, a reinforcement learning algorithm is used to solve the optimal charging power of the charging pile based on the state space and the action space, including: The objective function is: is the main grid electricity price during period t, is the amount of electricity purchased from the main grid during period t, is the constraint violation penalty coefficient; Setting constraints, including charging pile load constraints, energy storage system constraints, green power supply constraints, and power balance constraints; Setting up the reward function for a deep reinforcement learning model : Train a deep reinforcement learning model to determine the optimal action value in the action space based on the state space, objective function, constraints, and reward function.

5. The method according to claim 4, characterized in that Setting constraints includes: Charging pile load constraints: in, is the load demand of the i-th charging pile, N is the number of charging piles, is the minimum power of a single charging pile, The maximum power of a single charging pile; Energy storage system constraints: in, is the charge and discharge power, is the maximum discharge power, is the maximum charging power, is the minimum state of charge, is the maximum state of charge; Green electricity supply constraints: in, is the predicted maximum power generation; Power balance constraints: The total load power of the charging pile must be equal to the sum of green power output, energy storage output and main grid purchased power.

6. The method according to claim 4, characterized in that Train a deep reinforcement learning model to determine the optimal action value in the action space based on the state space, objective function, constraints, and reward function, including: Inputting the current state space into a deep reinforcement learning model, the deep reinforcement learning model comprising a policy network and a value network, wherein the policy network generates an action based on the current state space and constraints, and the value network generates an action value based on the current state space and the reward value of the action; the value network updates the parameters of the policy network using gradient ascent based on the action value until the action value regenerated by the updated policy network is maximized; Output the action corresponding to the maximized action value as the optimal action value; The optimal charging pile power adjustment amount in the optimal action value is added to the current charging pile power to obtain the optimal total charging power.

7. The method according to claim 1, characterized in that The optimal charging power is sent to the user terminal, and billing data is generated based on the difference between the charging power selected by the user and the optimal charging power, including: Calculate the optimal charging power for each charging pile based on the optimal total charging power and the number of charging piles in the charging state; Set multiple charging power levels and set the corresponding billing standard for each charging power level based on the difference between each charging power level and the optimal charging power; Sending the plurality of charging power levels and corresponding charging standards to the user terminal, and receiving the charging power level selected by the user terminal; Adjust the charging power of the corresponding charging pile to the charging power level selected by the user, and install the corresponding billing standard and charging time to generate billing data.

8. A charging pile power dispatching system based on microgrid, characterized in that: include: An acquisition module is used to collect status data, including the real-time load of the charging pile, the charge state of the energy storage system, the power generation power of the new energy power generation equipment, the main grid electricity price and weather forecast data; The prediction module is used to predict the load demand based on the real-time load of the charging pile and the green energy power generation based on weather forecast data and the power generation of new energy power generation equipment; A definition module is used to define the state data, load demand and green energy generation power as a state space, and define an action space including charging pile power adjustment instructions, energy storage charge and discharge control, and main grid switching; A solution module, configured to solve the optimal charging power of the charging pile based on the state space and the action space using a reinforcement learning algorithm with the goal of minimizing the main grid electricity price; The scheduling module is used to send the optimal charging power to the user end and generate billing data based on the difference between the charging power selected by the user and the optimal charging power.

9. A device, characterized in that include: A memory, used to store a microgrid-based charging pile power scheduling program; A processor is configured to implement the steps of the microgrid-based charging pile power scheduling method as described in any one of claims 1 to 7 when executing the microgrid-based charging pile power scheduling program.

10. A computer-readable medium storing a computer program, characterized in that: The readable medium stores a microgrid-based charging pile power scheduling program, and when the microgrid-based charging pile power scheduling program is executed by the processor, the steps of the microgrid-based charging pile power scheduling method according to any one of claims 1 to 7 are implemented.