A model prediction-based microgrid intelligent scheduling control method and system
Patent Information
- Application Number
- CN202610450594.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-08
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2046-04-08
AI Technical Summary
[0003]传统的微电网调度控制方法往往基于固定的运行模式和经验规则,难以准确应对微电网运行过程中的动态变化
[0007] Based on the above, by collecting real-time operational status data of the microgrid at the start of the current scheduling cycle, and inputting this data into a pre-built multi-timescale prediction model for operational status prediction processing, it is possible to generate future operational status prediction information for the microgrid, including the predicted output sequence of distributed power sources, the predicted status sequence of energy storage devices, and the predicted demand sequence of critical loads for multiple consecutive scheduling cycles. Based on this future operational status prediction information, a pre-set microgrid economic operation optimization objective function is solved on a rolling basis to obtain an initial set of scheduling control commands that meets economic operation requirements, effectively improving the economic efficiency of microgrid operation. The initial scheduling control command set is then input into a pre-trained microgrid safety and stability constraint verification model for dynamic safety constraint verification, generating a set of command safety margin indicators. This accurately assesses the safety level of the initial scheduling control commands under the physical constraints of the microgrid and promptly identifies potential safety risks. Based on the command safety margin indicator set, the initial scheduling control command set is relaxed and adjusted to generate a final scheduling control command sequence that meets the real-time operational safety boundary conditions of the microgrid, ensuring the safety and reliability of the scheduling control commands. Finally, the final scheduling and control command sequence is sent to the relevant controllers and terminals for execution, realizing the intelligent, safe and economical operation of the microgrid and improving the overall performance and stability of the microgrid.
Smart Images

Figure CN122338939B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of microgrid technology, and more specifically, to a model-predictive-based intelligent scheduling and control method and system for microgrids. Background Technology
[0002] Microgrids include distributed power sources, energy storage devices, and various loads. Their operation is affected by a variety of factors, such as weather changes and user electricity consumption behavior, and are highly uncertain and complex.
[0003] Traditional microgrid dispatch and control methods are often based on fixed operating modes and empirical rules, making it difficult to accurately respond to dynamic changes during microgrid operation. On the one hand, these methods lack effective prediction of the future operating status of the microgrid, failing to anticipate changes in distributed power output, energy storage device status, and critical load demand trends. This results in a lack of foresight in dispatch decisions, easily leading to problems such as power imbalance and equipment overload during operation. On the other hand, when generating dispatch and control commands, the safety and stability constraints of the microgrid are not fully considered, potentially causing commands to exceed the physical operating boundaries of equipment, leading to safety hazards and affecting the reliable operation of the microgrid. Summary of the Invention
[0004] In view of the aforementioned problems, and in conjunction with the first aspect of the present invention, embodiments of the present invention provide a model-predictive-based intelligent dispatch and control method for microgrids, the method comprising: The microgrid's real-time operating status data set is collected at the start of the current scheduling cycle. The real-time operating status data set includes distributed power generation output monitoring data, energy storage device status of charge monitoring data, and key load power monitoring data. The real-time operating status data set is input into a pre-built multi-timescale prediction model for operating status prediction processing to generate microgrid future operating status prediction information. The microgrid future operating status prediction information includes the distributed power generation prediction output sequence, energy storage device prediction status sequence, and critical load prediction demand sequence for multiple consecutive scheduling cycles in the future. Based on the predicted future operation status of the microgrid, the preset economic operation optimization objective function of the microgrid is solved in a rolling manner to obtain an initial scheduling control command set. The initial scheduling control command set satisfies the economic operation optimization objective function of the microgrid and includes the reference output command of each distributed power source and the reference charging and discharging command of the energy storage device. The initial scheduling control command set is input into a pre-trained microgrid security and stability constraint verification model for dynamic security constraint verification, generating a command security margin index set. The command security margin index set characterizes the security level of the initial scheduling control command set under the physical constraints of the microgrid. The initial scheduling control command set is relaxed and adjusted according to the set of command safety margin indicators to generate a final scheduling control command sequence that meets the real-time operation safety boundary conditions of the microgrid. The final scheduling control command sequence is then sent to the microgrid distributed power controller, energy storage device controller and load control terminal to trigger the execution operation.
[0005] Furthermore, embodiments of the present invention also provide a model-predictive-based intelligent dispatch and control system for microgrids, characterized in that it includes: A processor; a machine-readable storage medium for storing machine-executable instructions of the processor; wherein the processor is configured to execute the above-described model-predictive microgrid intelligent scheduling and control method by executing the machine-executable instructions.
[0006] In another aspect, embodiments of the present invention also provide a computer program product, the computer program product including machine-executable instructions, the machine-executable instructions being stored in a computer-readable storage medium, a processor of a computer device reading the machine-executable instructions from the computer-readable storage medium, the processor executing the machine-executable instructions, causing the computer device to execute the above-described model prediction-based microgrid intelligent scheduling and control method.
[0007] Based on the above, by collecting real-time operational status data of the microgrid at the start of the current scheduling cycle, and inputting this data into a pre-built multi-timescale prediction model for operational status prediction processing, it is possible to generate future operational status prediction information for the microgrid, including the predicted output sequence of distributed power sources, the predicted status sequence of energy storage devices, and the predicted demand sequence of critical loads for multiple consecutive scheduling cycles. Based on this future operational status prediction information, a pre-set microgrid economic operation optimization objective function is solved on a rolling basis to obtain an initial set of scheduling control commands that meets economic operation requirements, effectively improving the economic efficiency of microgrid operation. The initial scheduling control command set is then input into a pre-trained microgrid safety and stability constraint verification model for dynamic safety constraint verification, generating a set of command safety margin indicators. This accurately assesses the safety level of the initial scheduling control commands under the physical constraints of the microgrid and promptly identifies potential safety risks. Based on the command safety margin indicator set, the initial scheduling control command set is relaxed and adjusted to generate a final scheduling control command sequence that meets the real-time operational safety boundary conditions of the microgrid, ensuring the safety and reliability of the scheduling control commands. Finally, the final scheduling and control command sequence is sent to the relevant controllers and terminals for execution, realizing the intelligent, safe and economical operation of the microgrid and improving the overall performance and stability of the microgrid. Attached Figure Description
[0008] Figure 1This is a schematic diagram of the execution flow of the model prediction-based intelligent scheduling and control method for microgrids provided in an embodiment of the present invention.
[0009] Figure 2 This is a schematic diagram of exemplary hardware and software components of a model-predictive microgrid intelligent dispatch and control system provided in an embodiment of the present invention. Detailed Implementation
[0010] Figure 1 This is a flowchart illustrating a model-predictive-based intelligent dispatch and control method for microgrids provided in one embodiment of the present invention, which will be described in detail below.
[0011] Step S110: Collect the real-time operating status data set of the microgrid at the start of the current scheduling cycle. The real-time operating status data set includes distributed power output monitoring data, energy storage device charge status monitoring data, and key load power monitoring data.
[0012] In a specific embodiment, a microgrid comprising several distributed photovoltaic power stations, a wind turbine generator, a set of lithium iron phosphate energy storage battery cabinets, and multiple industrial and residential critical load nodes is used as an example. At the start time t of each scheduling cycle, a data acquisition operation is first performed. The scheduling cycle duration is set to T_d, and the formula for calculating the current time t is t = n × T_d, where n is the cycle number. Real-time data requests are sent to the intelligent monitoring terminals deployed at the grid connection interfaces of each distributed power source via industrial Ethernet. The intelligent monitoring terminals respond to the above instructions and immediately collect the output monitoring data of the distributed power source at that moment. For photovoltaic power plants, the above data includes DC-side voltage V_dc_i_t, DC-side current I_dc_i_t, AC active power P_pv_i_t, AC reactive power Q_pv_i_t, and grid connection point frequency F_pv_i_t, forming a vector P_gen_i_t=[V_dc_i_t, I_dc_i_t, P_pv_i_t, Q_pv_i_t, F_pv_i_t], where i represents the i-th distributed power source. For wind turbine generators, the above data includes active power P_wind_j_t, reactive power Q_wind_j_t, turbine speed R_wind_j_t, and pitch angle A_wind_j_t, forming a vector P_wind_j_t=[P_wind_j_t, Q_wind_j_t, R_wind_j_t, A_wind_j_t].
[0013] Simultaneously, a data acquisition command is sent to the energy storage device management system to collect the state of charge (SOC) monitoring data of the energy storage devices. This data includes the current remaining capacity percentage of the energy storage battery pack (SOC_ess_k_t), the current real-time charge / discharge power (P_ess_k_t), the average voltage of individual battery cells (V_cell_avg_k_t), the average temperature of the battery stack (Temp_ess_k_t), and the battery health status (SOH_ess_k_t), denoted as S_ess_k_t = [SOC_ess_k_t, P_ess_k_t, V_cell_avg_k_t, Temp_ess_k_t, SOH_ess_k_t], where k represents the k-th energy storage device.
[0014] In addition, data acquisition commands are sent to smart meters deployed at critical load nodes to collect critical load power monitoring data. For each critical load node, the above data includes active power P_load_m_t, reactive power Q_load_m_t, RMS voltage V_load_m_t, and RMS current I_load_m_t, forming a vector L_load_m_t=[P_load_m_t, Q_load_m_t, V_load_m_t, I_load_m_t], where m represents the m-th critical load node. All the collected data are accompanied by a high-precision timestamp. Finally, these data are aggregated to form the real-time operating status data set D_t={P_gen_i_t, S_ess_k_t, L_load_m_t} at the start time t of the scheduling cycle.
[0015] Step S120: Input the real-time operating status data set into the pre-built multi-timescale prediction model for operating status prediction processing to generate microgrid future operating status prediction information. The microgrid future operating status prediction information includes the distributed power generation prediction output sequence, energy storage device prediction status sequence, and critical load prediction demand sequence for multiple consecutive scheduling cycles in the future.
[0016] Next, the aforementioned D_t is input into the pre-built and trained multi-timescale prediction model. The prediction time domain is defined as containing H consecutive future scheduling cycles of equal length to the current scheduling cycle, i.e., future time points t+T_d, t+2×T_d, up to t+H×T_d. After internal calculation and processing, the multi-timescale prediction model finally outputs the microgrid's future operating status prediction information F_t. The aforementioned F_t comprises three core components: First, the predicted output sequence of distributed generation sources over multiple consecutive scheduling cycles, represented as a matrix P_pred with H rows and I columns. Each row of P_pred corresponds to a future scheduling cycle, and each column corresponds to a predicted output value of a distributed generation source. Second, the predicted state sequence of energy storage devices over multiple consecutive scheduling cycles, represented as a matrix S_pred with H rows and K columns. Each element of S_pred represents the predicted state of charge (SOC) of the corresponding energy storage device at the start of the corresponding scheduling cycle. Third, the predicted demand sequence of critical loads over multiple consecutive scheduling cycles, represented as a matrix L_pred with H rows and M columns. Each element of L_pred represents the predicted average power demand of the corresponding critical load node within the corresponding scheduling cycle. F_t serves as the foundational input information for subsequent economic optimization scheduling and safety verification.
[0017] Step S121: Perform time series decomposition processing on the distributed power generation output monitoring data in the real-time operating status data set, and extract the output cycle fluctuation characteristic component and output trend change characteristic component of the distributed power generation output monitoring data in historical periods.
[0018] Specifically, in the first prediction branch network within the aforementioned multi-timescale prediction model, for the input P_gen_i_t, since P_gen_i_t contains a long sequence consisting of power output measurements from the current time and multiple previous historical times, the first prediction branch network first calls an embedded time series decomposition module to process the sequence. This module employs an STL decomposition method based on a locally weighted regression scatter smoothing algorithm. For the historical power output sequence of one photovoltaic power station, the module first uses a locally weighted regression smoother and a neighboring data point weighted fitting method to extract the slowly changing long-term trend component in the sequence, denoted as the power output trend change feature component T_pv_i. Then, the extracted T_pv_i is subtracted from the original P_gen_i_t sequence to obtain a detrended intermediate sequence. Next, the detrended intermediate sequence is smoothed using a periodic subsequence smoothing method, forming subsequences based on the same time point each day. This extracts the sunrise and sunset power output patterns with a fixed 24-hour period caused by the Earth's rotation and revolution, denoted as the power output period fluctuation feature component C_pv_i. The remaining residual after decomposition is treated as random noise and does not participate in the construction of the main features. Finally, the output of the above module is a combination of feature vectors whose two dimensions, T_pv_i and C_pv_i, match the time length of the original sequence, and used as the input for subsequent prediction units.
[0019] Step S122: Input the output cycle fluctuation feature component and the output trend change feature component into the first prediction branch network of the multi-time scale prediction model for feature fusion prediction processing, and output a distributed power source predicted output sequence containing the output prediction values of each time point in multiple consecutive scheduling cycles in the future.
[0020] Next, the C_pv_i and T_pv_i extracted in step S121 are fed into the core prediction unit of the first prediction branch network. This unit employs a temporal prediction model based on a Long Short-Term Memory (LSTM) network encoder-decoder architecture. First, T_pv_i and C_pv_i, representing a preset historical window length (e.g., the past 48 hours), are concatenated along the feature dimension to form a comprehensive fused feature vector sequence. This sequence serves as the input to the encoder. The encoder consists of multiple stacked LSM network layers. These layers, through their ingenious input, forget, and output gate structures, progressively read the data from each time step in the fused feature vector sequence, encoding and compressing the temporal dependencies and pattern information contained in the entire historical sequence into a fixed-dimensional context vector. This vector represents the hidden state of the encoder's last time step. Then, the decoder uses this context vector as its initial hidden state and begins to progressively predict the output values for future scheduling cycles using autoregressive methods. In each decoding step, the decoder receives the predicted value output from the previous decoding step as the input for the current step, combines it with the current hidden state, and outputs a new hidden state. This new hidden state is then linearly mapped through a fully connected output layer to convert it into the distributed generation output prediction value for the corresponding future scheduling cycle. This decoding process is repeated H times, ultimately generating a sequence of output prediction values containing H time points, corresponding to the P_pred_i of the i-th distributed generation. The processing flow of steps S121 and S122 is executed in parallel or serially for all I distributed generation sources in the microgrid, ultimately yielding a complete P_pred matrix of shape H rows and I columns.
[0021] Step S123: Perform charging and discharging behavior identification processing on the energy storage device state of charge monitoring data in the real-time operating status data set to obtain the charging state change curve and discharging state change curve of the energy storage device state of charge monitoring data in historical time periods, and extract the charging rate feature parameter of the charging state change curve and the discharging depth feature parameter of the discharging state change curve.
[0022] Meanwhile, in the second prediction branch network of the aforementioned multi-timescale prediction model, the input S_ess_k_t is processed. S_ess_k_t is a time-series data containing multiple variables such as SOC_ess_k_t, P_ess_k_t, V_cell_avg_k_t, Temp_ess_k_t, and SOH_ess_k_t that change over time. First, a charging / discharging behavior recognition module built into the second prediction branch network segments the SOC_ess_k_t time-series data into different charging / discharging event segments based on the sign and magnitude of P_ess_k_t. When P_ess_k_t is positive, it is identified as a discharging behavior, and the SOC_ess_k_t data points within this continuous time interval are concatenated in chronological order to form a discharge state change curve. When P_ess_k_t is negative, it is identified as a charging behavior. The SOC_ess_k_t data points within this continuous time interval are concatenated in chronological order to form a charging state change curve. Then, for each identified charging state change curve, the charging rate feature parameter R_chg is extracted by calculating the change in SOC between its start and end points and dividing it by the average rate of change over the corresponding time span. This parameter quantifies the average speed at which the energy storage device absorbs electrical energy. For each identified discharging state change curve, the absolute value of the difference between its start and end point SOC values is calculated to extract the discharging depth feature parameter D_dchg. This parameter quantifies the relative proportion of energy released by the energy storage device in a single discharging event. Both R_chg and D_dchg are multidimensional feature vectors with a certain statistical distribution, rather than single values.
[0023] Step S124: Input the charging rate feature parameters into the charging behavior prediction subnetwork of the second prediction branch network of the multi-timescale prediction model for processing, input the discharge depth feature parameters into the discharge behavior prediction subnetwork of the second prediction branch network for processing, and output the energy storage device prediction state sequence containing the predicted state of charge values at each time point in multiple consecutive scheduling cycles through the fusion and state deduction of the subnetwork output results.
[0024] Next, R_chg extracted in step S123 is input into the dedicated charging behavior prediction subnetwork in the second prediction branch network. This subnetwork is a time-series prediction network built on gated recurrent units (GRUs), which learns the historical patterns of R_chg and predicts future charging events and their rates. Simultaneously, D_dchg is input into the dedicated discharging behavior prediction subnetwork in the second prediction branch network. This subnetwork is also a time-series prediction network based on GRUs, which learns the historical patterns of D_dchg and predicts future discharging events and their depths. The two subnetworks output the charging behavior probability sequence P_chg_prob and the discharging behavior probability sequence P_dchg_prob for a future time domain, along with corresponding rate and depth estimates. Then, a fusion and state deduction module of the second prediction branch network receives the outputs of the two subnetworks. This module first determines the most likely charging and discharging state for each future scheduling cycle based on P_chg_prob and P_dchg_prob. Then, using the current SOC_ess_k_t as the initial value, time-series extrapolation is performed according to the determined state and the corresponding rate or depth estimate, employing the principle of ampere-hour integration. For example, if a future scheduling cycle is determined to be in a charging state, the current SOC value is used as a basis, plus R_chg multiplied by T_d, to simulate and calculate the SOC value at the end of that cycle. Through the above cycle-by-cycle state determination and energy accumulation extrapolation, S_pred_k, containing the predicted SOC values at each time point within the next H consecutive scheduling cycles, is finally generated. Steps S123 and S124 are then performed on all K energy storage devices in the microgrid to obtain the complete S_pred matrix.
[0025] Step S125: Perform load component separation processing on the key load power monitoring data in the real-time operating status data set, decompose the basic load component and random fluctuating load component in the key load power monitoring data, and calculate the load change baseline curve of the basic load component in the historical period and the fluctuation amplitude statistical characteristics of the random fluctuating load component.
[0026] Meanwhile, in the third prediction branch network of the aforementioned multi-timescale prediction model, the input L_load_m_t is processed. L_load_m_t is also a multivariate time series containing P_load_m_t, Q_load_m_t, V_load_m_t, and I_load_m_t. First, the third prediction branch network incorporates a load component separation module. This module uses a wavelet transform-based algorithm to decompose the original L_load_m_t sequence into components of different frequencies. Using discrete wavelet transform, the original sequence is passed through a series of high-pass and low-pass filters, decomposing it into a basic load component representing the long-term stable variation of the load, typically corresponding to the approximate coefficient reconstruction sequence L_base_m_t after wavelet decomposition, and a random fluctuating load component representing rapid random fluctuations in the load, typically corresponding to the detailed coefficient reconstruction sequence L_rand_m_t after wavelet decomposition. Then, for the separated L_base_m_t, the module calculates its average value at the same time each day over a past period, such as the past week, and fits a smooth load change baseline curve L_base_m_curve. This curve reflects the typical daily load pattern of this load node under the influence of no special events. Simultaneously, for the separated L_rand_m_t, the module calculates its historical series standard deviation σ_rand_m and peak factor P_rand_m as the statistical feature of fluctuation amplitude V_vol_m=[σ_rand_m, P_rand_m]. This feature quantifies the severity of the random fluctuations in load around the baseline curve.
[0027] Step S126: Input the load change baseline curve and the fluctuation amplitude statistical characteristics into the third prediction branch network of the multi-timescale prediction model to perform load demand evolution prediction processing, and output a key load prediction demand sequence containing the load demand prediction values at each time point in multiple consecutive scheduling cycles in the future.
[0028] Next, the L_base_m_curve and V_vol_m calculated in step S125 are input into the core prediction unit of the third prediction branch network. This unit employs a hybrid prediction model combining an autoregressive integral moving average model and neural network error correction. First, the unit directly extrapolates L_base_m_curve to the next H scheduling cycles, obtaining a baseline prediction sequence L_base_pred. Then, the unit uses a multilayer perceptron neural network, taking the current L_load_m_t, time features (such as hour value H_hour, day of the week D_week), and external factors (such as temperature Temp_ext, holiday flag H_flag) as input, to predict the prediction error correction term ΔL_pred for each future scheduling cycle. This multilayer perceptron neural network includes an input layer, multiple hidden layers, and an output layer, capturing complex patterns that the baseline prediction cannot cover through nonlinear mapping. Finally, L_base_pred and ΔL_pred are added point-by-point to obtain the corrected prediction value L_corr_pred. Meanwhile, V_vol_m is used to generate the prediction confidence interval, but its mean prediction is the main output. Through the above method, the final output is L_pred_m, which contains the predicted load demand values at each time point within the next H consecutive scheduling cycles. Steps S125 and S126 are performed on all M critical load nodes in the microgrid to obtain the complete L_pred matrix.
[0029] Step S127: Align and combine the distributed power generation predicted output sequence, the energy storage device predicted state sequence, and the critical load predicted demand sequence according to the time order of the scheduling cycle to generate the microgrid future operation status prediction information. Each scheduling cycle in the microgrid future operation status prediction information includes a status prediction data unit containing a distributed power generation output prediction value, an energy storage device state of charge prediction value, and a critical load demand prediction value.
[0030] Finally, at the output of the aforementioned multi-timescale prediction model, an alignment and combination processing step is performed. This involves fusing the H-row, I-column P_pred matrix output from the first prediction branch network, the H-row, K-column S_pred matrix output from the second prediction branch network, and the H-row, M-column L_pred matrix output from the third prediction branch network. Specifically, the alignment and combination method is as follows: according to the chronological order of the scheduling cycles, i.e., the row indices of the matrix, a situation prediction data unit is created for each future scheduling cycle. For the h-th scheduling cycle in the future, the corresponding situation prediction data unit U_h is a structure containing three fields: the first field is the output prediction values of all I distributed power sources extracted from the h-th row of P_pred, forming the vector P_h=[P_pred_h1, P_pred_h2, ..., P_pred_hI]; the second field is the SOC prediction values of all K energy storage devices extracted from the h-th row of S_pred, forming the vector S_h=[S_pred_h1, S_pred_h2, ..., S_pred_hK]; the third field is the load demand prediction values of all M critical load nodes extracted from the h-th row of L_pred, forming the vector L_h=[L_pred_h1, L_pred_h2, ..., L_pred_hM]. Organizing all H of the above U_h values in order from h1 to h constitutes the final F_t={U_1, U_2, ..., U_H}. The above F_t is a time-series data container that clearly defines the expected state of the system at each future time.
[0031] Step S130: Based on the predicted future operating status of the microgrid, the preset economic operation optimization objective function of the microgrid is solved in a rolling manner to obtain an initial scheduling control command set. The initial scheduling control command set satisfies the economic operation optimization objective function of the microgrid and includes the reference output commands of each distributed power source and the reference charging and discharging commands of the energy storage device.
[0032] After obtaining the aforementioned F_t, the rolling optimization solver is started. This solver uses the predicted data in F_t as known conditions to iteratively optimize the preset microgrid economic operation objective function. The objective function is a mathematical expression aimed at minimizing the total operating cost of the microgrid system over the entire predicted time domain. The initial scheduling control command set U_init is the direct output of the optimization process. U_init is a data set containing the baseline output command value P_dg_base_i_h set for each distributed power source in each future scheduling cycle, and the baseline charge / discharge command value P_ess_base_k_h set for each energy storage device. P_dg_base_i_h specifically indicates the active power value that each distributed power source should output at various future times, while P_ess_base_k_h specifically indicates whether each energy storage device should be in a charging state (represented by negative power), a discharging state (represented by positive power), or a shutdown state (zero power) at various future times.
[0033] Step S131: Extract the status prediction data unit for each scheduling cycle from the future operation status prediction information of the microgrid. Calculate the net load prediction value of the microgrid system corresponding to each scheduling cycle based on the distributed power output prediction value and critical load demand prediction value in the status prediction data unit. Arrange the net load prediction values of the microgrid system for all scheduling cycles in chronological order to form a sequence of net load prediction values for the microgrid system.
[0034] The first step in the above rolling optimization solution is to analyze F_t. Iterate through each U_h in F_t, i.e., h from 1 to H. For the h-th U_h, read the output prediction values P_h of all I distributed power sources and sum them to obtain P_total_h = Σ_{i=1}^{I}P_h_i. Simultaneously, read the load demand prediction values L_h of all M critical load nodes and sum them to obtain L_total_h = Σ_{m=1}^{M}L_h_m. Then, subtract P_total_h from L_total_h to obtain the net load prediction value N_h = L_total_h - P_total_h for the microgrid system in this scheduling cycle, without considering energy storage and network losses. Arrange the N_h calculated over all H scheduling cycles into a one-dimensional vector according to the order of h from 1 to H, which constitutes the microgrid system net load prediction sequence N_load_pred=[N_1, N_2, ..., N_H].
[0035] Step S1311: Analyze the status prediction data unit of each scheduling cycle in the future operation status prediction information of the microgrid, read the distributed power output prediction value of the corresponding scheduling cycle from each status prediction data unit, and arrange the distributed power output prediction values of all scheduling cycles in chronological order of scheduling cycles to generate a distributed power output prediction time series vector.
[0036] Specifically, first, an empty matrix P_pred_seq with dimensions H rows and I columns is initialized. Then, for each h from 1 to H, the corresponding U_h is parsed, and the P_h vector with dimensions 1 row and I columns is extracted. This 1-row, 1-column P_h vector is used as the h-th row and filled into P_pred_seq. After processing all H scheduling cycles, P_pred_seq becomes a complete H-row, 1-column matrix. Each row of this matrix represents the output of all distributed power sources at a given time, and each column represents the output sequence of a single distributed power source across all time periods. This matrix is defined as the distributed power source output prediction time series vector P_pred_seq.
[0037] Step S1312: Read the critical load demand forecast value for the corresponding scheduling period from each situation prediction data unit, and arrange the critical load demand forecast values for all scheduling periods in chronological order of scheduling periods to generate a critical load demand forecast time series vector.
[0038] Similar to the steps above, initialize another empty matrix L_pred_seq with dimensions H rows and M columns. For each h from 1 to H, parse the corresponding U_h and extract the L_h vector, which has dimensions 1 row and M columns. Use this 1 row, M column L_h vector as the h-th row and fill it into L_pred_seq. After processing all H scheduling cycles, L_pred_seq becomes a complete H row, M column matrix. Each row of this matrix represents the demand of all critical loads at a given time, and each column represents the demand sequence of a critical load across all time periods. This matrix is defined as the critical load demand forecast time series vector L_pred_seq.
[0039] Step S1313: Subtract the critical load demand forecast value for each scheduling period from the distributed power output forecast value for the corresponding scheduling period in the distributed power output forecast time series vector to obtain the preliminary net load calculation value for each scheduling period.
[0040] Next, vector subtraction is performed. For each h from 1 to H, all M critical load demand forecasts in the h-th row are retrieved from L_pred_seq, and their sum is calculated as L_total_h = Σ_{m=1}^{M}L_pred_seq_h_m. Simultaneously, all I distributed generation output forecasts in the h-th row are retrieved from P_pred_seq, and their sum is calculated as P_total_h = Σ_{i=1}^{I}P_pred_seq_h_i. Then, the preliminary net load calculation value N_init_h = L_total_h - P_total_h for this scheduling period is calculated. This calculation is performed sequentially for h from 1 to H, resulting in H preliminary net load calculation values N_init = [N_init_1, N_init_2, ..., N_init_H].
[0041] Step S1314: Perform microgrid network loss compensation correction processing on the preliminary net load calculation value of each scheduling cycle. Calculate the network loss prediction coefficient corresponding to each scheduling cycle based on the real-time topology information of the microgrid system. Multiply the network loss prediction coefficient by the preliminary net load calculation value of the corresponding scheduling cycle to obtain the net load correction calculation value after considering network losses for each scheduling cycle.
[0042] Because power transmission within a microgrid incurs line losses and transformer losses, N_init needs to be corrected. The real-time topology information G_top of the microgrid system is obtained, which includes the parameters and connections of currently operational feeder segments, transformers, and other equipment. Based on G_top, a simplified power flow calculation or network loss estimation model, such as a model based on the loss factor method, is invoked to calculate the network loss prediction coefficient α_h for each scheduling cycle h. α_h is a coefficient greater than 1, and its specific value depends on the network structure and the currently predicted power flow distribution. The calculation formula can be expressed as α_h = 1 + f_loss(P_pred_seq_h, L_pred_seq_h, G_top), where f_loss is a loss function fitted based on historical data. Then, for each h, N_init_h is multiplied by the corresponding α_h to obtain the net load correction value N_corr_h = N_init_h × α_h, considering network losses.
[0043] Step S1315: The net load correction calculation values after considering network losses in each scheduling cycle are aggregated in the time order of the scheduling cycle to generate the net load prediction value sequence of the microgrid system. Each element in the net load prediction value sequence of the microgrid system corresponds to the net load prediction value of a scheduling cycle.
[0044] Finally, the N_corr_h calculated for all H scheduling cycles are combined into a one-dimensional vector according to the order of h from 1 to H. This vector is the final microgrid system net load prediction sequence N_load_pred=[N_corr_1, N_corr_2, ..., N_corr_H]. This sequence N_load_pred accurately reflects the net load demand that needs to be balanced by controllable resources within the microgrid, including the adjustable portion of distributed generation and energy storage devices, for each future scheduling cycle.
[0045] Step S132: Input the predicted net load sequence of the microgrid system as the constraint boundary condition for optimization solution into the preset microgrid economic operation optimization objective function. The microgrid economic operation optimization objective function aims to minimize the total operating cost of the microgrid system in the prediction time domain. The total operating cost includes the fuel cost parameters of each distributed power source, the start-up and shutdown cost parameters of each distributed power source, and the charging and discharging loss cost parameters of the energy storage device.
[0046] The aforementioned rolling optimization solver sets the N_load_pred generated in step S1315 as the boundary condition of the power balance constraint that must be satisfied in the optimization problem. Then, the solver loads the preset microgrid economic operation optimization objective function Obj. The mathematical form of Obj is a linear or mixed-integer linear expression, the objective of which is to minimize the total operating cost C_total over the entire prediction time domain H scheduling cycles from the current time. C_total is not a single cost, but a set of multiple cost parameters, and its expression is C_total=Σ_{h=1}^{H}[Σ_{i=1}^{I}(C_fuel_i(P_dg_i_h)+C_start_i(u_i_h,u_i_{h-1})+C_stop_i(u_i_h,u_i_{h-1}))+Σ_{k=1}^{K}C_loss_k(P_ess_k_h)]. Here, C_fuel_i is the fuel cost function proportional to P_dg_i_h, C_start_i and C_stop_i are start-stop cost functions related to the start-stop state variable u_i_h, and C_loss_k is the charging and discharging loss cost function related to the absolute value of P_ess_k_h. The task of the solver is to find a set of decision variables P_dg_i_h and P_ess_k_h that minimizes C_total under various constraints, including power balance.
[0047] Step S133: Call the mixed integer linear programming solver to perform iterative optimization calculation on the economic operation optimization objective function of the microgrid under the constraint boundary conditions. In each iteration, a set of candidate scheduling decision variables is generated. The set of candidate scheduling decision variables includes the candidate output commands of each distributed power source in each scheduling cycle and the candidate charging and discharging commands of the energy storage device in each scheduling cycle.
[0048] To solve the above Obj, a high-performance mixed-integer linear programming solver, such as CBC or Gurobi, is invoked. This solver employs algorithms such as branch and bound or cutting plane methods, iteratively searching within the feasible region defined by N_load_pred and other device constraints, such as the upper and lower limits of distributed power output P_dg_min_i≤P_dg_i_h≤P_dg_max_i, and the upper and lower limits of energy storage device power P_ess_min_k≤P_ess_k_h≤P_ess_max_k. During each iteration, the solver generates a set of candidate decision variable values by solving a linear programming relaxation problem based on the current branch and boundary information. These variable values constitute a candidate scheduling decision variable set U_cand. The aforementioned U_cand is a structured data body containing candidate output instructions for all distributed power sources in each of the next H scheduling cycles, i.e., an H-row, I-column matrix P_cand, and candidate charge / discharge instructions for all energy storage devices in each of the next H scheduling cycles, i.e., an H-row, K-column matrix S_cand, where positive numbers represent discharging and negative numbers represent charging.
[0049] Step S134: Perform microgrid power balance constraint verification processing on the candidate scheduling decision variable set, calculate the algebraic sum of the candidate output command of distributed power source and the candidate charge and discharge command of energy storage device (charge is negative, discharge is positive) corresponding to the candidate scheduling decision variable set, and use it as the predicted value of total adjustable power generation. Calculate the difference between the predicted value of total adjustable power generation and the predicted value of net load in the corresponding scheduling period in the microgrid system net load prediction value sequence to obtain the power balance deviation value for each scheduling period.
[0050] For each iteration of the solver, the generated U_cand needs to undergo rigorous feasibility verification. The first step is to verify the microgrid power balance constraints. Each h is iterated from 1 to H. For the h-th scheduling cycle, the candidate output command values P_cand_i_h for all I distributed power sources are extracted from U_cand, and their algebraic sum P_sum_cand_h = Σ_{i=1}^{I}P_cand_i_h. Simultaneously, the candidate charge / discharge command values S_cand_k_h for all K energy storage devices are extracted, and their algebraic sum S_sum_cand_h = Σ_{k=1}^{K}S_cand_k_h. The two are then added together to obtain the predicted total schedulable power generation for that scheduling cycle: G_total_cand_h = P_sum_cand_h + S_sum_cand_h. Finally, the h-th element N_corr_h is retrieved from N_load_pred. Finally, the power balance deviation value ΔP_h = G_total_cand_h - N_corr_h is calculated.
[0051] Step S135: Determine whether the power balance deviation value is within the preset power balance allowable error range. If the power balance deviation value exceeds the power balance allowable error range, adjust the distributed power source candidate output command and energy storage device candidate charging and discharging command in the corresponding scheduling period of the candidate scheduling decision variable set and re-perform the power balance constraint verification process until the power balance deviation value converges to the power balance allowable error range.
[0052] The calculated ΔP_h for each scheduling cycle is compared with a preset power balance tolerance range [-ε_p, ε_p]. ε_p is a very small positive number representing an acceptable small imbalance. If |ΔP_h|≤ε_p for all h from 1 to H, then U_cand is considered to have passed the power balance constraint verification. However, if there exists any h such that |ΔP_h|>ε_p, then U_cand does not satisfy the power balance constraint. In this case, the solver uses this constraint violation information as feedback and adjusts the U_cand generated in the next iteration by adding a cutting plane or adjusting branch variables, especially for P_cand_i_h and S_cand_k_h for the corresponding scheduling cycle h with severe constraint violations. The solver continues the above "generation-verification-adjustment" iterative process until the final generated U_cand makes |ΔP_h| for all H scheduling cycles satisfy the condition ≤ε_p, that is, converges to the tolerance range.
[0053] Step S136: Extract the set of candidate scheduling decision variables whose power balance deviation values converge to the allowable error range of power balance as a preliminary optimized scheduling instruction set that satisfies the power balance constraints of the microgrid.
[0054] Once the iterative process of the solver converges, the last U_cand that satisfies all |ΔP_h|≤ε_p is adopted as an intermediate result, called the preliminary optimized scheduling instruction set U_pre. This U_pre contains candidate output instructions P_pre_i_h for all distributed power sources in each scheduling cycle, and candidate charge / discharge instructions S_pre_k_h for all energy storage devices in each scheduling cycle. This set already satisfies the most important power balance constraint in the microgrid economic operation optimization objective function.
[0055] Step S137: Perform safety boundary constraint verification processing on the energy storage device state of charge (SBC) of the candidate charging and discharging commands in the preliminary optimized scheduling command set. Based on the SBC prediction value of the corresponding scheduling period in the predicted state sequence of the energy storage device and the simulated SBC value of the energy storage device after charging and discharging of the candidate charging and discharging commands, determine whether the simulated SBC value is within the preset upper and lower limits of safe operation of the energy storage device SBC.
[0056] While U_pre satisfies power balance, its safety for each individual energy storage device still needs to be verified. Next, for each energy storage device k (from 1 to K) and for each scheduling period h (from 1 to H), the safety boundary constraint verification process for the energy storage device's state of charge (SOC) is performed. First, the predicted SOC value for the corresponding energy storage device k at the beginning of scheduling period h is obtained from S_pred, denoted as SOC_pred_k_h. Then, the candidate charge / discharge command value S_pre_k_h for the corresponding energy storage device k within scheduling period h is obtained from U_pre. Based on the sign and magnitude of S_pre_k_h, combined with the energy storage device's capacity C_k and the charge / discharge efficiency parameters η_ch and η_dis, the simulated SOC value SOC_sim_k_h at the end of the period is simulated. The specific simulation calculation logic is as follows: If S_pre_k_h > 0 (discharging), then SOC_sim_k_h = SOC_pred_k_h - (S_pre_k_h × T_d) / (C_k × η_dis); if S_pre_k_h < 0 (charging), then SOC_sim_k_h = SOC_pred_k_h - (S_pre_k_h × T_d × η_ch) / C_k; if S_pre_k_h = 0, then SOC_sim_k_h = SOC_pred_k_h. After the calculation is completed, it is determined whether SOC_sim_k_h is within the preset safe operating limits of the energy storage device's state of charge, i.e., whether it satisfies SOC_min_k ≤ SOC_sim_k_h ≤ SOC_max_k.
[0057] Step S138: If the simulated state of charge value exceeds the upper and lower limits of the safe operation of the energy storage device's state of charge, then, with the constraint of bringing the simulated state of charge value back to the safe range, the candidate charging and discharging commands of the energy storage device in the corresponding scheduling period in the preliminary optimized scheduling command set are subjected to amplitude limiting correction processing to generate corrected energy storage device charging and discharging commands. The corrected energy storage device charging and discharging commands are then combined with the candidate output commands of distributed power sources in the corresponding scheduling period in the preliminary optimized scheduling command set to form the initial scheduling control command set that satisfies the safe boundary constraints of the energy storage device's state of charge. The initial scheduling control command set includes the reference output commands of each distributed power source and the reference charging and discharging commands of the energy storage device corresponding to each scheduling period.
[0058] If it is found in step S137 that for a certain energy storage device k and a certain scheduling period h, its SOC_sim_k_h exceeds the upper and lower limits of the safe operation range, a limiting correction process will be triggered. The objective of the correction process is to adjust the charging and discharging command of the energy storage device in this period, so that the corrected simulated SOC value returns to the safe range. If SOC_sim_k_h > SOC_max_k, it indicates that the discharge is excessive, and it is necessary to reduce the discharge power or switch to charging. Through reverse calculation, find the maximum allowable discharge power S_adj_k_h such that under the same initial SOC_pred_k_h, after discharging according to S_adj_k_h, the simulated SOC value is exactly equal to SOC_max_k, that is, solve S_adj_k_h=(SOC_pred_k_h-SOC_max_k)×C_k×η_dis / T_d, but it is necessary to ensure S_adj_k_h ≥ P_ess_min_k. If SOC_sim_k_h < SOC_min_k, it indicates that the charge is excessive or the discharge is too deep, it is necessary to reduce the charging power (absolute value) or increase the discharge, find the minimum allowable charging power (maximum discharge power) S_adj_k_h such that the simulated SOC value is not lower than SOC_min_k, that is, solve S_adj_k_h=(SOC_pred_k_h-SOC_min_k)×C_k / (T_d×η_ch) (negative when charging), and ensure that it is between P_ess_min_k and P_ess_max_k. This S_adj_k_h is the corrected charging and discharging command of the energy storage device. Replace the original S_pre_k_h corresponding to the energy storage device k and the scheduling period h in U_pre with S_adj_k_h. For all energy storage devices and periods that do not trigger the correction, the original S_pre_k_h is retained. After traversing all energy storage devices and all scheduling periods one by one and making necessary corrections, the final energy storage device charging and discharging command set S_base_k_h is recombined with the distributed power candidate output command P_pre_i_h corresponding to the scheduling period in the original U_pre, to form a brand new command set that fully meets all constraints. This final command set is the initial scheduling control command set U_init. The structure of the above U_init clearly defines: within each future scheduling period h, the reference output command value P_dg_base_i_h that each distributed power source i needs to output, and the reference charging and discharging command value P_ess_base_k_h (i.e., S_base_k_h) that each energy storage device k needs to execute.
[0059] Step S140: Input the initial scheduling control command set into the pre-trained microgrid security and stability constraint verification model for dynamic security constraint verification processing, and generate a command security margin index set, which characterizes the security level of the initial scheduling control command set under the physical constraints of the microgrid.
[0060] Although the aforementioned U_init satisfies the economic optimization objective and some device-level static constraints, it has not yet undergone comprehensive dynamic safety verification, i.e., verifying whether executing these commands in a real physical power grid would trigger safety issues such as voltage overruns, line overloads, or frequency instability. Therefore, the aforementioned U_init is input into a pre-trained microgrid safety and stability constraint verification model M_safety. M_safety is a deep learning model based on a combination of graph neural networks and time-series simulation. Its core function is to quickly simulate and evaluate the impact of a given scheduling command on grid safety over a future period. After complex internal processing of the input data, M_safety ultimately outputs a set of command safety margin indices, M_safety_set. M_safety_set is a multi-dimensional dataset that quantifies the proximity of the aforementioned U_init to the safe operating boundary under various physical constraints of the microgrid. A larger margin value indicates safer operation; a smaller margin value indicates closer proximity to the danger boundary, or even potential breach.
[0061] Step S141: Perform time-series expansion processing on the distributed power source reference output commands and the energy storage device reference charge / discharge commands corresponding to each scheduling cycle in the initial scheduling control command set to generate a time-seriesd scheduling command matrix containing the distributed power source reference output command values and the energy storage device reference charge / discharge command values in each scheduling cycle.
[0062] After receiving U_init, M_safety first performs a timing unpacking operation. The instruction data in U_init, originally organized by device-cycle, is reorganized into a standardized time-series scheduling instruction matrix U_seq. U_seq is a three-dimensional data structure, with dimensions H×(I+K). Specifically, each row of the matrix corresponds to one of the next H scheduling cycles. Each row is a long vector composed of two parts: the first part is the baseline output instruction value for all I distributed power sources in that cycle [P_dg_base_1_h, P_dg_base_2_h, ..., P_dg_base_I_h], and the second part is the baseline charge / discharge instruction value for all K energy storage devices in that cycle [P_ess_base_1_h, P_ess_base_2_h, ..., P_ess_base_K_h]. Thus, U_seq clearly describes the target power setpoint for all controllable resources at each future moment.
[0063] Step S142: Extract the real-time topology information of the microgrid system. The real-time topology information includes the location identifiers of each distributed power source access node, the location identifiers of each energy storage device access node, the location identifiers of each critical load node, and the description parameters of the feeder connection relationship between each node.
[0064] Meanwhile, the aforementioned M_safety also requires information on the current physical topology of the microgrid. Real-time topology information G_top is obtained from the microgrid energy management system. G_top is typically represented as a graph. In this graph, nodes represent individual buses or critical electrical connection points in the microgrid, denoted as Node_n, n=1..N_node. Each node is accompanied by its type identifier Type_n, such as DG_Node, ESS_Node, Load_Node, or Bus_Node. Edges in the graph represent feeder or transformer branches connecting these nodes, denoted as Edge_b, b=1..B, connecting node pairs (Node_u, Node_v). Each edge is accompanied by its electrical parameters, such as resistance R_b, reactance X_b, susceptance B_b, and current carrying capacity limit I_max_b. This graph structure G_top depicts the application points and propagation paths of dispatch commands in physical space.
[0065] Step S143: Input the time-seriesd scheduling instruction matrix and the real-time topology information into the feature encoding layer of the microgrid security and stability constraint verification model for joint embedding representation processing to generate a scheduling instruction topology coupling feature vector containing the spatial distribution features of scheduling instructions and the correlation between the microgrid topology.
[0066] The feature encoding layer of M_safety described above is responsible for deep fusion of the input U_seq and G_top. This layer first performs preliminary encoding on U_seq and G_top separately, and then learns the coupling relationship between them through an interaction module based on a graph attention network. The final output scheduling instruction topology coupling feature vector X_coupled is a high-dimensional vector that integrates the core information of "where and how much of a regulation instruction was applied".
[0067] Step S1431: Perform dimensional transformation processing on the time-seriesd scheduling instruction matrix, split the time-seriesd scheduling instruction matrix according to the device identifiers of distributed power sources and energy storage devices, and generate a single device output instruction timing sub-matrix corresponding to each distributed power source and a single device charge / discharge instruction timing sub-matrix corresponding to each energy storage device.
[0068] Inside the feature encoding layer, U_seq is first transformed in terms of dimension. Since the shape of U_seq is H×(I+K), the feature encoding layer splits it along the column dimension based on prior knowledge of the device identifier. After splitting, I vectors of shape H×1 are obtained, each vector corresponding to the output command timing of a distributed power source, i.e., the single-device output command timing submatrix of each distributed power source is P_dg_i_seq=[P_dg_base_i_1, P_dg_base_i_2, ..., P_dg_base_i_H]^T. At the same time, K vectors of shape H×1 are obtained, each vector corresponding to the charging and discharging command timing of an energy storage device, i.e., the single-device charging and discharging command timing submatrix of each energy storage device is P_ess_k_seq=[P_ess_base_k_1, P_ess_base_k_2, ..., P_ess_base_k_H]^T. This step restores the aggregated instruction matrix to timing signals that correspond one-to-one with specific physical devices.
[0069] Step S1432: Perform graph structure modeling processing on the real-time topology information, taking the distributed power sources, energy storage devices and key load nodes in the microgrid system as graph nodes, and the feeder connection relationships between the nodes as graph edges, to construct a microgrid topology connection graph, and assign a unique node embedding vector to each node of the microgrid topology connection graph.
[0070] The feature encoding layer also processes G_top. This layer formalizes G_top into a standard graph structure, namely the microgrid topology connection graph Graph_mg. In Graph_mg, all distributed generation nodes, energy storage device nodes, critical load nodes, and ordinary bus nodes are modeled as graph nodes. All feeders and transformer branches are modeled as graph edges connecting two nodes. Then, the feature encoding layer randomly initializes or generates a unique, learnable node embedding vector e_n for each graph node n, based on its type attribute Type_n. This e_n has a dimension of D_e and serves as the node's feature representation in the graph. This vector is continuously optimized during model training to capture the inherent role of the node in the power grid.
[0071] Step S1433: Input the timing sub-matrix of the single device output command corresponding to each distributed power source into the first fully connected network of the feature coding layer for feature mapping processing, and output the device output command embedding vector of each distributed power source.
[0072] Next, the aforementioned feature encoding layer feeds the P_dg_i_seq of each distributed power source into a first fully connected network FCN_1 with shared parameters. FCN_1, composed of multiple linear layers and nonlinear activation functions stacked together, maps and compresses the original time-series command sequence of length H into a fixed-dimensional embedding vector rich in semantic information. After processing by FCN_1, each distributed power source i obtains a corresponding device output command embedding vector v_dg_i = FCN_1(P_dg_i_seq), with dimension D_v.
[0073] Step S1434: Input the timing sub-matrix of the single device charge / discharge command corresponding to each energy storage device into the second fully connected network of the feature coding layer for feature mapping processing, and output the device charge / discharge command embedding vector of each energy storage device.
[0074] Similar to the steps described above, the feature encoding layer sends the P_ess_k_seq data of each energy storage device into a second fully connected network FCN_2 with shared parameters. The structure of FCN_2 is similar to FCN_1, but the weight parameters are independent to accommodate the characteristics of the charge / discharge commands. After processing by FCN_2, each energy storage device k receives a corresponding device charge / discharge command embedding vector v_ess_k = FCN_2(P_ess_k_seq), with the same dimension D_v, to ensure comparability with v_dg_i in the feature space.
[0075] Step S1435: Based on the association relationship of each node in the microgrid topology connection diagram, the device output command embedding vector of each distributed power source is added and fused with the node embedding vector of the corresponding node at the element level to obtain the distributed power source enhanced node vector of fused scheduling command information.
[0076] Now, the feature encoding layer needs to fuse the device-level instruction embedding vector with its position information in the power grid topology, i.e., the node embedding vector. For each distributed power source i, the corresponding node n_i is found in Graph_mg based on its access node identifier Node_ID_i. Then, the v_dg_i of the distributed power source is fused with the node embedding vector e_{n_i} of that node at the element-wise level to obtain a distributed power source enhanced node vector v_dg_enhanced_i = v_dg_i + e_{n_i} with the same dimension D_v.
[0077] Step S1436: Based on the association relationship of each node in the microgrid topology connection diagram, the device charging and discharging command embedding vector of each energy storage device is added and fused with the node embedding vector of the corresponding node at the element level to obtain the energy storage device enhanced node vector of fused scheduling command information.
[0078] Similarly, for each energy storage device k, the corresponding node n_k is found in Graph_mg based on its access node identifier Node_ID_k. Then, the v_ess_k of the energy storage device is element-wise added and fused with the node embedding vector e_{n_k} of the node to obtain an enhanced node vector v_ess_enhanced_k=v_ess_k+e_{n_k}.
[0079] Step S1437: The distributed power enhancement node vector, the energy storage device enhancement node vector, and the original node embedding vector of the critical load node are spliced together according to the node order of the microgrid topology connection diagram to generate a full node feature matrix containing all node information.
[0080] At this point, some nodes in the graph have acquired enhanced features from the fused instruction information. For critical load nodes, although there is no direct instruction embedding vector, their original node embedding vector e_{load} still contains their load characteristics and location information. The feature encoding layer now aggregates the final feature vectors of all nodes. Specifically, following the uniform order of all nodes in Graph_mg: Node_1, Node_2, ..., Node_{N_node}, for distributed power access nodes, their corresponding v_dg_enhanced_i is inserted; for energy storage device access nodes, their corresponding v_ess_enhanced_k is inserted; and for critical load nodes and other nodes, their original node embedding vector e_n is inserted. Stacking these vectors forms a full node feature matrix H_node with shape N_node×D_v.
[0081] Step S1438: Perform graph convolutional network propagation processing on the full node feature matrix, update the feature representation of each node by aggregating the feature information of neighboring nodes, and after multiple layers of graph convolution operations, extract the graph-level readout vector of the output layer as the topology coupling feature vector of the scheduling instruction.
[0082] Finally, the feature encoding layer inputs the aforementioned H_node into a multi-layer graph convolutional network (GCN). This GCN is composed of multiple stacked graph convolutional layers (GCN_layer). In each layer of graph convolution, each node aggregates the features of its neighboring nodes and updates its own feature representation through a learnable linear transformation and a nonlinear activation function. After L layers of propagation, the final features of each node not only contain its own command and location information but also information from its electrically close neighboring nodes. After all GCN layers have processed the data, the feature encoding layer performs a global readout operation on all node features in the output layer. For example, it averages the feature vectors of all nodes: ReadOut = (1 / N_node) × Σ_{n=1}^{N_node}H_node^{(L)}_n. The result of this global readout operation is a single, fixed-dimensional vector, namely the scheduling command topology coupling feature vector X_coupled = ReadOut. X_coupled is a highly abstract embedded representation of the combined effect of the future operating status of the entire microgrid and the scheduling commands.
[0083] Step S144: The dynamic power flow calculation module of the microgrid security and stability constraint verification model performs time-series power flow simulation on the topology coupling feature vector of the scheduling command. It simulates the voltage amplitude change trajectory of each node, the current amplitude change trajectory of each feeder, and the system frequency fluctuation trajectory of the microgrid system under the drive of the initial scheduling control command set in the future multiple consecutive scheduling cycles, and obtains a microgrid dynamic response simulation dataset containing the voltage time-series simulation data of each node, the current time-series simulation data of each feeder, and the system frequency time-series simulation data.
[0084] The aforementioned X_coupled is then fed into the dynamic power flow calculation module DPF_Net of M_safety. DPF_Net is a fast time-series simulator based on a physical information neural network. Taking X_coupled as input, DPF_Net utilizes its internal learning of grid dynamic characteristics from massive amounts of historical simulation data to directly deduce the changing trajectories of key electrical quantities in the microgrid system over the next H scheduling cycles. Specifically, the output of DPF_Net is a microgrid dynamic response simulation dataset R_sim. The aforementioned R_sim is a structured data volume containing three main parts: The first part is the timing simulation data of the voltage at each node, which can be organized into a matrix V_sim of shape H×N_node, where each row of V_sim_h represents the voltage amplitude of all nodes at a given time point; the second part is the timing simulation data of the current at each feeder, which can be organized into a matrix I_sim of shape H×B, where B is the total number of feeders, and each row of I_sim_h represents the current amplitude of all feeders at a given time point; the third part is the system frequency fluctuation trajectory, which can be organized into a vector Freq_sim=[f_1, f_2, ..., f_H] of length H.
[0085] Step S145: Call the safety margin calculation module of the microgrid safety and stability constraint verification model, calculate the absolute value of the difference between the voltage amplitude of each node in each scheduling cycle and the preset upper and lower limit boundary values of node voltage safety operation based on the voltage time-series simulation data of each node in the microgrid dynamic response simulation dataset, and obtain the original value of voltage safety margin of each node in each scheduling cycle.
[0086] Next, the aforementioned safety margin calculation module Sfty_Calc of M_safety starts to operate. This module first processes the voltage data. For each node n from 1 to N_node, and each scheduling period h from 1 to H, Sfty_Calc reads the simulated voltage amplitude value V_sim_n_h of the node at the corresponding moment from V_sim. Then, the preset lower limit value V_min_n and upper limit value V_max_n for safe voltage operation of the node are read from the system parameter library. Sfty_Calc calculates the absolute value of the difference between the voltage amplitude and the nearest boundary. The specific calculation logic is: first calculate d_low_n_h = V_sim_n_h - V_min_n, then calculate d_high_n_h = V_max_n - V_sim_n_h, and then take the number with the smaller absolute value among the two as the raw voltage safety margin value of the node at the corresponding moment, M_v_raw_n_h = min(|d_low_n_h|, |d_high_n_h|). If V_sim_n_h exceeds the upper limit or the lower limit, the corresponding difference will become a negative number, and after taking its absolute value, the M_v_raw_n_h will be a negative number, indicating the severity of the boundary violation.
[0087] Step S146: Calculate the absolute value of the difference between the current amplitude of each feeder in each scheduling period and the preset safety limit of feeder current-carrying capacity according to the time-series simulation data of each feeder current in the microgrid dynamic response simulation dataset, so as to obtain the raw current safety margin value of each feeder in each scheduling period.
[0088] Similarly, Sfty_Calc processes the current data. For each feeder b from 1 to B, and each scheduling period h from 1 to H, Sfty_Calc reads the simulated current amplitude value I_sim_b_h of the feeder at the corresponding moment from I_sim. Then, the preset safety limit I_max_b of the current-carrying capacity of the feeder is read from the system parameter library. Sfty_Calc calculates the raw current safety margin value M_i_raw_b_h = I_max_b - I_sim_b_h. If I_sim_b_h < I_max_b, M_i_raw_b_h is a positive number; if I_sim_b_h > I_max_b, M_i_raw_b_h is a negative number.
[0089] Step S147: Calculate the absolute value of the difference between the instantaneous value of the system frequency in each scheduling period and the preset upper and lower boundary values for safe operation of the system frequency according to the system frequency fluctuation trajectory in the microgrid dynamic response simulation dataset, so as to obtain the raw frequency safety margin value in each scheduling period.
[0090] Sfty_Calc then processes the frequency data. For each scheduling period h from 1 to H, Sfty_Calc reads the simulated system frequency value f_h from Freq_sim for that moment. Then, it reads the lower limit f_min and upper limit f_max of the system frequency safety operation from the system parameter library. Sfty_Calc calculates the raw value of the frequency safety margin M_f_raw_h = min(|f_h - f_min|, |f_max - f_h|).
[0091] Step S148: Perform normalization mapping on the original values of voltage safety margin of each node to generate voltage safety margin index; perform normalization mapping on the original values of current safety margin of each feeder to generate current safety margin index; perform normalization mapping on the original values of frequency safety margin of each scheduling cycle to generate frequency safety margin index.
[0092] The calculated raw margin values have different dimensions and numerical ranges. To facilitate comparison and subsequent relaxation adjustments, normalization is required. Sfty_Calc uses a unified Sigmoid function to map the raw margin values to the interval between 0 and 1. For the raw voltage margin value M_v_raw_n_h, the normalized voltage margin index M_v_norm_n_h = 1 / (1 + exp(-M_v_raw_n_h / σ_v)), where σ_v is the scale parameter of the voltage margin. For the raw current margin value Mi_i_raw_b_h, the normalized current margin index Mi_i_norm_b_h = 1 / (1 + exp(-M_i_raw_b_h / σ_i)), where σ_i is the scale parameter of the current margin. For the original frequency safety margin value M_f_raw_h, the normalized frequency safety margin index M_f_norm_h = 1 / (1+exp(-M_f_raw_h / σ_f)), where σ_f is the scaling parameter of the frequency margin. In this way, all indices are mapped to the (0, 1) interval, and the closer the value is to 1, the safer it is.
[0093] Step S149: The voltage safety margin index, the current safety margin index, and the frequency safety margin index are aggregated according to the time sequence of the scheduling cycle to generate an instruction safety margin index unit corresponding to each scheduling cycle, which contains the values of all safety margin indices within that scheduling cycle. The instruction safety margin index set is composed of the instruction safety margin index units of all scheduling cycles.
[0094] Finally, Sfty_Calc aggregates the results. For each scheduling cycle h, an instruction safety margin indicator unit U_m_h is created. The aforementioned U_m_h is a structure that contains the voltage safety margin indicators M_v_norm_n_h (n from 1 to N_node) for all N_node nodes, the current safety margin indicators M_i_norm_b_h (b from 1 to B) for all B feeders, and the frequency safety margin indicator M_f_norm_h for that cycle. Organizing the H U_m_h values from 1 to H in chronological order constitutes the final instruction safety margin indicator set M_safety_set = {U_m_1, U_m_2, ..., U_m_H}. The aforementioned M_safety_set comprehensively and quantitatively characterizes the performance of U_init in terms of dynamic safety.
[0095] Step S150: Based on the instruction safety margin index set, perform relaxation adjustment processing on the initial scheduling control instruction set to generate a final scheduling control instruction sequence that meets the real-time operation safety boundary conditions of the microgrid, and send the final scheduling control instruction sequence to the microgrid distributed power controller, energy storage device controller and load control terminal to trigger the execution operation.
[0096] After obtaining M_safety_set, the final core step is relaxation adjustment. The goal of the relaxation adjustment process is to modify U_init to a minimum while ensuring its dynamic safety performance meets pre-defined safety standards. M_safety_set is analyzed to identify dangerous scheduling cycles with excessively low or even negative safety margins and their corresponding hazardous equipment or lines. Then, the relevant instructions in U_init are adjusted accordingly to improve their safety margins. After a series of iterative or direct solutions, the final scheduling control instruction sequence U_final, which fully satisfies the safety boundary conditions, is generated. U_final is then decomposed into instruction packets for each scheduling cycle and distributed in real-time to each field controller via the microgrid communication network.
[0097] Step S151: Extract the instruction safety margin index unit for each scheduling cycle from the instruction safety margin index set, and perform minimum value search processing on all safety margin indices within each instruction safety margin index unit to obtain the minimum safety margin index corresponding to each scheduling cycle.
[0098] The relaxation adjustment process first performs a global review of M_safety_set. It iterates through each h from 1 to H, extracting its corresponding U_m_h. For each U_m_h, all voltage safety margin indices M_v_norm_n_h (all n), all current safety margin indices M_i_norm_b_h (all b), and frequency safety margin indices M_f_norm_h contained within it are grouped together to form a set S_h={M_v_norm_1_h, ..., M_v_norm_N_node_h, Mi_i_norm_1_h, ..., Mi_i_norm_B_h, M_f_norm_h}. Then, a minimum value search is performed on all values in S_h to find the smallest value, denoted as the minimum safety margin index M_min_h=min(S_h) for that scheduling period. This M_min_h represents the point closest to the safety boundary in the entire microgrid operating state during that scheduling period.
[0099] Step S152: Compare the minimum safety margin index corresponding to each scheduling cycle with the preset safety margin threshold, and determine whether the minimum safety margin index is less than the safety margin threshold. If the minimum safety margin index is less than the safety margin threshold, mark the scheduling cycle as a scheduling cycle to be adjusted, and record the corresponding node voltage safety margin index, corresponding feeder current safety margin index, or corresponding frequency safety margin index that caused the minimum safety margin index to appear in the scheduling cycle to be adjusted as the dominant safety constraint index.
[0100] Preset a safety margin threshold M_th, which is a positive number between 0 and 1, for example, M_th=0.2. For each h, compare M_min_h with M_th. If M_min_h ≥ M_th, it indicates that all safety indicators in this scheduling period meet the requirements, and no adjustment is needed. If M_min_h < M_th, it indicates that there is a safety risk in this scheduling period, which is marked as the to-be-adjusted scheduling period h_adj. Meanwhile, based on the result of the minimum value search in step S151, it is possible to trace which specific indicator leads to the occurrence of M_min_h. If the minimum value comes from the voltage safety margin indicator M_v_norm_n*_h of a certain node n*, the voltage safety margin indicator of this node is recorded as the dominant safety constraint indicator C_dom=(type=voltage, node=n*). If the minimum value comes from the current safety margin indicator M_i_norm_b*_h of a certain feeder b*, the current safety margin indicator of this feeder is recorded as the dominant safety constraint indicator C_dom=(type=current, branch=b*). If the minimum value comes from the frequency safety margin indicator M_f_norm_h, the frequency safety margin indicator is recorded as the dominant safety constraint indicator C_dom=(type=frequency). This step accurately locates the risk source.
[0101] Step S153: Perform output adjustment space analysis processing on the distributed power reference output instruction and the energy storage device reference charge-discharge instruction corresponding to the scheduling period in the initial scheduling control instruction set marked as the to-be-adjusted scheduling period, determine the specific object identifier of the distributed power source or energy storage device that needs to be adjusted according to the physical constraint type corresponding to the dominant safety constraint indicator, and calculate the adjustable range boundary parameter of the distributed power reference output instruction or the energy storage device reference charge-discharge instruction corresponding to the specific object identifier.
[0102] For each scheduling period h_adj marked as to be adjusted, the possibility of adjustment is analyzed. First, all distributed generation reference output commands P_dg_base_i_{h_adj} and all energy storage device reference charge / discharge commands P_ess_base_k_{h_adj} corresponding to this period are extracted from U_init. Then, the adjustment targets are determined according to the C_dom type determined in step S152. If C_dom is voltage-type and the dominant node is n*, the top distributed generation or energy storage devices with the greatest impact on the voltage of this node are identified according to the grid topology sensitivity matrix Sensitivity_V_P, and they are identified as the specific adjustment target set O_adj. If C_dom is current-type and the dominant branch is b*, the devices located upstream or downstream of this branch and contributing the most to its power flow are identified as O_adj. If C_dom is frequency-type, all devices with fast power regulation capabilities may become O_adj. After determining O_adj, the adjustable range boundary parameters of these objects in the current scheduling period command values are calculated. For a distributed power source i∈O_adj, its adjustable range boundary parameters are its technical minimum output P_dg_min_i and maximum output P_dg_max_i. For an energy storage device k∈O_adj, its adjustable range boundary parameters must consider not only its power limits P_ess_min_k and P_ess_max_k, but also its current SOC value SOC_pred_k_{h_adj} to calculate a dynamic power boundary P_ess_dyn_min_k and P_ess_dyn_max_k that is feasible at the current moment, ensuring that the adjustment does not violate the SOC constraint.
[0103] Step S154: Construct a relaxation adjustment optimization sub-problem based on the adjustable range boundary parameters and the dominant safety constraint index. The relaxation adjustment optimization sub-problem aims to improve the dominant safety constraint index of the scheduling cycle to be adjusted to no less than the safety margin threshold after adjusting the distributed power source reference output command or energy storage device reference charge / discharge command corresponding to the specific object identifier within the adjustable range boundary parameters.
[0104] Next, for each scheduling period h_adj to be adjusted, a relaxed adjustment optimization subproblem SubProb_{h_adj} with a scale much smaller than the global optimization problem is constructed. The decision variables of the above SubProb_{h_adj} are limited to the instruction values of the objects in O_adj determined in step S153, denoted as x_adj. The instruction values of all other devices remain unchanged in this subproblem from the values in U_init. The constraints of the above SubProb_{h_adj} are the boundary parameters of the adjustable range of these x_adj, that is, for dg_i, P_dg_min_i≤x_dg_i≤P_dg_max_i; for ess_k, P_ess_dyn_min_k≤x_ess_k≤P_ess_dyn_max_k. The optimization objective of the above SubProb_{h_adj} is: by adjusting x_adj, to improve the safety margin index corresponding to C_dom of the scheduling period h_adj to no less than M_th. To achieve this goal, a simplified, linear safety margin prediction model needs to be embedded in the subproblem. This model can quickly estimate the change in C_dom, ΔC_dom≈Sensitivity×Δx, based on the adjustment amount Δx of x_adj. Here, Sensitivity is obtained either based on the sensitivity information of M_safety or through local linearization of the physical formula. Therefore, the objective can be expressed as C_dom_current + Σ(Sensitivity_i×Δx_i) ≥ M_th.
[0105] Step S155: Call the local search algorithm to solve the relaxation adjustment optimization subproblem, obtain the output command of the distributed power source after adjustment or the charge / discharge command of the energy storage device after adjustment corresponding to the specific object identifier for each scheduling period to be adjusted, and replace the distributed power source reference output command or the energy storage device reference charge / discharge command in the initial scheduling control command set for the corresponding scheduling period with the distributed power source adjustment output command or the energy storage device adjustment charge / discharge command, to generate the intermediate scheduling control command set after relaxation adjustment.
[0106] Since the size of SubProb_{h_adj} is small, a fast local search algorithm, such as coordinate descent, can be used to solve it. The algorithm starts from the original instruction value x_adj_init in U_init and explores in small steps within the adjustable range to find the adjustment amount that satisfies the safety margin improvement target. The algorithm iterates until a feasible set of adjusted instructions x_adj_final is found, or the maximum number of iterations is reached. After solving, for each h_adj, a set of x_adj_final for O_adj is obtained. Then, these x_adj_final are used to replace the original instructions of the corresponding scheduling period in U_init. For all non-adjustable scheduling periods, the instructions remain unchanged. After one round of processing all scheduling periods to be adjusted, a relaxed and adjusted intermediate scheduling control instruction set U_mid is generated.
[0107] Step S156: Perform instruction smoothing transition processing on all non-adjustable scheduling cycles adjacent to the scheduling cycle to be adjusted in the intermediate scheduling control instruction set. Based on the time change gradient of the scheduling instruction value between the scheduling cycle to be adjusted and its adjacent scheduling cycles, fine-tune and correct the scheduling instructions of the adjacent non-adjustable scheduling cycles to generate the final scheduling control instruction sequence in which the time change gradient of the scheduling instructions meets the preset smoothing constraint conditions.
[0108] Direct replacement may cause drastic jumps in the instructions of some devices in U_mid over time, which is detrimental to device lifespan and grid stability. Therefore, a smooth transition is required. For each period marked as h_adj, check its adjacent periods h_adj-1 and h_adj+1 (if they exist). Calculate the gradient of the instruction value between h_adj and h_adj-1 for each adjusted device: G_prev = (x_adj_final - x_adj_prev) / T_d. If |G_prev| is greater than the preset maximum allowable gradient G_max, the instruction x_adj_prev of h_adj-1 needs to be fine-tuned to reduce its gradient to within G_max. Specifically, set a new x_adj_prev_new = x_adj_final - sign(G_prev) × G_max × T_d, ensuring it is within the device's allowable range. Similarly, perform similar processing for h_adj+1. Perform this operation on all h_adj, and finally generate U_final, which represents the time series gradient of the scheduling instructions that meets the preset smoothing constraints.
[0109] Step S157: Decompose the final scheduling control instruction sequence into final scheduling control instruction packages corresponding to each scheduling cycle according to the time order of the scheduling cycle. Each final scheduling control instruction package includes the final output instruction value of each distributed power source, the final charging and discharging instruction value of each energy storage device, and the demand response instruction value of each key load node within the scheduling cycle.
[0110] U_final is decomposed along the time dimension. For each h from 1 to H, all instructions for that period are extracted from U_final to form a final scheduling control instruction package U_final_h. The above U_final_h contains three parts: the final output instruction value P_dg_final_i_h for all I distributed power sources, the final charge / discharge instruction value P_ess_final_k_h for all K energy storage devices, and the demand response instruction value P_load_response_m_h for all M critical load nodes (this value can be indirectly derived from P_dg_final, P_ess_final, and the predicted load demand, or directly given by the optimization process).
[0111] Step S158: The final scheduling control instruction package for each scheduling cycle is sent to the corresponding distributed power controller, energy storage device controller, and load control terminal through the microgrid communication network. This triggers the distributed power controller to adjust the output power of the distributed power source according to the final output instruction value of each distributed power source, triggers the energy storage device controller to control the charging or discharging operation of the energy storage device according to the final charging or discharging instruction value of each energy storage device, and triggers the load control terminal to adjust the power demand of the critical load nodes according to the demand response instruction value of each critical load node.
[0112] Finally, U_final_h is transmitted in real time via the microgrid communication network. For each h, the corresponding U_final_h is sent out just before time t+(h-1)×T_d arrives. The distributed power controller receives P_dg_final_i_h and uses it as a setpoint to adjust the output power by regulating the inverter or prime mover. The energy storage device controller receives P_ess_final_k_h and controls the bidirectional converter to perform constant power charging or discharging based on its sign and magnitude. The load control terminal receives P_load_response_m_h and performs power control on some interruptible or adjustable loads according to the agreement signed with the user.
[0113] Step S210: After the final scheduling control command sequence is sent to the microgrid distributed power controller, energy storage device controller and load control terminal to trigger the execution operation, the actual operation feedback data set of the microgrid during the current scheduling cycle is collected in real time. The actual operation feedback data set includes the actual output feedback data of the distributed power source, the actual state of charge feedback data of the energy storage device and the actual power feedback data of the key load.
[0114] After executing step S158, the real-time feedback and model correction phase of the next scheduling cycle begins. During the execution of each scheduling cycle, actual operational feedback data is continuously collected. The currently executing scheduling cycle is defined as the h-th cycle, with a time interval of [t+(h-1)×T_d, t+h×T_d]. At the end of this cycle, i.e., at time t+h×T_d, the actual operational data for that cycle is collected. For distributed power sources, their average actual output value P_dg_act_i_h over the entire cycle is collected, forming a vector P_act_h=[P_dg_act_1_h, P_dg_act_2_h, ..., P_dg_act_I_h]. For energy storage devices, their actual state of charge SOC_ess_act_k_h at the end of the cycle is collected, forming a vector S_act_h=[SOC_ess_act_1_h, SOC_ess_act_2_h, ..., SOC_ess_act_K_h]. For critical load nodes, their average actual power P_load_act_m_h is collected within the cycle, forming a vector L_act_h=[P_load_act_1_h, P_load_act_2_h, ..., P_load_act_M_h]. The above data is summarized to form the actual operation feedback data set R_act_h={P_act_h, S_act_h, L_act_h} for the cycle.
[0115] Step S220: Compare the actual operation feedback data set with the final output command value of the distributed power source, the final charge and discharge command value of the energy storage device, and the demand response command value of the key load node in the corresponding scheduling period of the final scheduling control command sequence. Calculate the output tracking deviation value between the actual output feedback data of the distributed power source and the final output command value of the distributed power source in each scheduling period. Calculate the state of charge deviation value between the actual state of charge feedback data of the energy storage device and the expected state of charge value of the energy storage device simulated based on the final charge and discharge command value of the energy storage device in each scheduling period. Calculate the load response deviation value between the actual power feedback data of the key load and the demand response command value of the key load node in each scheduling period.
[0116] Obtain the final scheduling control instruction packet U_final_h corresponding to this cycle, and extract the final output instruction value P_dg_final_i_h of the distributed power source, the final charge / discharge instruction value P_ess_final_k_h of the energy storage device, and the demand response instruction value P_load_res_m_h of the critical load node from it. First, calculate the output tracking deviation value ΔP_i_h = P_dg_act_i_h - P_dg_final_i_h. Then, based on P_ess_final_k_h and the actual SOC value SOC_ess_act_k_{h-1} at the beginning of this cycle (if h=1, use the initial SOC), simulate and extrapolate the expected state of charge value SOC_exp_k_h at the end of this cycle. The simulation formula is as follows: If P_ess_final_k_h > 0 (discharging), then SOC_exp_k_h = SOC_ess_act_k_{h-1} - (P_ess_final_k_h × T_d) / (C_k × η_dis); if P_ess_final_k_h < 0 (charging), then SOC_exp_k_h = SOC_ess_act_k_{h-1} - (P_ess_final_k_h × T_d × η_ch) / C_k; if P_ess_final_k_h = 0, then SOC_exp_k_h = SOC_ess_act_k_{h-1}. Then, the state-of-charge deviation ΔSOC_k_h = SOC_ess_act_k_h - SOC_exp_k_h is calculated. Finally, the load response deviation value ΔP_load_m_h is calculated as P_load_act_m_h - P_load_res_m_h.
[0117] Step S230: The output tracking deviation value, the state of charge deviation value, and the load response deviation value are collected in the time order of the scheduling cycle to generate the instruction execution deviation measurement unit corresponding to each scheduling cycle. The instruction execution deviation measurement units of all scheduling cycles constitute the microgrid scheduling instruction execution deviation information set.
[0118] All calculated deviation values are aggregated over a period h. For each scheduling period h, a command execution deviation metric unit U_err_h is created. U_err_h contains three vectors: the output tracking deviation values ΔP_h=[ΔP_1_h, ΔP_2_h, ..., ΔP_I_h] for all I distributed power sources; the state-of-charge deviation values ΔSOC_h=[ΔSOC_1_h, ΔSOC_2_h, ..., ΔSOC_K_h] for all K energy storage devices; and the load response deviation values ΔP_load_h=[ΔP_load_1_h, ΔP_load_2_h, ..., ΔP_load_M_h] for all M critical load nodes. The H U_err_h values from h1 to H are organized in chronological order to form the microgrid scheduling command execution deviation information set Err_set={U_err_1, U_err_2, ..., U_err_H}.
[0119] Step S240: Input the set of microgrid dispatch command execution deviation information into the pre-built model prediction error online correction module for prediction deviation source analysis and processing. Calculate the prediction deviation correction gradient of the distributed power generation output prediction model based on the output tracking deviation value through backpropagation. Calculate the prediction deviation correction gradient of the energy storage device status prediction model based on the state of charge deviation value through backpropagation. Calculate the prediction deviation correction gradient of the critical load demand prediction model based on the load response deviation value through backpropagation.
[0120] The Err_set is input into the pre-built online model prediction error correction module Adapt_Model. Adapt_Model first performs bias source tracing. For the distributed power source part, ΔP_h is used as the loss signal and backpropagated along the computation graph of the first prediction branch network of the multi-timescale prediction model. Specifically, the gradient of the loss function L_dg=(1 / I)×Σ(ΔP_i_h)^2 with respect to each weight parameter W_dg in the first prediction branch network is calculated as ∇W_dg=∂L_dg / ∂W_dg. Similarly, for the energy storage device, ΔSOC_h is used as the loss signal, and the gradient of L_ess=(1 / K)×Σ(ΔSOC_k_h)^2 with respect to each weight parameter W_ess in the second prediction branch network is calculated as ∇W_ess=∂L_ess / ∂W_ess. For critical loads, ΔP_load_h is used as the loss signal. The gradient of L_load=(1 / M)×Σ(ΔP_load_m_h)^2 with respect to each weight parameter W_load in the third prediction branch network is calculated as ∇W_load=∂L_load / ∂W_load. The gradient indicates the direction and magnitude of the adjustment of each network weight parameter in order to reduce the prediction error.
[0121] Step S250: Use the prediction deviation correction gradient of the distributed power output prediction model to update and adjust the network weight parameters of the first prediction branch network of the multi-timescale prediction model online, and generate the corrected distributed power output prediction branch network.
[0122] Based on the calculated gradient ∇W_dg, the weight parameters of the first prediction branch network are updated online using stochastic gradient descent or its variants. The update formula is W_dg_new = W_dg_old - α × ∇W_dg, where α is a preset online learning rate, a small positive number. Through this step, the corrected distributed power supply output prediction branch Network_DG_new is obtained.
[0123] Step S260: Use the prediction bias correction gradient of the energy storage device state prediction model to update and adjust the network weight parameters of the second prediction branch network of the multi-timescale prediction model online, and generate the corrected energy storage device state prediction branch network.
[0124] Similarly, the weight parameters of the second prediction branch network are updated online based on the gradient ∇W_ess. The update formula is W_ess_new = W_ess_old - α × ∇W_ess. This yields the corrected energy storage device state prediction branch Network_ESS_new.
[0125] Step S270: Use the prediction deviation correction gradient of the critical load demand prediction model to update and adjust the network weight parameters of the third prediction branch network of the multi-timescale prediction model online, and generate the corrected critical load demand prediction branch network.
[0126] Similarly, the weight parameters of the third prediction branch network are updated online based on the gradient ∇W_load. The update formula is W_load_new = W_load_old - α × ∇W_load. This yields the corrected critical load demand prediction branch, Network_Load_new.
[0127] Step S280: Combine the modified distributed power output prediction branch network, the modified energy storage device status prediction branch network, and the modified critical load demand prediction branch network into an updated multi-timescale prediction model, and use the updated multi-timescale prediction model to replace the original multi-timescale prediction model for the operation status prediction processing of the next scheduling cycle.
[0128] Finally, Network_DG_new, Network_ESS_new, and Network_Load_new are recombined into a complete, updated multi-timescale prediction Model_new. At the start of the next scheduling cycle, t+H×T_d, this Model_new will replace the old model to generate the next round of microgrid future operation status prediction information F_{t+H}. This completes a full closed loop of online learning and model adaptive update.
[0129] For example, in step S310: before inputting the initial scheduling control command set into the pre-trained microgrid security and stability constraint verification model for dynamic security constraint verification, the microgrid security and stability constraint verification model is subjected to offline training and online collaborative update processing.
[0130] Before the model is officially put into use, it needs to be trained offline and updated online during operation to ensure its accuracy.
[0131] Step S311: Collect a set of historical operating status data samples of the microgrid system during the historical operating period, a set of historical dispatch instructions corresponding to the set of historical operating status data samples, and a set of historical safety margin indicators corresponding to the set of historical dispatch instructions. The set of historical safety margin indicators includes historical voltage safety margin records of each node, historical current safety margin records of each feeder, and historical frequency safety margin records of the system caused by each historical dispatch instruction sample in the actual operation of the microgrid.
[0132] Historical data over a given period is collected. There are T historical sample points. For each sample point τ, historical operating status data D_hist_τ and historical scheduling instructions U_hist_τ executed under that status are collected. Simultaneously, through actual measurements or high-precision offline simulations, the actual voltage safety margin M_v_hist_n_τ, feeder current safety margin M_i_hist_b_τ, and system frequency safety margin M_f_hist_τ achieved by the microgrid after executing U_hist_τ are obtained. These margin values are aggregated to form a historical safety margin index sample set M_hist_τ. Finally, a training dataset Train_Set={(D_hist_τ, U_hist_τ, M_hist_τ)|τ=1..T} is formed.
[0133] Step S312: Use the historical operating status data sample set and the historical scheduling instruction sample set as training input data, and the historical safety margin index sample set as training label data to construct an initial microgrid safety and stability constraint verification model.
[0134] An initial microgrid safety and stability constraint verification model M_safety_init is constructed, whose structure is completely consistent with M_safety described in steps S140 to S149. The input of the model is (D_hist_τ, U_hist_τ), and the expected output is the predicted safety margin index M_pred_τ.
[0135] Step S313: The training input data is forward-propagated through the initial microgrid safety and stability constraint verification model to generate a set of predicted safety margin indicators. The set of predicted safety margin indicators includes the predicted voltage safety margin of each node, the predicted current safety margin of each feeder, and the predicted frequency safety margin of the system.
[0136] Each pair (D_hist_τ, U_hist_τ) in the training dataset is input into M_safety_init. The model performs forward propagation, and after the complete computation process from steps S141 to S149, it finally outputs a set of predicted safety margin indices M_pred_τ={M_v_pred_n_τ, M_i_pred_b_τ, M_f_pred_τ}.
[0137] Step S314: Calculate the mean squared error loss value between the predicted safety margin index set and the corresponding historical safety margin index sample set in the training label data. Based on the mean squared error loss value, iteratively optimize and adjust the network weight parameters of the initial microgrid safety and stability constraint verification model through the backpropagation algorithm until the mean squared error loss value converges to below the preset training loss threshold, thereby obtaining the microgrid safety and stability constraint verification model that has been trained offline.
[0138] Calculate the mean squared error loss between the predicted value and the historical true value: L_mse = (1 / T) × Σ_τ[Σ_n(M_v_pred_n_τ-M_v_hist_n_τ)^2 + Σ_b(M_i_pred_b_τ-M_i_hist_b_τ)^2 + (M_f_pred_τ-M_f_hist_τ)^2]. Then, based on L_mse, calculate the gradients of all trainable parameters in M_safety_init using the backpropagation algorithm, and update the weights using optimizers such as Adam. Repeat steps S313 and S314, traversing the entire training dataset multiple times, until L_mse converges to below the preset training loss threshold θ_loss. At this point, the offline-trained model M_safety_offline is obtained.
[0139] Step S315: Deploy the offline trained microgrid safety and stability constraint verification model to the microgrid dispatch and control system. During the real-time operation of the microgrid, continuously collect the actual safety margin feedback data set after each dispatch cycle. The actual safety margin feedback data set includes the actual voltage safety margin feedback value of each node, the actual current safety margin feedback value of each feeder, and the actual frequency safety margin feedback value of the system.
[0140] Deploy M_safety_offline to the actual operating environment. After each scheduling cycle is completed, for example, after the h-th cycle, collect the actual safety margin feedback data for that cycle. Using PMUs or smart meters deployed at each node, measure the actual minimum voltage V_act_min_n_h and maximum voltage V_act_max_n_h for each node during that cycle, and calculate the actual voltage safety margin M_v_act_n_h = min(|V_act_min_n_h - V_min_n|, |V_act_max_n_h - V_max_n|). Calculate the actual current safety margin Mi_i_act_b_h = I_max_b - I_act_max_b_h by measuring the actual maximum current I_act_max_b_h for each feeder. By measuring the actual minimum and maximum values of the system frequency, f_act_min_h and f_act_max_h, the actual frequency safety margin M_f_act_h = min(|f_act_min_h - f_min|, |f_act_max_h - f_max|). These actual values are then aggregated to form the actual safety margin feedback data set M_act_h for that cycle.
[0141] Step S316: Use the real-time running status data set and the initial scheduling control instruction set of the scheduling cycle corresponding to the generated actual safety margin feedback data set as online training input data, and use the actual safety margin feedback data set as online training label data to construct online fine-tuning training data tuples.
[0142] Obtain the real-time runtime status data set D_h at the start of the scheduling cycle corresponding to M_act_h, and the initial scheduling control instruction set U_init_h executed in that cycle (note that the initial instructions before verification are used here, not the final executed instructions, because the model needs to learn to predict the risk of the initial instructions). Use (D_h, U_init_h) as the input for online training and M_act_h as the label for online training to form an online fine-tuning training data tuple Online_Tuple_h=(D_h, U_init_h, M_act_h).
[0143] Step S317: Input the accumulated online fine-tuning training data tuples from multiple scheduling cycles into the offline-trained microgrid safety and stability constraint verification model for incremental learning processing. Calculate the online fine-tuning loss value between the model output corresponding to the online fine-tuning training data tuples and the actual safety margin feedback data set. Based on the online fine-tuning loss value, perform small-batch gradient update processing on the network weight parameters of the offline-trained microgrid safety and stability constraint verification model to generate a collaboratively updated microgrid safety and stability constraint verification model that adapts to the latest operating characteristics of the microgrid. Replace the original microgrid safety and stability constraint verification model with the collaboratively updated microgrid safety and stability constraint verification model for dynamic safety constraint verification processing in subsequent scheduling cycles.
[0144] After running for a certain period of time, for example, after accumulating N_online Online_Tuple_h, an online fine-tuning is initiated. These N_online tuples are treated as a mini-batch and input into the currently used model M_safety_current (initially M_safety_offline). The model performs forward propagation on each tuple to obtain the prediction margin M_pred_h, and calculates the online fine-tuning loss L_online=(1 / N_online)×Σ_h[Σ_n(M_v_pred_n_h-M_v_act_n_h)^2+Σ_b(M_i_pred_b_h-M_i_act_b_h)^2+(M_f_pred_h-M_f_act_h)^2]. Then, the gradient is calculated based on L_online, and a small batch gradient update is performed on the model weights using a small online learning rate β: W_new=W_old-β×∇L_online. The updated model, M_safety_updated, is obtained after the update. The original M_safety_current is immediately replaced with M_safety_updated for dynamic safety constraint verification in the next scheduling cycle. Through this method, the model can continuously adapt to new operating characteristics of the microgrid caused by equipment aging, environmental changes, and other factors.
[0145] For example, in step S410: during the process of relaxing and adjusting the initial scheduling control instruction set according to the instruction safety margin index set to generate the final scheduling control instruction sequence that meets the real-time operation safety boundary conditions of the microgrid, multi-objective collaborative optimization and emergency backup scheduling instruction generation are performed simultaneously.
[0146] While performing relaxation adjustments in step S150, a multi-objective collaborative optimization and emergency backup scheduling instruction generation process is initiated in parallel to further improve the system's robustness and ability to respond to emergencies.
[0147] Step S411: Extract the voltage safety margin index of all nodes, the current safety margin index of all feeders, and the frequency safety margin index of all scheduling cycles from the instruction safety margin index set. Perform statistical analysis on the voltage safety margin index of all nodes and calculate the minimum, mean, and variance of the voltage safety margin index as statistical features of voltage safety margin.
[0148] Extract all data from M_safety_set. For voltage, obtain M_v_norm_n_h for all h and n. Calculate its minimum value M_v_min = min(M_v_norm_n_h), mean μ_v = (1 / (H×N_node))×Σ_hΣ_nM_v_norm_n_h, and variance σ_v^2 = (1 / (H×N_node))×Σ_hΣ_n(M_v_norm_n_h-μ_v)^2. These three statistics constitute the voltage safety margin statistical feature F_v = [M_v_min, μ_v, σ_v^2].
[0149] Step S412: Perform statistical analysis on all the feeder current safety margin indicators, and calculate the minimum, mean and variance of the current safety margin indicators as statistical characteristics of the current safety margin.
[0150] For current, extract M_i_norm_b_h for all h and b. Calculate its minimum value M_i_min, mean μ_i, and variance σ_i^2 to form the current safety margin statistical feature F_i=[M_i_min, μ_i, σ_i^2].
[0151] Step S413: Perform statistical analysis on the frequency safety margin indices of all scheduling cycles, and calculate the minimum, mean, and variance of the frequency safety margin indices as statistical features of the frequency safety margin.
[0152] For a frequency, extract M_f_norm_h for all h. Calculate its minimum value M_f_min, mean μ_f, and variance σ_f^2, which constitute the frequency safety margin statistical feature F_f=[M_f_min, μ_f, σ_f^2].
[0153] Step S414: The voltage safety margin statistical characteristics, the current safety margin statistical characteristics, the frequency safety margin statistical characteristics, and the total operating cost parameter in the microgrid economic operation optimization objective function are standardized respectively. The standardized operating cost parameter and each safety margin statistical characteristic are jointly optimized and modeled in a multi-objective manner to construct a multi-objective collaborative optimization function that includes the objectives of minimizing operating cost, maximizing voltage safety margin, maximizing current safety margin, and maximizing frequency safety margin.
[0154] Obtain the total operating cost C_total (i.e., the minimum value of Obj) from the optimization results of step S130. Since C_total has different dimensions than the safety margin index, it needs to be normalized. Let C_max and C_min be the maximum and minimum historical operating costs, then the normalized cost C_norm = (C_total - C_min) / (C_max - C_min). Similarly, the safety margin statistical characteristics are already between 0 and 1 and can be used directly. Construct a multi-objective collaborative optimization function Obj_multi, whose objective is to simultaneously minimize C_norm and maximize F_v, F_i, and F_f. Since it is a multi-objective problem, it can be transformed into a single-objective problem, for example, by using the weighted sum method: Obj_multi=min(w_c×C_norm-w_v×(w1×M_v_min+w2×μ_v-w3×σ_v^2)-w_i×(w1×M_i_min+w2×μ_i-w3×σ_i^2)-w_f×(w1×M_f_min+w2×μ_f-w3×σ_f^2)), where w_c, w_v, w_i, and w_f are weight coefficients, and w1, w2, and w3 are internal weights, reflecting the preference for the minimum, mean, and variance.
[0155] Step S415: Perform Pareto optimal solution set solving on the multi-objective cooperative optimization function to generate a set of Pareto optimal scheduling instruction candidates that achieve different trade-offs between operating costs and various safety margins.
[0156] A multi-objective evolutionary algorithm, such as NSGA-II, is used to solve Obj_multi. Through iterative evolution, the algorithm generates a set of non-dominated solutions, namely the Pareto optimal solution set Pareto_Set = {U_pareto_1, U_pareto_2, ..., U_pareto_P}. Each U_pareto_p in this set represents a different trade-off between operating cost and various safety margins; no single solution is superior to another in all objectives.
[0157] Step S416: Select the scheduling instruction with the highest matching degree with the current microgrid operating state from the Pareto optimal scheduling instruction candidate set as the primary final scheduling control instruction sequence. At the same time, select several Pareto optimal scheduling instructions that are closest to the primary final scheduling control instruction sequence in the decision variable space and have complementary safety margin distributions as the emergency backup scheduling instruction sequence.
[0158] Select one option, U_main, from the Pareto_Set as the primary option. The selection criterion could be its matching degree with the current running state D_t, such as choosing the option whose safety margin distribution is closest to the current actual safety margin and also has the lowest cost. Then, search the Pareto_Set for several options that are closest to U_main in the Euclidean distance of the decision variable space (i.e., the vector space composed of instruction values) and whose safety margin distribution is complementary to U_main. Complementarity means that the index with a lower safety margin in U_main has a higher safety margin in the backup option. For example, two backup options, U_spare_1 and U_spare_2, are selected.
[0159] Step S417: Perform executable condition labeling processing on each emergency backup dispatch instruction in the emergency backup dispatch instruction sequence, and label each emergency backup dispatch instruction with the applicable microgrid sudden disturbance scenario type identifier and switching trigger condition parameters. The sudden disturbance scenario type identifier includes the distributed power sudden grid disconnection scenario identifier, the critical load sudden increase scenario identifier, and the energy storage device failure scenario identifier.
[0160] Each U_spare is labeled with its applicable scenario and triggering conditions. For example, U_spare_1, characterized by increased diesel generator output and reduced energy storage discharge depth, can be labeled as a distributed power generation sudden grid disconnection scenario, with the triggering condition set when photovoltaic or wind power output drops by more than ΔP_threshold within 10 seconds. U_spare_2, characterized by increased energy storage reserve capacity, can be labeled as a critical load surge scenario, with the triggering condition set when critical load rises by more than ΔL_threshold within 5 seconds. Triggering condition parameters include specific values such as power change rate, duration, and voltage drop depth.
[0161] Step S418: While sending the primary final dispatch control command sequence to the microgrid distributed power controller, energy storage device controller and load control terminal, the emergency backup dispatch command sequence and its marked executable condition tags are stored in the emergency command cache area of the microgrid dispatch control system, and an association listening channel between the emergency command cache area and the microgrid real-time disturbance monitoring module is established.
[0162] While executing step S158 and issuing U_main, U_spare_1, U_spare_2, and their corresponding scenario type identifiers and trigger condition parameters are packaged and stored in the emergency command cache area Cache_Emer of the microgrid dispatch and control system. Simultaneously, a real-time monitoring channel is established between Cache_Emer and the microgrid real-time disturbance monitoring module Monitor_Dist.
[0163] Step S419: When the microgrid real-time disturbance monitoring module detects that the current operating status of the microgrid meets the switching trigger condition parameters of a certain emergency backup scheduling instruction in the emergency backup scheduling instruction sequence, it immediately retrieves the corresponding emergency backup scheduling instruction from the emergency instruction cache area and sends the emergency backup scheduling instruction to replace the currently executed primary final scheduling control instruction sequence to the microgrid distributed power controller, energy storage device controller and load control terminal to trigger emergency response operation.
[0164] Monitor_Dust analyzes rapidly sampled data from devices such as PMUs in real time. Once it detects that an event's characteristics match the trigger condition of a U_spare stored in Cache_Emer (e.g., detecting a drop in total photovoltaic output exceeding ΔP_threshold within 5 seconds), an interrupt is immediately triggered. The interrupt handler quickly retrieves the corresponding U_spare_1 from Cache_Emer based on the matched scenario identifier. Then, bypassing the normal optimized scheduling process, it directly uses U_spare_1 as a new control command and immediately sends it to each controller via a high-priority communication channel to execute emergency response operations. This prevents the situation from escalating in the shortest possible time and ensures the safe and stable operation of the microgrid.
[0165] Based on the same inventive concept, please refer to Figure 2 The diagram shows a schematic block diagram of a model-predictive microgrid intelligent dispatch and control system 100 provided in this application embodiment, including a communication unit 110, a machine-readable storage medium 120, and a processor 130.
[0166] In this embodiment, the machine-readable storage medium 120 can also be integrated into the processor 130 and can communicate and interact with external systems through the communication unit 110. The machine-readable storage medium 120 stores machine-executable instructions for executing the scheme of this application, and the processor 130 executes the machine-executable instructions stored in the machine-readable storage medium 120 to implement the model prediction-based intelligent scheduling and control method for microgrids provided in the aforementioned method embodiments.
[0167] It should be noted that, in order to simplify the description of the present invention and thus help to understand one or more embodiments of the invention, multiple features may sometimes be grouped into one embodiment, drawing or description thereof in the foregoing description of the embodiments of the present invention.
Claims
1. A model-predictive-based intelligent dispatch and control method for microgrids, characterized in that, The method includes: The microgrid's real-time operating status data set is collected at the start of the current scheduling cycle. The real-time operating status data set includes distributed power generation output monitoring data, energy storage device status of charge monitoring data, and key load power monitoring data. The real-time operating status data set is input into a pre-built multi-timescale prediction model for operating status prediction processing to generate microgrid future operating status prediction information. The microgrid future operating status prediction information includes the distributed power generation prediction output sequence, energy storage device prediction status sequence, and critical load prediction demand sequence for multiple consecutive scheduling cycles in the future. Based on the predicted future operation status of the microgrid, the preset economic operation optimization objective function of the microgrid is solved in a rolling manner to obtain an initial scheduling control command set. The initial scheduling control command set satisfies the economic operation optimization objective function of the microgrid and includes the reference output command of each distributed power source and the reference charging and discharging command of the energy storage device. The initial scheduling control command set is input into a pre-trained microgrid security and stability constraint verification model for dynamic security constraint verification, generating a command security margin index set. The command security margin index set characterizes the security level of the initial scheduling control command set under the physical constraints of the microgrid. The initial scheduling control command set is relaxed and adjusted according to the command safety margin index set to generate a final scheduling control command sequence that meets the real-time operation safety boundary conditions of the microgrid. The final scheduling control command sequence is then sent to the microgrid distributed power controller, energy storage device controller and load control terminal to trigger the execution operation. The initial set of scheduling control commands is input into a pre-trained microgrid security and stability constraint verification model for dynamic security constraint verification, generating a set of command security margin indicators, including: The distributed power source reference output command and the energy storage device reference charge / discharge command corresponding to each scheduling cycle in the initial scheduling control command set are subjected to time-series expansion processing to generate a time-seriesd scheduling command matrix containing the distributed power source reference output command value and the energy storage device reference charge / discharge command value in each scheduling cycle. Extract real-time topology information of the microgrid system. The real-time topology information includes the location identifiers of each distributed power source access node, the location identifiers of each energy storage device access node, the location identifiers of each critical load node, and the description parameters of the feeder connection relationship between each node. The time-seriesd scheduling instruction matrix and the real-time topology information are input into the feature encoding layer of the microgrid security and stability constraint verification model for joint embedding representation processing to generate a scheduling instruction topology coupling feature vector containing the spatial distribution features of scheduling instructions and the correlation between the microgrid topology. The dynamic power flow calculation module of the microgrid security and stability constraint verification model performs time-series power flow simulation and deduction on the topology coupling feature vector of the scheduling command. It simulates the voltage amplitude change trajectory of each node, the current amplitude change trajectory of each feeder, and the system frequency fluctuation trajectory of the microgrid system under the drive of the initial scheduling control command set in the future multiple consecutive scheduling cycles, and obtains a microgrid dynamic response simulation dataset containing the voltage time-series simulation data of each node, the current time-series simulation data of each feeder, and the system frequency time-series simulation data. The safety margin calculation module of the microgrid safety and stability constraint verification model is called to calculate the absolute value of the difference between the voltage amplitude of each node in each scheduling cycle and the preset upper and lower limit boundary values of node voltage safety operation based on the voltage time-series simulation data of each node in the microgrid dynamic response simulation dataset, so as to obtain the original value of voltage safety margin of each node in each scheduling cycle. Based on the current time-series simulation data of each feeder in the microgrid dynamic response simulation dataset, calculate the absolute value of the difference between the current amplitude of each feeder in each scheduling cycle and the preset feeder current carrying capacity safety limit, and obtain the original value of the current safety margin of each feeder in each scheduling cycle. The absolute value of the difference between the instantaneous value of the system frequency in each scheduling cycle and the preset upper and lower limit boundary values of the system frequency safe operation are calculated based on the system frequency fluctuation trajectory in the microgrid dynamic response simulation dataset, so as to obtain the original value of the frequency safety margin for each scheduling cycle. The original values of voltage safety margin for each node are normalized and mapped to generate a voltage safety margin index; the original values of current safety margin for each feeder are normalized and mapped to generate a current safety margin index; and the original values of frequency safety margin for each scheduling cycle are normalized and mapped to generate a frequency safety margin index. The voltage safety margin index, the current safety margin index, and the frequency safety margin index are aggregated and processed according to the time sequence of the scheduling cycle to generate an instruction safety margin index unit corresponding to each scheduling cycle, which contains the values of all safety margin indices within that scheduling cycle. The instruction safety margin index set is composed of the instruction safety margin index units of all scheduling cycles.
2. The model-predictive-based intelligent dispatch and control method for microgrids according to claim 1, characterized in that, The step of inputting the real-time operating status data set into a pre-built multi-timescale prediction model for operating status prediction processing to generate microgrid future operating status prediction information includes: Time series decomposition processing is performed on the distributed power generation output monitoring data in the real-time operating status data set to extract the output cycle fluctuation characteristic component and output trend change characteristic component of the distributed power generation output monitoring data in historical periods. The output cycle fluctuation feature component and the output trend change feature component are input into the first prediction branch network of the multi-time scale prediction model for feature fusion prediction processing, and the output is a distributed power source predicted output sequence containing the output prediction values of each time point in multiple consecutive scheduling cycles in the future. The charging and discharging behavior identification processing is performed on the energy storage device state of charge monitoring data in the real-time operating status data set to obtain the charging state change curve and discharging state change curve of the energy storage device state of charge monitoring data in historical time periods, and the charging rate feature parameter of the charging state change curve and the discharging depth feature parameter of the discharging state change curve are extracted. The charging rate feature parameters are input into the charging behavior prediction subnetwork of the second prediction branch network of the multi-timescale prediction model for processing, and the discharge depth feature parameters are input into the discharge behavior prediction subnetwork of the second prediction branch network for processing. By fusing the output results of the subnetworks and performing state deduction, a predicted state sequence of energy storage devices containing the predicted state of charge values at each time point in multiple consecutive scheduling cycles is output. The key load power monitoring data in the real-time operating status data set is subjected to load component separation processing to decompose the basic load component and random fluctuation load component in the key load power monitoring data, and the load change baseline curve of the basic load component in the historical period and the fluctuation amplitude statistical characteristics of the random fluctuation load component are calculated. The load change baseline curve and the fluctuation amplitude statistical characteristics are input into the third prediction branch network of the multi-time scale prediction model to perform load demand evolution prediction processing, and output a key load forecast demand sequence containing the load demand forecast values at each time point in multiple consecutive scheduling cycles in the future. The distributed power generation predicted output sequence, the energy storage device predicted status sequence, and the critical load predicted demand sequence are aligned and combined according to the time order of the scheduling cycle to generate the microgrid future operation status prediction information. Each scheduling cycle in the microgrid future operation status prediction information contains a status prediction data unit containing a distributed power generation output prediction value, an energy storage device state of charge prediction value, and a critical load demand prediction value.
3. The microgrid intelligent dispatch and control method based on model prediction according to claim 1, characterized in that, The process of performing a rolling solution on the preset microgrid economic operation optimization objective function based on the microgrid's future operating status prediction information to obtain an initial set of scheduling and control commands, including: Extract the status prediction data unit of each scheduling cycle from the future operation status prediction information of the microgrid, calculate the net load prediction value of the microgrid system corresponding to each scheduling cycle based on the distributed power output prediction value and the critical load demand prediction value in the status prediction data unit, and arrange the net load prediction values of the microgrid system of all scheduling cycles in chronological order to form a sequence of net load prediction values of the microgrid system. The net load forecast sequence of the microgrid system is used as the constraint boundary condition for optimization solution and input into the preset microgrid economic operation optimization objective function. The microgrid economic operation optimization objective function aims to minimize the total operating cost of the microgrid system in the prediction time domain. The total operating cost includes the fuel cost parameters of each distributed power source, the start-up and shutdown cost parameters of each distributed power source, and the charging and discharging loss cost parameters of the energy storage device. The mixed-integer linear programming solver is invoked to iteratively optimize the objective function of the microgrid's economic operation under the constraints and boundary conditions. In each iteration, a set of candidate scheduling decision variables is generated. The set of candidate scheduling decision variables includes the candidate output commands of each distributed power source in each scheduling cycle and the candidate charging and discharging commands of the energy storage device in each scheduling cycle. The candidate scheduling decision variable set is subjected to microgrid power balance constraint verification processing. The algebraic sum of the candidate output command of the distributed power source and the candidate charging and discharging command of the energy storage device corresponding to the candidate scheduling decision variable set is calculated as the total adjustable power generation prediction value. The difference between the total adjustable power generation prediction value and the net load prediction value of the corresponding scheduling period in the microgrid system net load prediction value sequence is calculated to obtain the power balance deviation value of each scheduling period. Determine whether the power balance deviation value is within the preset power balance allowable error range. If the power balance deviation value exceeds the power balance allowable error range, adjust the distributed power candidate output command and energy storage device candidate charging and discharging command in the corresponding scheduling period in the candidate scheduling decision variable set and re-perform the power balance constraint verification process until the power balance deviation value converges to the power balance allowable error range. The set of candidate scheduling decision variables whose power balance deviation values converge to the allowable error range of power balance is extracted as a preliminary set of optimized scheduling instructions that satisfies the power balance constraints of the microgrid. The candidate charging and discharging commands for energy storage devices in the preliminary optimized scheduling command set are subjected to energy storage device state of charge safety boundary constraint verification processing. Based on the predicted state of charge value of the corresponding scheduling period in the predicted state sequence of the energy storage device and the candidate charging and discharging commands of the energy storage device, the simulated state of charge value of the energy storage device after charging and discharging is calculated, and it is determined whether the simulated state of charge value is within the preset upper and lower limits of the safe operation of the energy storage device state of charge. If the simulated state of charge (SBC) value exceeds the upper and lower limits of the safe operation range of the energy storage device's SBC value, then, with the constraint of bringing the simulated SBC value back to the safe range, the candidate charge / discharge commands for the energy storage device in the corresponding scheduling period in the preliminary optimized scheduling command set are subjected to amplitude limiting correction processing to generate corrected energy storage device charge / discharge commands. The corrected energy storage device charge / discharge commands are then combined with the candidate output commands of distributed power sources in the corresponding scheduling period in the preliminary optimized scheduling command set to form the initial scheduling control command set that satisfies the safe boundary constraints of the energy storage device's SBC value. The initial scheduling control command set includes the reference output commands of each distributed power source and the reference charge / discharge commands of the energy storage device corresponding to each scheduling period.
4. The model-predictive-based intelligent dispatch and control method for microgrids according to claim 3, characterized in that, The process involves extracting situation prediction data units for each scheduling cycle from the microgrid's future operational situation prediction information. Based on the distributed generation output prediction values and critical load demand prediction values in these data units, the process calculates the microgrid system net load prediction value for each scheduling cycle. The microgrid system net load prediction values for all scheduling cycles are then arranged in chronological order to form a microgrid system net load prediction value sequence, including: The system analyzes the status prediction data unit of each scheduling cycle in the future operation status prediction information of the microgrid, reads the distributed power output prediction value of the corresponding scheduling cycle from each status prediction data unit, and arranges the distributed power output prediction values of all scheduling cycles in chronological order of scheduling cycles to generate a distributed power output prediction time series vector. Read the critical load demand forecast value for the corresponding scheduling period from each situation prediction data unit, and arrange the critical load demand forecast values for all scheduling periods in chronological order of scheduling periods to generate a critical load demand forecast time series vector. Subtract the critical load demand forecast value for each scheduling period from the distributed power generation output forecast value for the corresponding scheduling period in the distributed power generation output forecast time series vector to obtain the preliminary net load calculation value for each scheduling period. The preliminary net load calculation value for each scheduling cycle is corrected by microgrid network loss compensation. The network loss prediction coefficient corresponding to each scheduling cycle is calculated based on the real-time topology information of the microgrid system. The network loss prediction coefficient is multiplied by the preliminary net load calculation value of the corresponding scheduling cycle to obtain the net load correction calculation value after considering network loss for each scheduling cycle. The net load correction calculation values after considering network losses for each scheduling cycle are aggregated in chronological order of the scheduling cycles to generate the net load prediction value sequence of the microgrid system. Each element in the net load prediction value sequence of the microgrid system corresponds to the net load prediction value of one scheduling cycle.
5. The model-predictive-based intelligent dispatch and control method for microgrids according to claim 1, characterized in that, The process of jointly embedding the time-seriesd scheduling instruction matrix and the real-time topology information into the feature encoding layer of the microgrid security and stability constraint verification model generates a scheduling instruction topology coupling feature vector containing the spatial distribution features of scheduling instructions and the correlation between the microgrid topology, including: The time-series scheduling instruction matrix is subjected to dimensional transformation processing. The time-series scheduling instruction matrix is split according to the device identifiers of distributed power sources and energy storage devices to generate a single device output instruction timing sub-matrix corresponding to each distributed power source and a single device charge / discharge instruction timing sub-matrix corresponding to each energy storage device. The real-time topology information is processed by graph structure modeling. Distributed power sources, energy storage devices and key load nodes in the microgrid system are used as graph nodes, and the feeder connection relationships between the nodes are used as the edges of the graph. A microgrid topology connection graph is constructed, and a unique node embedding vector is assigned to each node of the microgrid topology connection graph. The timing submatrix of the single device output command corresponding to each distributed power source is input into the first fully connected network of the feature coding layer for feature mapping processing, and the device output command embedding vector of each distributed power source is output. The timing submatrix of the single device charge and discharge command corresponding to each energy storage device is input into the second fully connected network of the feature coding layer for feature mapping processing, and the device charge and discharge command embedding vector of each energy storage device is output. Based on the association relationship of each node in the microgrid topology connection diagram, the device output command embedding vector of each distributed power source is added and fused with the node embedding vector of the corresponding node at the element level to obtain the distributed power source enhanced node vector with fused scheduling command information. Based on the association relationship of each node in the microgrid topology connection diagram, the device charging and discharging command embedding vector of each energy storage device is added and fused with the node embedding vector of the corresponding node at the element level to obtain the energy storage device enhanced node vector of fused scheduling command information. The distributed power enhancement node vector, the energy storage device enhancement node vector, and the original node embedding vector of the critical load node are concatenated according to the node order of the microgrid topology connection diagram to generate a full node feature matrix containing all node information. The full node feature matrix is processed by graph convolutional network propagation. The feature representation of each node is updated by aggregating the feature information of neighboring nodes. After multiple layers of graph convolution operations, the graph-level readout vector of the output layer is extracted as the topology coupling feature vector of the scheduling instruction.
6. The microgrid intelligent dispatch and control method based on model prediction according to claim 1, characterized in that, The process involves relaxing and adjusting the initial scheduling control command set based on the command safety margin index set to generate a final scheduling control command sequence that meets the real-time operation safety boundary conditions of the microgrid. This final scheduling control command sequence is then distributed to the microgrid distributed power controller, energy storage device controller, and load control terminal to trigger execution operations, including: Extract the instruction safety margin index unit for each scheduling cycle from the instruction safety margin index set, and perform minimum value search processing on all safety margin indices within each instruction safety margin index unit to obtain the minimum safety margin index corresponding to each scheduling cycle. The minimum safety margin index corresponding to each scheduling cycle is compared with a preset safety margin threshold. It is determined whether the minimum safety margin index is less than the safety margin threshold. If the minimum safety margin index is less than the safety margin threshold, the scheduling cycle is marked as a scheduling cycle to be adjusted, and the corresponding node voltage safety margin index, corresponding feeder current safety margin index, or corresponding frequency safety margin index that causes the minimum safety margin index to appear in the scheduling cycle to be adjusted is recorded as the dominant safety constraint index. For the distributed power source reference output command and energy storage device reference charge and discharge command in the initial scheduling control command set marked as the scheduling period to be adjusted, the output adjustment space analysis processing is performed. Based on the physical constraint type corresponding to the dominant safety constraint index, the specific object identifier of the distributed power source or energy storage device that needs to be adjusted is determined, and the adjustable range boundary parameters of the distributed power source reference output command or energy storage device reference charge and discharge command corresponding to the specific object identifier are calculated. Based on the adjustable range boundary parameters and the dominant safety constraint index, a relaxation adjustment optimization sub-problem is constructed. The relaxation adjustment optimization sub-problem aims to improve the dominant safety constraint index of the scheduling cycle to be adjusted to no less than the safety margin threshold after adjusting the distributed power source reference output command or energy storage device reference charge and discharge command corresponding to the specific object identifier within the adjustable range boundary parameters. The local search algorithm is invoked to solve the relaxation adjustment optimization subproblem, and the output command of the distributed power source or the charge and discharge command of the energy storage device after adjustment is obtained for the specific object identifier of each scheduling period to be adjusted. The output command of the distributed power source or the charge and discharge command of the energy storage device after adjustment is then used to replace the distributed power source reference output command or the energy storage device reference charge and discharge command of the corresponding scheduling period in the initial scheduling control command set, thereby generating an intermediate scheduling control command set after relaxation adjustment. For all non-adjustable scheduling cycles adjacent to the scheduling cycle to be adjusted in the intermediate scheduling control instruction set, instruction smoothing transition processing is performed. Based on the time change gradient of the scheduling instruction value between the scheduling cycle to be adjusted and its adjacent scheduling cycles, the scheduling instructions of the adjacent non-adjustable scheduling cycles are fine-tuned and corrected to generate the final scheduling control instruction sequence in which the change gradient of the scheduling instructions in the time series meets the preset smoothing constraint conditions. The final scheduling control instruction sequence is decomposed into a final scheduling control instruction package corresponding to each scheduling cycle according to the time order of the scheduling cycle. Each final scheduling control instruction package includes the final output instruction value of each distributed power source, the final charging and discharging instruction value of each energy storage device, and the demand response instruction value of each key load node within the scheduling cycle. The final scheduling control instruction package for each scheduling cycle is sent to the corresponding distributed power controller, energy storage device controller, and load control terminal via the microgrid communication network. This triggers the distributed power controller to adjust the output power of the distributed power source according to the final output instruction value of each distributed power source, triggers the energy storage device controller to control the charging or discharging operation of the energy storage device according to the final charging or discharging instruction value of each energy storage device, and triggers the load control terminal to adjust the power demand of the critical load nodes according to the demand response instruction value of each critical load node.
7. The model-predictive-based intelligent dispatch and control method for microgrids according to claim 1, characterized in that, The method further includes: After the final scheduling control command sequence is sent to the microgrid distributed power controller, energy storage device controller and load control terminal to trigger the execution operation, the actual operation feedback data set of the microgrid during the current scheduling cycle is collected in real time. The actual operation feedback data set includes the actual output feedback data of the distributed power source, the actual state of charge feedback data of the energy storage device and the actual power feedback data of the key load. The actual operation feedback data set is compared with the final output command value of the distributed power source, the final charge and discharge command value of the energy storage device, and the demand response command value of the key load node in the corresponding scheduling period of the final scheduling control command sequence. The output tracking deviation value between the actual output feedback data of the distributed power source and the final output command value of the distributed power source in each scheduling period is calculated. The state of charge deviation value between the actual state of charge feedback data of the energy storage device and the expected state of charge value of the energy storage device simulated based on the final charge and discharge command value of the energy storage device in each scheduling period is calculated. The load response deviation value between the actual power feedback data of the key load and the demand response command value of the key load node in each scheduling period is calculated. The output tracking deviation value, the state of charge deviation value, and the load response deviation value are collected in the time order of the scheduling cycle to generate the instruction execution deviation measurement unit corresponding to each scheduling cycle. The instruction execution deviation measurement units of all scheduling cycles constitute the microgrid scheduling instruction execution deviation information set. The set of microgrid dispatch command execution deviation information is input into the pre-built model prediction error online correction module for prediction deviation source analysis. The prediction deviation correction gradient of the distributed power generation output prediction model is calculated by backpropagation based on the output tracking deviation value. The prediction deviation correction gradient of the energy storage device status prediction model is calculated by backpropagation based on the state of charge deviation value. The prediction deviation correction gradient of the critical load demand prediction model is calculated by backpropagation based on the load response deviation value. The network weight parameters of the first prediction branch network of the multi-time-scale prediction model are updated and adjusted online using the prediction deviation correction gradient of the distributed power generation prediction model to generate the corrected distributed power generation prediction branch network. The prediction bias correction gradient of the energy storage device state prediction model is used to update and adjust the network weight parameters of the second prediction branch network of the multi-timescale prediction model online, thereby generating the corrected energy storage device state prediction branch network. The prediction bias correction gradient of the critical load demand forecasting model is used to update and adjust the network weight parameters of the third prediction branch network of the multi-timescale forecasting model online, thereby generating the corrected critical load demand forecasting branch network. The modified distributed power output prediction branch network, the modified energy storage device status prediction branch network, and the modified critical load demand prediction branch network are combined into an updated multi-timescale prediction model, and the updated multi-timescale prediction model is used to replace the original multi-timescale prediction model for the operation status prediction processing of the next scheduling cycle.
8. A model-based predictive intelligent dispatch and control system for microgrids, characterized in that, include: processor; A machine-readable storage medium for storing machine-executable instructions of the processor; The processor is configured to execute the model prediction-based intelligent dispatch control method for microgrids as described in any one of claims 1 to 7 by executing the machine-executable instructions.
9. A computer program product, characterized in that, The computer program product includes machine-executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the machine-executable instructions from the computer-readable storage medium and executes the machine-executable instructions, causing the computer device to perform the model-predictive-based intelligent dispatch control method for microgrids as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Variable time scale optimization dispatching method for microgrid
CN106953316A
Transient stability control method for power distribution network containing high-proportion distributed energy
CN121663511A