Skip to content

ElectricityEmissions.jl is a Julia package for the calculation of carbon emissions intensity metrics for power system test cases.

License

Notifications You must be signed in to change notification settings

WISPO-POP/ElectricityEmissions.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ElectricityEmissions.jl

Build Status

ElectricityEmissions.jl is a Julia package for the calculation of carbon emissions intensity metrics for power system test cases. It also includes visualization functionality via the PowerPlots.jl package.

Installation

The latest development version of ElectricityEmissions.jl can be added via: Pkg> add https://github.com/WISPO-POP/ElectricityEmissions.jl.git

Basic Use

To use ElectricityEmissions.jl, simply load a test case in MATPOWER format, assign emissions intensity values to all generators, and calculate nodal carbon intensity values. Optionally, it is then possible to visualize these nodal intensity values.

using ElectricityEmissions, PowerModels, HiGHS

case = PowerModels.parse_file("./test_cases/case30pwl.m")

#randomly assign generator emissions factors between 0 and 1
for (id,gen) in case["gen"]
	gen["emissions"] = rand()
end


#calculate LMCE
lmce = calculate_LMCE(case,HiGHS.Optimizer)

#(Optional) Update test case with nodal emissions info and plot
update_emissions_intensity!(case,lmce)
plot_emissions(case)

ElectricityEmissions.jl currently supports the following carbon intensity calculation methods:

Generator Cost Function Support

Currently, ElectricityEmissions.jl supports the use of test cases with linear or piece-wise linear generator cost functions. At present, quadratic and higher terms within polynomial cost functions will be ignored. However, An upcoming update will a add support for quadratic terms.

Troubleshooting

The calculation of marginal metrics, such as LMCE and ALMCE, relies on the inversion of a constraint matrix and hence requires a unique solution to the generation dispatch problem (OPF). Situations in which there is more than one generator with the same cost function at a particular bus may result in a SingularException. To remedy this, we have included the function add_gen_cost_noise!(case)which adds a small amount of noise to all generator cost functions.

Acknowledgements

This code is primarily developed by Joe Gorka <[email protected]>, Noah Rhodes <[email protected]>, and Line Roald <[email protected]>.

Citation Information

If you use ElectricityEmissions.jl in your project, we would appreciate if you would cite the following publication:

@misc{gorka2024electricityemissionsjl,
      title={ElectricityEmissions.jl: A Framework for the Comparison of Carbon Intensity Signals}, 
      author={Joe Gorka and Noah Rhodes and Line Roald},
      year={2024},
      eprint={2411.06560},
      archivePrefix={arXiv},
      primaryClass={eess.SY},
      url={https://arxiv.org/abs/2411.06560}, 
}

About

ElectricityEmissions.jl is a Julia package for the calculation of carbon emissions intensity metrics for power system test cases.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published