A more realistic cost model for an electric power plant (but one that we use less often because it can be hard to find enough data to use this model) is that the total cost of generation is quadratic in the amount of electricity produced.
where TC is total cost ($), Q is total output (MWh), and a, b and c are constants, then the marginal cost of electricity production is found by taking the derivative of the total cost function:
which is linear in total output Q.
Because the marginal cost functions here are linear, we can use calculus to figure out the solution to the economic dispatch problem. In the solution we present here, we'll assume that there are only two generators. The solution to the economic dispatch problem we'll find, however, is also true for cases where there are more than two generators.
Before we get into it, we'll define a few variables.
- g1 and g2 are the electric energy (MWh) outputs of our two power plants.
- C1(g1) and C2(g2) are the total cost functions for the two power plants individually.
- TC(g1 + g2) is the total cost function for the electric system as a whole. We can also write this as TC(g1 + g2) = C1(g1) + C2(g2).
- D is total demand (in MWh).
Economic dispatch is a kind of optimization problem. The electric utility wants to choose levels of g1 and g2 in order to minimize the total cost of serving all electricity demand. The utility is constrained by the fact that it has to meet all electricity demand. It cannot simply choose to black out some houses or businesses because they are too expensive to serve.
Mathematically, we state this optimization problem as:
In calculus, you may have seen that you can find the maximum or minimum of a function by taking its derivative and setting that equal to zero. We'll basically do the same thing here. First, notice that since g1 + g2 = D, we get g2 = D - g1. Also, each generator's cost function depends only on that generator's output. So we can simplify this into a much easier problem that only depends on g1:
We will now take the derivative of this function and set it equal to zero. This is called the "first order condition" of the optimization problem, or FOC.
Notice that the solution to the economic dispatch problem is to set g1 and g2 such that their marginal costs are identical. We will call these optimal level of energy outputs g1* and g2*.
This result also holds if we have more than two power plants. In this case we can find the system lambda by calculating the marginal cost for either generator at the optimal level (g1* or g2*).
A kind of recipe for solving economic dispatch problems with quadratic total costs (linear marginal cost) is:
- Calculate marginal cost functions for each generator.
- Set g2 = D - g1, and substitute in the marginal cost function for g2.
- Set the marginal cost functions equal, solve for g1* (optimal value of g1).
- Find g2* = D - g1*
In this example we'll let C1(g1) = 50g1+1.5g12 and C2(g2) = 100g2 + g22. We'll also set D = 50 MWh. Note that, at least for now, we aren't setting any capacity limits on the two generators. We'll introduce those later in the course.
First we calculate marginal cost functions for each generator:
- MC(g1) = 50+3g1 = 50+3(50-g2). Note here that we have made the substitution g1 = D - g2.
- MC(g2) = 100+2g2
Next, we set MC(g1) = MC(g2) and solve for g2.
- 50+3(50-g2) = 100+2g2
- When we solve this equation, we get g2* = 20MWh
- Finally we solve for G1* as: g1* = 50-g2* = 30MWh
Thus, our economic dispatch is g1* = 30 MWh and g2* = 20 MWh.
To calculate the system lambda, we take either g1* or g2* and plug it back into the respective marginal cost function. Note that we can do this with either marginal cost function, or we could do it with both as a kind of check.
Finally, we return to the total cost functions for the two generators to get the total system cost of serving 50 MWh of electricity demand:
- TC(g1) = 50 × 30 + 1.5×302 = $2,850
- TC(g2) = 100 × 20 + 202 = $2,400
- Total Cost = $5,250
Here's another example that you can try yourself.
The total cost functions for the two generators are C1(g1) = 5 + 4g1+ g12 and C2(g2) = 5 + 2g2 + 2g22. Total demand for electricity is 30 MWh. Solve the economic dispatch problem. You should get:
- g1* = 19 2/3, g2* = 10 1/3
- The system lambda is λsys = $43.33/MWh.
- The total cost of serving all electricity demand is $709.67.