Homework 6

Due at 11:59pm on Dec 3. Submit to https://canvas.uw.edu/courses/1828831/assignments/10856279. Note, for the optimization problems, write out the formulation and provide the optimal value of the problem. You do not need to write out the optimal solutions unless instructed in a specific problem.

Problem 1

In power system operations the cost of generators are often given as piecewise linear functions. For example, let \(C_1(x_1)\) and \(C_2(x_2)\) be given as

\[C_1(x_1)= \begin{cases} x_1 & \mbox{ if } 0 \leq x_1 \leq 1 \\ 2 x_1-1 & \mbox{ if } x_1 > 1 \end{cases} \quad C_2(x_2)= \begin{cases} 0.5 x_2 & \mbox{ if } 0 \leq x_2 \leq 2 \\ 3 x_2-5 & \mbox{ if } x_2 > 2 \end{cases}\]

We want to solve the following optimization problem

\[\begin{align} \min \; & C_1(x_1)+C_2(x_2) \\ \mbox{s.t. } & x_1 \geq 0 \\ & x_2 \geq 0 \\ & x_1+x_2 = L \end{align}\]

Write this optimization problem as a linear program, that is, a problem with just affine cost functions and affine constraints.

Problem 2

We explore how to include energy storage in the optimization problem. A storage doesn’t generate net power, rather it has the ability to shift load around in time. A standard application of a storage is arbitrage, that is, buy low and sell high. The storage has some physical constraints. For example, the charge and discharge power must be limited by the rated power and the energy in the storage is bounded between 0 and some maximum state of charge (SoC).

Let’s consider 10 time slots. We assume perfect knowledge of the prices in these timeslots, and they are \(p=(1.3,2.8,4.1,3.6,1.9,5.0,2.2,3.4,4.8,1.7)\). Suppose the maximum SoC of the storage is 10 units, and the charge and discharge rate is 2 units of power at a time step. Assume the stoage starts with an SoC of 5 units.

a) Write an optimization problem that maximize the profit of the storage.

b) Let’s say we want the SoC to end a the same level at the end of the time period. Add that constraint and resolve the problem.

c) What is the marginal benefit of increasing the SoC (i.e., making the storage bigger)?

Problem 3

We continue with the last problem and add in some more constraints.

a) Most storages are not 100% efficient. Suppose the storage has a charging efficiency of 90% (for every 1 unit of energy drawn from the grid, only 0.9 units gets to the SoC) and a discharging efficiency of 85% (for every 1 unit of energy out of the storage, only 0.85 units get to the grid). Add this to the optimization problem in 2b) and resolve.

b) There is some cost of using the storage, for example, batteries runs down faster if they are used more aggressively. In addition, the health of a battery storage degrades if it is either too full or too empty. Let’s say that every unit charged or discharged has a cost of \(1\), and if the storage incurs a flat cost of \(0.5\) per time unit if it is below 20% or above 80% SoC. Rewrite the optimization problem in part a) and resolve it.

Problem 4

We continue with the previous problem. So far, we assumed that the price is known exactly. That is of course not the case in practice. Let’s say that there are two other possible prices, \((4.2,1.5,3.9,2.1,4.7,3.3,1.8,2.6,5.0,3.0)\) and \((2.4,4.9,1.1,3.7,2.0,4.4,1.6,3.2,2.9,4.0)\). Say the all three prices are equally likely to occur. Write and solve the optimization problem that takes this uncertainty into account.

Problem 5

In this problem we formulate and solve a simple nonconvex loss minimization problem. A generator supplies a load through a transmission line modeled as a series admittance \(y := g - jb, \quad g > 0, \; b > 0\). The voltage at the generator (reference) bus is fixed at \(V_0 := 1 \angle 0\). The required load power is \(S = P + jQ = |S| e^{j\phi}\), with \(P > 0\) specified, i.e., \(-S\) is the power injection at the load bus. Let the load voltage be \(V := v e^{j\theta}.\)

a) Show that the loss can be written as

\[P_\text{loss} = r |I|^2 = g | 1 - v e^{j\theta} |^2.\]

b) Fix \(v\) and \(P\). Formulate the optimal power flow (OPF) as a minimization over \((\theta, \phi)\) of the active line loss.

c) Reformulate the OPF as an unconstrained minimization \(\min_\phi f(\phi)\) over \(\phi\) only.

d) Find the unique minimize of \(f(\phi)\) over \(\phi \in [-\frac{\pi}{2},\frac{\pi}{2}]\).

Problem 6

This is a simplified example of voltage regulation in practice. Consider the system with the \(Y\)-bus matrix below.

\[Y = \begin{bmatrix} 0.83 - j1.47 & -0.83 + j1.47 & 0 & 0 & 0\\[4pt] -0.83 + j1.47 & 1.50 - j2.59 & -0.67 + j1.12 & 0 & 0\\[4pt] 0 & -0.67 + j1.12 & 2.20 - j4.35 & -0.95 + j1.89 & -0.58 + j1.34\\[4pt] 0 & 0 & -0.95 + j1.89 & 0.95 - j1.89 & 0\\[4pt] 0 & 0 & -0.58 + j1.34 & 0 & 0.58 - j1.34 \end{bmatrix}.\]

Suppose we want to minimize the loss while keeping all voltages at 1 per unit, with \(P\) and \(Q\) satisfying the upper bounds given below (the feeder, bus 1, is unconstrained).

\[(\overline{P}_2,\overline{Q}_2)=(-0.05,0.3), (\overline{P}_3,\overline{Q}_3)=(-0.25,0.25), (\overline{P}_4,\overline{Q}_4)=(-0.2,0.06), (\overline{P}_5,\overline{Q}_5)=(-0.01,0.05)\]

Write it as a semidefinite programming problem and solve it. Given the optimal solutions (the complex voltages) with the feeder as the slack bus.