EE 554 Largescale Electric Systems Analysis Homework Assigments
Homework 5
Due at 11:59pm at Nov 15th. Submit to https://canvas.uw.edu/courses/1828831/assignments/10827992.
Problem 1
Consider the following problem of supplying a load with two generators:
\[\begin{align} C(L)=\min\; & x_1^2+ 5 x_1 + 2 x_2^2+ 3 x_2 \\ \mbox{s.t. } & x_1+x_2 = L \\ \end{align}\]where \(L>0\) is some load. Find \(C(L)\) and confirm that the price \(C'(L)\) is equal to the dual variable (Lagrange multiplier) associated with the constraint.
Solution.
Substituting \(x_2\) in terms of \(L-x_1\) and minimizing, we can find
\(C(L)=\frac{2}{3} L^2 + \frac{13}{3} L - \frac{1}{3}\) and the price is
\(C'(L)= \frac{4}{3} L + \frac{13}{3}\).
If we dualize the problem and write out the Lagrangian, we get
\[\mathcal{L}= x_1^2+ 5 x_1 + 2 x_2^2+ 3 x_2+ \lambda (L-x_1-x_2)\]taking derivatives and using the equality constraint we have
\[\begin{align} 2 x_1+5 -\lambda &=0 \\ 4 x_2+3 - \lambda &=0 \\ x_1+x_2 &= L \end{align}\]Solving for \(\lambda\) in terms of \(L\) gives \(\lambda= \frac{4}{3} L+ \frac{13}{3}\).
Problem 2
This problem illustrates that the cost could be nondifferentiable. Consider the following problem
\[\begin{align} C(L)=\min\; & x_1 + 3 x_2 \\ \mbox{s.t. } & x_1+x_2 = L \\ & 0 \leq x_1 \leq 1 \\ & x_2 \geq 0 \end{align}\]Find \(C(L)\) and plot it. It would not be differentiable at \(L=1\). What is the price of power at \(L=1\)?
Solution.
The plot of \(C(L)\) is shown below:

The price of power is the derivative from the right, which would be \(3\). This is consistent with the dual variable interpretation of of the price. The Lagrangian is
\[\mathcal{L} = x_1+3x_2+\lambda(L-x_1-x_2) -\mu_1(x_1)+\mu_2(x_1-1)-\mu_3(x_2).\]At \(L=1\), the KKT conditions are that \(\mu_1\) and \(\mu_3\) are \(0\) (constraint not tight) and
\[\begin{align} 1- \lambda+\mu_2 &=0 \\ 3 -\lambda &=0 \end{align}\]So taking the derivative from the right hand side is not an arbitrary choice.
Problem 3
Consider the DC power flow model for a three bus fully connected network (e.g., a triangle). Suppose that the line between bus 1 and bus 2 has a capacity of 1 and the other lines have infinite capacity. All lines ahve equal susceptance values (\(b_{ij}\) are all equal). Bus 1 is the generator and buses 2 and 3 are load buses.
a) Suppose that the load at bus 2 is 1 and the load at bus 3 is 0.5. Find the power flow on the lines, if they exist, that satisfies these loads and the line capacity constraint.
b) Suppose that the load at bus 2 is 2 and the load at bus 3 is 4. Find the power flow on the lines, if they exist, that satisfies these loads and the line capacity constraint.
Solution.
It is easier to write down equations that govern power flow first. Let \(x_1\) be the generation and \(d_2\) and \(d_3\) be the loads, respectively. Let \(f_{i,j}\) denote the power flow from bus \(i\) to bus \(j\). We have the following equations
\[\begin{align} x_1 = d_2+d_3 &\mbox{ global power balance for a lossless network} \\ f_{12}+f_{23}+f_{31} = 0 & \mbox{ Kirchoff's voltage law} \\ f_{12}-f_{23} = d_2 & \mbox{ load balance at bus 2} \\ f_{23}-f_{31} = d_3 & \mbox{ load balance at bus 3} \\ -1 \leq f_{12} \leq 1 & \mbox{ Line capacity} \end{align}\]The four equality constraints can be used to eliminate 4 variables. We can write everything in terms of \(d_2\) and \(d_3\): \(f_{12} = \frac{2d_2 + d_3}{3}, \qquad f_{23} = \frac{d_3 - d_2}{3}, \qquad f_{31} = -\,\frac{d_2 + 2d_3}{3}\) In particular, the bounds on \(f_{12}\) becomes bounds on \(\frac{2 d_2 + d_3}{3}\).
a) \(f_{12}=\frac{2 \cdot 1+0.5}{3} \leq 1\), so this is feasible. The line capacities are \(f_{12} = \frac{5}{6}, \qquad f_{23} = -\frac{1}{6}, \qquad f_{31} = -\frac{2}{3}.\)
b) \(f_{12}=\frac{2 c\dot 2 +4}{3} \geq 1\), so the problem is infeasible.
Problem 4
a) Same setup as the previous problem. Plot the feasible region of the loads at bus \(2\) and bus \(3\) that satisfies the line capacity constraint.
b) We remove the line between bus 1 and bus 2. Find the feasible region of the loads at bus \(2\) and bus \(3\). Is it bigger or smaller than the region in problem a)?
Solution.
a) The region is given below

b) If we get rid of the line between \(1\) and \(2\), there are no line constraints and no cycle (Kirchoff’s voltage law) constraints. The the feasible region is actually the entire first quadrant (\(d_2 \geq 0, \quad d_3 \geq 0\)), which is big than the region in a). This shows that adding a (capacitated line) do not always help. Of course, in pratice, all lines would have some constraints, but one needs to be careful about adding lines since adding more lines do not always improve power flow.
Problem 5
Consider the 3 bus network below with data given in Tables below.

| Generator | Capacity (MW) | Marginal Cost ($/MWh) |
|---|---|---|
| A | 150 | 12 |
| B | 200 | 15 |
| C | 150 | 10 |
| D | 400 | 8 |
Table: Generation data for problem 5.
| Branch | Reactance | Capacity (MW) |
|---|---|---|
| 1-2 | 0.2 | 250 |
| 1-3 | 0.3 | 250 |
| 2-3 | 0.3 | 250 |
Table: Branch data for problem 5.
a) Find the least cost generating solution satisfying all the loads and line flow capacities. You should use a computer.
b) Find the prices at each of the buses. Note, all convex optimization solvers can report the dual variables. For equality constraints, different solvers would interpret it in different ways. That is, \(Ax=b\) can be dualized as \(\lambda ^T (Ax-b)\) or \(\lambda^T (b-Ax)\). You may need to do some post processing to flip the sign of the dual variable.
Solution.
a) Using a solver, we get the optimal solutions is \(X_A= 80 \; MW, \quad X_B=0, \quad X_C=40 \; MW, \quad X_D=400 \; MW\).
b) The prices are \(\lambda_1=13.33 \; \$/MW, \quad \lambda_2=12 \; \$/MW, \lambda_3=10 \; \$/MW\).
Problem 6
Consider DC pwoer flow. There are some generators and loads in the system. Suppose the generator costs are \(c_i x_i\). If all the \(c_i\)’s are positive, could the price at any of the load buses ever be negative? If yes, find an example. If not, prove it. Hint: consider the impact of line constraints. Also, ChatGPT gives a very meandering answer that is partly correct, partly wrong, and partly irrelevant.
Solution.
Yes. Consider a fully connected three bus network, with equal line susceptance. The load and generation are shown below. As shown in the second figure, increasing the load at bus $2$ by \(\epsilon\), allows bus 1 go transmit more power to bus $3$. This increases the cost by \(2 \epsilon\) (coming out of bus 1 and going into buses 2 and 3), and decreases the cost by \(3 \epsilon\) (bus 3 generates less), with a net increase of cost by \(-\epsilon\). Hence the price would be \(-1\) at bus 2.
