Carbon footprint scheduling method and system of micro-grid of port battery swap station, electronic device and medium

By using multi-source data processing and dynamic carbon footprint modeling, the problem of conflict between economic benefits and environmental protection goals in the microgrid scheduling of charging and battery swapping stations has been solved, and the efficiency, compliance and accuracy of port battery swapping station microgrids in complex environments have been achieved.

CN122000923BActive Publication Date: 2026-07-03STATE GRID ZHEJIANG ELECTRIC POWER CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID ZHEJIANG ELECTRIC POWER CO LTD
Filing Date
2026-04-10
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing microgrid scheduling strategies for charging and battery swapping stations fail to effectively address source-load uncertainty, dynamic correlation of carbon footprint, and multi-objective coordination, leading to conflicts between economic benefits and environmental goals, and making it difficult to achieve an efficient and compliant balance under complex market and environmental fluctuations.

Method used

By acquiring multi-source operational data, performing time-scale alignment, outlier removal, and data correction, photovoltaic output and load power are predicted, dynamic carbon footprint parameters are calculated, and multi-objective collaborative scheduling instructions are generated, including power conservation, carbon risk, and equipment health constraints.

Benefits of technology

It improves the scheduling accuracy and carbon economy of port battery swapping station microgrids in complex environments, achieving a balance between economic benefits and environmental protection goals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122000923B_ABST
    Figure CN122000923B_ABST
Patent Text Reader

Abstract

This invention relates to the field of power system automation technology, and particularly to a method, system, electronic equipment, and medium for carbon footprint scheduling of microgrids in port battery swapping stations. The method first acquires multi-source operating data of the port battery swapping station microgrid; then, it sequentially performs physical consistency processing on the multi-source operating data to obtain reliable data; based on the reliable data, it performs photovoltaic power output prediction and load power prediction to obtain predicted power values ​​and uncertainty parameters; finally, it calculates dynamic carbon footprint parameters based on the predicted power values ​​and uncertainty parameters; and then, based on the predicted power values, dynamic carbon footprint parameters, and set constraints, it generates multi-objective collaborative scheduling instructions for the port battery swapping station microgrid. This approach solves the problem of conflicts between economic benefits and environmental goals that easily arise in real-time applications of existing scheduling strategies, improving the scheduling accuracy and carbon economy of port battery swapping station microgrids in complex operating environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system automation technology, and in particular to a microgrid carbon footprint scheduling method, system, electronic equipment and medium for port battery swapping stations. Background Technology

[0002] With the rapid development of the new energy vehicle industry, charging and battery swapping station microgrids, as an important component of integrated photovoltaic, energy storage, charging, and battery swapping systems, play a crucial role in improving energy utilization efficiency and reducing operating costs. Charging and battery swapping station microgrids are typically connected to the distribution network via distribution transformers and integrate distributed photovoltaic, energy storage, and battery swapping loads. Their scheduling optimization directly affects the system's economy and stability. However, the source and load resources of charging and battery swapping station microgrids are highly uncertain (e.g., photovoltaic output is affected by weather fluctuations, and battery swapping load changes according to vehicle arrival patterns), and the scheduling process must consider grid constraints, equipment lifespan, and environmental requirements. Traditional economic scheduling methods struggle to achieve dynamic optimization under multiple objectives.

[0003] In existing technologies, resource aggregation and scheduling optimization mostly focus on economic objectives, using fixed strategies or static models for power allocation. For example, existing technology (application publication number CN118966720A) discloses an economic scheduling optimization method and system for microgrids with charging and battery swapping stations. This method aims to minimize charging costs and photovoltaic backfeed penalty costs, constructs operating constraints for grid-connected transformers, energy storage, and battery swapping stations, and solves the scheduling plan based on source-load power prediction. Although this method improves economic efficiency through optimization algorithms, its limitations are as follows: First, it does not fully consider the dynamic characteristics of source-load uncertainty (such as photovoltaic irradiation salt spray drift and load tidal fluctuations), which may lead to prediction deviations that cause scheduling instructions to deviate from actual operation, increasing the risk of deviation assessment; Second, the scheduling model only focuses on economic costs and does not introduce environmental constraints such as carbon footprint factors, which may lead to increased compliance costs due to carbon risk exceeding limits; Third, penalty costs (such as photovoltaic backfeed) are simplified to fixed parameters and are not coupled with market signals or real-time carbon intensity, lacking the ability to adaptively adjust to uncertain scenarios. Therefore, existing technologies struggle to balance efficiency and compliance in the scheduling of microgrids for charging and swapping stations under complex market and environmental fluctuations. In particular, they lack in-depth modeling of source-load uncertainty, dynamic correlation of carbon footprint, and multi-objective coordination, which makes it easy for scheduling strategies to conflict between economic benefits and environmental goals in real-time applications. Summary of the Invention

[0004] To address the aforementioned shortcomings or deficiencies, this invention provides a microgrid carbon footprint scheduling method, system, electronic equipment, and medium for port battery swapping stations, which solves the problem that existing scheduling strategies are prone to conflict between economic benefits and environmental protection goals in real-time applications.

[0005] This invention provides a microgrid carbon footprint scheduling method for port battery swapping stations, comprising:

[0006] Acquire multi-source operation data of the microgrid at the port battery swapping station.

[0007] Physical consistency processing, including time-scale alignment, outlier removal, and data correction, is performed sequentially on multi-source operational data to obtain reliable data.

[0008] Based on reliable data, photovoltaic power output prediction and load power prediction are performed to obtain predicted power values ​​and uncertainty parameters.

[0009] The dynamic carbon footprint parameters are calculated based on the predicted power value and uncertainty parameters.

[0010] Based on the predicted power value, dynamic carbon footprint parameters, and set constraints, multi-objective coordinated dispatch instructions for the port battery swapping station microgrid are generated. The set constraints include power conservation constraints, carbon risk constraints, and equipment health constraints.

[0011] According to a second aspect, this invention provides a microgrid carbon footprint scheduling system for port battery swapping stations, comprising:

[0012] The multi-source operation data acquisition module is used to acquire multi-source operation data of the port battery swapping station microgrid.

[0013] The trusted data generation module is used to perform physical consistency processing on multi-source running data, including time-scale alignment, outlier removal, and data correction, to obtain trusted data.

[0014] The power and uncertainty prediction module is used to perform photovoltaic output prediction and load power prediction based on reliable data, and obtain the predicted power value and uncertainty parameters.

[0015] The dynamic carbon footprint parameter generation module is used to calculate dynamic carbon footprint parameters based on predicted power values ​​and uncertainty parameters.

[0016] The collaborative scheduling instruction generation module is used to generate multi-objective collaborative scheduling instructions for the port battery swapping station microgrid based on the predicted power value, dynamic carbon footprint parameters, and set constraints. The set constraints include power conservation constraints, carbon risk constraints, and equipment health constraints.

[0017] According to a third aspect, the present invention provides an electronic device comprising:

[0018] At least one processor; and a memory communicatively connected to the at least one processor;

[0019] The memory stores instructions that can be executed by the at least one processor, which enables the at least one processor to execute the microgrid carbon footprint scheduling method for any port battery swapping station in the embodiments of the present invention.

[0020] According to another aspect of the present invention, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the microgrid carbon footprint scheduling method of any port battery swapping station in the embodiments of the present invention.

[0021] The present invention provides a microgrid carbon footprint scheduling method for port battery swapping stations. This method achieves collaborative optimization scheduling based on the fusion processing of multi-source operating data and dynamic carbon footprint modeling. Specifically, it includes: acquiring multi-source operating data of the port battery swapping station microgrid, and sequentially performing physical consistency processing on the multi-source operating data, including time-scale alignment, outlier removal, and data correction, to form reliable data; performing photovoltaic power output prediction and load power prediction based on the reliable data to obtain predicted power values ​​and uncertainty parameters; calculating dynamic carbon footprint parameters based on the predicted power values ​​and uncertainty parameters; and generating multi-objective collaborative scheduling instructions for the port battery swapping station microgrid based on the predicted power values, dynamic carbon footprint parameters, and set constraints, including power conservation constraints, carbon risk constraints, and equipment health constraints.

[0022] In this technical solution, the present invention addresses the problem that traditional scheduling methods, as described in the background art, do not fully consider the dynamic characteristics of adjustable load resources and the real-time impact of wind and solar curtailment penalty costs. By introducing physical consistency processing of multi-source operating data and uncertainty parameterization modeling, it achieves synergistic optimization of source-load power prediction and dynamic carbon footprint assessment. This method overcomes the scheduling deviations and economic shortcomings caused by static aggregation strategies and fixed penalty cost assumptions in existing technologies by constructing a multi-objective scheduling mechanism under multiple constraints of power conservation, carbon risk, and equipment health. Therefore, the technical solution of this invention solves the problem of conflicts between economic benefits and environmental goals that easily arise in real-time applications of existing scheduling strategies, improving the scheduling accuracy and carbon economy of port battery swapping station microgrids in complex operating environments. Attached Figure Description

[0023] Figure 1 This is a flowchart of a microgrid carbon footprint scheduling method for a port battery swapping station according to an embodiment of the present invention;

[0024] Figure 2 This is a structural block diagram of a microgrid carbon footprint scheduling system for a port battery swapping station according to an embodiment of the present invention;

[0025] Figure 3 This is a block diagram of an electronic device used to implement embodiments of the present invention. Detailed Implementation

[0026] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0027] This invention provides a microgrid carbon footprint scheduling method for port battery swapping stations, which can be applied to a microgrid carbon footprint scheduling system (hereinafter referred to as the "system") at a port battery swapping station. The system runs on a local server or edge computing platform at the port battery swapping station via local deployment or containerization to complete real-time acquisition, processing, and scheduling decision generation of multi-source operational data.

[0028] Specifically, the system's physical equipment includes, but is not limited to, an environmental sensor network deployed at the port's battery swapping station (monitoring parameters such as salt spray concentration, temperature, and humidity), an equipment monitoring system (collecting operational data such as energy storage state of charge and battery temperature), energy metering devices (measuring photovoltaic power, load power, and grid interaction power), and event logging devices (recording operational behavior data such as plug-in events and grid connection events). These physical devices must possess data acquisition, communication transmission, and edge computing capabilities to support the real-time acquisition and preliminary processing of multi-source heterogeneous data. This ensures the system can achieve highly reliable data transmission and processing in complex environments such as high salt spray and high humidity at ports, providing an accurate data foundation for subsequent carbon footprint scheduling and optimization.

[0029] like Figure 1 As shown, the method may include:

[0030] Step S110: Obtain multi-source operation data of the port battery swapping station microgrid.

[0031] Among them, multi-source operation data refers to the operation data of various distributed energy devices in the port battery swapping station microgrid, including photovoltaic power generation (unit: kilowatt), load power consumption (unit: kilowatt), energy storage device charging and discharging power (unit: kilowatt), and environmental parameters (such as irradiance, unit: watts per square meter). These data have multi-temporal and spatial scale characteristics and are used to characterize the real-time operation status of the microgrid.

[0032] Specifically, the system can collect photovoltaic power generation data through power sensors deployed on the photovoltaic array, sampling every 15 minutes; collect load power data through smart meters, sampling every minute; obtain energy storage status data through the battery management system; and obtain sunlight intensity data through a weather station, using MQTT (Message Queuing Telemetry Transport) as the transmission protocol. Data acquisition steps can be executed in parallel to improve efficiency.

[0033] In some embodiments, the system can calculate the load caliber within the station using the following formula (1):

[0034] (1)

[0035] Formula (1) is the formula for calculating the load power within the station, which is used to avoid the problem of repeated metering caused by the inclusion of chiller energy consumption in the total load. This represents the corrected load value within the station at time t (unit: kilowatt), which is the net load power after excluding specific auxiliary power equipment (such as chillers); This represents the total power consumption of the system measured at time t from the grid inlet or grid connection point (unit: kilowatt). This represents the operating power of the chiller itself at time t (unit: kilowatts), which is independently collected by a smart meter configured in the chiller's power supply circuit. This formula allows for accurate extraction of chiller energy consumption and the acquisition of the true power of other core loads within the station (such as power swapping equipment and lighting systems), providing a precise data foundation for subsequent load characteristic analysis, energy efficiency assessment, and optimized scheduling.

[0036] In some embodiments, the system can calculate the corrected photovoltaic output value using the following formula (2). :

[0037] (2)

[0038] Formula (2) is the constant bias correction formula for photovoltaic measurement, which is used to eliminate the problem of systematic overestimation of photovoltaic irradiation sensor measurement values ​​caused by high salt spray environment, thereby improving the accuracy of photovoltaic output data. This represents the corrected photovoltaic output value at time t (unit: kilowatts). This represents the raw photovoltaic output value (unit: kilowatts) directly measured by the sensor at time t. This represents the photovoltaic measurement bias constant (unit: kilowatt), whose value is derived from the salt spray sensitivity coefficient. (Unit: kilowatt-square centimeters per milligram) and average salt spray concentration over the past 7 days It is calculated by multiplying (unit: milligrams per square centimeter). Specifically, The results were obtained by performing linear regression analysis on historical data samples from the past 7 days of low irradiance (irradiance less than 50 watts per square meter) each week, reflecting the impact of unit salt spray concentration on the deviation of photovoltaic measurements. The arithmetic mean of salt spray concentrations over the past 7 days, calculated based on environmental monitoring data, characterizes the recent environmental corrosion intensity. Correction using this formula can effectively compensate for errors introduced by sensor drift.

[0039] Step S120: Perform physical consistency processing, including time-scale alignment, outlier removal, and data correction, on the multi-source running data in sequence to obtain reliable data.

[0040] Among them, time stamp alignment refers to unifying the timestamps of data from different sources to the same time base to eliminate clock deviations of the acquisition equipment; outlier removal refers to identifying and removing data points that deviate significantly from the normal range, such as abrupt values ​​caused by sensor failure; data correction refers to adjusting data based on physical laws (such as energy conservation) to ensure consistency; physical consistency processing is a preprocessing process to ensure that the data conforms to the physical constraints of the system, and its output is reliable data; reliable data refers to a dataset that conforms to the law of energy conservation and has an error lower than a preset threshold after physical consistency processing.

[0041] Specifically, the system can first use a time-stamp alignment algorithm to synchronize all data to the Coordinated Universal Time (UTC) timestamp; then apply statistical methods (such as the Z-score method, where Z-score is the standardized score) to detect outliers and use linear interpolation to fill in missing values; finally, perform data correction through power balance verification, for example, the total power generation should be equal to the total load power plus the energy storage change power.

[0042] For example, the system can calculate the optimal alignment offset using the following formula (3). :

[0043] (3)

[0044] Formula (3) is a time-scale alignment optimization formula based on event matching, used to calculate the offset that minimizes the time deviation between the reference event set and the load sequence jump set. This refers to the set of reference events, which is the set of time points of physical events (such as plugging in, unplugging, grid connection, and grid disconnection) with clear timestamps extracted from the logs of the battery swapping controller or inverter. This represents the set of load sequence jumps, which is the set of time points at which significant abrupt changes (such as sudden increases or decreases in power) are identified in the load power data; Δ represents the upper limit of link delay measurement (unit: seconds), which is the preset maximum delay value of the communication network, used to constrain the search range of the offset and avoid overcorrection; This represents the calculated optimal alignment offset (in seconds), which is based on event timestamp matching and used to eliminate data asynchrony caused by communication delays. Using this formula, the system can automatically eliminate timestamp deviations caused by communication link delays, improving data consistency.

[0045] In some embodiments, the system can calculate the mutual verification power estimate using the following formula (4). :

[0046] (4)

[0047] Formula (4) is a mutual verification power model based on the queue-load physical relationship, which is used to provide an auxiliary estimate of the physical drive when correcting the charging load metering deviation. This represents the mutual verification load power value (unit: kilowatt) calculated using the mutual verification model at time t. This indicates the number of trucks in a queue or charging state at time t (unit: vehicles). This represents the average operating current (in amperes) at all charging gun insertion points at time t. This indicates the rated DC voltage of the charging system (unit: volts). This represents the total cable transmission efficiency (dimensionless) from the charging station to the vehicle battery, and its value typically ranges from 0.96 to 0.99 depending on the physical characteristics. is a dimensionless regression correction coefficient, the value of which is obtained by fitting the metered power value to the model calculated value using the Huber regression algorithm over a steady-state charging segment lasting 2 to 5 minutes.

[0048] Next, in this embodiment, the system can also calculate the load power value after fusion correction using formula (5). :

[0049] (5)

[0050] Formula (5) is the metering-mutual verification light and heavy fusion formula, which is used to linearly weight and fuse the load value obtained by direct metering with the power estimate value obtained by mutual verification in order to improve the reliability of load data. This represents the final load power value after fusion correction at time t (unit: kilowatts). This represents the metered load power value (unit: kilowatt) at time t after preliminary corrections (such as time scale alignment and outlier removal). γ is the estimated power value of mutual verification calculated by formula (1) (unit: kilowatt); γ is the fusion coefficient (dimensionless), which ranges from 0 to 1 and is used to adjust the weight of the estimated power value of mutual verification in the final result. If a conservative strategy is adopted (such as only alarming and not automatically modifying), γ can be set to 0.

[0051] Step S130: Perform photovoltaic power output prediction and load power prediction based on reliable data to obtain predicted power values ​​and uncertainty parameters.

[0052] Among them, photovoltaic (PV) output forecasting refers to predicting future PV power generation based on historical data and environmental factors; load power forecasting refers to predicting future load demand; the predicted power value is a power estimate (unit: kilowatts) at a future time point; uncertainty parameters are indicators characterizing the uncertainty of the forecast, such as confidence intervals or standard deviations (unit: kilowatts), used to quantify the risk of forecast error. Specifically, the system uses time series models (such as ARIMA model, Autoregressive Integrated Moving Average model) for PV output forecasting, inputting historical PV data and predicted irradiance; it uses machine learning algorithms (such as support vector machines) for load forecasting, inputting historical load data and date type; the uncertainty parameters generate the probability distribution of the predicted values ​​through Monte Carlo simulation.

[0053] Step S140: Calculate the dynamic carbon footprint parameters based on the predicted power value and uncertainty parameters.

[0054] Among them, the dynamic carbon footprint parameter refers to the carbon emissions generated in real time during the operation of the microgrid (unit: kilogram of carbon dioxide equivalent). Its value is dynamically adjusted with the change of power generation source and is used to quantify the impact of carbon emissions. The calculation needs to integrate the prediction uncertainty to obtain the fluctuation range of the carbon footprint.

[0055] For example, the relevant calculation examples of dynamic carbon footprint are shown in the following formulas (39) to (55). The system maps the uncertainty parameters generated by the prediction residual to the carbon footprint fluctuation through the statistical transmission method, thereby ensuring dynamism.

[0056] Step S150: Generate multi-objective coordinated scheduling instructions for the port battery swapping station microgrid based on the predicted power value, dynamic carbon footprint parameters, and set constraints.

[0057] The constraints include power conservation constraints (total power generation equals total load power plus energy storage variation power), carbon risk constraints (carbon footprint does not exceed a threshold, such as 150 kg of carbon dioxide per hour), and equipment health constraints (such as energy storage charging and discharging times not exceeding 10 times per day). The multi-objective coordinated scheduling command is an optimized control command used to coordinate the operation of various equipment and achieve a balance between multiple objectives such as economy, low carbon emissions, and reliability.

[0058] Therefore, according to the above implementation method, firstly, multi-source operation data of the port battery swapping station microgrid is acquired, and physical consistency processing such as time-scale alignment, outlier removal, and data correction is performed sequentially on the multi-source operation data to form reliable data; based on the reliable data, photovoltaic output prediction and load power prediction are performed to obtain predicted power values ​​and uncertainty parameters; dynamic carbon footprint parameters are calculated based on the predicted power values ​​and uncertainty parameters; multi-objective collaborative scheduling instructions for the port battery swapping station microgrid are generated based on the predicted power values, dynamic carbon footprint parameters, and set constraints, including power conservation constraints, carbon risk constraints, and equipment health constraints.

[0059] Throughout the process, this embodiment addresses the issue that traditional scheduling methods described in the background technology do not fully consider the dynamic characteristics of adjustable load resources and the real-time impact of wind and solar curtailment penalty costs. By introducing physical consistency processing of multi-source operating data and uncertainty parameterization modeling, it achieves synergistic optimization of source-load power prediction and dynamic carbon footprint assessment. This method overcomes the scheduling deviations and economic shortcomings caused by static aggregation strategies and fixed penalty cost assumptions in existing technologies by constructing a multi-objective scheduling mechanism under multiple constraints of power conservation, carbon risk, and equipment health. Therefore, the technical solution of this embodiment solves the problem of conflicts between economic benefits and environmental goals that easily arise in real-time applications of existing scheduling strategies, improving the scheduling accuracy and carbon economy of port battery swapping station microgrids in complex operating environments.

[0060] In some embodiments, acquiring multi-source operational data of the port battery swapping station microgrid includes:

[0061] Environmental monitoring data is collected through an environmental sensor network deployed at port battery swapping stations.

[0062] Among them, the environmental sensor network refers to a monitoring system composed of multiple spatially distributed sensor nodes, used to collect physical environmental parameters around the microgrid. These nodes are connected through wired or wireless communication to form a unified data acquisition network.

[0063] Specifically, the system can be composed of a network consisting of illuminance sensors deployed in the photovoltaic panel area, temperature and humidity sensors distributed throughout the station area, and wind speed sensors near the harbor area. The sampling frequency is once every 5 minutes, and the communication protocol adopted is LoRaWAN (Long Range Wide Area Network). For example, the data collected by the environmental sensor network includes: illuminance of 850 watts per square meter, ambient temperature of 25 degrees Celsius, relative humidity of 65%, and wind speed of 3 meters per second.

[0064] Equipment operation status data is collected through the equipment monitoring system of the port's battery swapping station.

[0065] Among them, the equipment monitoring system refers to the computer system used to monitor and control the operating status of key electrical equipment in the battery swapping station in real time, which obtains status information through the sensors or controllers built into the equipment.

[0066] Specifically, the system can collect data such as the positioning status of the battery swapping robot, the operating mode of the battery stack charger, and the switching status of the energy storage converter through the data interface of the battery swapping station monitoring layer. The data update frequency is on the order of seconds. For example, the collected equipment operation status data includes: battery swapping robot No. 1 is in the "ready" state, battery stack charger No. 2 is in "constant current charging" mode, and energy storage converter is in "grid connected" operation state.

[0067] Data on electricity consumption behavior is collected through electricity metering devices.

[0068] Among them, electricity metering devices refer to instruments used to measure electricity-related parameters, such as smart meters and power transmitters, while electricity behavior data refers to data sequences that reflect the quantity, direction, and time characteristics of electricity flow.

[0069] Specifically, the system can collect active power (unit: kW), reactive power (unit: kilovar), and energy readings (unit: kilowatt-hours) through smart meters installed at the grid connection point, photovoltaic outlet, energy storage connection point, and load inlet, with a sampling interval of 1 minute. For example, the collected energy behavior data includes: at 10:00, the active power at the photovoltaic outlet is 300 kW, the active power at the load inlet is 500 kW, and the charging power of the energy storage device is 100 kW.

[0070] Operational behavior data is collected through an event logging device.

[0071] Among them, the event recording device refers to the device or software module that can record specific operations or state changes that occur in the system in chronological order, and the operation behavior data refers to the time series data composed of these events, which is used to analyze the operation pattern.

[0072] Specifically, the system can collect battery swapping request events, battery connection / disconnection events, and equipment alarm events through the event sequence recording function of the station control layer. Each record includes information such as event type, timestamp, and equipment number. For example, the collected operational behavior data includes: at 10:00:15 on October 31, 2024, the event "Electric heavy truck A completes battery replacement" was recorded; and at 10:01:30, the event "Energy storage system SOC (State of Charge) reaches 90%" was recorded.

[0073] The collected environmental monitoring data, equipment operating status data, power consumption data, and operational behavior data are organized and stored in a unified time-stamped format to form multi-source operational data.

[0074] Among them, the unified time stamp format refers to converting the timestamps of all data into the same standard time reference system and representation format, and the regularized storage refers to organizing the data in a predefined structured way and storing it in the database.

[0075] Specifically, the system can employ a data preprocessing module to uniformly convert the timestamps of all input data to Beijing time (UTC+8), in the format "YYYY-MM-DD hh:mm:ss". Subsequently, the four types of data are aligned according to time series and stored in a time-series database, forming a multi-source operational dataset with a consistent time base. For example, a data record after normalization and storage includes: timestamp "2024-10-31 10:00:00", light intensity "850 watts per square meter", status of battery swapping robot No. 1 "ready", photovoltaic output "300 kilowatts", and the most recent event "Electric heavy truck A completes battery replacement".

[0076] Therefore, according to the above implementation method, the system can realize the standardized collection and integration of multi-source heterogeneous data, providing a complete and consistent input data foundation for subsequent data processing and optimization scheduling.

[0077] In some embodiments, physical consistency processing, including time-scale alignment, outlier removal, and data correction, is sequentially performed on multi-source operational data to obtain reliable data, including:

[0078] The timestamps of each data channel in the multi-source running data are synchronized and aligned based on a preset set of reference events.

[0079] The reference event set refers to a set of physical events or system commands that are precisely traceable in time and can be captured by multiple data sources, serving as a benchmark for time synchronization; the data channel refers to an independent data stream from a specific sensor or metering device.

[0080] Specifically, the system can select the second pulse signal of Beidou or GPS (Global Positioning System) or key operation commands such as "switching of energy storage charging and discharging modes" in the system as reference events. It adopts a sliding time window matching algorithm to calculate the offset between each data channel and the timestamp of the reference event and perform compensation to achieve synchronization with millisecond-level accuracy.

[0081] For example, in some embodiments, the system can calculate the window energy value of each energy channel within a 15-minute time window using the following formula (6):

[0082] (6)

[0083] Formula (6) is a set of window energy integration formulas, which is used to integrate the power time series after preliminary correction within a 15-minute window and convert it into a cumulative energy value with clear physical meaning, thus providing a basis for energy conservation verification. This indicates the cumulative power generation of the photovoltaic channel within the window (unit: kilowatt-hours). This represents the corrected instantaneous photovoltaic power value (unit: kilowatts). This indicates the cumulative electricity consumption of the load channel within the window (unit: kilowatt-hours). This represents the instantaneous load power after fusion correction (unit: kilowatts). This indicates the cumulative power consumption of the chiller aisle within the window (unit: kilowatt-hours). This represents the instantaneous power of the chiller (unit: kilowatts). This indicates the cumulative discharge amount within the window of the energy storage discharge channel (unit: kilowatt-hours). This represents the instantaneous power value of the energy storage system (unit: kilowatt), and a positive value indicates discharge. This indicates the cumulative charging amount (in kilowatt-hours) of the energy storage charging channel within the window, obtained by taking... The maximum value of the negative value is obtained by integration; This indicates the change in the state of charge of the energy storage battery between the start and end of the window (unit: percentage %). and These represent the state of charge values ​​at the beginning and end of the window (unit: percentage %). This indicates the sampling interval (unit: hours). When the power sampling frequency is once per second, Hour.

[0084] Next, in this embodiment, the system can also calculate the energy conservation difference within the window using formula (7). :

[0085] (7)

[0086] Formula (7) is the energy conservation difference calculation formula, which is used to quantify the imbalance between the total input energy and the total output energy (including energy storage changes) of the microgrid system within a specific time window. This represents the calculated energy conservation difference (unit: kilowatt-hours). A positive value indicates that the input energy is greater than the consumed energy, and a negative value indicates the opposite. This represents the net electricity purchased (in kilowatt-hours) exchanged with the main power grid within the window; purchases are positive and sales are negative. This indicates the rated equivalent capacity of the energy storage battery (unit: kilowatt-hour).

[0087] Furthermore, in this embodiment, the system can also calculate the simple weights of each energy channel used to distribute the energy deviation using formula (8). :

[0088] (8)

[0089] Formula (8) is a dynamic weight allocation formula based on channel credibility, used to determine the proportion of the deviation to be allocated to the three adjustable channels of photovoltaic, load and energy storage when the energy conservation difference exceeds the limit. , , These represent the initial weights of the photovoltaic channel, load channel, and energy storage channel, respectively, obtained from preliminary calculations. Represents the final weights after normalization, satisfying ; This represents the median (unit: watts per square meter) of the monitored irradiance values ​​within the current time window. This is an indicator function; it takes the value 1 when the condition in parentheses is true, and 0 otherwise. MedRes represents the median relative residual of the load channel, which is used to measure the relative deviation level between the cross-validation power model and the load metering value.

[0090] Furthermore, in this embodiment, the system can also calculate the power correction amount to be allocated to each channel using formula (9). :

[0091] (9)

[0092] Formula (9) is the formula for calculating the differential amortized power, which is used to calculate the total energy conservation difference. The weights are allocated and evenly distributed over the entire time window, transforming them into constant power correction amounts that need to be superimposed on the original power sequence. This represents the energy difference allocated to the i-th energy channel (unit: kilowatt-hours). This represents the power correction amount (in kilowatts) that the i-th channel needs to handle, which is considered a constant within the window. This indicates the duration of the time window (in hours), which is 0.25 hours (15 minutes) in this case.

[0093] Therefore, by combining the above formulas (6) to (9), the system can first integrate the power sequence to obtain the window energy, and then accurately calculate the energy conservation difference; when the conservation difference exceeds the preset tolerance, the system can dynamically allocate the deviation according to the reliability of each channel, and amortize the energy difference back as the power correction amount, and finally generate a power sequence with strict physical consistency: This method has a clear and traceable process, effectively eliminating the energy non-conservation problem caused by measurement errors and disturbances, and providing reliable data support for subsequent accurate carbon footprint calculation and scheduling optimization.

[0094] The system applies preset anomaly detection rules to remove outliers from the aligned multi-source running data and performs imputation on missing data.

[0095] Among them, the anomaly detection rule refers to the discrimination logic set by combining data statistical characteristics and equipment physical limits; the interpolation process refers to filling data gaps with reasonable values ​​to maintain the continuity of the data sequence.

[0096] Specifically, the system can use a dynamic threshold method (such as calculating the mean ± 3 standard deviation based on a sliding window of data from the most recent hour as the threshold) combined with equipment rated parameters (such as the maximum output power of the photovoltaic inverter) to identify anomalies. For missing data, time series forecasting methods (such as the ARIMA model) or data derivation based on associated sensors can be used to fill in the missing data. For example, the normal fluctuation range of photovoltaic power is set to 0 to 400 kW (rated capacity). If a power value of 450 kW is detected at a certain moment, it is judged as an anomaly and removed; the data before and after this time point are 300 kW and 310 kW respectively, and linear interpolation is used to obtain a completed value of 305 kW.

[0097] Sensor drift correction and data cross-verification fusion are performed on the multi-source operational data after outlier removal to correct measurement bias.

[0098] Among them, sensor drift correction refers to compensating for systematic errors caused by the decline in measurement accuracy of sensors due to long-term use; data cross-verification and fusion refers to using multiple independent measurements to cross-verify and integrate information on the same physical quantity, thereby improving data accuracy.

[0099] Specifically, the system can be calibrated on-site periodically (e.g., monthly) using a high-precision standard to establish a quadratic polynomial correction model for sensor reading deviations. For key parameters (such as energy storage SOC), the estimated values ​​from the voltage method, the calculated values ​​from the current integral method, and the values ​​reported by the battery management system can be fused together and weighted according to the confidence level of each method.

[0100] Energy conservation adjustments are made to the corrected multi-source operating data to obtain reliable data.

[0101] Among them, energy conservation adjustment refers to the rational allocation and correction of measurement values ​​with slight deviations based on the power balance relationship between power generation, power consumption, energy storage and losses in the microgrid system.

[0102] Specifically, the system can construct node power balance equations, take the difference between total power generation and total power consumption (including network losses) as the residual, and use the least squares algorithm to optimally allocate the residual based on the historical error statistics characteristics (such as error variance) of each measurement point.

[0103] Therefore, according to the above implementation method, the system can significantly improve the accuracy and physical consistency of the original data through a progressive data cleaning and correction process, providing a solid and reliable data foundation for subsequent prediction and optimization decisions.

[0104] In some embodiments, photovoltaic power output prediction and load power prediction are performed based on reliable data to obtain predicted power values ​​and uncertainty parameters, including:

[0105] Extract load tidal cycle characteristics and photovoltaic output disturbance characteristics from reliable data.

[0106] Among them, the load tidal cycle characteristic refers to the periodic fluctuation pattern of load power over time, which is closely related to port operation patterns (such as ship berthing and departure, peak loading and unloading periods). Its characteristic parameters include daily cycle amplitude (unit: kilowatts) and weekly cycle phase. The photovoltaic output disturbance characteristic refers to the short-term, non-stationary fluctuation component in the photovoltaic power generation sequence caused by factors such as cloud cover and temporary equipment failures. Its characteristic parameters include fluctuation intensity (unit: kilowatts per minute) and disturbance duration (unit: minutes).

[0107] Specifically, the system can use Fourier transform or wavelet analysis algorithms to decompose the daily periodic component with 24-hour fundamental frequency and the weekly periodic component with 168-hour fundamental frequency from historical load data, thereby extracting tidal periodic characteristics; at the same time, it can quantify disturbance characteristics by calculating the first-order difference variance of the photovoltaic power sequence and combining it with the range within the sliding window.

[0108] For example, the system can perform periodic decomposition modeling of the uniform load power sequence using the following formula (10):

[0109] (10)

[0110] Formula (10) is a harmonic decomposition model of load power, which is used to decompose the load power sequence into basic components, main periodic harmonic components and random residuals, so as to accurately characterize its periodic variation law. This represents the uniformized load power value (in kilowatts) from the output of step S1 at time index t. The regression constant term (unit: kilowatt) represents the base load component in the load power sequence, i.e., the average level after removing periodic fluctuations; and These represent the regression coefficients (unit: kilowatt) of the cosine and sine terms of the k-th harmonic component, respectively, which are used to jointly determine the amplitude and phase of that harmonic. This represents the angular frequency (unit: radians per time step) corresponding to the kth harmonic. The model fit residual (unit: kilowatt) at time index t represents the random fluctuations not captured by the harmonic model; the summation symbol... These correspond to the two main periodic harmonic components, 24 hours and 12 hours, which are intended to be extracted.

[0111] Next, in this embodiment, the system can also calculate the angular frequency that precisely corresponds to the 24-hour and 12-hour periods using formula (11). :

[0112] (11)

[0113] Formula (11) is the formula for calculating the periodic angular frequency, which is used to convert the actual time period into the angular frequency required in discrete time series modeling. The formula represents the angular frequency of the k-th harmonic (in radians per time step); k represents the order of the harmonic (dimensionless), with k=1 corresponding to a 24-hour period and k=2 corresponding to a 12-hour period; the constant 96 in the denominator represents the total number of time steps corresponding to the 24-hour period, which is determined by the 15-minute sampling interval. This formula ensures a strict correspondence between the angular frequency and the physical time period.

[0114] Furthermore, in this embodiment, the system can also calculate the amplitude of the k-th harmonic component using formulas (12) and (13). and phase :

[0115] (12)

[0116] (13)

[0117] Formula (12) is the formula for calculating harmonic amplitude, which is used to quantify the wave intensity of the k-th order periodic component. The value represents the amplitude of the k-th harmonic component (unit: kilowatt). The larger the value, the greater the influence of the periodic component on the overall load power. Formula (13) is the harmonic phase calculation formula, used to determine the initial phase angle of the k-th periodic component. The phase of the k-th harmonic component (in radians) reflects the time offset of the periodic oscillation relative to the time origin. It is the arctangent function in the fourth quadrant, and can be determined according to... and The sign of the sign determines the correct phase angle quadrant, ensuring the accuracy of phase calculation.

[0118] Furthermore, in this embodiment, the system can also solve for the regression coefficient vector using the least squares method according to formula (14). :

[0119] (14)

[0120] Formula (14) is the least squares estimation formula, used to solve the regression coefficients in the harmonic decomposition model (Formula 10) so as to minimize the sum of squares of the model fitting error. The vector represents the estimated values ​​of the regression coefficients; X is the design matrix consisting of the values ​​of the harmonic basis functions at all time points t; y is the vector consisting of the uniformized load power values. The observation vector formed by the values ​​at all time points; It is the pseudo-inverse of matrix X.

[0121] Therefore, by combining the above formulas (10) to (14), the system can first establish a harmonic decomposition model of the load power, then accurately calculate the angular frequency of the main periodic components, and then solve for the amplitude and phase of each periodic component to quantify its intensity and time characteristics. Finally, the least squares method is used to efficiently and reliably estimate the model parameters. This method transforms the physical periodic characteristics (tidal characteristics) of the load into interpretable mathematical model parameters. , This effectively avoids the black-box problem of pure data-driven models, provides prior features with clear physical meaning for subsequent prediction models such as LSTM, and improves the interpretability and accuracy of port battery swapping load prediction.

[0122] By integrating load tidal cycle characteristics, photovoltaic output disturbance characteristics, and environmental monitoring data, equipment operating status data, and operating behavior data from reliable data, a multi-dimensional feature vector is constructed, and the multi-dimensional feature vector is then standardized.

[0123] Among them, the multi-dimensional feature vector refers to a numerical vector formed by concatenating the above-mentioned different types of features in a specific order, used to comprehensively describe the various factors affecting the prediction target; standardization processing refers to scaling the values ​​of each dimension in the vector to the same numerical range through linear transformation (e.g., ...). This is to eliminate the influence of dimensions and improve the stability of model training.

[0124] Specifically, the system can concatenate 20 features in a predetermined order, including the amplitude and phase of tidal cycle characteristics, the intensity and duration of disturbance characteristics, light intensity and temperature from environmental monitoring data, energy storage SOC (State of Charge) from equipment operating status data, and battery swapping event counts from operational behavior data, into a 20-dimensional feature vector. Then, it uses the Min-Max normalization method to transform each feature value to... Interval.

[0125] For example, the system can calculate the predicted target vector for the next time step using the following formula (15). :

[0126] (15)

[0127] Formula (15) is the formula for defining the prediction target, which is used to clarify the photovoltaic output and load power values ​​that the machine learning model needs to predict at future moments. This represents the predicted target vector at the next time step (t+1) at the current time t. It is a two-dimensional column vector. This represents the predicted photovoltaic active power at time t+1 (unit: kilowatts). This represents the predicted active power of the load at time t+1 (unit: kilowatt); the subscript t+1 indicates a discrete time point at 15-minute intervals, that is, the first time step after the current time t.

[0128] Next, in this embodiment, the system can also calculate the set of historical data windows required for model input using formula (16). :

[0129] (16)

[0130] Formula (16) is the historical input window definition formula, which specifies which time points of data to extract from historical data as input features of the machine learning model to ensure temporal continuity. This represents a continuous time index set ending at the current time t, containing the historical data points required for model input; t represents the time index of the current 15-minute time (e.g., an integer index, t=0 representing the start time); L represents the length of the historical window (unit: steps), i.e., the number of time points contained in the set, and its value must cover at least one complete daily cycle (e.g., 24 hours × 4 steps / hour = 96 steps) to ensure that the tidal cycle characteristics of the load (e.g., daily cycle fluctuations) can be captured; the elements in the set are from... "to t" indicates backtracking from the current moment. The time from the start of the step up to the current time t.

[0131] Therefore, by combining the above formulas (15) and (16), the system can clearly define the target output of the prediction task and the data range of the model input: Formula (16) ensures the input window The continuous and sufficiently historical period provides the model with a complete feature sequence with temporal logic; Formula (15) defines the specific physical quantities (photovoltaic and load power) that the model needs to predict, thus providing a structured input-output specification for subsequent time-series prediction models (such as LSTM and Transformer). This combination ensures the standardization and traceability of the prediction process, effectively supporting the 15-minute-level scheduling decision of the port battery swapping station microgrid.

[0132] In some embodiments, the system can perform empirical mode decomposition on the uniform irradiance sequence and the uniform photovoltaic power sequence using the following formula (17):

[0133] (17)

[0134] Formula (17) is an empirical mode decomposition formula, which is used to adaptively decompose a non-stationary original time series into a finite number of intrinsic mode functions and a trend term to reveal its intrinsic frequency components. This represents the uniformized irradiance value (in watts per square meter) from the output of step S1 at time index t. This represents the uniformized photovoltaic power value at time index t (unit: kilowatts). and These represent the values ​​of the j-th intrinsic mode function (IMF) obtained by the EMD algorithm (Empirical Mode Decomposition, an adaptive signal decomposition method mainly used to process non-stationary and nonlinear data sequences) at time t, respectively, corresponding to the irradiance sequence and the photovoltaic power sequence. These IMF components are arranged from high to low frequency (i.e., j=1 has the highest frequency), reflecting the fluctuations at different time scales in the data. and These represent the trend terms (or residual terms) of the irradiance sequence and photovoltaic power sequence obtained after decomposition, respectively, representing the long-term trend of change in the sequence; the upper limit of summation 7 represents the maximum number of IMF components obtained by the preset EMD decomposition, and the actual number depends on the complexity of the data itself.

[0135] Next, in this embodiment, the system can also calculate the smoothed irradiation driving amount after high-frequency removal using formula (18). With smooth photovoltaic power drive :

[0136] (18)

[0137] Formula (18) is a frequency domain filtering formula used to filter based on a set cutoff frequency. High-frequency IMF components (often considered noise) are filtered out, while low-frequency IMF components and trend terms are retained, resulting in a smoothed driving quantity sequence that provides stable input for subsequent predictions. This represents the smoothed irradiation drive after high-frequency removal (unit: watts per square meter). This represents the smoothed photovoltaic power drive after high-frequency removal (unit: kilowatts). and These represent the dominant frequencies (in Hertz) of the j-th IMF component for the irradiance sequence and the photovoltaic power sequence, respectively, characterizing the dominant oscillation frequency of this component; The cutoff frequency (in Hertz) is a key threshold parameter; all frequencies above this threshold are considered cutoff frequencies. The IMF component will be filtered out.

[0138] Furthermore, in this embodiment, the system can also calculate the optimal cutoff frequency using formula (19). :

[0139] (19)

[0140] Formula (19) is the cutoff frequency optimization formula, which aims to select a cutoff frequency from a candidate frequency set F that maximizes the prediction performance on the validation set (i.e., minimizes the mean absolute percentage error). ; This represents the value of the independent variable f that minimizes the objective function. Here, f is selected from the candidate set F. F represents a pre-defined set of candidate cutoff frequencies (in Hertz), which typically contains a series of possible frequency values ​​that are uniformly distributed or logarithmically spaced within a certain range. This represents the mean absolute percentage error (in %) calculated on an independent validation dataset after filtering with the cutoff frequency f and training the prediction model using the obtained smoothed driving sequence. The smaller the value, the higher the prediction accuracy.

[0141] Therefore, by combining the above formulas (17) to (19), the system can first decompose the original irradiance and photovoltaic power sequences into modal components of different frequencies, and then filter out high-frequency noise components according to an optimizable cutoff frequency, thereby extracting a smooth driving quantity sequence. Furthermore, by automatically selecting the cutoff frequency that minimizes the prediction error of the validation set, the system ensures that the denoising effect is directly linked to the goal (high accuracy) of the final prediction task. This method adaptively extracts the main components in the sequence that are beneficial to prediction, effectively suppresses the adverse effects of high-frequency jitter, provides stable and reliable input features for subsequent time series prediction models, and significantly improves the accuracy of photovoltaic output and related predictions.

[0142] The photovoltaic output and load power are jointly predicted by the standardized multi-dimensional feature vector through a preset time series prediction model, and the predicted power value is output.

[0143] Among them, time series forecasting model refers to machine learning model applicable to time series data forecasting; joint forecasting refers to using a single model to simultaneously output the future values ​​of two targets, photovoltaic power output and load power, which is beneficial for capturing the coupling relationship between them.

[0144] Specifically, the system can preset a Long Short-Term Memory (LSTM) network as a time series prediction model. Its input is the historical multi-dimensional feature vector of the past 6 hours, and its output is the photovoltaic power output prediction value (unit: kilowatt) and load power prediction value (unit: kilowatt) for the next 1 hour.

[0145] For example, the system can calculate the unified feature vector using the following formula (20). :

[0146]

[0147] (20)

[0148] Formula (20) is a unified feature vector construction formula, which is used to integrate multi-source features into a vector, covering four dimensions: environment, device, time series and prior, providing comprehensive input for machine learning models. This represents the unified feature vector constructed at time index t. It is a high-dimensional vector that contains all the features needed for prediction. The smoothed irradiance drive at time t (unit: watts per square meter) is the irradiance value after high frequency removal; The uniform salt spray intensity at time t is expressed in milligrams per square centimeter. This represents the uniformized ambient temperature (in degrees Celsius) at time t, derived from the output of step S1. This indicates the arrival or concurrent charging intensity at time t (unit: units per 15 minutes), which is the number of trucks that start charging per unit time. It represents the average health status of the energy storage battery within a time window (unit: percentage %), and is an indicator of the equipment's health. This represents the cumulative number of cycles (in times) of the energy storage battery at time t, reflecting the equipment's usage history. These correspond to 24-hour and 12-hour periods, respectively; m represents the lag order (dimensionless), defining the number of historical time steps; the ellipsis in the vector indicates that photovoltaic power is also included. and its historical values and other historical values ​​of load power. To capture temporal dependencies.

[0149] In some embodiments, the system can calculate the forgetting gate vector using the following formula (21). :

[0150] ;(twenty one)

[0151] Formula (21) is the forget gate calculation formula in LSTM, which is used to determine how much historical cell state information is retained at time step t in order to control the degree of forgetting of information. This represents the forgetting gate vector (dimensionless), where each element takes a value between 0 and 1. The closer the value is to 1, the more historical information is retained. The weight matrix (dimensionless) representing the forget gate is a trainable parameter used to linearly combine the input vector and the previous hidden state. The hidden state vector (dimensionless) represents the previous time step and carries historical sequence information; This represents the input feature vector (dimensionless) at the current moment. The bias vector of the forget gate (dimensionless); σ represents the sigmoid activation function (dimensionless), which maps the input to... Interval.

[0152] Next, in this embodiment, the system can also calculate the input gate vector using formula (22). :

[0153] ;(twenty two)

[0154] Formula (22) is the input gate calculation formula in LSTM, which is used to determine how much new information is updated to the cell state at time step t in order to control the injection of new information. This represents the input gate vector (dimensionless), where each element takes a value between 0 and 1. The closer the value is to 1, the more new information is updated. The weight matrix (dimensionless) represents the input gate weights, which are trainable parameters. The bias vector of the input gate is dimensionless; the other parameters have the same meaning as in formula (21).

[0155] Furthermore, in this embodiment, the system can also calculate the candidate cell state vector using formula (23). :

[0156] ;(twenty three)

[0157] Formula (23) is the formula for calculating candidate cell states in LSTM, which is used to generate new information to be updated into the cell state, i.e., the candidate memory content at the current moment. This represents a dimensionless vector representing the candidate cell state, where each element takes values ​​ranging from 1 to 2. Between 1 and 1; This represents the hyperbolic tangent activation function (dimensionless), which maps the input to... interval; The weight matrix (dimensionless) representing the state of candidate cells is a trainable parameter; The bias vector (dimensionless) represents the candidate cell state; the other parameters have the same meaning as in formula (21).

[0158] Furthermore, in this embodiment, the system can also calculate the updated cell state vector using formula (24). :

[0159] ;(twenty four)

[0160] Formula (24) is the cell state update formula in LSTM, which is used to dynamically update the cell state by combining the information from the forget gate and the input gate, serving as the long-term memory carrier of the network. The dimensionless vector representing the cell state at the current moment is the model's long-term memory. Represents the cell state vector at the previous moment (dimensionless). represents element-wise multiplication (Hadamard product, dimensionless), used for gating adjustment; the meanings of other parameters are the same as those in formulas (21) to (23).

[0161] Furthermore, in this embodiment, the system can also calculate the output gate vector using formula (25). and the current hidden state vector :

[0162] (25)

[0163] Formula (25) is the formula for calculating the output gate and hidden state in LSTM. It is used to generate the hidden state at the current time and control how much cell state information is output to the hidden state as the input for subsequent prediction. This represents the output gate vector (dimensionless), where each element takes a value between 0 and 1. The weight matrix (dimensionless) represents the output gate and consists of trainable parameters. Represents the bias vector of the output gate (dimensionless). The hidden state vector (dimensionless) represents the current time step and is the key output of the model, used to pass information to the next time step or prediction layer; the meanings of other parameters are the same as those in formulas (21) to (24).

[0164] Finally, in this embodiment, the system can also calculate the photovoltaic power prediction value using formula (26). and load power forecast :

[0165] (26)

[0166] Formula (25) is the output prediction formula of the LSTM model, which is used to generate the prediction of photovoltaic and load power points at future time (t+1) based on the hidden state, and the predicted value is constrained to be non-negative by the rectified linear unit function (i.e., a non-linear activation function commonly used in artificial neural networks, abbreviated as ReLU). This represents the predicted photovoltaic power at time t+1 (unit: kilowatts). This represents the predicted load power at time t+1 (unit: kilowatts). and represents the weight vectors (dimensionless) of the photovoltaic and load output layers, respectively, which are trainable parameters used to map the hidden states to scalar outputs; the superscript ⊤ indicates the vector transpose (dimensionless). and These represent the bias of the photovoltaic and load output layers, respectively (unit: kilowatts).

[0167] Therefore, by combining the above formulas (21) to (26), the system can dynamically learn long-term dependencies using the gating mechanism (forget gate, input gate, output gate) of the Long Short-Term Memory network. The forget gate controls the retention of historical information, the input gate controls the updating of new information, candidate cell states generate new information, cell states serve as long-term memory carriers, the output gate generates hidden states, and finally, non-negative photovoltaic and load power point predictions are output through an independent fully connected regression head. This process achieves accurate prediction of 15-minute-level photovoltaic output and load power for the port battery swapping station microgrid, providing reliable input for subsequent scheduling optimization.

[0168] The prediction residual is calculated based on the comparison between the predicted power value and the true value in the reliable data.

[0169] The prediction residual refers to the difference (unit: kilowatt) between the predicted power value and the actual measured power value at the same time point, and is used to quantify the prediction error.

[0170] In some embodiments, the system can calculate the absolute residual between photovoltaic power and load power using the following formula (27):

[0171] (27)

[0172] Formula (27) is the absolute residual calculation formula, which is used to quantify the deviation between the predicted value of the point and the actual observed value after the consistency processing in step S1. This represents the absolute residual of photovoltaic power at time t+1 (unit: kilowatt). A positive value indicates that the predicted value is too low, and a negative value indicates that the predicted value is too high. This represents the absolute residual of the load power at time t+1 (unit: kilowatts). and These represent the consistent photovoltaic power and load power values ​​(unit: kilowatts) from step S1 at time t+1, respectively, serving as a benchmark for evaluating prediction accuracy. and These represent the point prediction values ​​(in kilowatts) of the photovoltaic power and load power at time t to time t+1, respectively, provided by the prediction model.

[0173] Next, in this embodiment, the system can also calculate the relative residual between photovoltaic power and load power using formula (28):

[0174] (28)

[0175] Formula (28) is the formula for calculating the relative residual, which is used to eliminate the influence of the absolute power level on the residual assessment, so that the prediction errors under different power levels are comparable. This represents the relative residual of photovoltaic power at time t+1 (dimensionless), and is usually understood as a percentage. This represents the relative residual of the load power at time t+1 (dimensionless). ε represents a very small positive number (dimensionless). When the predicted value is very close to zero, ε is used as the lower limit of the denominator to ensure computational stability.

[0176] Furthermore, in this embodiment, the system can also calculate the exponentially weighted moving average covariance matrix of the photovoltaic and load forecast residuals using formula (29). :

[0177] (29)

[0178] Formula (29) is the update formula for the binary exponential weighted moving average covariance matrix, which is used to dynamically estimate the joint fluctuation characteristics and correlation between photovoltaic and load forecast residuals. The residual vector at time t (unit: kilowatt) is a two-dimensional column vector containing the absolute residuals of photovoltaic and load at that time. The residual covariance matrix (in kilowatt squares) after the update at time t is a... symmetric matrix; Indicates the previous moment The covariance matrix (unit: kilowatt squared); The smoothing coefficient (dimensionless) of the exponentially weighted moving average, also known as the decay factor, typically ranges from 0.05 to 0.2. The smaller the value, the stronger the memory of historical data and the more significant the smoothing effect. The outer product of the residual vector and its transpose (unit: kilowatt squared) reflects the instantaneous covariance information of the residual at the current moment.

[0179] Furthermore, in this embodiment, the system can also obtain the covariance matrix from formula (30). Extracting standard deviation , :

[0180] (30)

[0181] Formula (30) is the covariance matrix decomposition formula, which is used to obtain the standard deviation of the prediction error of each variable and the linear correlation coefficient between them, so as to quantify uncertainty and correlation. It represents the standard deviation (in kilowatts) of the photovoltaic power prediction residual at time t, and measures the magnitude of the uncertainty in photovoltaic prediction; It represents the standard deviation (in kilowatts) of the load power forecast residual at time t, and measures the magnitude of the uncertainty in load forecasting; Represents the covariance matrix The element in the first row and first column is the variance of the photovoltaic prediction residual (unit: kilowatt squared). Represents the covariance matrix The element in the second row and second column is the variance of the load forecast residual (unit: kilowatt squared).

[0182] Furthermore, in this embodiment, the system can also calculate the 95% confidence intervals of the predicted photovoltaic power and load power using formula (31):

[0183] (31)

[0184] Formula (31) is a confidence interval calculation formula based on the assumption of normal distribution, which is used to provide a possible range of fluctuation for the predicted point value and quantify the uncertainty risk of the prediction. This represents the 95% confidence interval of the predicted photovoltaic power at time t+1 (unit: kilowatts). 1.96 represents the 95% confidence interval (in kilowatts) of the predicted load power at time t+1; 1.96 is the Z-value (dimensionless) corresponding to the 97.5th quantile of the standard normal distribution, used to construct the 95% confidence interval (two-sided).

[0185] Therefore, by combining the above formulas (27) to (31), the system can first calculate the absolute and relative residuals of the prediction to assess the accuracy of single-point prediction. Then, it uses the exponentially weighted moving average method to dynamically update and estimate the joint covariance matrix of photovoltaic and load prediction errors, and then extracts the standard deviation representing the uncertainty of each and the correlation coefficient representing the correlation between the two. Finally, based on the normal distribution assumption, it constructs a 95% confidence interval for the future point prediction values. This process realizes a dynamic and quantitative assessment of prediction uncertainty and provides key risk measurement information for subsequent scheduling decisions. For example, the scheduling algorithm can use the confidence interval to formulate a more robust strategy to cope with the risks brought about by prediction errors.

[0186] In some embodiments, the system can calculate the mean squared error (MSE) of photovoltaic power point prediction using the following formula (32):

[0187] (32)

[0188] Formula (32) is the formula for calculating the mean square error of photovoltaic power point prediction. It is used to quantify the average square deviation between the predicted value and the actual value, so as to ensure the accuracy of point prediction. The mean square error (MSE) represents the photovoltaic power point prediction (unit: kilowatt squared). The smaller the value, the higher the prediction accuracy. n represents the sample size (dimensionless), which is the total number of time points involved in the calculation. This represents the actual photovoltaic power value (unit: kilowatts) after the consistency processing in step S1 at time t+1. This represents the predicted photovoltaic power point value at time t+1 (unit: kilowatts).

[0189] Next, in this embodiment, the system can also calculate the mean square error of the load power point prediction using formula (33):

[0190] (33)

[0191] Formula (33) is the formula for calculating the mean square error of load power point prediction, which is used to quantify the average square deviation between the predicted load value and the actual value. This represents the mean square error of the load power point prediction (unit: kilowatts squared). This represents the actual load power value (unit: kilowatts) at time t+1 after the above consistency processing. This represents the predicted load power at time t+1 (unit: kilowatt); the meanings of other parameters are the same as in formula (32).

[0192] Furthermore, in this embodiment, the system can also calculate the negative log-likelihood (NLL) loss of the residual distribution using formula (34):

[0193] (34)

[0194] Formula (34) is the formula for calculating negative log-likelihood loss, which is used to measure the degree of fit between the prediction residual and the multivariate normal distribution model, and to ensure the rationality of probability prediction. This represents the negative log-likelihood loss value (dimensionless). The smaller the value, the closer the residual distribution is to the multivariate normal distribution. Represents a matrix The determinant is taken as the natural logarithm (dimensionless). Represents the residual vector at time t (unit: kilowatts); Represents the covariance matrix The inverse matrix (unit: 1 squared per kilowatt); It represents a quadratic form (dimensionless) used to measure the degree of fit between the residual and the distribution.

[0195] Furthermore, in this embodiment, the system can also calculate the sample-level evidence weight using formula (35). :

[0196] (35)

[0197] Formula (35) is the formula for calculating the sample-level evidence weight, which is used to summarize the evidence weights of each channel into a sample-level weight, so that the model pays more attention to high-credibility data. This represents the sample-level weight (dimensionless) at time t, with a value ranging from 0 to 1; This represents a clipping function (dimensionless) that restricts the weight values ​​to between 0 and 1, i.e., if x < 0, then take 0; if x > 1, then take 1; otherwise, take x. and These represent the dimensionless evidence weights (for the photovoltaic and load channels) at time t, respectively, reflecting the data's reliability. Higher values ​​indicate more reliable data.

[0198] Furthermore, in this embodiment, the system can also calculate the scene weighting weight using formula (36). :

[0199] (36)

[0200] Formula (36) is a scene weighting calculation formula, which is used to increase the sample weight for harsh scenes (such as high salt spray or sudden irradiation) and improve the accuracy of the model under extreme conditions. This represents the scene weighting (dimensionless) at time t, with a base value of 1, which increases when encountering adverse scenes; This represents the weighting coefficient (dimensionless), used to control the magnitude of the weight increase, and is usually taken as a positive value, such as 0.5; This indicates an indicator function (dimensionless), which takes the value 1 when the condition inside the parentheses is true, and 0 otherwise. The salt spray intensity at time t (unit: milligrams per square centimeter) is derived from environmental monitoring data. This represents the salt spray intensity threshold (unit: milligrams per square centimeter), used to define high salt spray scenarios; This represents the smoothed irradiance drive at time t (unit: watts per square meter). This represents the threshold for irradiance variation (unit: watts per square meter), used to define scenarios of sudden irradiance changes.

[0201] Furthermore, in this embodiment, the system can also calculate the total multi-task loss L using formula (37):

[0202] (37)

[0203] Formula (37) is the formula for calculating the total loss of multiple tasks. It is used to integrate point prediction error, probability consistency loss and sample weights to form a comprehensive optimization objective. L represents the total loss value (dimensionless), which is the objective function that needs to be minimized during model training. , , These are the dimensionless weighting coefficients for photovoltaic point prediction loss, load point prediction loss, and probabilistic consistency loss, respectively, satisfying... , used to balance the importance of different tasks; the meanings of other parameters are the same as those in formulas (32) to (37).

[0204] Therefore, by combining the above formulas (32) to (37), the system can first quantify the mean square error of photovoltaic and load point prediction respectively, then evaluate the probability consistency of the residual distribution, and then combine the data credibility weight and scenario weight to finally integrate into the multi-task total loss function.

[0205] Uncertainty parameters are generated based on the predicted residuals.

[0206] The uncertainty parameter is a quantitative indicator used to characterize the potential range of fluctuations in future predicted values, usually expressed as an interval or probability distribution. Specifically, the system can calculate the standard deviation σ (unit: kilowatt) of the predicted residual sequence over a past period (e.g., 24 hours) and use this to construct the uncertainty interval of the predicted values.

[0207] In some embodiments, the system can calculate the predicted value of the photovoltaic power point, the predicted value of the load power point, and their corresponding prediction uncertainty intervals at the next time point (t+1) using the following formula (38):

[0208] (38)

[0209] Formula (38) is the formula for representing the prediction result, which is used to define the prediction input required by the scheduling model. This represents the predicted photovoltaic power point value (unit: kilowatts) at time t+1, output by the prediction model; This represents the predicted load power at time t+1 (unit: kilowatts). The half-range width (unit: kilowatt) represents the uncertainty of photovoltaic power forecast, and is used to define the possible range of fluctuation of the forecast value; The half-interval width (unit: kilowatts) represents the uncertainty of load power forecast.

[0210] Next, in this embodiment, the system can also calculate the predicted total power supply value using formulas (39) and (40). and dynamic carbon footprint parameters :

[0211] (39)

[0212] (40)

[0213] Formula (39) is the formula for predicting total power supply. This represents the predicted total power supply (unit: kilowatts). This represents the predicted self-consumption power of photovoltaic power (unit: kilowatts). Represents the non-negative part of the predicted energy storage discharge power (unit: kilowatt); γ represents the non-negative part of the predicted power purchase capacity of the power grid (unit: kilowatt). Formula (40) is the formula for calculating dynamic carbon footprint parameters. γ represents the equivalent carbon footprint intensity of the system (unit: kilograms of carbon dioxide equivalent per kilowatt-hour); The marginal carbon factor of the power grid is expressed in kilograms of carbon dioxide equivalent per kilowatt-hour. Indicates the marginal carbon factor of energy storage (unit: kilograms of carbon dioxide equivalent per kilowatt-hour). The marginal carbon factor of photovoltaics (unit: kilograms of carbon dioxide equivalent per kilowatt-hour) is usually taken as 0; ε is a very small positive number used to prevent the denominator from being zero.

[0214] Furthermore, in this embodiment, the system can also calculate the power correction amount and net power deficit using formula (41). :

[0215] (41)

[0216] Formula (41) is the formula for calculating the power correction and net gap caused by uncertainty. This represents a conservative correction for photovoltaic power (unit: kilowatts), used to account for forecast uncertainties. A conservatism coefficient (dimensionless) representing photovoltaic power, ranging from 0 to 1, used to reduce the risk of over-repair; The meaning is the same as in formula (38), which is the half-interval width of the uncertainty in photovoltaic power prediction (dimensionless, needs to be normalized). Indicates a conservative correction amount for load power (unit: kilowatts). The conservative coefficient (dimensionless) represents the load power. This represents the net power deficit (unit: kilowatt). A positive value indicates that the system has a power deficit, while a negative value indicates that there is power redundancy.

[0217] Furthermore, in this embodiment, the system can also calculate the power adjustment amount and final power command of each device using formulas (42) and (43):

[0218] (42)

[0219] (43)

[0220] Formula (42) is the formula for calculating the power adjustment amount. This indicates the adjustment amount of power purchased by the power grid (unit: kilowatts). This represents the adjustment amount of energy storage discharge power (unit: kilowatt), and its value is within the available uplink margin of energy storage. (Unit: kilowatt) values ​​are taken from the range; The available uplink margin for purchasing electricity from the grid is expressed in kilowatts. Formula (43) is the final power command calculation formula, and the projection operator is used to ensure that the command does not exceed the limit. This indicates the adjusted energy storage discharge power command (unit: kilowatt).

[0221] Furthermore, in this embodiment, the system can also calculate the corrected equivalent carbon footprint parameters using formula (44). :

[0222] (44)

[0223] Formula (44) is the formula for calculating the modified equivalent carbon footprint parameter, and the carbon intensity is recalculated based on the adjusted final power command. This represents the corrected equivalent carbon footprint parameter (unit: kilograms of CO2 equivalent per kilowatt-hour). , , These represent the final grid power purchase, energy storage discharge, and photovoltaic self-consumption power command values ​​(unit: kilowatts) obtained after the projection operation of formula (43); the meanings of other parameters are the same as those in formula (40).

[0224] Therefore, by combining the above formulas (38) to (44), the system can first obtain prediction and uncertainty information, then calculate the initial carbon footprint, then quantify the power adjustment requirements caused by prediction uncertainty, and determine the optimal power adjustment amount for each unit under equipment operation constraints. Finally, the corrected equivalent carbon footprint is calculated based on the adjusted power command. This process realizes the dynamic evaluation and optimization of the carbon intensity of system operation under the conditions of considering prediction uncertainty and equipment physical limitations, providing a key decision-making basis for the low-carbon scheduling of port battery swapping station microgrids.

[0225] In some embodiments, the system can calculate the dynamic carbon footprint parameters using the following formula (45). :

[0226] (45)

[0227] Formula (45) is the formula for calculating dynamic carbon footprint parameters, which is used to quantify the carbon emission intensity per unit of power supply of a microgrid in real time. The dynamic carbon footprint parameter at time t (unit: kilograms of carbon dioxide equivalent per kilowatt-hour) is the core indicator for carbon emission accounting. This represents the marginal carbon factor of the power grid (unit: kilograms of carbon dioxide equivalent per kilowatt-hour), and its value is dynamically updated based on the real-time cleanliness of the regional power grid. This represents a non-negative value (unit: kilowatt) indicating the power purchased by the power grid, ensuring that only power purchase behavior is counted. The marginal carbon factor of energy storage (unit: kilograms of carbon dioxide equivalent per kilowatt-hour) is calculated based on the weighted average of historical charging sources for energy storage. A non-negative value representing the energy storage discharge power (unit: kilowatt); This represents the marginal carbon factor of photovoltaics (unit: kilograms of carbon dioxide equivalent per kilowatt-hour), which is usually taken as 0 during the operation period; This represents the actual power utilized by photovoltaics (unit: kilowatt), which is the generated power minus the curtailed power. This indicates the total power supply (unit: kilowatt).

[0228] Next, in this embodiment, the system can also calculate the carbon footprint correction residual using formula (46). :

[0229] (46)

[0230] Formula (46) is the formula for calculating the carbon footprint correction residual, which is used to quantify the deviation between the dynamic carbon footprint parameters and their correction values. This represents the carbon footprint correction residual at time t (unit: kg CO2 equivalent per kilowatt-hour), with a positive value indicating that the original estimate was overestimated. The meaning is the same as in formula (45); This represents the corrected carbon footprint parameter at time t (unit: kilograms of CO2 equivalent per kilowatt-hour), the value of which is obtained through external calibration or historical data.

[0231] Furthermore, in this embodiment, the system can also calculate the exponentially weighted moving average of the corrected residual using formula (47). :

[0232] (47)

[0233] Formula (47) is the formula for calculating the exponentially weighted moving average, which is used to smooth the carbon footprint correction residual sequence and capture its long-term trend. This represents the exponentially weighted moving average of the corrected residuals at the current moment (unit: kilograms of carbon dioxide equivalent per kilowatt-hour). β represents the mean value at the previous moment (unit: kilograms of carbon dioxide equivalent per kilowatt-hour); β represents the smoothing factor (dimensionless), ranging from 0 to 1, with smaller values ​​resulting in stronger smoothing. The meaning is the same as in formula (46).

[0234] Furthermore, in this embodiment, the system can also calculate the second-order origin moment of the corrected residual using formula (48). :

[0235] (48)

[0236] Formula (48) is the formula for calculating the second-order original moment, which is used to quantify the fluctuation intensity of the corrected residual. Represents the second-order moment at the origin at the current moment (unit: square of kilograms of carbon dioxide equivalent per kilowatt-hour). The second-order moment at the origin at the previous moment is expressed as (unit: square of kilograms of carbon dioxide equivalent per kilowatt-hour); the meanings of other parameters are the same as in formula (47).

[0237] Furthermore, in this embodiment, the system can also calculate the standard deviation of the corrected residual using formula (49). :

[0238] (49)

[0239] Formula (49) is the standard deviation calculation formula, which is used to measure the degree of uncertainty of the corrected residual. The standard deviation of the corrected residuals is expressed in kilograms of carbon dioxide equivalent per kilowatt-hour. This represents the function that takes the maximum value (dimensionless), ensuring that the value inside the square root is non-negative.

[0240] Furthermore, in this embodiment, the system can also calculate the 95% confidence interval of the carbon footprint parameter using formula (50). :

[0241] (50)

[0242] Formula (50) is the confidence interval calculation formula, which is used to provide the uncertainty range for correcting carbon footprint parameters. Indicates a 95% confidence interval (unit: kilograms of carbon dioxide equivalent per kilowatt-hour). This represents the estimated value of the corrected carbon footprint parameter (unit: kilograms of CO2 equivalent per kilowatt-hour). This represents the 97.5th percentile (dimensionless) of the standard normal distribution, approximately equal to 1.96.

[0243] Furthermore, in this embodiment, the system can also calculate the final carbon footprint parameters using formula (51). :

[0244] (51)

[0245] Formula (51) is the final carbon footprint parameter calculation formula, which is used to project the correction value into a reasonable range. The final carbon footprint parameter is represented in kilograms of CO2 equivalent per kilowatt-hour. and These represent the minimum and maximum allowable values ​​for the carbon footprint parameter (unit: kilograms of carbon dioxide equivalent per kilowatt-hour).

[0246] Furthermore, in this embodiment, the system can also define a projection operator using formula (52). :

[0247] (52)

[0248] Formula (52) is the definition formula for the projection operator, which is used to restrict the input value to a specified range. The projection operator is dimensionless; x represents the input value (unit depends on the context); l represents the lower limit of the interval (unit is the same as x). Indicates the upper limit of the interval (unit is the same as x); Take the larger value of x and l.

[0249] Therefore, by combining the above formulas (45) to (52), the system can dynamically calculate the carbon footprint parameters, quantify their estimation error, obtain the mean and standard deviation of the uncertainty through exponential weighted smoothing and statistical processing, construct the confidence interval, and finally ensure that the result is within a reasonable range through the projection operator. This process realizes robust estimation and uncertainty management of carbon footprint parameters, providing a reliable data foundation for carbon emission monitoring and low-carbon scheduling of port battery swapping station microgrids.

[0250] Therefore, according to the above implementation method, the system can achieve high-precision power prediction through feature engineering and machine learning models, and quantify the uncertainty of the prediction, providing key input parameters and risk measures for subsequent carbon footprint calculation and optimized scheduling.

[0251] In some embodiments, dynamic carbon footprint parameters are calculated based on predicted power values ​​and uncertainty parameters, including:

[0252] Based on the preset energy conservation relationship, the source load power supply path in the predicted power value is decomposed, and the power supply share of each energy source is calculated.

[0253] Among them, the source-load power supply path refers to the physical path of electrical energy flowing from the power source (such as photovoltaic, grid) to the load (such as battery swapping station, auxiliary load) in the microgrid system; the power supply share refers to the proportion of the load power undertaken by a certain power source to the total load power in a specific time period (dimensionless).

[0254] Specifically, the system can construct a linear programming model based on DC power flow model or energy balance principle, with the goal of minimizing network loss or achieving optimal economic efficiency, to solve the optimal output allocation of each power source (photovoltaic, grid-purchased electricity, and energy storage discharge) under a given total load power, and then calculate the energy supply share of each energy source.

[0255] The initial carbon footprint parameters are calculated based on the energy supply share and the preset marginal carbon factor.

[0256] Among them, the marginal carbon factor refers to the amount of carbon dioxide emissions indirectly caused by consuming 1 kWh of electricity (unit: kilograms of carbon dioxide equivalent per kWh), and its value depends on the energy type, reflecting the carbon intensity of that energy; the initial carbon footprint parameter refers to the point estimate of carbon emissions calculated based on the expected value of predicted power (unit: kilograms of carbon dioxide equivalent).

[0257] In some embodiments, the system can calculate the individual variability coefficient of energy storage carbon footprint using the following formula (53). :

[0258] (53)

[0259] Formula (53) is the formula for calculating the individual difference coefficient of energy storage carbon footprint, which is used to quantify the additional carbon emission intensity of energy storage system caused by factors such as battery aging, environmental corrosion and photovoltaic fluctuations. The value represents the individual variability coefficient of energy storage carbon footprint (dimensionless), with a value greater than 1 indicating increased carbon emission intensity and a value less than 1 indicating optimization. The reference carbon factor (unit: kg CO2 equivalent per kilowatt-hour) represents the energy storage battery in its brand-new state, determined by the battery production life cycle assessment; for example, 0.08 is used for lithium iron phosphate batteries. N represents the cumulative equivalent full cycle count (dimensionless), read from the battery management system, with each 100% deep discharge counted as one cycle. The constant 0.965 represents the cycle decay coefficient (dimensionless), reflecting the rate of carbon factor decay due to efficiency reduction after every 100 cycles. S represents the average salt spray concentration (unit: mg per square centimeter), calculated based on environmental monitoring data, reflecting the impact of the highly corrosive port environment. The constant 0.002 is the salt spray concentration influence coefficient (dimensionless), representing the degree of linear influence of salt spray on battery corrosion. The average surface temperature of the battery (unit: degrees Celsius) is obtained by monitoring with a temperature sensor; the constant 0.001 is the temperature-salt coupling coefficient (dimensionless), which characterizes the accelerated aging effect of the combined action of salt spray and temperature. This represents the photovoltaic power fluctuation rate (dimensionless).

[0260] Next, in this embodiment, the system can also calculate the marginal carbon factor of energy storage using formula (54). :

[0261] (54)

[0262] Among them, formula (54) is the formula for assigning marginal carbon factor value to energy storage, which is used to directly convert individual difference coefficients into marginal carbon factor values ​​and establish dynamic carbon emission characterization. The marginal carbon factor of energy storage at time t (unit: kilograms of carbon dioxide equivalent per kilowatt-hour) characterizes the carbon emission intensity per unit discharge of the energy storage system. The coefficient of individual variability in the carbon footprint of energy storage calculated at time t (dimensionless) is derived from the output of formula (54). This formula reflects the dynamic correlation between the carbon factor of energy storage and the individual state of the equipment, the operating environment, and the fluctuations of renewable energy.

[0263] Therefore, by combining the above formulas (53) and (54), the system can first dynamically calculate the individual difference coefficient of the carbon footprint of the energy storage system based on multiple factors such as battery cycle life, corrosive environment, temperature conditions, and photovoltaic fluctuations, and then directly assign this coefficient as the marginal carbon factor of the energy storage. This method quantifies the impact of equipment aging and environmental factors on the carbon footprint, transforming the marginal carbon factor of the energy storage from a fixed value into a dynamic parameter, providing more realistic key input parameters for accurate carbon footprint accounting and low-carbon scheduling of port battery swapping station microgrids.

[0264] The initial carbon footprint parameters are sensitively corrected based on the uncertainty parameters to obtain the corrected carbon footprint point values.

[0265] Sensitivity correction refers to the process of considering the impact of the uncertainty of the predicted power on the carbon footprint calculation results and making appropriate adjustments to the point estimates; the corrected carbon footprint point values ​​refer to the single-value estimates of the carbon footprint after the uncertainty correction (unit: kilograms of carbon dioxide equivalent).

[0266] In some embodiments, the system can calculate the dynamic carbon footprint parameters using the following formula (55). :

[0267] (55)

[0268] Formula (55) is the formula for calculating dynamic carbon footprint parameters. It is used to quantify the carbon emission intensity of a unit power supply of a port power swapping station microgrid in real time, and comprehensively reflect the carbon emission impact of power grid purchase, energy storage discharge and photovoltaic power consumption. The dynamic carbon footprint parameter at time t (unit: kilograms of carbon dioxide equivalent per kilowatt-hour) is the core indicator for scheduling optimization. The marginal carbon factor of the power grid at time t (unit: kilograms of carbon dioxide equivalent per kilowatt-hour) is dynamically updated based on the real-time cleanliness of the regional power grid. This represents the non-negative value of the power purchased by the power grid at time t (unit: kilowatt), ensuring that only power purchase behavior is counted. The marginal carbon factor of energy storage at time t (unit: kilograms of carbon dioxide equivalent per kilowatt-hour) is calculated based on the weighted average of carbon factors from historical charging sources of energy storage. This represents the non-negative value of the energy storage discharge power at time t (unit: kilowatt); This represents the photovoltaic marginal carbon factor at time t (unit: kilograms of carbon dioxide equivalent per kilowatt-hour), which is usually taken as 0 during the operating period; This represents the actual photovoltaic power utilized at time t (unit: kilowatt), which is the photovoltaic power generation minus the curtailed power. This represents the total power supplied at time t (unit: kilowatt). It represents a very small positive number (unit: kilowatt) to prevent the denominator from being zero and to ensure the mathematical stability of the formula when there is no power supply.

[0269] The uncertainty parameters are transformed into carbon footprint confidence intervals using statistical transmission methods.

[0270] Among them, the statistical transmission method refers to the method of transferring the probability distribution characteristics of the input variable (such as the power prediction value) to the output variable (carbon footprint) through a mathematical model (here, the carbon footprint calculation function) to obtain the probability distribution or confidence interval of the output variable; the carbon footprint confidence interval refers to the range in which the true value of the carbon footprint may fall at a given confidence level (unit: kilograms of carbon dioxide equivalent).

[0271] The corrected carbon footprint point values ​​and carbon footprint confidence intervals are subjected to engineering constraint projection processing to obtain dynamic carbon footprint parameters.

[0272] The engineering constraint projection processing refers to the process of combining the calculated carbon footprint point values ​​and intervals with actual engineering operation constraints (such as maximum allowable carbon emission limits, equipment ramp-up rate limits, etc.) to conduct a rationality check and make necessary adjustments, ensuring that the results are feasible in engineering. The dynamic carbon footprint parameters are the final carbon emission quantification results used for scheduling decisions after all the aforementioned steps. They can include both point estimates and interval estimates to reflect their dynamic and uncertain characteristics. Specifically, the system can compare the corrected carbon footprint point values ​​and confidence intervals with preset carbon emission upper limits (such as 150 kg CO2 equivalent). If the point value or interval part exceeds the upper limit, the energy supply share of each energy source can be scaled proportionally according to the degree of exceedance and the system's adjustment capacity, or additional constraints can be introduced to recalculate so that the final dynamic carbon footprint parameters meet the actual engineering requirements.

[0273] Therefore, according to the above implementation method, the system can not only calculate the point estimate of carbon footprint, but also quantify its uncertainty range, and ensure the rationality and feasibility of the results through engineering constraint projection, providing more comprehensive and reliable carbon emission information input for low-carbon scheduling.

[0274] In some embodiments, a multi-objective coordinated scheduling instruction for the port battery swapping station microgrid is generated based on the predicted power value, dynamic carbon footprint parameters, and set constraints, including:

[0275] Construct a decision vector that includes energy storage charging and discharging power, grid interaction power, and load control parameters.

[0276] Among them, the decision vector refers to the vector composed of a series of adjustable variables to be solved in the optimization model, and its value determines the system's operating strategy; the energy storage charging and discharging power refers to the charging (positive value) or discharging (negative value) power command (unit: kilowatt) allocated to the energy storage device; the grid interaction power refers to the exchange power between the microgrid and the upper-level grid, with positive values ​​for purchasing electricity and negative values ​​for selling electricity (unit: kilowatt); the load control parameters refer to the parameters used to adjust the operating status of controllable loads (such as delayed battery swapping operations, air conditioning loads, etc.), such as load power adjustment amount (unit: kilowatt) or start-stop schedule.

[0277] Based on decision vectors, predicted power values, and dynamic carbon footprint parameters, a multi-objective optimization function is constructed with the goals of power balance, carbon emission control, and equipment operation.

[0278] Among them, multi-objective optimization functions refer to a combination of mathematical expressions that need to simultaneously minimize or maximize multiple performance indicators, usually handled by weighted sum methods or Pareto optimality methods. Power balance targets mainly refer to system operating costs (unit: yuan); carbon emission control targets refer to costs or penalties related to carbon emissions (unit: yuan); equipment operation targets may include costs related to equipment wear and tear, lifespan depletion, etc. (unit: yuan).

[0279] Establish a set of constraints based on the set constraints.

[0280] The constraint set refers to the set of all mathematical expressions that the decision variables in an optimization problem must satisfy, including equality constraints and inequality constraints.

[0281] In some embodiments, the system can calculate the decision variable vector x using the following formula (56):

[0282] (56)

[0283] Formula (56) is the definition formula for the decision variable vector, which is used to concatenate the power variables of each device within the scheduling cycle into a high-dimensional vector, facilitating unified processing by the optimization model. In this formula, each subscript "H-dimensional" indicates that the control variable contains values ​​from time t to time t within the rolling optimization horizon. The power / current values ​​are obtained over H time steps, therefore the dimension of this variable subvector is H, and the total dimension of the entire decision vector x is 6H. x represents the decision variable vector (dimensionless), which has a dimension of 6H (because it contains 6 subvectors, each with H dimensions). Indicates from time t to The energy storage discharge power sequence (unit: kilowatt) is an H-dimensional sub-vector; This represents the energy storage charging power sequence (unit: kilowatts). This represents the power purchase sequence of the power grid (unit: kilowatts). This represents the power sales sequence of the power grid (unit: kilowatts). This indicates the chiller power sequence (unit: kilowatts). The value represents the sequence of changes in charging current (unit: amperes), reflecting fluctuations in charging demand; H represents the prediction time domain length (unit: steps).

[0284] Next, in this embodiment, the system can also calculate the feature vector s using formula (57):

[0285] (57)

[0286] Formula (57) is the eigenvector definition formula, which is used to integrate environmental, equipment and load-related features to provide input for weight calculation. s represents the eigenvector (dimensionless), which is a 5-dimensional column vector; S represents the salt spray concentration (unit: milligrams per square centimeter), which reflects the intensity of the port's corrosive environment; ρ represents the air density (unit: kilograms per cubic meter), which affects heat dissipation efficiency; This represents the utilization rate of charging piles (dimensionless), with a value range of 0 to 1, indicating the proportion of charging piles that are busy. This represents the photovoltaic power fluctuation rate (dimensionless).

[0287] Furthermore, in this embodiment, the system can also calculate the standardized feature vector using formula (58). :

[0288] (58)

[0289] Formula (58) is the feature vector standardization formula, which is used to eliminate the differences in the dimensions of each feature and improve the stability of model training. represents the standardized feature vector (dimensionless), with a mean of 0 and a standard deviation of 1 for each dimension; s has the same meaning as in formula (57). The mean vector representing the feature vectors (with the same units as the original features) is calculated from historical data; The standard deviation vector of the feature vector (units are the same as the original feature).

[0290] Furthermore, in this embodiment, the system can also calculate the weight vector using formula (59). :

[0291] (59)

[0292] Formula (59) is the formula for calculating the weight vector, which is used to generate multi-objective weights through the softmax function to achieve a trade-off between economy, carbon emissions, temperature and equipment health. w represents the weight vector (dimensionless), whose element sum is 1; softmax represents the softmax activation function (dimensionless), which maps the input vector to a probability distribution; A represents the weight matrix (dimensionless), which is a trainable parameter with a dimension of 4×5; b represents the bias vector (dimensionless), with a dimension of 4×1. Indicates economic weight (dimensionless); Indicates the carbon emission control weight (dimensionless). Indicates the temperature management weight (dimensionless); This represents the weight of equipment health status (dimensionless).

[0293] Therefore, by combining the above formulas (56) to (59), the system can first construct a decision vector containing power variables at multiple time steps, then define environmental and operational feature vectors, eliminate the influence of dimensions through standardization, and finally use softmax to generate multi-objective weights to achieve collaborative optimization scheduling of the port power swapping station microgrid, thereby improving economy, low carbon emissions and equipment reliability.

[0294] The multi-objective optimization function is solved under the constraint set using a preset optimization algorithm to obtain the optimal scheduling solution.

[0295] The preset optimization algorithm refers to the mathematical solution algorithm pre-selected to solve this type of optimization problem; the optimized scheduling solution refers to the specific numerical value of the decision vector found by the algorithm that satisfies all constraints and makes the objective function as optimal as possible. Specifically, linear programming or interior-point methods can be used for linear or convex problems; heuristic algorithms such as genetic algorithms and particle swarm optimization can be used for nonlinear or nonconvex problems. The solver can be MATLAB's fmincon or CPLEX (IBM ILOG CPLEX Optimization Studio) solver for numerical solutions.

[0296] The executable scheduling instructions for the current moment are generated based on the optimized scheduling solution, and the scheduling instructions are sent to the corresponding execution devices in the port battery swapping station microgrid.

[0297] Among them, executable scheduling instructions refer to standardized commands that transform the optimized solution into specific equipment controllers that can recognize and execute. These commands typically include information such as equipment identifier, instruction type, target value, and timestamp. Executing equipment refers to the physical devices in the microgrid that can receive and execute scheduling instructions, such as energy storage converters, grid interface circuit breakers, and load controllers. Specifically, the system can encapsulate the current variable values ​​in the optimized solution into instruction messages according to a predetermined communication protocol (such as IEC 61850, Modbus TCP) and distribute them through the station control layer network.

[0298] Therefore, according to the above implementation method, the system can combine predictive information, carbon emission targets and operational constraints, and automatically generate optimal scheduling instructions with multiple objectives such as coordinated economy, low carbon, and safety through mathematical optimization methods, and execute them accurately, thereby achieving efficient, low carbon and stable operation of the port battery swapping station microgrid.

[0299] In some embodiments, before generating multi-objective coordinated scheduling instructions for the port battery swapping station microgrid, the method further includes:

[0300] Power conservation constraints are set based on the power balance relationship between the power supply side and the power consumption side of the microgrid.

[0301] In this context, the aggregated power on the supply side refers to the sum of all power generation units (such as photovoltaics and backup generators) within the microgrid and the power purchased from the grid (unit: kilowatts); the aggregated power on the consumption side refers to the sum of all loads (such as battery swapping equipment and auxiliary systems) within the microgrid and the power sold to the grid (unit: kilowatts). The power conservation constraint requires that at any given time, the aggregated power on the supply side equals the sum of the aggregated power on the consumption side and network losses.

[0302] In some embodiments, the system can calculate the power balance relationship using the following formula (60):

[0303] (60)

[0304] Formula (60) is the power balance equation, which describes the conservation relationship between the power of each energy source in the microgrid system at any given time, ensuring that the input power equals the output power and avoiding energy mismatch. t represents the current time index (dimensionless), corresponding to a discrete moment in a 15-minute time interval; This represents the load power (unit: kilowatt) at time t, which is the total power demand of the system. This represents the photovoltaic power generation at time t (unit: kilowatt). This represents the energy storage discharge power at time t (unit: kilowatt), and is taken as a positive value; This represents the energy storage charging power at time t (unit: kilowatt), and is taken as a positive value, but is treated as a subtractive term in the formula; This represents the power purchased from the grid at time t (unit: kilowatt), and is taken as a positive value. This represents the power sold to the grid at time t (unit: kilowatt), and is taken as a positive value, but is treated as a subtractive term in the formula; This represents the energy wastage power at time t (unit: kilowatt), such as energy waste caused by photovoltaic curtailment or load reduction, and is taken as a positive value.

[0305] Next, in this embodiment, the system can also calculate the energy supply share of each energy source using formula (61):

[0306] (61)

[0307] Formula (61) is the formula for calculating the energy supply share, which is used to quantify the relative contribution ratio of photovoltaic, energy storage and grid power purchase to load power supply, and to provide a weighting basis for carbon footprint calculation. This indicates the share of energy supplied by photovoltaics (dimensionless), that is, the proportion of photovoltaic power supply to total power supply; This indicates the energy supply share of energy storage (dimensionless), that is, the proportion of energy storage discharge to the total power supply; This represents the share of energy supplied by the power grid (dimensionless). The total power supply (unit: kilowatt) is the sum of the positive power from photovoltaic power generation, energy storage discharge, and grid-purchased electricity; constraints. Ensure that the total share is 100%.

[0308] Furthermore, in this embodiment, the system can also calculate the energy closure error using formula (62):

[0309] (62)

[0310] Formula (62) is the energy closure verification formula, which is used to verify the accuracy of the power balance equation by the cumulative energy value over 15 minutes, and avoid misjudgment caused by instantaneous measurement interference. It represents the energy closure error at time t (unit: kilowatt-hour), that is, the accumulation of power imbalance within the time window; Indicates the time step (unit: hours), with 15 minutes corresponding to 0.25 hours; This represents the energy closure tolerance threshold (unit: kilowatt-hour), which is set according to the system accuracy requirements, such as 5 kilowatt-hours.

[0311] Therefore, by combining the above formulas (60) to (62), the system can first establish a power balance equation to ensure real-time power conservation, then calculate the energy supply share of each energy source to quantify carbon emission responsibility, and finally eliminate instantaneous errors through energy closure verification, thereby providing an accurate and consistent energy data basis for carbon footprint calculation and improving the reliability of carbon management of port battery swapping station microgrids.

[0312] In some embodiments, the system can calculate the power balance relationship using the following formula (63):

[0313] (63)

[0314] Formula (63) is the power balance equation, which is used to ensure that the total input power of the microgrid system at any time is equal to the total output power, thus maintaining energy conservation. This represents the actual utilized photovoltaic power (unit: kilowatt), which is the photovoltaic power generation power minus the curtailed power. This represents the energy storage discharge power (unit: kilowatt), and is taken as a positive value. This represents the power purchased from the power grid (unit: kilowatt), and is taken as a positive value. This indicates the load power (unit: kilowatt), which is the total power demand of the system; This indicates the power loss due to cold energy (unit: kilowatt), such as the energy consumption of a cooling system; This indicates the amount of power wasted (unit: kilowatt), such as the energy waste caused by photovoltaic power curtailment. This represents the power sold to the grid (unit: kilowatt), and is taken as a positive value.

[0315] Next, in this embodiment, the system can also calculate the range of values ​​and rate of change constraints of each power variable using formula (64):

[0316] (64)

[0317] Formula (64) is a set of power constraint formulas used to limit the reasonable range and rate of change of power of each device to ensure safe operation. Indicates energy storage charging power (unit: kilowatt); Indicates the maximum allowable discharge power of energy storage (unit: kilowatt); Indicates the maximum allowable charging power of energy storage (unit: kilowatts); This indicates the maximum power purchase capacity of the power grid (unit: kilowatts). This indicates the maximum power output of the power grid (unit: kilowatts). This indicates the maximum power of the chiller (unit: kilowatt). This represents the power value at time k (in kilowatts), where x represents the equipment type; Indicates the upper limit of the power change rate (unit: kilowatts per time step); k represents the time index (dimensionless).

[0318] Furthermore, in this embodiment, the system can also calculate the energy change and state of charge range of the energy storage unit using formula (65):

[0319] (65)

[0320] Among them, formula (65) is the energy storage energy management formula, which is used to simulate the dynamics of energy storage and constrain its state of charge. This represents the stored energy at time k (unit: kilowatt-hours). This represents the stored energy at time k+1 (unit: kilowatt-hours). This represents the energy storage charging efficiency (dimensionless), with a value ranging from 0 to 1. Indicates the energy storage discharge efficiency (dimensionless). and The meaning is the same as in formula (60); Indicates time interval (unit: hours); Indicates the rated energy of the energy storage (unit: kilowatt-hour); Indicates the minimum permissible state of charge (dimensionless). Indicates the maximum permissible state of charge (dimensionless).

[0321] Furthermore, in this embodiment, the system can also calculate the battery temperature change and temperature constraint using formula (66):

[0322] (66)

[0323] Formula (66) is a battery temperature management formula used to quantify temperature changes and ensure that the battery does not overheat. Indicates the change in battery temperature (unit: degrees Celsius). This represents the temperature rise coefficient related to load power (unit: degrees Celsius per kilowatt). The temperature rise coefficient related to the energy storage discharge power (unit: degrees Celsius per kilowatt); Temperature drop coefficient (unit: degrees Celsius per kilowatt) indicates cooling power. , , The meaning is the same as in formulas (63) and (64); Indicates battery temperature (unit: degrees Celsius); Indicates ambient temperature (unit: degrees Celsius); This indicates the maximum allowable temperature of the battery (unit: degrees Celsius).

[0324] Furthermore, in this embodiment, the system can also calculate the carbon footprint ratio using formula (67). :

[0325] (67)

[0326] Formula (67) is the carbon footprint ratio calculation formula, which is used to quantify the carbon emission intensity per unit of electricity supply. Indicates carbon footprint ratio (unit: kilograms of CO2 equivalent per kilowatt-hour). The marginal carbon factor of the power grid (unit: kilograms of carbon dioxide equivalent per kilowatt-hour) reflects the cleanliness of the power grid; The marginal carbon factor for energy storage (unit: kilograms of carbon dioxide equivalent per kilowatt-hour) is calculated based on the energy storage charging source. ε represents the marginal carbon factor of photovoltaics (unit: kilograms of carbon dioxide equivalent per kilowatt-hour), which is usually taken as 0 during the operation period; ε represents a very small positive number (unit: kilowatt) to prevent the denominator from being zero.

[0327] Furthermore, in this embodiment, the system can also calculate the carbon footprint risk constraint using formula (68):

[0328] (68)

[0329] Formula (68) is a carbon footprint risk constraint formula, used to ensure the safe range of carbon footprint ratio under uncertainty. This represents the 97.5th percentile (dimensionless) of the standard normal distribution, approximately equal to 1.96; Indicates carbon footprint ratio The standard deviation (unit: kilograms of carbon dioxide equivalent per kilowatt-hour) was estimated using historical data; The risk threshold (unit: kilograms of carbon dioxide equivalent per kilowatt-hour) is set by policy or safety requirements.

[0330] Furthermore, in this embodiment, the system can also calculate the battery state health (SOH) and fault resistance using formula (69):

[0331] (69)

[0332] Formula (69) is the equipment health assessment formula, used to monitor battery aging rate and failure risk. SOH represents the state of health (dimensionless), and the smaller the value, the more severe the aging. This represents the temperature effect coefficient (unit: per degree Celsius), reflecting the accelerating effect of temperature on aging; Indicates charging time (unit: hours); This represents the fault resistance (unit: ohms) and is used to assess the risk of electrical faults. The failure factor (unit: ohms per kilowatt) reflects the impact of the load on the resistance. The meaning is the same as in formula (63); This indicates the maximum permissible fault resistance (unit: ohms).

[0333] Therefore, by combining the above formulas (63) to (69), the system can establish a complete system of power balance, constraints, energy storage management, temperature control, carbon footprint accounting and equipment health monitoring, so as to ensure that the microgrid of the port power swapping station can achieve optimized operation under the premise of safety, reliability and low carbon, and improve the overall economy and environmental friendliness.

[0334] Carbon risk constraints are set based on dynamic carbon footprint parameters and preset carbon risk upper limits.

[0335] Among them, the carbon risk cap refers to the threshold for carbon emissions per unit time (unit: kilogram of carbon dioxide equivalent) set to control carbon emission risk, which is usually set based on policy requirements or corporate low-carbon targets; carbon risk constraint requires that the dynamic carbon footprint parameter (point value or upper limit of range) must not exceed this threshold in order to manage carbon emission risk.

[0336] In some embodiments, the system can calculate the power shortage and peak shaving cost using the following formula (70). :

[0337] (70)

[0338] Formula (70) is the formula for calculating the power shortage and peak shaving cost, which is used to quantify the degree of power shortage when the load demand is not met. This represents the energy deficit at time k (unit: kilowatt-hours), calculated as the difference between load power and total power supply (photovoltaic utilization, energy storage discharge, and grid purchase). Negative values ​​are considered as 0. This represents the load power at time k (unit: kilowatts). , , These represent the photovoltaic utilization power, energy storage discharge power, and grid power purchase power at time k (unit: kilowatts). The energy shortage cost (dimensionless) represents the normalized average energy shortage level; H represents the optimization time domain length (dimensionless), i.e., the total number of time steps. This represents the normalized energy reference value (unit: kilowatt-hour), which is usually taken as the typical load value.

[0339] Next, in this embodiment, the system can also calculate the carbon emission cost using formula (71). :

[0340] (71)

[0341] Formula (71) is the carbon emission cost calculation formula, which is used to quantify the loss of carbon emission exceeding the limit. This represents the carbon emissions at time k (unit: kilograms of carbon dioxide equivalent). , , These represent the carbon intensity factors for the power grid, energy storage, and photovoltaics (unit: kilograms of carbon dioxide equivalent per kilowatt-hour). This indicates the amount of electricity purchased from the power grid (unit: kilowatt-hours). Indicates the carbon emission cost (dimensionless). Indicates carbon emission reference value (unit: kilograms of carbon dioxide equivalent). This represents the carbon over-limit penalty coefficient (dimensionless). This represents the actual carbon intensity at time k (unit: kilograms of carbon dioxide equivalent per kilowatt-hour). Indicates the upper limit threshold of carbon intensity (unit: kilograms of carbon dioxide equivalent per kilowatt-hour). Indicates the width of the carbon safety belt (unit: kilograms of carbon dioxide equivalent per kilowatt-hour), used for softening the restraints; .

[0342] Furthermore, in this embodiment, the system can also calculate the cost of exceeding the temperature limit using formula (72). :

[0343] (72)

[0344] Formula (72) is the formula for calculating the cost of exceeding the temperature limit, which is used to quantify the severity of the battery temperature exceeding the safe range. Indicates the cost of exceeding the temperature limit (dimensionless); This represents the battery temperature at time k (in degrees Celsius). This indicates the temperature control setpoint (unit: degrees Celsius), which is the upper limit for safe operation. This indicates the absolute upper limit of temperature (unit: degrees Celsius) and is used for normalization.

[0345] Furthermore, in this embodiment, the system can also calculate the equipment degradation cost using formula (73). :

[0346] (73)

[0347] Formula (73) is the formula for calculating the cost of equipment degradation, which is used to quantify the decline in battery health and the risk of failure. Indicates the cost of equipment degradation (dimensionless); Represents the health weighting coefficient (dimensionless). This represents the amount of decrease in battery health at time k (dimensionless). Indicates a reference value for a decline in health (dimensionless); Indicates the fault weighting coefficient (dimensionless). The fault resistance at time k is expressed in ohms. This indicates the maximum permissible fault resistance (unit: ohms).

[0348] Furthermore, in this embodiment, the system can also calculate the comprehensive objective function using formula (74). :

[0349] (74)

[0350] Formula (74) is the formula for calculating the comprehensive objective function, used to weight and combine the four sub-costs and add a constraint penalty term. J represents the value of the comprehensive objective function (dimensionless), which needs to be minimized; , , , Representing the scenario weights (dimensionless) for electricity, carbon emissions, temperature, and equipment degradation, respectively, satisfying... + + + =1; ρ represents the penalty coefficient (dimensionless). A vector representing the negative part (violation amount) of all inequality constraints (units depend on the constraint type), such as power violation amount; L1 norm (dimensionless) represents the sum of the absolute values ​​of the elements of a vector.

[0351] Therefore, by combining the above formulas (70) to (74), the system can quantify multiple objectives such as power balance, carbon emission control, temperature management, and equipment health into costs of a unified scale, and handle constraint violations through penalty functions, providing a clear and quantifiable objective function for particle swarm optimization algorithm, thereby achieving economic, low-carbon, and safe operation optimization of the port power swapping station microgrid.

[0352] In some embodiments, the system can calculate the velocity update value of the particle in the iteration using the following formula (75):

[0353]

[0354] (75)

[0355] Formula (75) is the particle velocity update formula, which is used to calculate the new velocity of each particle in each iteration in the particle swarm optimization algorithm to guide the movement of particle positions. This represents the velocity vector of particle i at iteration number q+1 (unit: dimensionless, but represents the change in the decision variable). The inertial weight (dimensionless) represents the tendency of the particle to maintain its original velocity at iteration number q. The velocity vector of particle i at iteration number q (unit: dimensionless); and These represent the individual acceleration coefficient and the group acceleration coefficient (dimensionless), respectively, used to adjust the intensity of a particle's movement toward its historical best and global best. and This represents a dimensionless random number generated at iteration number q, which follows a uniform distribution. (i.e., the value range is 0 to 1); Represents the historical best position vector of particle i (unit: dimensionless, but represents the value of the decision variable); The vector representing the current position of particle i at iteration number q (unit: dimensionless). Represents the global optimal position vector (unit: dimensionless). This represents a clipping function (dimensionless) used to restrict each component of the velocity vector v to an interval [ [Inside, to prevent excessive speed;] This represents the upper limit vector of velocity (unit: dimensionless), and its value is usually set based on the range of decision variables. This represents the position vector of particle i at iteration number q+1 (unit: dimensionless, but represents the value of decision variables, such as power setting value). The projection operator (dimensionless) is used to project the input vector into the feasible region to ensure that the location satisfies boundary constraints, ramp rate constraints, energy storage state of charge constraints, temperature constraints, carbon emission constraints, etc. This represents the current position vector of particle i at iteration number q (unit: dimensionless).

[0356] Next, in this embodiment, the system can also calculate the position update value of the particle in the iteration using formula (76):

[0357] (76)

[0358] Formula (76) is the fitness evaluation and optimal position update formula, which is used to quantify the quality of particle positions and dynamically update individual and global optimal solutions. The fitness value (dimensionless) represents the fitness value of particle i; the smaller the value, the better the solution. This represents a dimensionless objective function, such as total cost or carbon emission cost, calculated based on particle positions. The corresponding scheduling scheme; ← represents the historical best position of particle i (unit: dimensionless); ← represents the assignment operation (dimensionless). This represents the parameter (dimensionless) corresponding to the minimum value, i.e., comparing the historical best fitness with the current fitness and selecting the better one for updating. ; Indicates the global optimal position (unit: dimensionless). This means updating the position with the minimum fitness among all the historical best positions of all particles. .

[0359] Furthermore, in this embodiment, the system can also calculate the algorithm hyperparameters and set the convergence logic using formula (77):

[0360] (77)

[0361] Among them, formula (77) is the hyperparameter setting and convergence logic formula, which is used to dynamically adjust the algorithm parameters and define the stopping conditions. The inertia weight (dimensionless) represents the inertia weight at iteration number q, and its value decreases linearly with each iteration. This represents the maximum value of the inertial weight (dimensionless), for example, 0.9; This represents the minimum inertial weight (dimensionless), for example, 0.4; q represents the maximum number of iterations (dimensionless); q represents the current number of iterations (dimensionless); M represents the number of particles (dimensionless). and These represent the upper and lower bound vectors of the decision variables (unit: dimensionless).

[0362] Therefore, by combining the above formulas (75) to (77), the system can realize the complete process of the particle swarm optimization algorithm: first, the particle movement direction is dynamically adjusted by the velocity update formula, taking into account individual and group experience; then, the solution is ensured to meet physical and operational constraints by the position update formula; next, the solution quality is continuously optimized by fitness evaluation and optimal position update mechanism; finally, the efficiency and accuracy of the algorithm are controlled by hyperparameter setting and convergence logic.

[0363] Equipment health constraints are set based on the state of charge boundary of the energy storage system, battery temperature rise limit, and equipment health degradation requirements.

[0364] Among them, battery temperature rise limit refers to the maximum allowable increase in internal or surface temperature of the battery during operation (unit: degrees Celsius) to ensure battery safety and lifespan; equipment health degradation requirements refer to the restrictions set on key parameters (such as equivalent cycle number) that reflect equipment aging or wear in order to extend equipment lifespan.

[0365] The established power conservation constraints, carbon risk constraints, and equipment health constraints constitute the constraint conditions.

[0366] Specifically, the system logically integrates all the above equality and inequality constraints to form a complete set of constraints, which serves as the input conditions for the optimization problem. This set defines the feasible region of the decision variables (such as power commands).

[0367] Therefore, according to the above implementation method, the system can systematically establish a comprehensive constraint system that takes into account real-time power balance, carbon emission risk management and long-term reliable operation of equipment, laying a solid constraint foundation for generating safe, low-carbon and economical optimal scheduling instructions.

[0368] Figure 2 This is a structural block diagram of a microgrid carbon footprint scheduling system for a port battery swapping station according to an embodiment of the present invention.

[0369] like Figure 2 As shown, the microgrid carbon footprint scheduling system of this port battery swapping station includes:

[0370] The multi-source operation data acquisition module 210 is used to acquire multi-source operation data of the port battery swapping station microgrid; the reliable data generation module 220 is used to perform physical consistency processing on the multi-source operation data in sequence, including time-scale alignment, outlier removal, and data correction, to obtain reliable data; the power and uncertainty prediction module 230 is used to perform photovoltaic power output prediction and load power prediction based on the reliable data to obtain predicted power values ​​and uncertainty parameters; the dynamic carbon footprint parameter generation module 240 is used to calculate dynamic carbon footprint parameters based on predicted power values ​​and uncertainty parameters; and the collaborative scheduling instruction generation module 250 is used to generate multi-objective collaborative scheduling instructions for the port battery swapping station microgrid based on predicted power values, dynamic carbon footprint parameters, and set constraints, including power conservation constraints, carbon risk constraints, and equipment health constraints.

[0371] In some embodiments, the power and uncertainty prediction module 230 is further configured to extract load tidal cycle characteristics and photovoltaic output disturbance characteristics from the reliable data; fuse the load tidal cycle characteristics and photovoltaic output disturbance characteristics with environmental monitoring data, equipment operating status data and operating behavior data in the reliable data to construct a multi-dimensional feature vector, and standardize the multi-dimensional feature vector; perform joint prediction of photovoltaic output and load power on the standardized multi-dimensional feature vector through a preset time series prediction model, and output the predicted power value; calculate the prediction residual based on the comparison result between the predicted power value and the true value in the reliable data; and generate uncertainty parameters based on the prediction residual.

[0372] In some embodiments, the dynamic carbon footprint parameter generation module 240 is further configured to: decompose the source-load power supply path in the predicted power value according to the preset energy conservation relationship; calculate the energy supply share of each energy source; calculate the initial carbon footprint parameter according to the energy supply share and the preset marginal carbon factor; perform sensitivity correction on the initial carbon footprint parameter according to the uncertainty parameter to obtain the corrected carbon footprint point value; convert the uncertainty parameter into a carbon footprint confidence interval through a statistical transmission method; and perform engineering constraint projection processing on the corrected carbon footprint point value and the carbon footprint confidence interval to obtain the dynamic carbon footprint parameter.

[0373] In some embodiments, the collaborative scheduling instruction generation module 250 is further configured to construct a decision vector including energy storage charging and discharging power, grid interaction power, and load control parameters; based on the decision vector, predicted power value, and dynamic carbon footprint parameters, construct a multi-objective optimization function with the objectives of power balance, carbon emission control, and equipment operation; establish a set of constraints according to the set of constraints; solve the multi-objective optimization function under the set of constraints using a preset optimization algorithm to obtain an optimized scheduling solution; generate an executable scheduling instruction for the current moment based on the optimized scheduling solution, and send the scheduling instruction to the corresponding execution device in the port battery swapping station microgrid.

[0374] The specific functions and examples of each module and submodule of the device in this embodiment of the invention can be found in the relevant descriptions of the corresponding steps in the above method embodiments, and will not be repeated here.

[0375] According to embodiments of the present invention, the above-described method of the present invention can be applied to an electronic device and a readable storage medium.

[0376] Figure 3 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0377] like Figure 3 As shown, the electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. The RAM 603 may also store various programs and data required for the operation of the electronic device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0378] Multiple components in electronic device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of displays, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows electronic device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0379] The computing unit 601 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as a microgrid carbon footprint scheduling method for a port battery swapping station. For example, in some embodiments, a microgrid carbon footprint scheduling method for a port battery swapping station can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of a microgrid carbon footprint scheduling method for a port battery swapping station described above can be performed. Alternatively, in other embodiments, computing unit 601 may be configured by any other suitable means (e.g., by means of firmware) to execute a microgrid carbon footprint scheduling method for a port battery swapping station.

[0380] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0381] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0382] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0383] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT or LCD monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual, auditory, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0384] The systems and technologies described herein can be implemented in computing systems that include back-end components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0385] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0386] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this invention can be achieved, and this is not limited herein.

[0387] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of this invention should be included within the scope of protection of this invention.

Claims

1. A microgrid carbon footprint scheduling method for port battery swapping stations, characterized in that, include: Acquire multi-source operation data of the port battery swapping station microgrid; Physical consistency processing, including time-scale alignment, outlier removal, and data correction, is performed sequentially on the multi-source operational data to obtain reliable data. Based on the reliable data, photovoltaic power output prediction and load power prediction are performed to obtain the predicted power value and uncertainty parameters; The dynamic carbon footprint parameters are calculated based on the predicted power value and the uncertainty parameters. The multi-objective coordinated scheduling instructions for the port battery swapping station microgrid are generated based on the predicted power value, the dynamic carbon footprint parameters, and the set constraints, including power conservation constraints, carbon risk constraints, and equipment health constraints. The calculation of dynamic carbon footprint parameters based on the predicted power value and the uncertainty parameter includes: Based on the preset energy conservation relationship, the source load power supply path in the predicted power value is decomposed, and the power supply share of each energy source is calculated. The initial carbon footprint parameters are calculated based on the energy supply share and the preset marginal carbon factor. The initial carbon footprint parameters are sensitively corrected based on the uncertainty parameters to obtain the corrected carbon footprint point values. The uncertainty parameters are converted into carbon footprint confidence intervals using a statistical transmission method. The corrected carbon footprint point values ​​and the carbon footprint confidence interval are subjected to engineering constraint projection processing to obtain the dynamic carbon footprint parameters.

2. The method according to claim 1, characterized in that, The acquisition of multi-source operation data of the port battery swapping station microgrid includes: Environmental monitoring data is collected through an environmental sensor network deployed at the port's battery swapping station; The equipment operation status data is collected through the equipment monitoring system of the port power exchange station; Data on electricity consumption behavior is collected through electricity metering devices; Collect operational behavior data through an event recording device; The collected environmental monitoring data, equipment operating status data, power consumption data, and operating behavior data are organized and stored in a unified time-stamped format to form the multi-source operating data.

3. The method according to claim 2, characterized in that, The physical consistency processing of sequentially performing time-scale alignment, outlier removal, and data correction on the multi-source operational data to obtain reliable data includes: The timestamps of each data channel in the multi-source running data are synchronized and aligned based on a preset set of reference events. By applying preset anomaly detection rules, outliers in the aligned multi-source running data are removed, and missing data is imputed. Sensor drift correction and data cross-verification fusion are performed on the multi-source operating data after outlier removal to correct measurement bias. The corrected multi-source operating data is adjusted for energy conservation to obtain the reliable data.

4. The method according to claim 3, characterized in that, The process of performing photovoltaic power output prediction and load power prediction based on the reliable data to obtain predicted power values ​​and uncertainty parameters includes: Extract load tidal cycle characteristics and photovoltaic output disturbance characteristics from the reliable data; The load tidal cycle characteristics, the photovoltaic output disturbance characteristics, and the environmental monitoring data, equipment operating status data, and operating behavior data in the trusted data are fused to construct a multi-dimensional feature vector, and the multi-dimensional feature vector is then standardized. The photovoltaic output and load power are jointly predicted by the standardized multi-dimensional feature vector through a preset time-series prediction model, and the predicted power value is output. Based on the comparison between the predicted power value and the true value in the reliable data, the prediction residual is calculated; The uncertainty parameter is generated based on the predicted residual.

5. The method according to claim 1, characterized in that, The process of generating multi-objective coordinated scheduling instructions for the port battery swapping station microgrid based on the predicted power value, the dynamic carbon footprint parameters, and the set constraints includes: Construct a decision vector that includes energy storage charging and discharging power, grid interaction power, and load control parameters; Based on the decision vector, the predicted power value, and the dynamic carbon footprint parameters, a multi-objective optimization function is constructed with the objectives of power balance, carbon emission control, and equipment operation. Establish a set of constraints based on the defined constraints; The multi-objective optimization function is solved under the set of constraints using a preset optimization algorithm to obtain an optimized scheduling solution; Based on the optimized scheduling solution, an executable scheduling instruction for the current moment is generated, and the scheduling instruction is sent to the corresponding execution device in the port battery swapping station microgrid.

6. The method according to claim 5, characterized in that, Before generating the multi-objective coordinated scheduling instructions for the port battery swapping station microgrid, the method further includes: The power conservation constraint is set according to the power balance relationship between the power supply side and the power consumption side of the microgrid; The carbon risk constraint is set based on the dynamic carbon footprint parameters and the preset carbon risk upper limit. The device health constraints are set according to the state of charge boundary of the energy storage system, the battery temperature rise limit, and the device health degradation requirements. The power conservation constraint, the carbon risk constraint, and the equipment health constraint constitute the constraint conditions.

7. A microgrid carbon footprint scheduling system for a port battery swapping station, characterized in that, include: A multi-source operation data acquisition module is used to acquire multi-source operation data of the port battery swapping station microgrid; The trusted data generation module is used to sequentially perform physical consistency processing on the multi-source running data, including time-scale alignment, outlier removal, and data correction, to obtain trusted data. The power and uncertainty prediction module is used to perform photovoltaic output prediction and load power prediction based on the reliable data, and obtain the predicted power value and uncertainty parameters. A dynamic carbon footprint parameter generation module is used to calculate dynamic carbon footprint parameters based on the predicted power value and the uncertainty parameter. The collaborative scheduling instruction generation module is used to generate multi-objective collaborative scheduling instructions for the port power swapping station microgrid based on the predicted power value, the dynamic carbon footprint parameters, and the set constraints, including power conservation constraints, carbon risk constraints, and equipment health constraints. The dynamic carbon footprint parameter generation module is also used to decompose the source-load power supply path in the predicted power value according to the preset energy conservation relationship, and calculate the power supply share of each energy source. The initial carbon footprint parameters are calculated based on the energy supply share and the preset marginal carbon factor. The initial carbon footprint parameters are sensitively corrected based on the uncertainty parameters to obtain the corrected carbon footprint point values. The uncertainty parameters are converted into carbon footprint confidence intervals using a statistical transmission method. The corrected carbon footprint point values ​​and the carbon footprint confidence interval are subjected to engineering constraint projection processing to obtain the dynamic carbon footprint parameters.

8. The microgrid carbon footprint scheduling system for port battery swapping stations according to claim 7, characterized in that, The power and uncertainty prediction module is also used to extract load tidal cycle characteristics and photovoltaic output disturbance characteristics from the reliable data; The load tidal cycle characteristics, the photovoltaic output disturbance characteristics, and the environmental monitoring data, equipment operating status data, and operating behavior data in the trusted data are fused to construct a multi-dimensional feature vector, and the multi-dimensional feature vector is then standardized. The photovoltaic output and load power are jointly predicted by the standardized multi-dimensional feature vector through a preset time-series prediction model, and the predicted power value is output. Based on the comparison between the predicted power value and the true value in the reliable data, the prediction residual is calculated; The uncertainty parameter is generated based on the predicted residual.

9. The microgrid carbon footprint scheduling system for port battery swapping stations according to claim 8, characterized in that, The coordinated scheduling instruction generation module is also used to construct a decision vector including energy storage charging and discharging power, grid interaction power and load control parameters; Based on the decision vector, the predicted power value, and the dynamic carbon footprint parameters, a multi-objective optimization function is constructed with the objectives of power balance, carbon emission control, and equipment operation. Establish a set of constraints based on the defined constraints; The multi-objective optimization function is solved under the set of constraints using a preset optimization algorithm to obtain an optimized scheduling solution; Based on the optimized scheduling solution, an executable scheduling instruction for the current moment is generated, and the scheduling instruction is sent to the corresponding execution device in the port battery swapping station microgrid.

10. An electronic device, characterized in that, include: At least one processor; and a memory that is communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.

11. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, Computer instructions are used to cause a computer to perform the method according to any one of claims 1-6.