OPF tries to allocate available generation to meet the current load while keeping transmission lines within the limits of what they can carry. OPF adds a dimension of space to the ED problem. Currently minpower performs the simplest version of power flow, called decoupled OPF and considers only real power [1]. The classic text is Bergen & Vittal.
In this mathematical formulation generators are indexed by . is a generator’s power output and is its cost function. The objective is to minimize the total cost. There are three constraints:
For DCOPF, the real power flow on a line depends linearly on the voltage angles of the buses it connects (, ) and its own reactance . Bus angles are the difference in voltage angle between the bus and the reference bus which has angle .
To define a simple OPF problem, Minpower requires three spreadsheets. The first describes the generator parameters and location (generators.csv):
name, bus, cost curve equation
cheap, Tacoma, 5P + .01P^2
mid grade, Olympia, 7P + .01P^2
expensive, Seattle, 10P + .01P^2
The second describes the load at each bus (loads.csv):
name, bus, P
UW, Seattle, 50
paper mill, Tacoma, 0
smelter, Olympia, 50
The third describes the lines between buses (lines.csv):
From, To, Pmax
Seattle, Tacoma, 3
Olympia, Tacoma, 10000
Olympia, Seattle, 10000
Note
For more information about what options you can specify in each spreadsheet see: Creating a Problem.
Save the three spreadsheets above into into a folder (call it mypowerflow) and run:
minpower mypowerflow
This particular problem is also Minpower built-in test case, so if you haven’t been following along, to solve it, call:
minpower opf
The result is a plot (powerflow.png):
OPF is difficult to visualize (please send suggestions).
There are also spreadsheet outputs of generator information (powerflow-generators.csv):
and line information (powerflow-lines.csv):
Each line’s real power flow is output. Lines that have congestion will show a positive shadow price. Because the flow is Tacoma Seattle and the from/to fields of the spreadsheet are the other way around, we see a negative power flow. The Seattle-Tacoma line is at its limit, so there is an extra cost to the system from the congestion and the line has a positive shadow price.
Footnotes
[1] | Modern power systems often have reactive power issues. While DCOPF is a decent approximate solution with reactive power considered, your results may vary significantly from real operations without it. |