Microgrid charging station power control method and charging system

CN122808530APending Publication Date: 2026-09-25XIAN LINCHR NEW ENERGY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611146566.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

在光伏微网充电场站中,充电桩的功率需求具有显著的波动性和不确定性,而光伏发电出力受云层遮挡、天气变化等因素影响,存在剧烈波动甚至骤降的风险

Benefits of technology

[0015]本申请提供的一种微网充电场站功率控制方法、装置、终端和介质,可以首先基于微网充电场站功率控制系统对应的历史光伏出力时序数据以及环境特征数据,预测得到未来光伏功率预测结果;基于预设滑动窗口内的变压器运行数据,得到重构误差;计算得到当前功率安全系数;基于所述当前功率安全系数以及微网充电场站功率控制系统对应的实时系统状态数据,得到各个充电桩对应的目标整机限功率值以及储能变流器对应的目标储能充放电功率指令,通过目标功率值以及目标充放电功率指令,来实现微网充电场站在安全边界约束下的光伏–储能–充电桩功率最优分配与闭环自适应调控。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122808530A_ABST
    Figure CN122808530A_ABST
Patent Text Reader

Abstract

The application discloses a micro-grid charging station power control method and a charging system. The method comprises the following steps: based on historical photovoltaic output time sequence data and environmental characteristic data corresponding to a micro-grid charging station power control system, a future photovoltaic power prediction result is predicted; based on transformer operation data in a preset sliding window, a reconstruction error is obtained; a current power safety coefficient is calculated; based on the current power safety coefficient and real-time system state data corresponding to the micro-grid charging station power control system, a target whole-machine power limit value corresponding to each charging pile and a target energy storage charging and discharging power instruction corresponding to an energy storage converter are obtained. The application aims to realize optimal distribution and closed-loop adaptive regulation and control of photovoltaic-energy storage-charging pile power under safety boundary constraints of the micro-grid charging station.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of new energy charging technology, and in particular to a power control method and charging system for microgrid charging stations. Background Technology

[0002] With the rapid development of new energy vehicles, the construction scale of charging stations is expanding daily. In photovoltaic microgrid charging stations, the power demand of charging piles exhibits significant fluctuations and uncertainties, while photovoltaic power generation output is affected by factors such as cloud cover and weather changes, posing a risk of drastic fluctuations or even sudden drops. When photovoltaic power suddenly experiences a significant loss, if the energy storage system fails to replenish the power gap in time, the system will instantly draw a large amount of power from the grid, which can easily lead to overload tripping of the upstream transformer, causing a large-scale power outage at the station and severely impacting the quality of charging services.

[0003] However, existing power control methods for microgrid charging stations have the following shortcomings: They employ a timed optimization scheduling mode, lacking real-time response capabilities to millisecond-level anomalies such as sudden drops in photovoltaic power; their control logic relies on an open-loop interaction mode where charging piles report their demands before calculation and distribution, posing a significant risk of response lag; existing technologies use command time-domain smoothing to avoid power oscillations, but do not involve a closed-loop architecture where the microgrid controller continuously and actively distributes overall power limits to charging piles, nor do they design a rapid energy storage compensation mechanism for sudden photovoltaic power drops; existing technologies rely on load forecasting results for passive guidance rather than real-time closed-loop control, with adjustments depending on user-side behavior, resulting in significant uncertainty; and existing technologies lack energy storage systems for compensation, making it impossible to fill power gaps within a second-level time window. Summary of the Invention

[0004] The main purpose of this application is to provide a power control method and charging system for microgrid charging stations, which aims to achieve optimal power allocation and closed-loop adaptive regulation of photovoltaic-energy storage-charging piles under safety boundary constraints.

[0005] To achieve the above objectives, this application provides a power control method for a microgrid charging station, which is applied to a power control system for a microgrid charging station. The power control system for the microgrid charging station includes a microgrid controller, an energy storage converter, a photovoltaic access unit, at least one charging pile, and a transformer. The method includes: Based on the historical photovoltaic output time series data and environmental characteristic data corresponding to the power control system of the microgrid charging station, the future photovoltaic power prediction result is obtained. Based on the future photovoltaic power prediction result, the power control system of the microgrid charging station is processed to reduce the overall power limit value of each charging pile and make the energy storage converter enter a high power output standby state. Based on the transformer operating data within a preset sliding window, a reconstruction error is obtained. Based on the reconstruction error, a second processing is performed on the power control system of the microgrid charging station to achieve preventive control of the overall power of the power control system of the microgrid charging station. The reconstruction error is used to characterize the degree of abnormality of the current operating state of the transformer deviating from the normal operating mode. The current power safety factor is calculated based on the system status observation data corresponding to the power control system of the microgrid charging station. Based on the current power safety factor and the real-time system status data corresponding to the power control system of the microgrid charging station, the target total power limit value of each charging pile and the target energy storage charging and discharging power command of the energy storage converter are obtained.

[0006] Specifically, the environmental characteristic data includes irradiance sensor data and cloud cover change trend characteristic data; The prediction of future photovoltaic power output based on historical photovoltaic output time-series data and environmental characteristic data corresponding to the microgrid charging station power control system includes: Based on the historical photovoltaic power output time series data, the irradiance sensor data, and the cloud cover change trend data, the future photovoltaic power prediction result is obtained by forward inference processing through a preset time series prediction model.

[0007] Specifically, the first processing of the microgrid charging station power control system based on the future photovoltaic power prediction results includes: Based on the predicted future photovoltaic power, determine the maximum decrease in photovoltaic power within a preset time period in the future; If the maximum decrease exceeds the preset decrease threshold, a pre-decrease signal is triggered; Based on the pre-reduction signal, the overall power limit value of each charging pile is reduced to the pre-reduction target power limit value, and a high-power output preparation command is sent to the energy storage converter.

[0008] Specifically, the process of obtaining the reconstruction error based on transformer operating data within a preset sliding window includes: The transformer operating data within the preset sliding window is input into the preset autoencoder anomaly detection model, and the reconstruction error is output. The preset autoencoder anomaly detection model includes an encoder and a decoder. The encoder is used to compress the transformer operating data within the preset sliding window into a low-dimensional feature representation vector, and the decoder is used to reconstruct the low-dimensional feature representation vector into reconstructed output data. The reconstruction error is calculated based on the transformer operating data within the preset sliding window and the reconstruction output data.

[0009] Specifically, the second processing of the microgrid charging station power control system based on the reconstruction error includes: If the reconstruction error exceeds the first threshold, the energy storage pre-charging state corresponding to the microgrid charging station power control system is activated. If the reconstruction error exceeds the second threshold, the overall power limit value of each charging pile is pre-reduced. Wherein, the second threshold is greater than the first threshold.

[0010] Specifically, the calculation of the current power safety factor based on the system state observation data corresponding to the microgrid charging station power control system includes: Based on the system state observation data, the posterior distribution between the power safety factor and the system stability metric is calculated using the Gaussian process surrogate model of the online Bayesian optimization module. Based on the posterior distribution, the current power safety factor is obtained by constraining the expectation improvement acquisition function. The power safety factor is used as the decision variable of the constraint expectation improvement acquisition function, and the statistical index of whether the transformer exceeds the limit after a preset number of command issuances is used as the constraint condition of the constraint expectation improvement acquisition function. The system stability metric is calculated based on the real-time load rate of the transformer and the preset safety threshold in the system state observation data.

[0011] Specifically, the posterior distribution includes the posterior mean and the posterior variance; The process of obtaining the current power safety factor based on the posterior distribution by improving the acquisition function through constraint expectation includes: Based on the posterior mean and the posterior variance, with the power safety factor as the decision variable and the statistical index of whether the transformer exceeds the limit after a preset number of commands are issued as the constraint function, the acquisition function is improved by the constraint expectation, and at least one acquisition function value corresponding to the power safety factor is calculated. The power safety factor corresponding to the maximum acquisition function value is determined as the current power safety factor.

[0012] Specifically, the real-time system status data includes real-time photovoltaic output data, energy storage status data, energy storage health, power demand corresponding to each charging pile, real-time output power corresponding to each charging pile, and real-time transformer load rate. The process of obtaining the target overall power limit value for each charging pile and the target energy storage charging and discharging power command for the energy storage converter based on the current power safety factor and the real-time system status data corresponding to the microgrid charging station power control system includes: A real-time state vector is constructed based on the real-time photovoltaic output data, the energy storage state of charge data, the energy storage health status, the power demand corresponding to each charging pile, the real-time output power corresponding to each charging pile, the real-time load rate of the transformer, and the current power safety factor. The real-time state vector is input into a preset policy network, and the mean and log standard deviation of the action vector are output. Based on the mean and logarithmic standard deviation of the action vector, a continuous action vector is obtained by mapping through the tanh activation function. The continuous action vector includes the target total power limit value and the target energy storage charging and discharging power command.

[0013] Specifically, the method further includes: Multiply the target total power limit value by the current power safety factor to obtain the target execution power value, and then send it to each charging pile for execution; Store the state transition tuple corresponding to the microgrid charging station power control system after execution into the experience replay buffer. Randomly sample batches of data from the experience replay buffer, and update the preset policy network by minimizing the temporal difference error.

[0014] To achieve the above objectives, this application also provides a charging system, including at least two power modules, a controller, a power distribution device, and at least one charging interface. The power distribution device is connected to the controller, each power module, and each charging interface. The power modules are used to convert AC power from the power grid into DC power and supply it to the charging interfaces. The controller is used to obtain the power demand of each charging interface and generate scheduling instructions based on the connection relationship of the controllable switches in the power distribution device and the power demand, so as to execute the microgrid charging station power control method as described in any one of claims 1 to 9. The power distribution device is used to control the opening or closing of the controllable switches according to the scheduling instructions, so as to distribute the output power of each power module to each charging interface.

[0015] This application provides a power control method, device, terminal, and medium for microgrid charging stations. It first predicts future photovoltaic power based on historical photovoltaic output time-series data and environmental characteristic data corresponding to the microgrid charging station power control system; then, it obtains the reconstruction error based on transformer operating data within a preset sliding window; finally, it calculates the current power safety factor; and based on the current power safety factor and real-time system status data corresponding to the microgrid charging station power control system, it obtains the target overall power limit value for each charging pile and the target energy storage charging / discharging power command for the energy storage converter. Through the target power values ​​and target charging / discharging power commands, it achieves optimal power allocation and closed-loop adaptive control of the photovoltaic-energy storage-charging pile power under safety boundary constraints at the microgrid charging station. Attached Figure Description

[0016] Figure 1 A flowchart illustrating the method provided in the embodiments of this application; Figure 2 This is an overall architecture diagram of the power control system for a microgrid charging station provided in an embodiment of this application; Figure 3 A schematic diagram illustrating the hierarchical relationship and data flow of the four-layer AI collaborative control architecture provided in this application embodiment; Figure 4 The photovoltaic power drop look-ahead sensing process based on a time-series prediction model is provided in the embodiments of this application; Figure 5 The transformer anomaly detection process provided in the embodiments of this application; Figure 6 A flowchart of adaptive power coefficient adjustment based on online Bayesian optimization is provided for embodiments of this application; Figure 7 A schematic diagram of the power allocation decision state space and action space provided in the embodiments of this application; Figure 8 A schematic diagram of the custom FEMS protocol application layer frame structure provided in the embodiments of this application; Figure 9 This is a schematic diagram of the structure provided for an embodiment of this application. Detailed Implementation

[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0018] Existing microgrid charging station power control methods have the following shortcomings: They employ a timed optimization scheduling mode, lacking real-time response capabilities to millisecond-level anomalies such as sudden drops in photovoltaic power; their control logic relies on an open-loop interaction mode where charging piles report their demands before calculation and distribution, posing a significant risk of response lag; existing technologies use command time-domain smoothing to avoid power oscillations, but do not involve a closed-loop architecture where the microgrid controller continuously and actively distributes overall power limits to charging piles, nor do they design a rapid energy storage compensation mechanism for sudden photovoltaic power drops; existing technologies rely on load forecasting results for passive guidance rather than real-time closed-loop control, with adjustments depending on user-side behavior, leading to significant uncertainty; and existing technologies lack energy storage systems for compensation, making it impossible to fill power gaps within a second-level time window.

[0019] Therefore, this application provides a power control method, device, terminal, and medium for microgrid charging stations to solve practical technical problems.

[0020] In some embodiments, the device may be integrated into an electronic terminal, which may be a terminal, server, or other terminal.

[0021] In some embodiments, the server may also be implemented as a terminal.

[0022] The server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0023] The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and the server can be connected directly or indirectly through wired or wireless communication, which is not limited herein.

[0024] The following sections provide detailed descriptions of each example. It should be noted that the sequence numbers of the following embodiments are not intended to limit the preferred order of the embodiments.

[0025] This application provides a power control method and charging system for microgrid charging stations, aiming to achieve optimal power allocation and closed-loop adaptive regulation of photovoltaic-energy storage-charging piles under safety boundary constraints.

[0026] The architecture of the four-layer AI collaborative control module of the microgrid charging station power control system executes in the following order within a complete control cycle: first, step S110 (first-layer forward sensing); then step S120 (second-layer anomaly warning); next, step S130 (third-layer safety boundary adaptation); and finally, step S140 (fourth-layer intelligent decision-making and closed-loop distribution). The data acquisition cycle is aligned with the FEMS protocol communication cycle, which is 500ms.

[0027] like Figure 1 The specific process of the method may include: S110. Based on the historical photovoltaic output time-series data and environmental characteristic data corresponding to the power control system of the microgrid charging station, the future photovoltaic power prediction result is obtained. Based on the future photovoltaic power prediction result, the power control system of the microgrid charging station is processed to reduce the overall power limit value of each charging pile and make the energy storage converter enter a high power output standby state.

[0028] In some embodiments, such as Figure 2 As shown, the method is applied to the power control system of a microgrid charging station, which includes a microgrid controller, an energy storage converter, a photovoltaic access unit, at least one charging pile, and a transformer.

[0029] Specifically, the power control system of the microgrid charging station connects to the field communication network of each device. The microgrid controller is used to coordinate the power scheduling between the energy storage converter, photovoltaic access unit and charging pile. The microgrid controller has a built-in four-layer AI collaborative control module and FEMS protocol communication module. The charging pile establishes a TCP / IP long connection with the microgrid controller through the FEMS protocol. The charging pile is used to receive the whole machine power limit value instruction and perform power adjustment locally.

[0030] In some embodiments, such as Figure 3 The architecture of the four-layer AI collaborative control module of the microgrid charging station power control system executes in the following order within a complete control cycle: first, step S110 (first-layer forward sensing); then step S120 (second-layer anomaly warning); next, step S130 (third-layer safety boundary adaptation); and finally, step S140 (fourth-layer intelligent decision-making and closed-loop distribution). The data acquisition cycle is aligned with the FEMS protocol communication cycle and is 500ms.

[0031] In some embodiments, the environmental characteristic data includes irradiance sensor data and cloud cover change trend characteristic data.

[0032] Specifically, the prediction of future photovoltaic power based on historical photovoltaic output time-series data and environmental characteristic data corresponding to the power control system of the microgrid charging station includes the following specific implementation process: Based on the historical photovoltaic power output time series data, the irradiance sensor data, and the cloud cover change trend data, the future photovoltaic power prediction result is obtained by forward inference processing through a preset time series prediction model.

[0033] Specifically, the microgrid controller collects photovoltaic output sequences from the past N sampling points (N=60, sampling interval 5 seconds, covering the past 5 minutes), irradiance sensor data, cloud cover change trend data, and time-coded features from the fieldbus to construct the input feature vector for the time-series prediction model. For example... Figure 4 As shown, the input feature vector is input into the time-series prediction model. The encoder of the time-series prediction model extracts time-dependent features, which are then output by the decoder to obtain the photovoltaic power prediction vector for the next 30 seconds to 5 minutes, i.e., the future photovoltaic power prediction result. Taking the Informer Transformer architecture as an example, the encoder of the time-series prediction model uses a ProbSparse self-attention mechanism to reduce the computational complexity of long sequences, and the decoder of the time-series prediction model uses generative decoding to output multi-step prediction results, i.e., the future photovoltaic power prediction result.

[0034] In some embodiments, the first processing of the microgrid charging station power control system based on the future photovoltaic power prediction results includes the steps A1 to A3 shown below: A1. Based on the future photovoltaic power prediction results, determine the maximum decrease in photovoltaic power within a preset time period in the future; A2. If the maximum decrease exceeds the preset decrease threshold, a pre-decrease signal is triggered. A3. Based on the pre-reduction signal, the overall power limit value of each charging pile is reduced to the pre-reduction target power limit value, and a high-power output preparation command is sent to the energy storage converter.

[0035] In some embodiments, the maximum drop in photovoltaic power within the next 30 seconds is calculated based on the photovoltaic power prediction vector. When the maximum drop exceeds a preset threshold (e.g., 60kW), a pre-drop signal is triggered. Based on the pre-drop signal, the pre-drop target power limit value for each charging pile is calculated. The pre-drop target power limit value = current photovoltaic predicted output + available power of the energy storage converter PCS - safety margin. For example, if the current photovoltaic predicted output is 200kW, the available power of the energy storage converter PCS is 300kW, and the safety margin is 50kW, then the pre-drop target power limit value is 450kW, with 225kW allocated to each of the two charging piles. The overall power limit value of each charging pile is lowered to the pre-drop target power limit value, and a high-power output preparation command is sent to the energy storage converter PCS, enabling the energy storage converter PCS to switch from standby to high-power output within 0.5 seconds when the actual photovoltaic power drop occurs. Through the feedforward pre-sag mechanism, the system limits the power of the charging pile to a safe range before the sudden drop actually occurs, thus avoiding instantaneous overload of the transformer.

[0036] S120. Based on the transformer operating data within a preset sliding window, a reconstruction error is obtained, and based on the reconstruction error, a second processing is performed on the power control system of the microgrid charging station to achieve preventive control of the overall power of the power control system of the microgrid charging station. The reconstruction error is used to characterize the degree of abnormality of the current operating state of the transformer deviating from the normal operating mode.

[0037] In some embodiments, such as Figure 5 The process of obtaining the reconstruction error based on transformer operating data within a preset sliding window includes steps B1 to B2 as shown below: B1. Input the transformer operating data within the preset sliding window into the preset autoencoder anomaly detection model and output the reconstruction error. The preset autoencoder anomaly detection model includes an encoder and a decoder. The encoder is used to compress the transformer operating data within the preset sliding window into a low-dimensional feature representation vector, and the decoder is used to reconstruct the low-dimensional feature representation vector into reconstructed output data. B2. The reconstruction error is calculated based on the transformer operation data within the preset sliding window and the reconstruction output data.

[0038] Specifically, the microgrid controller incorporates a lightweight autoencoder anomaly detection model. This model uses multi-dimensional time-series data (including transformer load rate, voltage, current, temperature, harmonic distortion rate, etc.) from the transformer's historical normal operating conditions for unsupervised training to learn the reconstructed representation of normal patterns. Transformer operating data within a sliding window (60 seconds window length, 1-second sampling interval) is input into the preset autoencoder anomaly detection model. The encoder of the preset autoencoder anomaly detection model consists of three fully connected layers (dimensions 64, 32, and 16 respectively), compressing the input data into a 16-dimensional low-dimensional feature representation. The decoder of the preset autoencoder anomaly detection model consists of three fully connected layers (dimensions 32, 64, and output dimension respectively), reconstructing the output data from the 16-dimensional low-dimensional feature representation. Based on the reconstructed output data and the input transformer operating data, the mean square reconstruction error is calculated as the reconstruction error.

[0039] Specifically, the second processing of the microgrid charging station power control system based on the reconstruction error includes the following specific implementation process: If the reconstruction error exceeds the first threshold, the energy storage pre-charging state corresponding to the microgrid charging station power control system is activated. If the reconstruction error exceeds the second threshold, the overall power limit value of each charging pile is pre-reduced. Wherein, the second threshold is greater than the first threshold.

[0040] Specifically, when the reconstruction error exceeds the first threshold (e.g., 0.05), a yellow warning signal is output and the energy storage pre-charging state is initiated; when the reconstruction error exceeds the second threshold (e.g., 0.15), a red warning signal is output and the pre-reduction operation of the overall power limit value of each charging pile is triggered. Through the self-encoder anomaly detection, the system can detect risks from deviations in operating mode before the transformer load rate reaches the 95% physical threshold, initiating preventive measures an average of 3 to 8 seconds earlier than traditional threshold detection.

[0041] S130. Based on the system status observation data corresponding to the power control system of the microgrid charging station, the current power safety factor is calculated.

[0042] In some embodiments, such as Figure 6 As shown, the calculation of the current power safety factor based on the system state observation data corresponding to the microgrid charging station power control system includes the following steps C1 to C2: C1. Based on the system state observation data, the posterior distribution between the power safety factor and the system stability metric is calculated using the Gaussian process surrogate model of the online Bayesian optimization module. C2. Based on the posterior distribution, the current power safety factor is obtained by constraining the expectation improvement acquisition function. The power safety factor is used as the decision variable of the constraint expectation improvement acquisition function, and the statistical index of whether the transformer exceeds the limit after a preset number of command issuances is used as the constraint condition of the constraint expectation improvement acquisition function. The system stability metric is calculated based on the real-time load rate of the transformer and the preset safety threshold in the system state observation data.

[0043] Specifically, the posterior distribution includes the posterior mean and the posterior variance.

[0044] The process of improving the acquisition function based on the posterior distribution and solving for the current power safety factor by constraining the expectation includes the following steps C21 to C22: C21. Based on the posterior mean and the posterior variance, with the power safety factor as the decision variable and the statistical index of whether the transformer exceeds the limit after a preset number of instructions are issued as the constraint function, the acquisition function is improved by the constraint expectation, and at least one acquisition function value corresponding to the power safety factor is calculated. C22. The power safety factor corresponding to the maximum acquisition function value is determined as the current power safety factor.

[0045] Specifically, based on the historical observation dataset D={(β_i, L_i)}_{i=1}^{n}, the posterior mean μ(β*) and posterior variance σ²(β*) between the power safety factor β and the system stability metric L are calculated using a Gaussian process surrogate model. The system stability metric L is determined based on the difference between the real-time transformer load rate λ_T and the safety threshold of 0.95, and is zero when the real-time transformer load rate λ_T is less than 0.95. The covariance kernel function of the Gaussian process surrogate model adopts the Matérn 52 kernel function, based on the distance r between the power safety factor β and β′, the signal variance σ_f, and the length scale parameter. The covariance value is calculated, where σ_f and Hyperparameter optimization is performed by maximizing the marginal likelihood function. The posterior mean and posterior variance are calculated through matrix operations based on the covariance vector k* between the training input and the new input, the covariance matrix K between the training inputs, the observation noise variance σ_n², and the identity matrix I.

[0046] Continuing with the above embodiments, based on the posterior mean and posterior variance, the power safety factor β is used as the decision variable (value range [0.3, 1.0]), and the statistical index of the number of times the transformer exceeded the limit after the issuance of the last 30 commands is used as the constraint function. The acquisition function value of each candidate β is calculated through the constraint expectation improvement acquisition function. The constraint function is based on the transformer load rate data after the issuance of the last 30 commands. The proportion of the number of times the transformer load rate exceeds 0.95 to the length of the statistical window is statistically analyzed through the indicator function. When this proportion is less than or equal to the over-limit tolerance threshold ε=0.03, the constraint is determined to be satisfied. The constraint expectation improvement acquisition function value is equal to the product of the unconstrained expectation improvement value EI(β) and the constraint satisfaction probability P(g(β)≤0). The unconstrained expectation improvement value EI(β) is calculated based on the currently observed optimal system stability metric L_best, the posterior mean μ(β), and the posterior standard deviation σ(β) through the standard normal cumulative distribution function Φ and the probability density function φ. During the initialization phase, K0=10 initial sampling points are generated within the value range of β [0.3, 1.0]. Corresponding power safety factors are then issued, and the system stability metric L and constraint function value g(β) are recorded to construct the initial observation dataset. During the online operation phase, based on the acquisition function values ​​of each candidate β, the candidate β with the largest acquisition function value is selected as the optimal power safety factor β_next for the current moment, i.e., the current power safety factor.

[0047] In some embodiments, the method may further include: dynamically adjusting the upper bound of the search for β based on the current energy storage state of charge (SOC), photovoltaic volatility σ_pv, and the warning signal output by the autoencoder anomaly detection model. When the SOC is greater than 60% and the photovoltaic volatility σ_pv is less than a preset threshold, the CEI acquisition function tends to explore a larger β value; when a yellow or red warning signal is output, the upper bound of the search for β is temporarily reduced to 0.7; when the photovoltaic volatility σ_pv exceeds the preset threshold, the upper bound of the search for β is temporarily reduced to 0.8. After the optimal power safety factor β_next is issued and executed, the actual transformer load rate for that period is recorded, the new L value and constraint function value are calculated, the new observation data is added to the historical observation dataset, and a sliding window is used to maintain the most recent 30 records. The Gaussian process surrogate model is continuously updated with the observation data, and after long-term operation, it gradually approaches the optimal safety boundary under the specific physical conditions of the site. The safety boundary optimization effect is 15% to 25% better than that of the fixed coefficient.

[0048] S140. Based on the current power safety factor and the real-time system status data corresponding to the power control system of the microgrid charging station, obtain the target total power limit value for each charging pile and the target energy storage charging and discharging power command for the energy storage converter.

[0049] In some embodiments, such as Figure 7The process of obtaining the target total power limit value for each charging pile and the target energy storage charging and discharging power command for the energy storage converter based on the current power safety factor and the real-time system status data corresponding to the power control system of the microgrid charging station includes the following steps D1 to D3: D1. Construct a real-time state vector based on the real-time photovoltaic output data, the energy storage state of charge data, the energy storage health status, the power demand corresponding to each charging pile, the real-time output power corresponding to each charging pile, the real-time load rate of the transformer, and the current power safety factor. D2. Input the real-time state vector into the preset policy network and output the mean and log standard deviation of the action vector. D3. Based on the mean and the logarithmic standard deviation of the action vector, a continuous action vector is obtained by mapping using the tanh activation function. The continuous action vector includes the target total power limit value and the target energy storage charging and discharging power command.

[0050] Specifically, a real-time state vector s_t is constructed based on the real-time photovoltaic power output data P_pv(t), energy storage state of charge data SOC(t), energy storage health status SOH(t), power demand of each charging pile P_dem_i(t), real-time output power of each charging pile P_act_i(t), real-time transformer load rate λ_T(t), current power safety factor β(t), and time period encoding feature h(t). The state vector dimension is 6 + 2 × N_c, where N_c is the number of charging piles in the station. The time period encoding feature h(t) uses sine and cosine encoding to represent the time of day. Based on the real-time state vector s_t, forward inference is performed through the policy network of a deep reinforcement learning agent to obtain a continuous action vector a_t. The agent adopts an Actor-Critic architecture based on the Soft Actor-Critic algorithm. The policy network π_φ(a|s) takes the state vector s_t as input and outputs the mean and logarithmic standard deviation of the action vector. These are mapped to the action value range using the tanh activation function. The policy network is a three-layer fully connected network with hidden layers of dimension 256 and ReLU activation function. The action vector a_t contains the power limit value P_cmd_i(t) for each charging pile and the charging / discharging power command P_pcs(t) for the energy storage converter PCS. The power limit value for each charging pile ranges from [0, P_rated_i], and the charging / discharging power command for the energy storage converter PCS ranges from [-P_pcs_max, P_pcs_max]. Positive values ​​indicate discharging, and negative values ​​indicate charging. The value network contains two Q-networks, both taking the concatenation of the state vector and action vector as input and outputting a Q-value scalar. A dual-Q network is used to minimize the output value to mitigate overestimation bias.

[0051] In some embodiments, the method further includes steps T1 to T3 as shown below: T1. Multiply the target total power limit value by the current power safety factor to obtain the target execution power value, and send it to each charging pile for execution; T2. Store the state transition tuple corresponding to the microgrid charging station power control system after execution into the experience replay buffer. T3. Randomly sample batch data from the experience replay buffer, and update the preset strategy network by minimizing the temporal difference error.

[0052] Specifically, the method further includes: The power limit value P_cmd_i(t) of each charging pile in the continuous action vector a_t is multiplied by the power safety factor β(t) before execution. Based on the system state after the action, three levels of rewards are calculated: Safety layer reward r_safe(t): When the transformer load rate λ_T(t) is between 95% and 100%, a soft penalty value (soft penalty coefficient C_s=100) is calculated based on the excess amount using a quadratic soft penalty function. When the load rate exceeds 100%, a fixed large hard penalty (hard penalty coefficient C_s2=500) is applied. The sum of these two values, with a negative sign, constitutes the safety layer reward. Efficiency layer reward r_eff(t): Calculated by subtracting the slight penalty value (energy storage charging penalty coefficient α=0.1) when the sum of the actual output power of each charging pile to the sum of the demand power of each charging pile. The energy storage protection layer reward r_bat(t) is calculated as follows: when the SOC is below 0.2, the lower limit penalty value is calculated using a quadratic function based on the deviation; when the SOC is above 0.8, the upper limit penalty value is calculated using a quadratic function based on the deviation (energy storage protection penalty coefficient C_b=50). The sum of these two values, with a negative sign, constitutes the energy storage protection layer reward. When the SOC is in the safe range of [0.2, 0.8], the energy storage protection layer reward is zero. The total reward r_t is calculated by weighting and summing the three layers of rewards according to the safety layer weight w_s=2.0, the efficiency layer weight w_e=1.0, and the energy storage protection layer weight w_b=0.5. The safety layer weight is greater than the efficiency layer weight to ensure that safety constraints always take precedence over efficiency optimization; the efficiency layer weight is greater than the energy storage protection layer weight to ensure that charging efficiency is maximized first while meeting safety constraints. The state transition tuple (s_t, a_t, r_t, s_{t+1}) is stored in the experience replay buffer. Offline pre-training phase: A simulation environment is constructed using historical operational data from the field. The agent is trained for 10,000 rounds in this environment. In each round, 2,000 time-step experience tuples are collected and stored in an experience replay buffer with a capacity of 1×10^6. The batch size is 256. The parameters of the policy network and value network are updated alternately by minimizing temporal difference error and maximizing expected reward. Online fine-tuning phase: The pre-trained agent is deployed to the field. Real-time state vectors are received every 500ms control cycle, and action vectors are output through forward inference via the policy network. New experience tuples are stored in an online experience replay buffer with a capacity of 1×10^5 (FIFO policy). Online network parameter updates are triggered every 100 control cycles. 256 tuples are randomly sampled from the online experience replay buffer to calculate gradients and update parameters. The learning rate is 1×10^-4. The target network is soft-updated using an exponential moving average with a soft-updation coefficient τ=0.005. The updated target network parameters are calculated using the exponential moving average formula based on the current network parameters θ and the target network parameters θ_target, ensuring training stability.Compared with large-scale linear programming solutions, it reduces computational delay by more than 90% while satisfying transformer capacity constraints.

[0053] In some embodiments, such as... Figure 8 The frame structure and transmission process of the FEMS protocol are described in detail: Based on the overall power limit, pile number, and limited charging / discharging power type of each charging pile, communication frames are encapsulated according to the FEMS protocol frame structure. Tables 1 and 2 below show the following fields in the frame structure: Start Identifier (1 byte, fixed at 0x68, representing the start of a data frame), Data Byte Count (2 bytes, original data length when unencrypted, encrypted data length when encrypted), Sequence Number Field (2 bytes, data packet transmission sequence number starts from 0 and increases sequentially), Encryption Flag (1 byte, 0x00 indicates no encryption, 0x01 indicates 3DES encryption), Frame Type Flag (1 byte, defining uplink and downlink data frames; odd numbers for charging piles, even numbers for platforms; key frame type code: 0x20 indicates the overall power limit of the charging pile). The protocol includes a message body (variable length; for frame type code 0x20, the message body contains the pile number (BCD code, 8 bytes), query or set flag (BCD code, 1 byte), overall pile power limit setting value (BCD code, 1 byte), limit charging / discharging power type (BCD code, 1 byte, 0 for charging, 1 for discharging), and charger / discharger power limit (BIN code, 4 bytes, unit kW, precision 0.1kW)), and a frame check field (2 bytes, CRC16 check, polynomial 0x180D, low byte first). Compared to the standard Modbus protocol, the FEMS protocol eliminates multi-level device addressing fields and adds a dedicated power direct transmission command type. The communication frames are actively sent to each charging pile via a TCP / IP long connection with a period of 500ms, without waiting for a response confirmation from the charging pile. The microgrid controller proactively pushes the overall power limit value at fixed intervals, eliminating request-response waiting delays and reducing end-to-end command transmission latency by approximately 60% compared to the standard Modbus protocol. It receives the actual output power reported by the charging pile via FEMS protocol frame type code 0x09, compares the transmitted command limit value with the actual output power, and triggers command retransmission or alarm processing when the deviation exceeds a preset threshold, forming a closed-loop feedback.

[0054]

[0055] Table 1 Custom FEMS Protocol Application Layer Frame Format

[0056] Table 2 Frame Type Code 0x20 Message Body Format (Sent from Microgrid Controller to Charging Pile) In addition, the embodiments of this application also include an offline power protection mechanism: the microgrid controller sends offline power limit values ​​to each charging pile through FEMS protocol frame type code 0x26. When the FEMS connection is disconnected due to network failure, the charging pile automatically switches to offline mode and uses the most recently received offline power limit value as the maximum output power of the whole machine, ensuring that the transformer is still protected by the power limit in extreme cases such as communication interruption.

[0057] In summary, this application provides a power control method for microgrid charging stations, upgrading the open-loop control architecture of demand reporting and response to a complete four-layer intelligent closed-loop control architecture encompassing AI prediction, early warning, adaptive boundary, intelligent decision-making, direct protocol transmission, and closed-loop feedback. The microgrid controller no longer needs to wait for charging piles to report demands; it directly calculates and continuously issues overall power limits based on new energy output prediction and the charging system's safety status, fundamentally eliminating the risk of instantaneous overload. Through a time-series prediction model, the pre-power reduction process can be initiated 30 seconds before a sudden drop in photovoltaic power actually occurs, transforming passive response into feedforward prevention, shortening the transformer overload risk window by more than 70%. Through self-encoder anomaly detection, risks can be detected in advance from deviations in operating modes before the transformer load rate reaches the 95% physical threshold, initiating preventative measures an average of 3 to 8 seconds earlier than traditional threshold detection. Through online Bayesian optimization, the power safety factor is automatically adjusted according to different real-time conditions, maximizing station charging efficiency while ensuring safety; the safety boundary optimization effect is 15% to 25% better than a fixed coefficient. By customizing the FEMS protocol, in continuous direct power generation scenarios, the multi-level addressing redundancy of the general protocol is eliminated, a dedicated direct power generation command type is added, and the communication cycle is compressed to 500ms. The end-to-end command delivery latency is reduced by approximately 60% compared to the standard Modbus protocol. Through a deep reinforcement learning agent, in scenarios with multiple charging piles, varying energy storage states, and fluctuating photovoltaic output combinations, it can output optimal power allocation actions that exceed fixed rules, reducing computational latency by more than 90% compared to large-scale linear programming solution methods, while simultaneously satisfying transformer capacity constraints.

[0058] To better implement the above methods, such as Figure 9As shown in the embodiments of this application, a charging system is also provided, including at least two power modules 110, a controller 130, a power distribution device 140, and at least one charging interface 120. The power distribution device 140 is connected to the controller 130, each power module 110, and each charging interface 120. The power modules 110 are used to convert AC power from the power grid into DC power and provide it to the charging interfaces. The controller 130 is used to obtain the power demand of each charging interface 120 and generate scheduling instructions according to the connection relationship of the controllable switches in the power distribution device 140 and the power demand, so as to execute the microgrid charging station power control method as described in any one of claims 1 to 9. The power distribution device 140 is used to control the opening or closing of the controllable switches according to the scheduling instructions, so as to distribute the output power of each power module 110 to each charging interface 120.

[0059] The above provides a detailed description of a microgrid charging station power control method and charging system provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A power control method for microgrid charging stations, characterized in that, The microgrid charging station power control system includes a microgrid controller, an energy storage converter, a photovoltaic access unit, at least one charging pile, and a transformer. The method includes: Based on the historical photovoltaic output time series data and environmental characteristic data corresponding to the power control system of the microgrid charging station, the future photovoltaic power prediction result is obtained. Based on the future photovoltaic power prediction result, the power control system of the microgrid charging station is processed to reduce the overall power limit value of each charging pile and make the energy storage converter enter a high power output standby state. Based on the transformer operating data within a preset sliding window, a reconstruction error is obtained. Based on the reconstruction error, a second processing is performed on the power control system of the microgrid charging station to achieve preventive control of the overall power of the power control system of the microgrid charging station. The reconstruction error is used to characterize the degree of abnormality of the current operating state of the transformer deviating from the normal operating mode. The current power safety factor is calculated based on the system status observation data corresponding to the power control system of the microgrid charging station. Based on the current power safety factor and the real-time system status data corresponding to the power control system of the microgrid charging station, the target total power limit value of each charging pile and the target energy storage charging and discharging power command of the energy storage converter are obtained.

2. The method as described in claim 1, characterized in that, The environmental characteristic data includes irradiance sensor data and cloud cover change trend data; The prediction of future photovoltaic power output based on historical photovoltaic output time-series data and environmental characteristic data corresponding to the microgrid charging station power control system includes: Based on the historical photovoltaic power output time series data, the irradiance sensor data, and the cloud cover change trend data, the future photovoltaic power prediction result is obtained by forward inference processing through a preset time series prediction model.

3. The method as described in claim 1, characterized in that, The first processing of the microgrid charging station power control system based on the future photovoltaic power prediction results includes: Based on the predicted future photovoltaic power, determine the maximum decrease in photovoltaic power within a preset time period in the future; If the maximum decrease exceeds the preset decrease threshold, a pre-decrease signal is triggered; Based on the pre-reduction signal, the overall power limit value of each charging pile is reduced to the pre-reduction target power limit value, and a high-power output preparation command is sent to the energy storage converter.

4. The method as described in claim 1, characterized in that, The reconstruction error obtained based on transformer operating data within a preset sliding window includes: The transformer operating data within the preset sliding window is input into the preset autoencoder anomaly detection model, and the reconstruction error is output. The preset autoencoder anomaly detection model includes an encoder and a decoder. The encoder is used to compress the transformer operating data within the preset sliding window into a low-dimensional feature representation vector, and the decoder is used to reconstruct the low-dimensional feature representation vector into reconstructed output data. The reconstruction error is calculated based on the transformer operating data within the preset sliding window and the reconstruction output data.

5. The method as described in claim 1, characterized in that, The second processing of the microgrid charging station power control system based on the reconstruction error includes: If the reconstruction error exceeds the first threshold, the energy storage pre-charging state corresponding to the microgrid charging station power control system is activated. If the reconstruction error exceeds the second threshold, the overall power limit value of each charging pile is pre-reduced. Wherein, the second threshold is greater than the first threshold.

6. The method as described in claim 1, characterized in that, The current power safety factor is calculated based on the system state observation data corresponding to the power control system of the microgrid charging station, including: Based on the system state observation data, the posterior distribution between the power safety factor and the system stability metric is calculated using the Gaussian process surrogate model of the online Bayesian optimization module. Based on the posterior distribution, the current power safety factor is obtained by constraining the expectation improvement acquisition function. The power safety factor is used as the decision variable of the constraint expectation improvement acquisition function, and the statistical index of whether the transformer exceeds the limit after a preset number of command issuances is used as the constraint condition of the constraint expectation improvement acquisition function. The system stability metric is calculated based on the real-time load rate of the transformer and the preset safety threshold in the system state observation data.

7. The method as described in claim 6, characterized in that, The posterior distribution includes the posterior mean and the posterior variance; The process of obtaining the current power safety factor based on the posterior distribution by improving the acquisition function through constraint expectation includes: Based on the posterior mean and the posterior variance, with the power safety factor as the decision variable and the statistical index of whether the transformer exceeds the limit after a preset number of commands are issued as the constraint function, the acquisition function is improved by the constraint expectation, and at least one acquisition function value corresponding to the power safety factor is calculated. The power safety factor corresponding to the maximum acquisition function value is determined as the current power safety factor.

8. The method as described in claim 1, characterized in that, The real-time system status data includes real-time photovoltaic output data, energy storage status data, energy storage health status, power demand corresponding to each charging pile, real-time output power corresponding to each charging pile, and real-time transformer load rate. The process of obtaining the target overall power limit value for each charging pile and the target energy storage charging and discharging power command for the energy storage converter based on the current power safety factor and the real-time system status data corresponding to the microgrid charging station power control system includes: A real-time state vector is constructed based on the real-time photovoltaic output data, the energy storage state of charge data, the energy storage health status, the power demand corresponding to each charging pile, the real-time output power corresponding to each charging pile, the real-time load rate of the transformer, and the current power safety factor. The real-time state vector is input into a preset policy network, and the mean and log standard deviation of the action vector are output. Based on the mean and logarithmic standard deviation of the action vector, a continuous action vector is obtained by mapping through the tanh activation function. The continuous action vector includes the target total power limit value and the target energy storage charging and discharging power command.

9. The method as described in claim 8, characterized in that, The method further includes: The target total power limit value is multiplied by the current power safety factor to obtain the target execution power value, which is then sent to each charging station for execution. Store the state transition tuple corresponding to the microgrid charging station power control system after execution into the experience replay buffer. Randomly sample batches of data from the experience replay buffer, and update the preset policy network by minimizing the temporal difference error.

10. A charging system, characterized in that, The system includes at least two power modules, a controller, a power distribution device, and at least one charging interface. The power distribution device is connected to the controller, each power module, and each charging interface. The power modules convert AC power from the grid into DC power and supply it to the charging interfaces. The controller acquires the power demand of each charging interface and generates scheduling instructions based on the connection relationship of the controllable switches in the power distribution device and the power demand, to execute the microgrid charging station power control method as described in any one of claims 1 to 9. The power distribution device controls the opening or closing of the controllable switches according to the scheduling instructions to distribute the output power of each power module to each charging interface.