Method for dynamic tracking and tracing of carbon footprint of multi-node building power distribution network

CN123014419APending Publication Date: 2026-10-30WUHAN HUAXINGLONG NEW ENERGY TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611518264.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-29
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

由于网损同样具有高度的时变性,当前的分摊机制割裂了节点动态用电行为与网络损耗之间的关联,导致分摊结果不具备公平性与科学性

Benefits of technology

本发明通过对多向功率数据实施降维及频率特征解析,克服了储能设备时间平移特性造成的碳追踪难题,并通过双队列机制客观反映了充放电的能量结构差异;同时结合配电网物理拓扑参数及模态瞬时波形特征,建立了网损碳排与各节点用电行为的动态物理映射,提高了复杂建筑配电网内部多节点碳足迹溯源的时效性与精准度,实现了碳排放责任在多节点间的合理分配,明晰了各环节的碳排放责任归属。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123014419A_ABST
    Figure CN123014419A_ABST
Patent Text Reader

Abstract

The present application relates to carbon emission data processing technical field, especially building power distribution network multi-node carbon footprint dynamic tracking and tracing method, including: collecting node power time sequence and external network carbon intensity sequence, splitting positive and negative power to construct non-negative power matrix and getting time base function and node space activation coefficient through non-negative matrix decomposition; based on spectrum centroid, dynamic weight fusion carbon intensity is obtained to get dynamic carbon sequence, energy storage adopts double queue to record carbon intensity, and charges and discharges according to transient and basic energy queue; relying on topological admittance matrix and activation coefficient to solve modal loss responsibility vector, weighted combination generates time-varying loss allocation vector; the net loss carbon footprint is allocated to each load node, and the real-time carbon footprint accounting is completed combined with node power. The present application solves the problems of time sequence characteristic analysis, energy storage carbon attribute detailed definition and net loss carbon emission dynamic allocation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of carbon emission data processing technology, and in particular to a method for dynamic tracking and tracing of the carbon footprint of multiple nodes in building power distribution networks. Background Technology

[0002] As a critical end point of energy consumption, building distribution networks not only encompass various electrical loads but also increasingly integrate distributed power sources and energy storage devices. This deep coupling of diverse elements disrupts the traditional unidirectional transmission pattern of energy flow within the distribution network, exhibiting complex characteristics of multidirectional, high-frequency fluctuations and strong spatiotemporal coupling. The carbon emission intensity of electricity transmitted from the external power grid to the building distribution network is not constant but fluctuates in real time with changes in the power generation structure. Tracking and tracing the carbon footprint of multiple nodes within the building distribution network and clarifying the attribution of carbon emission responsibility at each stage are crucial foundations for conducting refined carbon management and formulating low-carbon dispatch strategies.

[0003] However, faced with massive and high-dimensional power time-series data, traditional carbon accounting methods cannot deeply analyze the spatiotemporal variations behind energy flow. The time-shifting characteristics of energy storage devices increase the difficulty of carbon tracing. The electrical energy absorbed by an energy storage system at different times carries different carbon intensity attributes, while the electrical energy released by the system is essentially a mixture of transient energy and base energy with different time frequency characteristics. Traditional tracing methods often use coarse static carbon intensity averages or single energy inflow / outflow models, which cannot accurately represent the temporal energy structure differences during charging and discharging, leading to biases in the carbon attribute tracing of energy storage nodes.

[0004] When electrical energy is transmitted in the physical topology of a distribution network, network losses are inevitable. The carbon footprint resulting from these losses should be reasonably shared by the nodes that induce energy interaction. However, since network losses are also highly time-varying, the current allocation mechanism severs the connection between the dynamic electricity consumption behavior of nodes and network losses, resulting in an allocation result that lacks fairness and scientific rigor. Summary of the Invention

[0005] To address the technical challenges of time-series feature analysis, detailed definition of energy storage carbon attributes, and dynamic allocation of carbon emissions from network losses, this invention provides a method for dynamic tracking and tracing of the carbon footprint of multiple nodes in a building power distribution network. The method includes: S1, acquiring the power time series, line topology parameters, equipment type, reference voltage, and real-time carbon intensity sequence of the power distribution network nodes; separating the bidirectional power time series of the energy storage nodes into non-negative charging and non-negative discharging sequences, combining these sequences with the non-negative power sequences of the remaining nodes to form a non-negative power matrix, and performing non-negative matrix decomposition to obtain the time basis function and spatial activation coefficients.

[0006] S2. Calculate the spectral centroid of the time basis function and normalize it into dynamic weights. Weightedly fuse the real-time carbon intensity sequence and its mean to generate a dynamic carbon intensity sequence. Based on the spectral centroid, the reconstructed charging power is divided into transient energy and base energy, which are stored in the last-in-first-out queue and the first-in-first-out queue respectively and bound to the corresponding carbon intensity. During discharge, energy is extracted according to the queue priority and the discharge carbon properties are calculated. S3. Construct a node impedance matrix and a power flow tracing mapping matrix using the line topology parameters; convert the spatial activation coefficients into complex apparent power and generate a node modal injection current vector; combine the node impedance matrix and the power flow tracing mapping matrix to determine the modal loss responsibility vector; use the square of the current instantaneous value of each time basis function as the weight to weight the modal loss responsibility vector to generate a time-varying dynamic loss allocation vector; allocate the network loss carbon footprint to each node accordingly; and combine it with the node power sources determined by the steady-state power flow distribution data and the power flow tracing algorithm to determine the real-time carbon footprint.

[0007] By separating bidirectional power flows and performing nonnegative matrix decomposition, the implicit spatiotemporal characteristics of power fluctuations at distribution network nodes are effectively extracted. Based on this, the spectral centroid of the time basis function is derived to distinguish between transient energy and base energy. A dual-queue structure is used to separately record the dynamic carbon intensity sequence values ​​at corresponding moments, achieving physical isolation and precise definition of high-frequency fluctuation energy and long-period energy, correcting the carbon attribute tracing bias of energy storage nodes. Simultaneously, a modal loss responsibility vector is generated based on the topological admittance matrix, and a weighted combination is performed strictly according to the square of the instantaneous value of the time basis function. By accurately mapping the correspondence between time-series current and the square of network loss to the overall network loss allocation space, a dynamically coordinated time-varying loss allocation vector is generated. This scientifically allocates the network loss carbon footprint to each related node, effectively improving the fairness of carbon accounting allocation.

[0008] Preferably, the nonnegative matrix decomposition to obtain the time basis function and spatial activation coefficients includes: arranging the power time series of each node by row; separating the bidirectional power time series of the energy storage node and taking its absolute value to split it into independent nonnegative charging and discharging sequences; concatenating these sequences with the unidirectional nonnegative power sequences of the remaining nodes at the node dimension to form a nonnegative power matrix with the number of rows equal to the total number of all nonnegative sequences and the number of columns equal to the number of sampling points within a preset time period; constructing a time feature matrix and a node coefficient matrix containing a preset rank and performing nonnegative random initialization; alternately updating the time feature matrix and the node coefficient matrix using the multiplication update rule of nonnegative matrix decomposition until the matrix reconstruction error is less than the convergence threshold; using each row of the converged time feature matrix as the time basis function and each column element of the converged node coefficient matrix as the spatial activation coefficient of the corresponding node.

[0009] By using non-negative random initialization and a multiplicative update rule to alternately update the feature matrix, stable convergence and reduced reconstruction error can be achieved, thereby accurately extracting the temporal fluctuation pattern and spatial distribution characteristics of the power of each node.

[0010] Preferably, the calculation of the spectral centroid of the time basis function and its normalization into dynamic weights includes: performing a fast Fourier transform on the time basis function to extract discrete amplitudes and corresponding frequency components in the frequency domain; summing the products of all frequency components and the squares of their corresponding discrete amplitudes, and dividing the sum by the sum of the squares of all discrete amplitudes to calculate the spectral centroid; dividing the spectral centroid by a preset reference frequency to obtain a dimensionless eigenvalue, and inputting the dimensionless eigenvalue into a variable with a natural constant. In SIGMOID-type functions with a base of 0, the absolute values ​​of the mapping results between 0 and 1 are set as dynamic weights.

[0011] The time-domain sequence is converted into frequency-domain components using Fast Fourier Transform, and dimensionless eigenvalues ​​are derived by weighted summation of discrete amplitude squares. These eigenvalues ​​are then mapped using a SIGMOD-type function, providing high-precision quantitative control parameters for the dynamic weighted fusion of carbon intensity.

[0012] Preferably, the weighted fusion of the real-time carbon intensity sequence and its mean to generate a dynamic carbon intensity sequence includes: calculating the arithmetic mean of all data points of the real-time carbon intensity sequence within a preset time period as the mean; performing a scalar multiplication of the dynamic weights with the real-time carbon intensity sequence to obtain a first component sequence that retains fluctuation characteristics; subtracting the dynamic weights from the value 1 and multiplying the difference by the mean to obtain a second component sequence that is constant throughout the time period; and adding the first component sequence and the second component sequence element by element at the same time point to generate a dynamic carbon intensity sequence with a corresponding time basis function.

[0013] Based on the fluctuation characteristics of different time basis functions, the fusion ratio of real-time values ​​and average values ​​is adaptively adjusted, preserving the carbon fluctuation characteristics consistent with specific frequency bands, while suppressing abnormal fluctuation interference from the original high-frequency carbon emission data of the power grid.

[0014] Preferably, the step of dividing the reconstructed charging power into transient energy and base energy based on the spectral centroid, storing them in a LIFO queue and an FIFO queue respectively, and binding them to the corresponding carbon intensity, includes: extracting the time basis function determined to be transient energy and its corresponding spatial activation coefficient; multiplying the spatial activation coefficient by the current instantaneous value of the time basis function to generate the actual injected transient power value; multiplying the actual injected transient power value by a preset sampling time step to convert it into transient energy; binding the value of the transient energy with the value of the dynamic carbon intensity sequence at the corresponding time and pushing it into the LIFO queue controlled by a stack structure; performing the same power conversion operation on the time basis function determined to be base energy to obtain the base energy, and binding the value of the base energy with the value of the dynamic carbon intensity sequence at the corresponding time and pushing it into the FIFO queue.

[0015] The high-frequency energy identified as transient and the carbon properties at a specific moment are encapsulated into a data packet and controlled using a stack structure. This accurately simulates the actual physical state of low energy participation in the cycle during short-term frequent charging and discharging, thus improving the timeliness of transient phase tracking.

[0016] Preferably, the step of extracting energy and calculating discharge carbon attributes according to queue priority during discharge includes: when the energy storage node discharges, prioritizing the removal of transient energy from the top of the last-in-first-out queue for demand offset; when the transient energy in the last-in-first-out queue is exhausted, triggering a conditional branch to extract base energy from the head of the first-in-first-out queue for demand offset; during the extraction process, the extracted energy values ​​are used as weights and weighted averaged with the corresponding dynamic carbon intensity values, and the calculated equivalent carbon intensity value is assigned to the current discharge amount as the discharge carbon attribute.

[0017] A multi-level conditional branching processing mechanism is established in the energy storage and discharge stage. Energy is extracted according to the priority order of transient state first and then substrate, and the equivalent carbon intensity is calculated by weighted average to accurately restore the true proportion of input energy in different frequency bands on the output side.

[0018] Preferably, the step of converting spatial activation coefficients into complex apparent power and generating node mode injection current vectors includes: extracting the fixed resistance and fixed reactance of each branch in the distribution network topology to construct a full-size complex admittance matrix; removing the rows and columns corresponding to the main grid access balance nodes to generate a non-singular complex admittance matrix; inverting the non-singular complex admittance matrix to obtain the distribution network node impedance matrix; assigning positive and negative labels to the spatial activation coefficients according to the equipment type and power flow direction and aggregating them to generate a node directed mode power vector; expanding it into a complex apparent power vector by combining it with a preset steady-state power factor; and dividing the complex apparent power vector element by the conjugate of the node reference voltage to generate a node mode injection current vector.

[0019] By obtaining the global electrical coupling impedance matrix of the network and expanding the spatial features with positive and negative direction indicators into the injected current vector, basic parameters are provided at the electrical mechanism level for subsequent accurate calculation of network losses caused by each mode.

[0020] Preferably, determining the modal loss responsibility vector by combining the node impedance matrix and the power flow tracing mapping matrix includes: multiplying the node modal injection current vector with the distribution network node impedance matrix to obtain the node modal voltage vector; calculating the squared magnitude of the difference between the node modal voltage vectors of the corresponding nodes at both ends of each branch, and multiplying the squared magnitude with the conductance of the corresponding branch to generate the modal active power loss vector; establishing the active power flow tracing mapping matrix from each node to each branch, and performing a left multiplication operation on the modal active power loss vector using the active power flow tracing mapping matrix to generate the modal loss responsibility vector.

[0021] By using the difference in node mode voltage vectors and branch conductance, the base loss of each branch is obtained. The loss is then calculated and allocated using the power flow tracing mapping matrix, clearly defining the proportion of responsibility that a single independent load mode should bear for the network loss.

[0022] Preferably, after generating a time-varying dynamic loss allocation vector by weighting and summing the modal loss responsibility vectors using the squares of the current instantaneous values ​​of each time basis function as weights, the method further includes a step of compensating for the inter-modal cross impedance loss vector. Specifically, this includes: calculating twice the product of the current instantaneous values ​​of any two different time basis functions as the cross term time weight; for any two different time basis functions, extracting the corresponding node modal voltage vectors respectively; calculating the sum of the real and imaginary parts of the modal voltage difference between the nodes at both ends of the same branch; multiplying this sum by the conductance of the branch to generate a branch cross loss vector; performing a left multiplication operation on the branch cross loss vector using the active power flow tracking mapping matrix to obtain a cross impedance loss vector; performing a scalar multiplication of the cross term time weights and the corresponding cross impedance loss vectors to generate a cross loss basis vector; and adding the cross loss basis vectors to the weighted and summed modal loss responsibility vectors according to the row index of the corresponding nodes.

[0023] To address the nonlinear characteristics of network loss caused by the superposition of different modes, the time weight of the cross term and the cross impedance loss vector are calculated and compensated, which reduces the numerical analysis error left by the independent superposition calculation method and ensures the accuracy of the time-varying allocation results.

[0024] Preferably, the step of determining the real-time carbon footprint by combining the node power sources determined by steady-state power flow distribution data and power flow tracing algorithm includes: obtaining the loss-sharing power to be borne by each distribution network node based on the time-varying dynamic loss-sharing vector; dividing the loss-sharing power into the power borne by the external power grid and the power borne by energy storage discharge according to the node power source composition, multiplying them by the real-time carbon intensity of the external power grid and the carbon attribute of the discharge at the current moment, and accumulating them to obtain the network loss carbon footprint; dividing the power consumption of the reconstructed distribution network nodes into the power supply part of the external power grid and the power supply part of the energy storage discharge, multiplying them by the dynamic carbon intensity sequence and the carbon attribute of the discharge, and accumulating them to obtain the power consumption carbon footprint; and adding the network loss carbon footprint and the power consumption carbon footprint to determine the real-time carbon footprint.

[0025] By taking into account both network losses and actual power consumption of nodes, and classifying and summarizing the data according to different power sources, a complete carbon accounting system was constructed, which outputs the true carbon footprint results of nodes with spatiotemporal differences.

[0026] The technical solution of the present invention has the following beneficial technical effects: This invention overcomes the carbon tracking challenge caused by the time-shifting characteristics of energy storage devices by performing dimensionality reduction and frequency feature analysis on multi-directional power data, and objectively reflects the differences in energy structure during charging and discharging through a dual-queue mechanism. At the same time, by combining the physical topology parameters and instantaneous waveform characteristics of the distribution network, a dynamic physical mapping between network loss carbon emissions and the electricity consumption behavior of each node is established, which improves the timeliness and accuracy of carbon footprint tracing of multiple nodes within complex building distribution networks, realizes the reasonable allocation of carbon emission responsibility among multiple nodes, and clarifies the attribution of carbon emission responsibility in each link. Attached Figure Description

[0027] Figure 1 This is a flowchart of a method for dynamic tracking and tracing of the carbon footprint of multiple nodes in a building power distribution network; Figure 2 This is a schematic diagram of the waveform of the implicit mode time basis function; Figure 3 This is a schematic diagram comparing carbon intensity fusion sequences. Detailed Implementation

[0028] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0029] Reference Figure 1 The method for dynamic tracking and tracing of carbon footprint of building power distribution networks includes steps S1 to S3, which are described in detail below.

[0030] S1. Data Acquisition and Non-negative Matrix Decomposition. Specifically, the power time-series data of each node in the building power distribution network within a preset time period and the real-time carbon intensity sequence of the external power grid are acquired. The positive and negative power in the power time-series data are split into non-negative sequences to construct a non-negative power matrix. Non-negative matrix decomposition is performed on the non-negative power matrix to obtain the time basis functions and the spatial activation coefficients of each node on each time basis function.

[0031] Specifically, active power time-series data is read from smart meters deployed at various nodes of the building's power distribution network, and real-time carbon intensity sequences are obtained from an external power grid dispatch center. The power time-series data is aligned according to node and time dimensions, and missing values ​​are processed using linear interpolation. Power consumption greater than 0 is retained as the first sequence, and power injection less than 0 is processed using an absolute value function and retained as the second sequence. The first and second sequences are concatenated along the node dimension to generate a non-negative power matrix in which all elements are greater than or equal to 0. A multiplier update algorithm is selected as the optimization solver, and the matrix is ​​randomly initialized using a uniform distribution. The non-negative power matrix is ​​iteratively decomposed and calculated until the reconstruction error is less than a preset convergence threshold. The decomposed time basis function matrix and the spatial activation coefficient matrix containing the weights of each node on each time basis function are output.

[0032] In the specific implementation process, the power time-series data of each node are arranged row by row. The bidirectional power time-series data of the energy storage node is separated and its absolute value is taken, splitting it into independent non-negative charging power sequences and non-negative discharging power sequences. In the separation operation, the positive value part is retained to form a non-negative charging sequence, and the remaining data is padded with 0; the negative value part is taken as the absolute value to form a non-negative discharging sequence, and the remaining data is padded with 0. After splitting and padding with 0, the total number of node sequences will be expanded to be greater than the total number of physical nodes in the distribution network, thus forming a non-negative power matrix with the number of rows equal to the total number of all non-negative sequences and the number of columns equal to the number of sampling points in the time period. A non-negative node coefficient matrix and a non-negative time feature matrix are initialized; the non-negative power matrix is ​​iteratively decomposed and approximated using a multiplicative update rule until the reconstruction error meets the convergence threshold. The column elements of the converged non-negative node coefficient matrix are used as the spatial activation coefficients of the corresponding nodes on each time basis function, and the rows of the converged non-negative time feature matrix are used as time basis functions.

[0033] In this embodiment, the building power distribution network includes a preset number of 10 physical nodes. The preset time period is set to 24 hours, and the data sampling interval is set to 15 minutes. Based on this, the number of sampling points for the time series is calculated to be 96. For ordinary load nodes that do not contain energy storage, taking the office lighting node as an example, its power time series data is used as one row in the matrix construction. If the 3rd node is a lithium battery energy storage system node, the charging power in the original power series is positive, with a preset maximum charging power of 50 kW; the discharging power is negative, with a preset minimum discharging power of -40 kW. The bidirectional sequence of this energy storage node is separated: the positive value part is retained to form a non-negative charging sequence, and the data at other times is padded with 0; the absolute value of the negative value part is taken to form a non-negative discharging sequence, and the data at other times is padded with 0. After the separation operation, the total number of node sequences expands to 11, which is greater than the total number of physical nodes of 10.

[0034] Based on the above data, construct a non-negative power matrix of size 11×96, denoted as . ,like Figure 2 As shown, the non-negative power matrix corresponds to the 24-hour building power distribution network node power time series sample. It maintains the basic load at 0:00, and two peak electricity consumption periods occur successively at noon and in the evening. The difference between day and night load fluctuations is prominent, which can support the sample data logic of positive and negative power splitting and non-negative matrix decomposition time domain mode decomposition.

[0035] The decomposition rank and number of basis functions after dimensionality reduction are selected to be 4. Using uniform or normal distributions within the interval of 0 to 1, a non-negative node coefficient matrix of size 11×4 is randomly initialized. and a nonnegative time feature matrix of size 4×96 An iterative solution is achieved using the multiplicative update rule of nonnegative matrix factorization, updating the values ​​of the nonnegative time feature matrix and the nonnegative node coefficient matrix in each iteration. The specific update relationship is as follows: ; ; in, The non-negative power matrix is ​​obtained through a positive and negative power splitting and dimension concatenation algorithm. In this embodiment, its value is a power sampling value matrix of size 11×96. Represents the non-negative node coefficient matrix; Represents the non-negative time characteristic matrix; The transpose of the non-negative node coefficient matrix is ​​obtained through matrix transpose operation. In this embodiment, its value is a floating-point matrix of size 4×11. The transpose of the non-negative time feature matrix is ​​obtained through matrix transpose operation. In this embodiment, its value is a floating-point matrix of size 96×4. This represents a small constant used to prevent the denominator from being zero during calculations. In this embodiment... Preset ; operator This represents element-wise division of a matrix.

[0036] After each update, calculate the current reconstruction matrix. With non-negative power matrix The reconstruction error is calculated using the square of the F-norm. Iteration stops when the reconstruction error is less than a set convergence threshold, the preferred range of which is... to In this embodiment, the convergence threshold is set to Alternatively, iteration can stop when the maximum number of iterations reaches 1000. After convergence, the non-negative node coefficient matrix... The first in Line and number The elements of the column represent the first The independent sequence in the th order The spatial activation coefficients on the time basis functions represent the influence of the latent modes in the spatial dimension, and the values ​​of the spatial activation coefficients range from 0 to 10. Non-negative time characteristic matrix. The first in A total of 96 data points are used as the first row. The time basis function represents the th time basis function. The temporal characteristics of power fluctuations of an implicit mode within a day.

[0037] S2. Dynamic tracking of carbon properties in energy storage. Specifically, dynamic weights are calculated based on the spectral centroid of the time basis function, and a dynamic carbon intensity sequence is generated by fusion. A hybrid queue carbon intensity recording mechanism is established for energy storage nodes to achieve accurate tracking of carbon properties during charging and discharging.

[0038] Specifically, a Fast Fourier Transform (FFT) is performed on each time basis function obtained through nonnegative matrix factorization in the above steps to convert the time-domain power fluctuation characteristics into frequency-domain information. The spectral centroid of each time basis function is calculated to determine the concentration position of its energy in the frequency domain, thereby characterizing the speed of power fluctuation in that mode. A preset Sigmoid activation function maps the spectral centroid to dynamic weights between 0 and 1. Higher weights indicate a more sensitive response of the mode to real-time carbon intensity fluctuations. Using these dynamic weights, the real-time carbon intensity sequence of the external power grid and its arithmetic mean within a preset time period are weighted and fused to generate an independent dynamic carbon intensity sequence for each time basis function, achieving adaptive characterization of carbon intensity at different time scales. For energy storage nodes, a hybrid queue carbon intensity recording model consisting of a stack-structured last-in-first-out queue and a standard first-in-first-out queue is constructed.

[0039] During charging, based on a preset frequency threshold, the time basis function is divided into high-frequency modes that generate transient energy components and low-frequency modes that generate base energy components. The charging energy reconstructed based on the high-frequency modes is bound to the dynamic carbon intensity at the corresponding moment, encapsulated as a transient carbon footprint data packet, and pushed into a last-in-first-out (LIFO) queue. Similarly, the charging energy reconstructed based on the low-frequency modes is bound to the carbon intensity, encapsulated as a steady-state carbon footprint data packet, and pushed into a first-in-first-out (FIFO) queue. During discharging, conditional branching logic is written to first pop transient energy from the top of the LIFO queue for deduction. When the transient energy is exhausted, base energy is extracted from the head of the FIFO queue. The extracted energies are weighted and averaged with their bound carbon intensities to calculate the equivalent carbon intensity, which is used as the discharge carbon attribute of the current discharge capacity.

[0040] In the specific implementation process, based on the obtained nonnegative time feature matrix Its number of rows Corresponding to 4 time basis functions, number of columns Corresponding sampling points. For the non-negative time feature matrix. Each row in the code, i.e., each time basis function sequence of length 96, undergoes a Fast Fourier Transform (FFT). The FFT converts the time-domain sequence to the frequency domain, extracting the discrete amplitudes of the 48 positive frequency components in the frequency domain. and the corresponding frequency components Based on this, the centroid of the Fourier transform spectrum of this time basis function is calculated. The calculation formula is:

[0041] All frequency components With the square of the corresponding discrete amplitude The products are summed, and the sum is divided by the sum of the squares of all discrete amplitudes. For example, after calculating the spectral centroid of a time basis function representing a short-term fluctuation, Value This roughly corresponds to a 2-hour power fluctuation cycle, indicating that its energy is concentrated in the higher frequency band.

[0042] To achieve the mapping from spectral features to dynamic weights, a reference frequency is preset. Its value is set based on the typical load fluctuation cycle of the distribution network. In this embodiment, it is set as follows: for This corresponds to a 3-hour load fluctuation cycle limit. First, the spectral centroid... Dividing by the reference frequency yields the dimensionless eigenvalue. For example, in the above example Then, the feature value is input into a sigmoid activation function with the natural constant e as the base for normalization, and the relationship is calculated as follows:

[0043] In this embodiment, the translation parameter of the Sigmoid function The preferred value is 1, steepness parameter The preferred value is 5. Normalization mapping is performed using this SIGMOID-type function, ensuring the mapping result is an absolute value between 0 and 1. The dynamic weight calculation result of the time basis function corresponding to the aforementioned spectral centroid is... This dynamic weight characterizes the mode's 72% accuracy in following real-time changes in external grid carbon intensity, while its reference accuracy to the average value is 28%. The calculated absolute value is set as the dynamic weight of this time basis function.

[0044] Based on dynamic weights, an independent dynamic carbon intensity sequence is generated for each time basis function. First, the real-time carbon intensity sequence of the external power grid, updated every 15 minutes within a 24-hour period, is obtained. The sequence contains 96 discrete data points, with physical units of kgCO2 / kWh. The arithmetic mean of all 96 discrete data points in the real-time carbon intensity sequence for this period is calculated as the constant mean carbon intensity factor over the entire period. In this embodiment, kgCO2 / kWh, such as Figure 3 As shown, the time series curve covers the changes in the carbon intensity of the power grid throughout the day. The dashed line shows a significant difference between day and night in the real-time carbon intensity, while the solid line shows the dynamic carbon intensity. The mean and real-time values ​​are fused by relying on the spectral weight to smooth out extreme values ​​and match the carbon intensity correction calculation process corresponding to different frequency load modes.

[0045] Next, a weighted fusion calculation is performed to generate a dynamic carbon intensity sequence for this mode. The calculation formula is:

[0046] This calculation is performed element-wise. A scalar multiplication of the dynamic weights with the real-time carbon intensity sequence yields the first component sequence, preserving its fluctuation characteristics. The dynamic weights are subtracted from the value 1, and the difference is multiplied by the mean of the carbon intensity factor to obtain the second component sequence, which remains constant throughout the time period. The first and second component sequences are then added element-wise at the same time point to generate the dynamic carbon intensity sequence corresponding to the time basis function. For the mode with a weight of 0.72, its real-time carbon intensity at a certain moment is... When the value is 0.85 kg CO2 / kWh, the calculated dynamic carbon intensity value is kgCO2 / kWh. This sequence preserves the fluctuation trend of real-time carbon intensity while smoothing out extreme peaks through averaging, achieving a dynamic response of carbon intensity that matches the modal frequency characteristics.

[0047] After constructing the dynamic carbon intensity sequence, the hybrid queue carbon intensity recording model is initialized for the energy storage nodes. A global fixed frequency threshold is preset in the control system. This is used to distinguish energy properties. In this embodiment, Set as Hz. For the four time basis functions, if their spectral centroids... For example, in the previous example If the frequency is Hz, then the charging power generated by the mode reconstruction is determined to be a transient energy component; otherwise, if If it is, then it is determined to be the basis energy component.

[0048] At the charging moment of the energy storage node, the charging power is reconstructed from the transient and base modes respectively. For the transient mode, the spatial activation coefficient of the energy storage node in that mode is extracted. and the current moment Instantaneous value of time basis function Multiplying the two yields the actual injected transient power contribution of this mode. Multiply this transient power value by the control cycle time step. In this embodiment, the duration is 0.25 hours, which is converted into the actual injected transient energy value. Compare this energy value with the dynamic carbon intensity corresponding to this mode at the current moment. The data is bound and encapsulated into a transient carbon footprint data packet of the form {Energy:E_trans,CarbonIntensity:C_dyn,Type:"Transient"}, and then pushed onto the top of a last-in-first-out queue using a stack structure for push-pop-drop control. For the basis modes, the same operation is performed: the corresponding spatial activation coefficients are extracted and multiplied by the instantaneous value of the time basis function at the current moment to obtain the actual injected basis power value, which is then multiplied by the time step to convert it into the actual injected basis energy value. The energy value is bound to the corresponding dynamic carbon intensity, encapsulated into a steady-state carbon footprint data packet in the form of {Energy:E_base,CarbonIntensity:C_dyn,Type:"Baseload"}, and then pushed into the tail end of the first-in-first-out queue.

[0049] When an energy storage node discharges, the carbon attribute calculation logic is initiated, and conditional branching logic is written: First, it checks whether the Last-In-First-Out (LIFO) queue is empty; if not empty, transient carbon footprint data packets are continuously popped from the top of the LIFO queue, and the transient energy values ​​in them are used to meet the discharge demand. When the LIFO queue is empty, i.e., the transient energy is exhausted, the conditional branch is triggered, and the base energy in the steady-state carbon footprint data packet is extracted from the head of the First-In-First-Out (FIFO) queue to offset the demand. During the extraction process, the energy values ​​in all energy data packets consumed in this discharge are used as weights, and a weighted average is calculated with their respective bound dynamic carbon intensity values ​​to obtain a comprehensive equivalent carbon intensity value. This equivalent carbon intensity is assigned to the total amount of electricity discharged in this discharge as its discharge carbon attribute output, which is used for the source calculation of the carbon footprint of subsequent nodes. This dual-queue mechanism accurately simulates the two physical characteristics of the energy storage device: the transient response of "last charge first discharge" and the base cycle of "first charge first discharge," improving the realism of energy storage carbon footprint tracking.

[0050] S3. Network Loss Carbon Footprint Allocation and Calculation. Specifically, based on the distribution network topology admittance matrix and spatial activation coefficients, modal loss responsibility vectors are calculated for each time basis function. Time-varying dynamic loss allocation vectors are generated in real time using weighted averages, and the network loss carbon footprint is allocated to each load node. Combined with the node power source, the real-time carbon footprint of each node is determined.

[0051] Specifically, a full-size node complex admittance matrix is ​​constructed based on the distribution network line parameters. After removing slack nodes, the node impedance matrix is ​​obtained by inversion. Using the obtained spatial activation coefficients, different sequences of the same physical node are aggregated by assigning positive and negative directions to generate the node directed mode power vector for each mode. The reference voltage is converted into a node mode injection current vector, which is multiplied with the node impedance matrix to obtain the node mode voltage vector, and then the mode active power loss vector of each branch is calculated. A node-to-branch loss mapping matrix is ​​established using a power flow tracing algorithm, and left-multiplying it yields the mode loss responsibility vector that the node should bear under each mode. At the same time, the cross impedance loss vector between different modes is calculated. During real-time tracking, the instantaneous values ​​of each time basis function are extracted at the current moment, the self-term weight and cross-term weight are calculated, and the above loss responsibility vectors are weighted and summed to generate a time-varying dynamic loss allocation vector. This vector is used to allocate the network loss carbon footprint to each node, and combined with the source composition of node power, dynamic carbon intensity sequence, and energy storage discharge carbon attributes, the real-time carbon footprint of the node is accumulated.

[0052] In the specific implementation process, the building power distribution network topology, which includes 10 nodes and 9 branches, is first analyzed. The fixed resistance of each branch is then read. and fixed reactance For example, a certain type of cable has a resistance of 0.32 Ω / km and a reactance of 0.28 Ω / km. The complex impedance of each branch is calculated using the line impedance parameters. and its admittance Based on Kirchhoff's current law, a structure with dimension [missing information] is assembled. The full-size complex domain node admittance matrix is ​​obtained. Selecting the main network access point as the balancing node, the rows and columns corresponding to the balancing node are removed from the full-size complex domain node admittance matrix to generate a dimension-reduced non-singular complex admittance matrix with dimension O(log n). Matrix inversion is performed on the reduced-dimensional non-singular complex admittance matrix to obtain the nodal impedance matrix containing global electrical coupling information, which also has the same dimension. This is used for subsequent voltage and loss calculations.

[0053] Based on the obtained nonnegative node coefficient matrix Its size is The rows correspond to 11 independent non-negative sequences, and the columns correspond to 4 time basis function modes. For the first... For each time basis function mode, the spatial activation coefficients of all independent sequences in that mode are extracted. Based on the device type and original power flow direction of each sequence, these coefficients are assigned positive and negative signs: coefficients for energy storage discharge sequences and grid injection sequences are assigned positive signs, indicating power injection into the grid; coefficients for ordinary load sequences and energy storage charging sequences are assigned negative signs, indicating power consumption from the grid. Subsequently, the signed coefficients of different sequences belonging to the same physical node are algebraically added to achieve node aggregation. For example, for the third lithium battery energy storage system node, its non-negative charging sequence coefficient is 5, and its non-negative discharging sequence coefficient is -8. After aggregation, the directed mode coefficient of this node is -3, indicating that the node as a whole consumes power in this mode. Thus, a node directed mode power vector of length 10 is generated.

[0054] To perform electrical calculations, the pure active power vector needs to be expanded into a complex apparent power vector. The steady-state power factor of each node is set to a constant 0.9, and the reactive power components corresponding to each node are calculated accordingly, thus transforming the node directed mode power vector. Transform into a complex apparent power vector The nominal reference voltage for distribution network operation is set to single-phase. Its phasor form is The conjugate value remains unchanged. The complex number is considered as part of the power vector. Divide each element by the conjugate reference voltage, i.e. Calculate and generate a node modal injection current vector with dimension 10. Its elements are complex numbers in amperes.

[0055] Obtaining the 10-dimensional current vector Then, the elements corresponding to the balancing nodes are removed, reducing the dimension to 9. Matrix multiplication is then performed. This yields a 9-dimensional nodal modal voltage vector. By filling the voltage bias corresponding to the slack node with zero, a 10-dimensional nodal modal voltage vector is finally recovered. For connected nodes and nodes Extract any branch and Calculate the complex difference The modal active power loss of this branch is calculated by squared the magnitude of the voltage difference and multiplying it by the conductance of this branch. We obtain the real part of the branch admittance, and the calculation formula is: Perform this calculation on all 9 branches to generate a modal active power loss vector of length 9. .

[0056] To distribute the responsibility for branch losses among all nodes, a power flow tracing algorithm based on the proportional sharing principle is adopted to generate a dimension... Active power flow tracking mapping matrix For each branch road Based on steady-state power flow distribution data, the contribution ratio of each upstream node to the active power flowing into the initial stage is determined. If the node... To the side road The proportion of active power provided to the total active power at the beginning of this branch is Then the active power flow tracing mapping matrix T will be the first... line, number The elements of the column are set to If node and branch road If there is no power supply path between nodes, the corresponding element is set to 0. By traversing all 10 nodes and 9 branches according to this rule, the complete active power flow tracing mapping matrix is ​​obtained. This matrix satisfies the condition that the sum of the elements in each column is 1. The elements in the expression represent the share of loss borne by each node for each branch. By performing a left multiplication operation in linear algebra, we obtain the corresponding... Modal loss responsibility vector for each mode Its length is 10, and each element represents the reference loss power that the corresponding node should bear in this mode.

[0057] Since network loss is a nonlinear function of current, when the system state is a linear superposition of multiple modes, the total loss must include the interaction terms between different modes. Therefore, we extract arbitrary two different time basis functions. and Corresponding nodal mode voltage vector and For the same branch, calculate the sum of the real and imaginary products of the modal voltage differences at its two endpoints, and then multiply by the conductance of that branch. The cross loss of this branch is generated. After calculating the cross loss vector for all 9 branches, the power flow tracing mapping matrix is ​​used again. Perform a left multiplication on the branch cross loss vector to obtain the intermodal cross impedance loss vector. .

[0058] Real-time carbon footprint tracking Synchronously read the instantaneous values ​​of the four time basis functions at the current moment. First, calculate the self-weights: the squares of the instantaneous values ​​of each time basis function, i.e. Simultaneously calculate the cross term weight: twice the product of the instantaneous values ​​of any two different time basis functions, i.e. The modal loss responsibility vector for each mode. Scalar multiplication and scaling of all vector elements with the corresponding self-weights generate four weighted loss basis vectors, and the cross impedance loss vector between each mode is then used to calculate the cross impedance loss vector. The corresponding cross-term weights are scaled using scalar multiplication of all vector elements to generate 6 cross-loss basis vectors. These 10 vectors are then summed at the row indices of their corresponding nodes. If a negative amortization term appears during the summation, it is truncated to zero, and the remaining positive terms are scaled proportionally to ensure that the total amortization is normalized. Finally, a time-varying dynamic loss amortization vector of length 10 is generated. .

[0059] For example, when progressing to a specific time step, such as 12:00 noon, the convergence of the non-negative time feature matrix is ​​synchronized. The values ​​of all four modes at the given time index are extracted during the mid-scale analysis; these are the instantaneous values ​​of each time basis function. arrive In this example, the values ​​are 1.5, 0.8, 2, and 0.5, respectively. Given that the transmission line network loss is mechanistically proportional to the square of the current intensity passing through the conductor, when the system state is a linear superposition of multiple modes, the total loss must include cross-multiplication terms between different modes. The four extracted instantaneous values ​​are squared respectively, resulting in self-term time weighting coefficients of 2.25, 0.64, 4, and 0.25. Simultaneously, the time weighting coefficients of the six cross-terms are calculated by multiplying each pair of the four instantaneous values ​​by two. For example, the cross weights generated by instantaneous values ​​1.5 and 0.8 are... Extract the modal loss responsibility vectors obtained from the previous stage's static calculation of these four modes, as well as the pre-extracted six inter-modal cross-impedance loss vectors. Perform scaling processing using the aforementioned time weighting coefficients to generate four weighted loss basis vectors and six cross-loss basis vectors. Perform scalar addition on these ten column vectors along the same node row index. If a negative allocation term due to cross-terms is encountered, it is truncated to zero. The remaining positive allocation terms are scaled proportionally to ensure total normalization, thus obtaining the correct aggregated loss value containing coupled nonlinear characteristics. After traversing and aggregating the ten nodes, output a one-dimensional column vector of length 10. This resulting vector constitutes the time-varying dynamic loss allocation vector at 12:00 noon, representing the specific amount of loss power that each node needs to allocate under complex power grid operation.

[0060] Based on the time-varying dynamic loss allocation vector, the row elements of the corresponding load nodes are extracted to obtain the loss allocation power to be borne by each load node. According to the composition of the node power source, the loss allocation power is divided into the power borne by the external power grid and the power borne by the energy storage discharge. These are multiplied by the real-time dynamic carbon intensity sequence value of the external power grid and the carbon attribute of the discharge at the current moment, and then accumulated to obtain the network loss carbon footprint.

[0061] For the node's electricity carbon footprint, based on the nonnegative matrix decomposition results, the reconstructed electricity power of the node at the current moment is decomposed according to each time basis function to obtain the power value of each modal component. Simultaneously, the distribution network's ground-state steady-state power flow distribution data is extracted, and the absolute distribution ratio of the power injected from the external grid to the discharge power of energy storage devices at each load node in the network is calculated using a power flow tracing algorithm. This ratio is established as the node's power source composition. Based on this node power source composition, the power value of each modal component is further divided into the external grid power supply part and the energy storage discharge power supply part. Specifically, the external grid power supply part is multiplied by the instantaneous value of the dynamic carbon intensity sequence of the corresponding time basis function and the time step, while the energy storage discharge power supply part is multiplied by the calculated energy storage discharge carbon attribute and the time step. The calculation results of all modal components are then summed to obtain the node's electricity carbon footprint.

[0062] Finally, the carbon footprint of network loss and the carbon footprint of electricity consumption are added together at the corresponding nodes to determine the real-time carbon footprint of the node at the current moment and its source composition, and a visualized carbon source composition map is generated simultaneously for use in building microgrid optimization strategies.

[0063] It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of this invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A method for dynamic tracking and tracing of the carbon footprint of multiple nodes in a building power distribution network, characterized in that, include: S1. Obtain the power timing sequence, line topology parameters, equipment type, reference voltage, and real-time carbon intensity sequence of the external power grid for the distribution network nodes. The bidirectional power time series of the energy storage node is separated into non-negative charging sequence and non-negative discharging sequence, which together with the non-negative power sequences of the other nodes form a non-negative power matrix. Non-negative matrix decomposition is then performed to obtain the time basis function and spatial activation coefficient. S2. Calculate the spectral centroid of the time basis function and normalize it into dynamic weights. Weightedly fuse the real-time carbon intensity sequence and its mean to generate a dynamic carbon intensity sequence. Based on the spectral centroid, the reconstructed charging power is divided into transient energy and base energy, which are stored in the last-in-first-out queue and the first-in-first-out queue respectively and bound to the corresponding carbon intensity. During discharge, energy is extracted according to the queue priority and the discharge carbon properties are calculated. S3. Construct a node impedance matrix and a power flow tracing mapping matrix using the aforementioned line topology parameters; The spatial activation coefficients are converted into complex apparent power and a node modal injection current vector is generated. The modal loss responsibility vector is determined by combining the node impedance matrix and the power flow tracing mapping matrix. The modal loss responsibility vector is weighted and summed using the square of the current instantaneous value of each time basis function as the weight to generate a time-varying dynamic loss allocation vector. The network loss carbon footprint is allocated to each node accordingly. The real-time carbon footprint is determined by combining the node power sources determined by the steady-state power flow distribution data and the power flow tracing algorithm.

2. The method for dynamic tracking and tracing of carbon footprint of multiple nodes in a building power distribution network according to claim 1, characterized in that, The nonnegative matrix decomposition process, which yields the time basis function and spatial activation coefficients, includes: arranging the power time series of each node by row; separating the bidirectional power time series of the energy storage node by taking the absolute value, splitting it into independent nonnegative charging and discharging sequences; concatenating these sequences with the unidirectional nonnegative power sequences of the remaining nodes along the node dimension to form a nonnegative power matrix with the number of rows equal to the total number of all nonnegative sequences and the number of columns equal to the number of sampling points within a preset time period; constructing a time feature matrix and a node coefficient matrix containing a preset rank, and performing nonnegative random initialization; alternately updating the time feature matrix and the node coefficient matrix using the multiplication update rule of nonnegative matrix decomposition until the matrix reconstruction error is less than the convergence threshold; using each row of the converged time feature matrix as the time basis function, and using each column element of the converged node coefficient matrix as the spatial activation coefficient of the corresponding node.

3. The method for dynamic tracking and tracing of carbon footprint of multiple nodes in a building power distribution network according to claim 1, characterized in that, The calculation of the spectral centroid of the time basis function and its normalization into dynamic weights includes: Perform a Fast Fourier Transform on the time basis function to extract the discrete amplitude and corresponding frequency components in the frequency domain; The spectral centroid is calculated by summing the products of all the frequency components and the squares of the corresponding discrete amplitudes, and then dividing the sum by the sum of the squares of all the discrete amplitudes. Dividing the spectral centroid by a preset reference frequency yields a dimensionless eigenvalue, which is then input into a function that uses a natural constant. In SIGMOID-type functions with a base of 0, the absolute values ​​of the mapping results between 0 and 1 are set as dynamic weights.

4. The method for dynamic tracking and tracing of carbon footprint of multiple nodes in a building power distribution network according to claim 1, characterized in that, The weighted fusion of the real-time carbon intensity sequence and its mean to generate the dynamic carbon intensity sequence includes: The arithmetic mean of all data points in the real-time carbon intensity sequence within a preset time period is calculated as the mean. The dynamic weights are multiplied by the real-time carbon intensity sequence to obtain the first component sequence that retains the fluctuation characteristics; Subtract the dynamic weight from the numerical value 1, and multiply the difference by the mean to obtain the second sub-sequence that is constant throughout the entire time period; The first sub-sequence and the second sub-sequence are added element by element at the same time point to generate a dynamic carbon intensity sequence with the corresponding time basis function.

5. The method for dynamic tracking and tracing of carbon footprint of multiple nodes in a building power distribution network according to claim 1, characterized in that, The reconstructed charging power is divided into transient energy and base energy based on the spectral centroid, and stored in a last-in-first-out queue and a first-in-first-out queue respectively, and bound to the corresponding carbon intensity, including: Extract the time basis function and its corresponding spatial activation coefficients that are determined to be transient energy, and multiply the spatial activation coefficients by the current instantaneous value of the time basis function to generate the actual injected transient power value; The actual injected transient power value is multiplied by the preset sampling time step to convert it into transient energy; The transient energy value is bound to the dynamic carbon intensity sequence value at the corresponding moment and then pushed into a last-in-first-out queue controlled by a stack structure. Perform the same power conversion operation on the time basis function determined to be the base energy to obtain the base energy, and then bind the value of the base energy with the value of the dynamic carbon intensity sequence at the corresponding time and push it into the first-in-first-out queue.

6. The method for dynamic tracking and tracing of carbon footprint of multiple nodes in a building power distribution network according to claim 1, characterized in that, The process of extracting energy and calculating discharge carbon properties according to queue priority during discharge includes: When the energy storage node discharges, transient energy is preferentially ejected from the top of the last-in-first-out queue to offset demand. When the transient energy in the last-in-first-out queue is exhausted, a conditional branch is triggered, and the base energy is extracted from the head of the first-in-first-out queue to offset the demand. During the extraction process, the various energy values ​​that pop up are used as weights and are weighted and averaged with the corresponding dynamic carbon intensity values ​​at the time of the connection. The calculated equivalent carbon intensity value is then assigned to the current discharge charge as the discharge carbon attribute.

7. The method for dynamic tracking and tracing of carbon footprint of multiple nodes in a building power distribution network according to claim 1, characterized in that, The process of converting spatial activation coefficients into complex apparent power and generating nodal mode injection current vectors includes: Extract the fixed resistance and fixed reactance of each branch in the distribution network topology to construct a full-size complex admittance matrix. Remove the rows and columns corresponding to the main grid access balance nodes to generate a non-singular complex admittance matrix. Invert the non-singular complex admittance matrix to obtain the impedance matrix of the distribution network nodes. Based on the device type and power flow direction, the spatial activation coefficients are assigned positive and negative labels and aggregated to generate node directed mode power vectors, which are then expanded into complex apparent power vectors by combining with the preset steady-state power factor. The node modal injection current vector is generated by dividing the complex apparent power vector element by the conjugate of the node reference voltage.

8. The method for dynamic tracking and tracing of carbon footprint of multiple nodes in a building power distribution network according to claim 7, characterized in that, The determination of the modal loss responsibility vector by combining the node impedance matrix and the power flow tracking mapping matrix includes: The nodal modal voltage vector is obtained by multiplying the nodal modal injection current vector with the distribution network nodal impedance matrix; Calculate the squared magnitude of the difference in nodal modal voltage vectors between the corresponding nodes at both ends of each branch, and multiply the squared magnitude by the conductance of the corresponding branch to generate the modal active power loss vector. Establish an active power flow tracing mapping matrix from each node to each branch, and perform a left multiplication operation on the modal active power loss vector using the active power flow tracing mapping matrix to generate a modal loss responsibility vector.

9. The method for dynamic tracking and tracing of carbon footprint of multiple nodes in a building power distribution network according to claim 8, characterized in that, After generating a time-varying dynamic loss allocation vector by weighting and summing the modal loss responsibility vector using the squares of the current instantaneous values ​​of each time basis function, the process further includes a step of compensating for the inter-modal cross impedance loss vector, specifically including: Calculate twice the product of the current instantaneous values ​​of any two different time basis functions, and use it as the time weight of the cross term; For any two different time basis functions, the corresponding node mode voltage vectors are extracted respectively. The sum of the real part product and the imaginary part product of the mode voltage difference between the two nodes of the same branch is calculated and multiplied by the conductance of the branch to generate the branch cross loss vector. The branch cross loss vector is then left-multiplied using the active power flow tracking mapping matrix to obtain the cross impedance loss vector. The time weight of the cross term is multiplied by the corresponding cross impedance loss vector to generate a cross loss basis vector; the cross loss basis vector is then added to the weighted summed modal loss responsibility vector according to the row index of the corresponding node.

10. The method for dynamic tracking and tracing of carbon footprint of multiple nodes in a building power distribution network according to claim 1, characterized in that, The determination of real-time carbon footprint, which is based on the nodal power sources determined by steady-state power flow distribution data and power flow tracing algorithms, includes: The power of loss allocation to be borne by each distribution network node is obtained based on the time-varying dynamic loss allocation vector; Based on the power source composition of the nodes, the power loss sharing is divided into the power borne by the external power grid and the power borne by the energy storage discharge. These are then multiplied by the real-time carbon intensity of the external power grid and the carbon attribute of the discharge at the current moment, and the network loss carbon footprint is obtained by summing them up. The power consumption of the reconstructed distribution network nodes is divided into the external grid power supply part and the energy storage discharge power supply part. The power consumption carbon footprint is obtained by multiplying the dynamic carbon intensity sequence and the discharge carbon attribute by the respective parts and then summing them. The real-time carbon footprint is determined by adding the network loss carbon footprint and the power consumption carbon footprint.