So you need to figure out how much it actually costs to run a power grid
Most people think power system economics is just about calculating fuel costs and dividing by megawatts. It isn't. I spent three years doing dispatch modeling for a regional transmission organization and the part that actually kept me up at night had nothing to do with fuel prices. It was the intersection of marginal cost allocation and transmission congestion pricing, and how they interacted when you had five separate markets running at once. The basics are straightforward enough. You have generation costs, transmission losses, demand charges, and the various market mechanisms that determine who pays what. But the way these pieces connect is where things get interesting and occasionally frustrating.
Fundamentals Of Power System Economics
At its core, power system economics deals with allocating the cost of producing and delivering electricity across all the participants in a grid. There are two main approaches people use, and which one you pick depends heavily on whether you are trying to recover costs or signal efficient behavior. Cost-of-service allocation assigns expenses based on whoever caused them. That sounds logical until you realize "caused" can mean several different things depending on whether you are looking at peak demand, energy consumption, or reactive power support. Incremental cost pricing is the other approach and it is what most modern markets actually use. Instead of figuring out historical costs, you price at the margin. The last megawatt hour of demand sets the price for everyone. This creates efficient signals but it means the total revenue collected often doesn't match the total costs incurred. Every market designer has to deal with that shortfall somehow. I learned this the hard way in 2019 when we were redesigning the distribution capacity charge structure for a medium-sized utility. The theoretical model said everyone would pay their fair share. The actual billing data showed that large industrial customers with high load factors were subsidizing smaller commercial customers by roughly twelve percent annually. We caught it during the stakeholder review phase, which took four months and cost about sixty thousand dollars in consulting fees before we adjusted the demand charge structure.
How to actually build a cost model without losing your mind
Start with the cost components. Fixed costs include capital recovery, debt service, depreciation, and return on invested capital. Variable costs are fuel, operations and maintenance that scale with output, and emissions compliance. Transmission and distribution add their own fixed and variable layers on top. Most beginners skip the distribution side entirely and wonder why their numbers don't match reality. Get your data from actual utility filings when you can. FERC Form 1 in the United States gives you detailed cost breakdowns by utility. If you are working internationally, look for national energy regulatory commission publications. The data quality varies wildly between jurisdictions. I once worked with a dataset where the variable O&M costs were listed as zero for an entire coal fleet. Turns out the utility had reclassified them as fixed costs in a previous reporting period and never updated the format. It took three weeks of digging through footnotes to figure that out. Build your cost curves using levelized cost of electricity calculations for capital-intensive resources like nuclear or renewable generation. Use short-run marginal cost for thermal plants. When you combine these into a merit order dispatch model, you start seeing how different cost structures create different market outcomes. A system dominated by zero-marginal-cost renewables will have very different price signals than one with mostly gas-fired generation.
Get the Full Details

The thing nobody tells you about transmission pricing
Transmission congestion revenue adequacy is where most models break down in practice. The theoretical framework assumes you can allocate congestion rents perfectly to recover transmission investment costs. In real markets, the math rarely works out cleanly. You end up with either under-recovery, which discourages investment, or over-recovery, which distorts generation location decisions. Here is a specific example I encountered. We had a transmission constraint between two zones where the congestion rent was $4.2 million annually. The transmission owner's cost of service indicated they needed $5.1 million to recover their regulated return. The shortfall was small in absolute terms but it triggered a cascading effect because the tariff design required full cost recovery through the transmission charge to all. We ended up using a partial revenue decoupling mechanism where we blended locational marginal pricing with a zone-level surcharge to close the gap without creating excessive price signals. This kind of adjustment takes about two weeks of modeling work once you know what you are doing. For someone new to the process, expect to spend three to four months getting the calibration right.
Common mistakes that waste time
Don't conflate average cost with marginal cost. They serve completely different purposes and using the wrong one in your model will give you answers that look reasonable but are fundamentally wrong. I have seen this happen repeatedly in academic papers and industry reports alike. Another mistake is ignoring the time value of money in cost allocation studies. If you are comparing a gas plant with high operating costs against a solar farm with high capital costs, you need to discount everything to the same point in time. Without proper discounting, you might conclude that the gas plant is cheaper even though the net present value tells a different story. A typical discount rate for utility planning ranges from four to eight percent depending on the regulatory environment and risk profile. Loss allocation is another area where people tend to cut corners. Transmission losses are not uniform across the network. A megawatt lost in one location costs significantly more than a megawatt lost elsewhere because of the network topology and loading conditions. Simplistic averaging methods can introduce errors of five to ten percent in final cost allocations. Use loss coefficients or zonal loss factors instead. The calculation adds maybe an hour to your workflow but the accuracy improvement is worth it.
What happens when the model doesn't work
Sometimes your cost allocation comes out to negative values for certain customer classes. This happens when the cost causal factor you chose creates cross-subsidization that reverses under certain loading conditions. In my experience, the solution is usually to switch from a flat demand charge to a two-part tariff with a capacity component and an energy component. The capacity charge recovers the fixed costs and the energy charge recovers variable costs. This structure is more stable across different operating conditions. There are also cases where the economic dispatch solution doesn't exist because the cost curves create a loop. This occurs in networks with multiple constraints and counter-flow patterns. The workaround is to use optimal power flow with security constrained unit commitment instead of simple merit order dispatch. The computation is heavier but it handles the topology correctly. A typical 200-bus system takes about fifteen minutes to solve on standard hardware using commercial tools.

Tools you will actually use
For basic calculations, Excel can handle simple cost allocation problems with maybe fifty nodes before it becomes unwieldy. Beyond that, you need dedicated software. PSCAD or DIgSILENT PowerFactory work for technical modeling. For economic analysis specifically, many utilities use proprietary tools built on top of MATPOWER or custom Python implementations. The open-source PyPSA framework has become quite popular for energy system modeling and it handles the economics fairly well once you get past the initial setup. Learning PyPSA takes about two weeks of focused work if you already know Python. After that, you can build a full generation expansion model with cost optimization in a weekend. The documentation is adequate but not great. I recommend following the tutorial examples closely before attempting anything custom.
When to just hire a consultant
If your problem involves regulatory compliance, rate case preparation, or multi-stakeholder negotiations, you are better off working with someone who has filed testimony before the relevant public utilities commission. The procedural requirements and evidentiary standards are specific to each jurisdiction. A technically correct model that doesn't meet filing requirements is useless. I have watched engineers spend weeks building elaborate models only to have them rejected because the cost allocation methodology didn't follow precedent from a specific jurisdiction. The economics of power systems is a field where theory meets regulation constantly. Understanding both sides matters more than mastering either one in isolation. Most textbooks focus heavily on the theory and leave the practical aspects as exercises. The practical aspects are where the real work happens. If you want to dig deeper, start with the FERC white papers on transmission cost allocation and the NERC reliability standards that interact with economic dispatch. The industry literature is scattered across journals and conference proceedings but the fundamental principles remain consistent. The applications vary enormously depending on market design choices made decades ago and locked in by regulation.