Introduction

The global imperative to mitigate climate change has intensified the focus on carbon emissions from electric power industry1,2,3,4,5,6, which accounts for approximately 40% of energy-related emissions positioning it as a critical sector in the global effort to achieve carbon neutrality7,8. Electricity, as a secondary energy source, relies heavily on power generation technologies, which dominate the carbon footprint of power systems. Unlike static generator-level emission factors, the carbon intensity of electricity consumed by end-users or lost in transmission lines depends on the dynamic power flow distribution, which is influenced by grid topology, generator dispatch, and fluctuating renewable output9,10,11,12,13. Furthermore, the life cycle emissions of electricity generation must be considered to provide a comprehensive understanding of the carbon footprint associated with power systems. This includes emissions from the construction of power plants, the extraction and processing of fuels, and the eventual decommissioning of facilities14,15,16,17,18. While renewable energy sources (e.g., wind and solar) and nuclear power offer low operational emissions, their life cycle emissions, particularly from construction and material production, cannot be ignored. Fossil fuel-based generation, on the other hand, continues to be a significant contributor to greenhouse gases throughout its life cycle operation.

Accurately quantifying carbon emissions in power systems has been a focal point of energy research, driven by the need to align grid operations with decarbonisation goals. Early methodologies, such as carbon flow models, established foundational frameworks for tracking emissions from generators to consumers. Kang et al. (2012, 2015)1,2 pioneered this approach by proposing the carbon flow model, allocating emissions proportionally to power flows. While effective for transmission systems, the efficiency of these models may be reduced due to the topological characteristic of distribution networks with radial configurations and bidirectional power flows from distributed energy resources19. Matrix-based approaches emerged to address scalability challenges. Zhou et al. (2012)20 formulated carbon emission factors using nodal power injection matrices, enabling systematic allocation of emissions. However, matrix inversion operations in large-scale systems (e.g., distribution grids with thousands of nodes) incur prohibitive computational costs21. Guddanti et al. (2021)22 proposed iterative solvers to bypass matrix inversion, yet their accuracy diminishes under high renewable penetration due to nonlinear power flow dynamics. A critical gap across existing methods is the exclusion of life cycle emissions. Traditional models focus solely on operational emissions from fossil fuel combustion, neglecting upstream (e.g., fuel extraction, plant construction) and downstream (e.g., decommissioning) phases. Pehl et al. (2017)14 integrated an energy–economy–land-use–climate model for life cycle assessment to explore life cycle emissions of future low-carbon power supply systems. (Hertwich et al., 2015)16 proposed a comprehensive life cycle assessment reveals that transitioning to low-carbon electricity technologies (solar, wind, hydro-power, CCS) significantly reduces greenhouse gas emissions and environmental pollution over their entire life cycle compared to fossil fuels, despite higher initial material demands, confirming their global benefit under climate-mitigation scenarios. Recent studies integrate life cycle assessment (LCA) into grid models but remain static, lack of a clear instruction for dynamic tracking of carbon emission footprint17,18.

In this study, we propose a flow network23,24,25,26 model to address the above mentioned limitations by:

  • Generalising grid representation through virtual sink nodes for losses, eliminating topological restrictions;

  • Replacing matrix inversion with Markov chain-based probabilistic flow analysis, enhancing scalability;

  • Incorporating dynamic life cycle factors for all generation technologies, providing a comprehensive assessment of the carbon footprint associated with electricity generation, transmission, and consumption.

Validated with the IEEE 30-bus system, our results reveal that emission factors for loads and transmission lines fluctuate significantly with renewable generation variability. For instance, loads directly connected to renewable sources achieve near-zero emission factors during peak renewable generation periods, while emission factors of loads remote from renewable sources exhibit weaker responses to renewable output changes. These findings underscore the importance of dynamic emission tracking in optimising grid operations for carbon reduction, such as aligning load consumption with renewable availability or prioritising low-loss transmission pathways. Additionally, the inclusion of life cycle emissions highlights the long-term carbon implications of different generation technologies, informing more sustainable grid planning and investment decisions.

Results

The flow network model for power grids

A power grid is an interconnected network delivering electricity from generators to consumers. The electricity flowing through an AC power grid is normally denoted by complex power which is the vector sum of active and reactive power27. Active power (the real part of the complex power) is the flow that transfers the consumable electrical energy from generators to consumers. Reactive power (the imaginary part of the complex power) that stores and releases energy in the circuit’s inductors and capacitors does not deliver consumable electrical energy between generators and consumers. The carbon emission in power grids comes from the consumption of electricity, thus the carbon emission factor in power grids is only related to active power. We focus on the analysis of carbon emission factor in this paper, thus we only consider the active power flow and ignore the reactive power flow. Figure 1 (a) shows a single-line diagram, the simplest symbolic representation, of a 5-bus power grid. This single line diagram contains four basic components of a power grid: (1) generators which produce electricity, represented with a letter “G”; (2) loads which consume electricity, represented with a letter “L”; (3) power lines which deliver electricity from generators to loads, represented with a thin line; (4) buses which collect and distribute electricity among power lines, represented with thick lines. Power loss arises when transferring electrical energy due to heat loss etc. on power lines. Shown as Fig 1 (a), the power injected into the power line between bus 1 and bus 4 is \(P_{14}\) and the power output from this line is \(P^\prime _{14}\), and \(P_{14}-P^\prime _{14}\) is the power loss on this power line.

A power grid can be represented by a flow network. A flow network is denoted by a directed graph28 \({\mathcal {G}}({\mathcal {V}}, {\mathcal {E}})\), where \({\mathcal {V}}\) is a set of distinct nodes, \({\mathcal {E}}\) is a set of distinct directed edges. We define that each edge \((i,j)\in {\mathcal {E}}\) has a non-negative flow \(f_{i,j}\) from node i to j. More strictly, we require \({\mathcal {E}}\) never contains both edge (ij) and edge (ji) for any pair of nodes, i.e., each edge in \({\mathcal {E}}\) is uniquely directed, thus there is no loop flow in the network. For any node \(i,j\in {\mathcal {V}}\), if \((i,j)\notin {\mathcal {E}}\), we let \(f_{i,j}=0\). A flow network contains source nodes, denoted by a set of \({\mathcal {S}}\), that provides flow into the network, and sink nodes, denoted by a set of \({\mathcal {L}}\), that absorb flow from the network. Other nodes that only distribute flows and neither provide nor absorb flow from the network are named as junction nodes.

In order to represent a power grid with a flow network, we transform the power grid topology shown in Fig. 1 (a) to (b). In this transformation, each component of the power grid is transformed to a type of nodes: (1) source nodes: containing nodes that transformed from generators, denoted by bus numbers with a letter “G”, such as node 1G; (2) sink nodes: containing two types of nodes including (a) nodes that transformed from loads, denoted by bus numbers with a letter “L”, such as node 4L; (b) nodes that transformed from power lines, denoted by the symbol \(\Delta\) with subscripts of the numbers of buses that connects each power line, such as node \(\Delta _{1-4}\). (3) junction nodes: transformed from buses and denoted by bus numbers, such as node 1. In the above transformation, we have transformed all power lines into virtual sink nodes, such as node \(\Delta _{1-4}\) absorbing flow from the network. We allocate each virtual sink node to the primary side of the original power line, for example, we connect \(\Delta _{1-4}\) with node 1 which is the primary side of the power line (1,4). We define a set \({\mathcal {D}}\in {\mathcal {L}}\) to contain all these virtual sink nodes transformed from power lines. This transformation of power lines to nodes helps us to deal with power losses on power lines. We consider the power loss on a power line as the power consumed by the virtual sink node transformed from that power line, for example, the loss \(P_{14}-P^\prime _{14}\) on the power line (1, 4) is consumed by the virtual sink node \(\Delta _{1-4}\). This process transforms the loss \(P_{14}-P^\prime _{14}\) on power line (1, 4) into a power flow, \(P_{1,\Delta _{1-4}}\), from node 1 to node \(\Delta _{1-4}\) on edge \((1,\Delta _{1-4})\). With the above transformation, the power line (1, 4) can be treated as a lossless power line, i.e., the power injected from node 1 to edge (1, 4) is equal to that received by node 4 from edge (1, 4) and the quantity of this power flow is \(P^\prime _{1,4}\). Furthermore, we set the power flow from a generator to the bus connecting it to be the generation power of the generator, i.e., \(P_{1G,1}\) on edge (1G, 1) in Fig. 1 (b) to be equal to \(P_{1G}\) in Fig. 1 (a). Similarly, the power flow from a bus to its downstream load is set to be the consumption power of that load, i.e., \(P_{1,1L}\) on edge (1, 1L) in Fig. 1 (b) to be equal to \(P_{1L}\) in Fig. 1 (a). The node set, \({\mathcal {V}}\), of the flow network in 1 (b) are composed by the source nodes transformed from generator, the sink nodes transformed from both loads and power lines and the junction nodes transformed from buses. The edge set, \({\mathcal {E}}\), of the flow network in 1 (b) are composed by the power lines that connects two nodes in \({\mathcal {V}}\). The active power flow is treated as the flow on each edge, i.e., for any edge transmitting active power from node i to j we require \(f_{i,j}= P_{i,j}\). The 5-bus power grid in Fig. 1 (a) is now modelled by the flow network in Fig. 1 (b).

Fig. 1
figure 1

The 5-bus power grid and its flow network model. (a) shows the single line diagram of a 5-bus power grid with generators, loads, power lines and buses. (b) shows the equivalent flow network of the 5-bus power grid.

The carbon emission from generation to consumption

All electricity generation technologies produce carbon emissions in their life cycle. The construction, maintenance and decommission process of all generation sites, including nuclear and renewable plants, emits carbon dioxide into the atmosphere. Generators that burns fossil fuels continues emitting carbon dioxide in their operation when generating electricity.

Let \(C_{g,construction}\) represent the total carbon emissions produced in the construction of a power plant, \({\hat{C}}_{g,maintenance}\) be the expected carbon emissions caused by maintaining or repairing works in the life cycle of the power plant, \({\hat{C}}_{g,decommission}\) be the expected carbon emissions caused by decommissioning or recycling works of the power plant, and \({\hat{E}}_g\) indicate the expected total electricity to be generated in the life cycle of the power plant. The non-operation carbon emission factor, \(F_{g,non-op.}\) (in unit of \(kgCO_2/MWh\)), can be calculated as the average carbon emission per unit of electricity over its life cycle in Eq. 1

$$\begin{aligned} F_{g,non-op.}= \frac{C_{g,construction}+{\hat{C}}_{g,maintenance}+{\hat{C}}_{g,decommission}}{{\hat{E}}_g}. \end{aligned}$$
(1)

Define \(F_{g,fuel-burning}\) to be the carbon emission factor of the fossil fuel during its burning process in a power plant, indicating the carbon emission generated from burning a unit of fossil fuel. Define \(F_{g,fuel-upstream}\) to be the carbon emission factor of the fossil fuel during its producing and delivering process, indicating the carbon emission generated from the upstream works for a unit of fossil fuel. Let \(W_{g}\) be the total units of fuels burned by the generator during a time period dt, and \(P_{g}\) be the average power of the generator during dt. The operational carbon emission factor of this generator is calculated in Eq. 2

$$\begin{aligned} F_{g,op.}= \frac{(F_{g,fuel-burning}+F_{g,fuel-upstream} ) \cdot W_{g}}{P_g \cdot dt}. \end{aligned}$$
(2)

Nuclear and renewable plants do not generate carbon emissions during their running process, thus the carbon emission factor of a nuclear or renewable generation site is equal to their non-operating carbon emission factor, i.e.:

$$\begin{aligned} F_{g,non-fossil}= F_{g,non-op.}, \end{aligned}$$
(3)

where \(F_{g,non-fossil}\) indicates the carbon emission factor of nuclear and renewable generations. However, the carbon emissions of a generator utilising fossil fuels come from both its non-operation and operation processes, i.e.:

$$\begin{aligned} F_{g,fossil}= F_{g,non-op.}+F_{g,op.}, \end{aligned}$$
(4)

where \(F_{g,fossil}\) indicates the carbon emission factor of a generator utilising fossil fuels.

Normally, \(C_{g,construction}\) is a fixed value for a generation plant, \({\hat{C}}_{g,maintenance}\), \({\hat{C}}_{g,decommission}\) and \({\hat{E}}_g\) can be evaluated as constant values during the life cycle of a generator. Thus, the non-operating carbon emission factor can be treated as a constant value, i.e., nuclear and renewable sources have constant carbon emission factors during their life cycle. In terms of a generator utilising fossil fuels, it burns the same batch of fossil for a given period of time, which implies \(F_{g,fuel-burning}\) and \(F_{g,fuel-upstream}\) to be constants for that period of time. Furthermore, the efficiency of a fossil fuel generator is denoted by a ratio of energy input to energy output, calculated in \(\eta _g=P_g\cdot dt/W_g\). Normally, \(\eta _g\) can be treated as a constant for a given type of generator. Thus, \(F_{g,op.}\) can be treated to be a constant value for a given period of time. Therefore, the carbon emission factor of a generator utilising fossil fuels is a constant during a given period of time.

The World Nuclear Association studied the average life cycle \(\hbox {CO}_2\) equivalent emissions of various electricity generation sources, as shown in Fig. 2.

Fig. 2
figure 2

Average life cycle \(\hbox {CO}_2\) equivalent emissions of different types of power plants. Data source: World Nuclear Association29.

Fig. 3
figure 3

The transfer process of carbon emission responsibility from generation to consumption.

The electricity is supplied by generators but finally utilised by consumers. The responsibility of carbon emission occurred at the generation side should be counted at the consumption side, i.e., there is a transfer process of the carbon emission responsibility along with the transfer process of power from generation to consumption, shown in Fig. 3. The direct carbon emissions happens in fossil fuel generations from their operating and non-operating periods, and happens in nuclear and renewable generations during their non-operating periods. However, the emission factor of a load is not directly known in a power grid, since a consumer may received electricity from different types of generators with different emission factors. In the meantime, the proportion of the electricity received by each load from each generator is dynamically changing due to the real-time dispatching process in power systems. This means that, the carbon emission factor of each load is a real-time number that dynamically changing. The lack of clear carbon emission factor on consumer side restricts the allocation of responsibility of indirect carbon emissions among consumers and limits the tracking of carbon footprint for products that utilised electricity in their production process. The majority of electricity is utilised by consumers with a small part being lost during transmission. The power loss on a power line can be modelled as a consumption of the power line as shown in Fig. 1 (b). Loads and power lines share the carbon emission responsibility originated from generators. The carbon emission factor of each power line is also a dynamic number that is not directly known. The lack of clear carbon emission factor on power loss limits the evaluation of the indirect carbon emissions of the power transportation system.

To solve the above mentioned issues for power consumers and power transportation system is then formed to track the life cycle carbon emissions in power grids: to calculate the dynamic carbon emission factors for loads and power lines with known carbon emission factors of generators (\(F_{g,non-fossil}\) and \(F_{g,fossil}\)) and known power flow distribution given by the power flow calculation27 at each time point of the system running process.

Calculation of dynamic carbon emission factors

We apply a path-based allocation method with Markov chain theory to calculate the dynamic carbon emission factors. A directed path in a flow network is a sequence of distinct directed edges joining a sequence of distinct nodes, where any edge in the path must have the same direction as that of the flow on this edge. For example, there are two paths from node 1 to node 5 in Fig. 1 (b) including path \(1\rightarrow (1,4)\rightarrow 4\rightarrow (4,5)\rightarrow 5\) and path \(1\rightarrow (1,2)\rightarrow 2\rightarrow (2,3)\rightarrow 3\rightarrow (3,5)\rightarrow 5\). Assume there is at least one path between node i and j. We define \(q^k_{i,j}\) where \(k\geqslant 1\) to denote the \(k_{th}\) path between node i and j. We denote \((u,v)\in q^k_{i,j}\) if edge (uv) is in the sequence of path \(q^k_{i,j}\). All paths in a directed flow network can be found by the deep-first-search (DFS) algorithm30.

In a power grid, the electricity flowing through power lines between nodes is a macroscopic phenomena of the electrons moving between nodes through power lines in microscopic level. Each electron leaving a node has a probability to be distributed to one of the downstream power line connected to this node. As shown in Fig. 1 (b), the electrons at node 1 are dispatched to edges (1, 2), (1, 4), \((1,\Delta _{1-2})\) and \((1,\Delta _{1-4})\). Since the power flow is known in this network, we can treat the probability of each electron distributed to an edge from node 1 being equal to the proportional ratio between the amount of power flowing from node 1 to that edge and the total output power of node 1. For example, the probability of an electron flowing from node 1 to edge (1, 2) can be calculated as \(P_{1,2}/(P_{1,2}+P_{1,4}+P_{1,\Delta _{1-2}}+P_{1,\Delta _{1-4}})\cdot 100\%=P_{1,2}/P_1\). Furthermore, we requires the electron that leaves a node will not flow back to that node. In this way, the power flow in a power grid can be treated as a chain process: each node is a discrete state, and the transfer of an electron from an upstream state, i, to one of its downstream state, j, has a probability of \(M_{i,j}\) calculated by \(M_{i,j}=P_{i,j}/P_i \cdot 100\%\). Since the electron does not flow backward from node j to i, the probability \(M_{i,j}\) only depends on the state of the upstream (\(P_i\)). If node i and j is not directly connected, i.e. \((i,j)\notin {\mathcal {E}}\)), implying that the electrons leaving from node i cannot be distributed to node j directly, then we set \(M_{i,j}=0\). Following the above analysis, we define \({\textbf{M}}\) as the Markov matrix31, of a power network with element \(M_{i,j}\) being calculated in Eq. 5

$$\begin{aligned} M_{i,j}= \frac{P_{i,j}}{P_i}\cdot 100\%, \end{aligned}$$
(5)

where \(P_{i,j}\) and \(P_i\) are the active power of edge (ij) and node i, respectively, and \(M_{i,j}=0\) if \((i,j)\notin {\mathcal {E}}\). Power flow calculation gives us the power distribution in the network, thus we can calculate all elements in \({\textbf{M}}\).

Assume node i and node j is not directly connected, i.e., \((i,j)\notin {\mathcal {E}}\), but there is at least a path transmitting power from node i to j. Assume the \(k_{th}\) path delivering power from node i to j is \(q^k_{ij}=i\rightarrow (i,u)\rightarrow u\rightarrow (u,j)\rightarrow j\), where node u is a junction node joining the path \(q^k_{ij}\) between node i and j. The probability of an electron, e, leaving from node i arriving at node u is \(M_{i,u}\) and the probability for this electron to be further delivered to node j from node u is \(M_{u,j}\). Thus, the macroscopic power flow from node i to j can be treated as a microscopic Markov chain with the probability of the electron e to be delivered from node i to j calculated as \(M_{i,u}\cdot M_{u,j}\). Considering the total output power of node i is \(P_i\), the total power delivered from node i to j through path \(q^k_{i,j}\) is calculated as \(P_i\cdot M_{i,u}\cdot M_{u,j}\). This means that the flow from node i to j through a path \(q^k_{i,j}\) can be calculated as a Markov chain by multiplying \(P_i\) with all \(M_{u,v}\), provided edge (uv) is in the sequence of \(q^k_{i,j}\). Thus, use \(R^k_{i,j}\) to denote the flow from node i to j via path \(q^k_{i,j}\), we have

$$\begin{aligned} R^k_{i,j}=P_i\cdot \prod _{(u,v)\in q^k_{i,j}} M_{u,v}. \end{aligned}$$
(6)

Define \(R_{i,j}\) indicating the total flow from node i to node j via all paths between them. \(R_{i,j}\) can be calculated in Eq. 7

$$\begin{aligned} R_{i,j}=\sum _{k=1}^{\mid {\mathcal {Q}}_{i,j} \mid } R^k_{i,j}. \end{aligned}$$
(7)

where the set \({\mathcal {Q}}_{i,j}\) contains all directed paths from node i to j and \(\mid {\mathcal {Q}}_{i,j} \mid\) represents the total number of paths between node i and j. Note that if there is no path between node i and j, \({\mathcal {Q}}_{i,j}\) becomes an empty set and \(R_{i,j}=0\).

The carbon emission is transferred from sources to sinks in the network along with the power transmitting process. Assume node i is a source node with carbon emission factor of \(F_i\) (in unit of \(\mathrm {kgCO_2/MWh}\)) which can be calculated in Eq. 3 for nuclear or renewable sources and in Eq. 4 for power plants utilising fossil fuels. Assume the average power of node i to be \(P_i\) (in unit of \(\textrm{MW}\)) during a period of time dt. Let \(C_i\) (in unit of \(\mathrm {kgCO_2}\)) be the total quantity of carbon dioxide emitted from i during dt. \(C_i\) can be calculated in Eq. 8

$$\begin{aligned} C_i= F_i\cdot P_i \cdot dt. \end{aligned}$$
(8)

Assume node j is a sink node and there is at least one path delivering power from node i to j. Let \(C_{i,j}\) be the total quantity of carbon emission transferred from node i to j during a period of time dt. Recall the previous analysis that the carbon emission factor \(F_i\) of generator i can be treated as constant value for a given period of time, then the carbon emission transferred from node i to j is linearly proportional to the total electricity delivered from node i to j which is \(R_{i,j}\cdot dt\). Thus, \(C_{i,j}\) as a portion of \(C_i\), can be calculated by Eq. 9

$$\begin{aligned} C_{i,j}= C_i \cdot \frac{R_{i,j}\cdot dt}{P_i\cdot dt} =(F_i\cdot P_i \cdot dt)\cdot \frac{R_{i,j}}{P_i}= F_i\cdot R_{i,j}\cdot dt. \end{aligned}$$
(9)

The total carbon emission transferred from all sources to sink j is then derived in Eq. 10

$$\begin{aligned} C_j= \sum _{i\in {\mathcal {S}}}C_{i,j}, \end{aligned}$$
(10)

where \({\mathcal {S}}\) is the previously defined set containing all source nodes. Considering the total electricity consumed at node j during dt is \(P_j\cdot dt\), the carbon emission factor of node j during dt is calculated in Eq. 11

$$\begin{aligned} F_j= \frac{C_j}{P_j\cdot dt} = \frac{\sum _{i\in {\mathcal {S}}} (F_i\cdot R_{i,j})}{P_j}. \end{aligned}$$
(11)

In Eq. 11, \(F_i\) is the carbon emission factor of a source node which can be treated a constant value for a given period of time, however, \(F_j\) as the carbon emission factor of a sink node is a real-time changing number since \(R_{i,j}\) and \(P_j\) are dynamic changing depending on the power distribution of the network at each time point.

Equation 11 can be applied to calculate the dynamic carbon emission factors of all loads and power lines that have been modelled as virtual sink nodes. With all dynamic carbon emission factors known for loads and power lines at any given time, the life cycle carbon emissions from power plants are explicitly transferred to consumers and power losses at each time point.

Further considering the power losses of all power lines are known from the power flow calculation, we can evaluate the average dynamic carbon emission factor of the network transmission lines, i.e., the dynamic carbon emission factor of the whole transmitting grid is calculated in Eq.

$$\begin{aligned} F_{grid} =\frac{\sum _{j\in {\mathcal {D}}}C_j}{\sum _{j\in {\mathcal {D}}} P_j\cdot dt} = \frac{\sum _{j\in {\mathcal {D}}} F_j \cdot P_j\cdot dt}{\sum _{j\in {\mathcal {D}}} P_j\cdot dt} = \frac{\sum _{j\in {\mathcal {D}}} F_j\cdot P_j}{\sum _{j\in {\mathcal {D}}} P_j}, \end{aligned}$$
(12)

where \({\mathcal {D}}\) is the previously defined set containing all virtual sink nodes transformed from power lines. \(F_{grid}\) is the dynamic carbon emission factor caused by the total network loss in the process of transmitting electricity. Traditionally, the total network loss is an important variable for power grid planning or operation in order to minimize the long-term or short-term operation cost of the power grid. With increasing attention on green development, low carbon emission has become a significant target for the optimisation process in power grid planning or operation. \(F_{grid}\), the grid carbon emission indicator, is a key variable supporting to minimise the total carbon emission cost of the network in nowadays’ low carbon emission grid design.

Case study with the IEEE 30-bus system

The model proposed in this article can be generally applied to track life cycle carbon emissions in various time resolutions, such as daily, hourly or minute level, depending on the time interval selected in Eq.8. In this work, we provide a case study for dynamic tracking the life cycle carbon emissions with a 96-point (a point per 15 minute for 24 hours) operating simulation with the IEEE 30-bus system. The 96-point simulation provides a relatively higher resolution of carbon emission calculation in power system. The benefits of utilising high-resolution (or real-time) models to calculate carbon emission factors include supporting better informed decision-making about load management32, enabling real-time low carbon scheduling operations33, helping accurately quantify the carbon emission costs34, monitoring carbon emissions precisely during disruptions such as extreme weather events35 etc. The IEEE-30 bus system represents a portion of the American power grid as of December, 196136. The system has 6 generators and 10 loads. The single line diagram of the system is shown in Fig. 4 (a). The power of generators and loads is obtained from the initial power flow data of the “case30” in the open-source Python package “pypower”. The package “pypower” is a Python solver of power flow and optimal power flow, which is a port of MATPOWER to the Python programming language37. We utilise a 96-point p.u. power dataset for wind and solar generations provided by the open-source Python package “pandapower” (data in the file named \(``cigre\_timeseries\_15min.json''\))38 in order to simulate the dynamic process. We set the generator at bus 2 to be a wind farm and the generator at bus 23 to be a solar farm, and modify the static power of the two generators provided by “pypower” to a 96-point dynamic power dataset corresponding to the 96-point p.u. power dataset provided by “pandapower”. Taking bus 2 as an example, the modification process is as below:

  • find the maximum p.u. value of the wind power in the 96-point p.u. power dataset from “pandapower”, denoted it by \(p_{max,p.u.}\);

  • find the maximum limitation of the generator at bus 2, denoted by \(p_{max}\), given by “pypower”;

  • calculate a ratio, \(p_{max}/p_{max,p.u.}\), and multiply this ratio to all p.u. values in the 96-point p.u. power of the wind generator.

With the above modification, we obtain a 96-point power of the wind generator at bus 2. The 96-point power of the solar farm at bus 23 can be obtained following the same rule. The power curves of the wind generation, solar generation, total generation and total demand are shown in Fig. 4 (b). As shown in Fig. 4 (b), we assumed the demand power to keep unchanged as given by the initial power flow data in “pypower”. This assumption helps us simplify the simulation and clearly show the impact of the renewable sources to carbon emission factors. A more realistic scenario where demands change overtime is discussed in the Discussion section after this section. Referring to Fig. 2, we set the carbon emission factors of generators in Fig. 4 (a) as shown in Table 1. With the above settings, we can simulate the 96-point dynamic process of the system with the power flow redistributed at each time point along the changing of power outputs of the wind farm and the solar farm.

Table 1 Assumption of the carbon emission factors (CEF) of the generators in the IEEE-30 bus system.
Fig. 4
figure 4

The IEEE 30-bus system. (a) shows the single line diagram of the IEEE 30-bus system39 where a wind farm (2G) is connected to bus 2 and a solar farm (23G) is connected to bus 23. (b) shows the wind power curve of the wind farm 2G on the left hand side (LHS) axis and the solar power curve of the solar farm 23G on the right hand side (RHS) axis.

Figure 5 shows the real-time supplied power of the wind farm and the solar farm and the real-time carbon emission factors of loads 2L, 23L, power line (6, 8) and the grid. As shown in Fig. 4, bus 2 connects the wind farm and the load 2L together. Consequently, a large part of the wind power is supplied to 2L and the carbon emission factor of 2L is highly negative-correlated to the output power of the wind farm. Between 12:00pm to 12:45pm, the wind farm output is large enough to support load 2L resulting in \(F_{2L}=11 kgCO_2/MWh\) which is same to the carbon emission factor of the wind farm. The load 23L and the solar farm 23G are directly connected to bus 23, thus the carbon emission factor of 23L is highly affected by the solar farm. The carbon emission factor of 23L, \(F_{23L}\), is high when the solar farm does not supply power in night hours. However, with increasing power generated by the solar farm from 8:30am, the carbon emission factor of 23L keeps decreasing fast and being equal to the carbon emission factor of the solar farm (\(48 kgCO_2/MWh\)) at 9:15am, meaning that the power generated by the solar farm is enough to support 23L running at low carbon emission status. The solar power becomes weak in the afternoon and the emission factor of 23L starts rising at 15:15pm. Modelled as a load, the power line (6, 8) is not adjacent to the wind farm and solar farm, but its emission factor is still indirectly affected by the changing of the renewable output power in the simulation. The grid emission factor is affected by the total renewable output power. \(F_{grid}\) reaches its minimum when the renewable output power climbs to its peak at 12:15pm and \(F_{grid}\) increased to its maximum at 20:00pm when the renewable output power falls to its trough.

Fig. 5
figure 5

The dynamic emission factors of the loads 2L, 23L, the power line (\(\Delta _{6-8}\)) and the grid along with the output power of the wind farm and the solar farm during the simulation. The two vertical red lines mark up the time points of the maximum and minimum renewable output power, respectively.

The quantity of carbon emission of loads and grid can be evaluated at each time point with known power distribution and calculated emission factors. Assume the power distribution of the grid is unchanged within the minimum simulation time interval which is \(dt=15\) minutes \(=0.25h\) in our 96-point simulation. The carbon emission of each load or power line can be calculated using the same method applied to derive the carbon emission for source nodes in Eq. 8. Within each time interval, the total carbon emission of all loads (including the virtual loads of power lines) is calculated in \(\sum _{i\in {\mathcal {L}}} C_i\) where \({\mathcal {L}}\) is the pre-defined set containing all sink nodes. Figure 6 shows the carbon emission of all loads, the carbon emission of the grid, and the total output power of the wind farm and the solar farm. The carbon emission of the grid is relatively low comparing to that of the loads. This makes sense because most power of the system is consumed by loads with a small portion being lost in grid during transmission. The total carbon emission of all loads and the grid is negatively correlated to the output of the renewable output. The system is running with lowest carbon emission at 12:15 pm when renewable sources generating the maximum power. This result can be a reference to optimise the power grid for low carbon emission operation, i.e., encourage loads to consume more power when renewable output is high.

Fig. 6
figure 6

The carbon emissions of all loads and the grid for the IEEE-30 bus system during the simulation. The total carbon emission of all loads is shown in grey and the carbon emission of the grid is shown in red on the left hand side (LHS) axis. The power curve of the renewable output is shown in green line on the right hand side (RHS) axis.

Discussion

Reducing carbon emission in practical power systems

We trace the life cycle carbon emissions from sources to loads by calculating the dynamic carbon emission factors of loads, power lines and the grid utilising a flow network model. The result is as expected: more renewable source power supplied in the system results in lower carbon emission factors, and consequently lower carbon emissions of loads and the grid. In our study, we assumed the consumption power of loads unchanged during the day. However, the consumption power of loads is not a constant value in reality. Figure 7 shows a curve of loads and a curve of the renewable output during a day utilising the data provided in “pandapower”38. We find that the peak time of loads is roughly from 17:00pm to 22:00pm, however, the renewable output is relatively low during this period of time. This means that consumers need to utilise more non-renewable power to support the peak period, which will leads to higher carbon emissions.

Low carbon demand response is a hot research topic to reduce carbon emissions in power systems40,41,42,43 which requires power suppliers to encourage consumers to change their load curve to use more power when renewable output is high and use less power when renewable output is low. Alternatively, building more energy storage plants to store green electricity during the peak time of renewable output to supply peak load is also a way to reduce carbon emission of power systems. However, either changing the consumer load curve or building more energy storage plants may lead to higher cost to power suppliers or consumers. To balance the carbon emission and running cost in power systems is a topic that needs to be further studied.

Fig. 7
figure 7

The 96-point residential load curve and renewable output curve38.

Validation of the proposed methodology

Table 2 The equivalence of carbon emission factors of loads calculated by the flow network model and the carbon flow model.

The carbon flow model1,2 and the direct calculation model with matrix20 are developed to track the carbon emission flowing from generation to consumption. The two existing methodologies can be applied to calculate the dynamic carbon emission factors for loads and imply the same results19. We validate the proposed methodology proposed in this work by comparing the carbon emission factors of all loads calculated by the flow network model developed in this paper to the existing carbon flow model in Table 2 at time 00:00 in our simulation. As shown in the table, the results given by the two models are equivalent for any load. This proves the correctness of the flow network model.

The carbon flow model is friendly to be applied in transmission networks and maybe restricted by the topology characteristic of distribution networks19, while the methodology utilising matrix calculation is restricted by the inverse calculation of large size matrix when applied in a large scale network21,22. The flow network model developed in this paper can be applied in both transmission networks and distribution networks without topological requirement and can be applied in large scale grid without inverse calculation of large size matrix. A detailed comparison of the proposed methodology with the existing carbon flow model and matrix-based model is shown in Table 3

Table 3 Comparison of the flow network model and existing models in calculating carbon emission factors.

Conclusion

This study presents a flow network model to dynamically track life cycle carbon emissions in power grids, addressing critical gaps in traditional methods by integrating grid topology, real-time power flow dynamics, and comprehensive life cycle emissions of generation technologies. By transforming power grids into directed graphs with virtual sinks for transmission losses and employing a Markov chain-based probabilistic flow analysis, the framework enables precise allocation of emissions from generators to loads and power lines without matrix inversion or topological constraints. Validation on the IEEE 30-bus system over a 24-hour simulation revealed three key insights.

1) Dynamic emission factors driven by renewables: Loads directly connected to renewable sources achieve near-zero emission factors during peak generation (e.g., 11 \(kgCO_2/MWh\) for wind-powered loads), while remote loads exhibit delayed and weaker responses to renewable variability. Grid-level emission factors inversely correlate with renewable output, reaching minima during periods of high solar and wind penetration.

2) Minor role of transmission losses: Losses contribute marginally (5–8% of total emissions) compared to loads, underscoring demand-side optimisation, such as aligning consumption with renewable availability, as a priority for emission reduction.

3) Life cycle emissions matter: Incorporating construction, maintenance, and decommissioning phases significantly impacts emission factors for renewables (e.g., solar rises from 0 to 48 \(kgCO_2/MWh\)), emphasizing the need for holistic assessments in grid planning.

The proposed model’s scalability and compatibility with transmission/distribution networks make it a versatile tool for low-carbon grid operations. It supports strategies like prioritizing low-loss pathways, incentivising time-shifted consumption, and evaluating the long-term carbon trade-offs of renewable deployment versus storage integration. Future work will integrate real-world load flexibility data and explore cost-emission optimization frameworks to accelerate the transition to carbon-neutral power systems. By bridging dynamic grid operations with life cycle accountability, this methodology advances both academic research and practical decarbonisation efforts.