Skip to content

Commit 991fe64

Browse files
committed
update and generate html
1 parent ad572f3 commit 991fe64

File tree

4 files changed

+108
-114
lines changed

4 files changed

+108
-114
lines changed

class15/Manifest.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
julia_version = "1.12.1"
44
manifest_format = "2.0"
5-
project_hash = "6f7658fc1a60fcdce7547b146a1707751df3cc03"
5+
project_hash = "220826bb4b55d716beb2198d70faa500307a45d4"
66

77
[[deps.ASL_jll]]
88
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]

class15/Project.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
name = "DynamicOptimalControlNotebook"
2-
uuid = "6fd508a3-41c1-4c16-bb31-09a03e84fbc0"
3-
authors = [ "Shuaicheng Tong <[email protected]>",]
4-
version = "0.1.0"
5-
61
[deps]
72
Pluto = "c3e4b0f8-55cb-11ea-2926-15256bba5781"
83
PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8"

class15/class15.html

Lines changed: 19 additions & 0 deletions
Large diffs are not rendered by default.

class15/class15.jl

Lines changed: 88 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,9 @@ The **DC power flow model** provides a linearized approximation of AC power flow
197197

198198
# ╔═╡ 7b4800c2-133d-4793-95b1-a654a4f19558
199199
md"""
200-
### DC Optimal Power Flow Formulation
200+
### DC Power Flow Formulation
201+
202+
The DC power flow optimization problem combines economic dispatch with network physics:
201203
202204
```math
203205
\begin{align}
@@ -209,20 +211,20 @@ md"""
209211
\end{align}
210212
```
211213
212-
- Reactance of line: $x_{ij}$. $\frac{1}{x_{ij}} = b_{ij}$: susceptance (specified by equipment manufacturer)
213-
- Reference bus: only for modeling, you can pick any bus as the reference bus. We only care about angle differences (which carries current through lines)
214+
- Reactance of line $x_{ij}$. $\frac{1}{x_{ij}} = b_{ij}$: susceptance (manufacturer specified)
215+
- Reference bus: only for modeling, you can pick any bus as the reference bus. We only care about angle differences (which carries current through lines
214216
- Individual bus angle has no physical meaning
215217
"""
216218

217219
# ╔═╡ 7961c1d1-3e82-49ea-8201-c5f82066d70d
218220
md"""
219-
### Exercise: Solve DCOPF (suggested solver: Ipopt)
221+
### Exercise: Solve DCOPF (solver suggested: Ipopt)
220222
221-
Let's apply the DC power flow formulation to the 3-bus network with line constraints:
223+
Let's apply the DC power flow formulation to our 3-bus network with line constraints:
222224
223225
![3-Bus Network with Constraints](https://www.al-roomi.org/multimedia/Power_Flow/3BusSystem/SystemIII/Murty3BusSystem.jpg)
224226
225-
**Net generation calculations:**
227+
**How did I get the numbers:**
226228
- Assume P1 generates 85 MW, with 50 MW of load, the net injection is 35 MW
227229
- Assume P2 generates 40 MW, with no load, net injection is 40 MW (we take upwards arrow as injection)
228230
- Bus 3 has no gen, only load
@@ -232,7 +234,7 @@ Let's apply the DC power flow formulation to the 3-bus network with line constra
232234
md"""
233235
### DCOPF Solution
234236
235-
Consult lecture slides for the solution and detailed analysis. Observe how adding line limits changes dispatch and total cost.
237+
Consult lecture slides for the solution and detailed analysis.
236238
"""
237239

238240
# ╔═╡ f72775b9-818c-4a9b-9b66-cfccd88e17ed
@@ -241,10 +243,9 @@ md"""
241243
242244
This section has introduced the fundamentals of static optimal power flow problems including economic dispatch and DC optimal power flow. Key takeaways:
243245
244-
- You observed that without thermal limits, optimal dispatch from ED can overload lines
245-
- Real systems are AC (complex voltages/currents) -- much harder. This is just a lightweight intro so we can think about expressing real-world problems as optimization formulations without burdening ourselves with AC physics, which we will see in transient stability section.
246-
247-
In the next section, we introduce transients and transient stability constraints to capture dynamic states of grid components, bringing time domain dynamics into the optimization.
246+
- You will see that without thermal limits, optimal dispatch can overload lines
247+
- Reference bus is arbitrarily picked by the solver.
248+
- Real systems are AC (complex voltages/currents) -- much harder. This is just a lightweight intro so we can think about expressing real-world problems as optimization formulations without overburdening ourselves with AC physics, which we will see in transient stability section.
248249
"""
249250

250251
# ╔═╡ 53ab9b31-78aa-49b6-9e24-df47aa80f25a
@@ -946,11 +947,6 @@ J\omega\dot{\omega} = P_m - P_e
946947
```
947948
948949
This relates how fast the mass is spinning ($\omega$) to the imbalance of power input (generation) and power withdrawal (load + losses).
949-
"""
950-
951-
# ╔═╡ 3a911e1a-5ec9-4eb0-9ec5-4ee2502e5103
952-
md"""
953-
## From Torque to Power (Continued)
954950
955951
In practice, generators operate close to system frequency, so the generators spin at an angular velocity that is close to that 60 Hz constant. Since the variations are mostly tiny, we can define inertia constant $M = J\omega$
956952
@@ -991,7 +987,7 @@ So we have per unit swing:
991987

992988
# ╔═╡ abcd31d0-c6eb-4bc7-a752-83a8d7f6fda1
993989
md"""
994-
## Damping and Advanced Forms
990+
## Damping and Another Form of Generator Swing Equations
995991
996992
Some also add damping:
997993
@@ -1080,7 +1076,7 @@ M_{\text{virtual}} \dot{\omega} = P_{\text{ref}} - P
10801076

10811077
# ╔═╡ 0a2c4c0a-c68e-4f21-afbb-1b80791ec166
10821078
md"""
1083-
## Virtual Inertia (continued)
1079+
## Virtual Inertia
10841080
10851081
**How it works:**
10861082
- The inverter adjusts its internal frequency reference according to power imbalance
@@ -1172,11 +1168,6 @@ Power-flow balance:
11721168
P_G - P_D = \text{network losses}, \qquad
11731169
Q_G - Q_D = 0.
11741170
```
1175-
"""
1176-
1177-
# ╔═╡ 2644c1ad-c1aa-4b03-ab27-fb414c03e3af
1178-
md"""
1179-
## Steady-State Load Models Continued
11801171
11811172
However, the static load model has important limitations. Interpretation of the above model:
11821173
- Loads are fixed regardless of system conditions, or at most respond to nodal voltage.
@@ -1231,11 +1222,6 @@ J\frac{d\omega_r}{dt} = T_e(V,\omega_r) - T_m
12311222
\quad\Longleftrightarrow\quad
12321223
J\,\omega_s\,\frac{ds}{dt} = T_m - T_e(V,s).
12331224
```
1234-
"""
1235-
1236-
# ╔═╡ 64252a52-551a-4119-9e6e-78a0b3338ef9
1237-
md"""
1238-
## Rotor Dynamics (continued)
12391225
12401226
**Variable definitions:**
12411227
- Rotor inertia (kg·$m^2$): $J$
@@ -1338,10 +1324,7 @@ Q_d &= x_q\!\left(\frac{V}{V_0}\right)^{N_{qt}}.
13381324
**Parameters:**
13391325
- Internal recovery states (how much of the load has recovered): $x_p, x_q$
13401326
- Time constants — larger values $\Rightarrow$ slower recovery: $T_p, T_q$
1341-
"""
13421327
1343-
# ╔═╡ c9d0e1f2-0894-4340-a18b-72f8e1204497
1344-
md"""
13451328
## Adaptive Exponential Recovery Load (ERL) Model (continued)
13461329
13471330
- Nominal power withdrawals at reference voltage $V_0$: $P_0, Q_0$
@@ -1413,7 +1396,8 @@ md"""
14131396

14141397
# ╔═╡ 011a1e50-0316-42ec-9295-eeee64b76299
14151398
md"""
1416-
## Why We Go Beyond Steady-State OPF
1399+
## Wrap up
1400+
### Why We Go Beyond Steady-State OPF
14171401
14181402
In this chapter, we motivated from the physical principles and operation constraints to demonstrate that power systems are fundamentally dynamic. **The bigger picture:**
14191403
- Even though steady-state analysis is helpful for many purposes and have lower computational burden, power systems are **dynamic systems.**
@@ -1423,7 +1407,7 @@ In this chapter, we motivated from the physical principles and operation constra
14231407

14241408
# ╔═╡ 81952b3e-93c9-4179-8b12-5933d49749a6
14251409
md"""
1426-
## Four Building Blocks of System Dynamics
1410+
### Four Building Blocks of System Dynamics
14271411
14281412
Throughout this chapter, we have explored four fundamental components that govern power system dynamics:
14291413
@@ -1435,7 +1419,7 @@ Throughout this chapter, we have explored four fundamental components that gover
14351419

14361420
# ╔═╡ a3b4c5d6-0894-4340-a18b-72f8e1204503
14371421
md"""
1438-
## Why We Need Dynamic Optimization (TSC-OPF)
1422+
### Why We Need Dynamic Optimization (TSC-OPF)
14391423
14401424
These building blocks come together in transient stability-constrained optimization. **Why we need optimization with system dynamics embedded (TSC-OPF):**
14411425
- Steady-state OPF finds an economical operating point **only at equilibrium.**
@@ -1446,80 +1430,76 @@ These building blocks come together in transient stability-constrained optimizat
14461430
# ╟─4866207c-0894-4340-a18b-72f8e1204424
14471431
# ╟─a1b2c3d4-0894-4340-a18b-72f8e1204425
14481432
# ╟─e6aa5227-91bd-4cec-9448-24384708a305
1449-
# ╠═19dac419-2df3-4878-b7da-608e8ec1e53b
1450-
# ╠═8ed6af99-1c5d-4d27-b60d-17d2e6c6ceff
1451-
# ╠═f742f5f3-d9d3-4374-ac9e-17073c3a2f6d
1452-
# ╠═ad8e9d79-e226-468e-9981-52b7cda7c955
1453-
# ╠═fc329e51-e91c-4d83-b6fe-07a3bce44d5d
1454-
# ╠═d767175f-290d-403e-99de-d3a8f2ccb5b5
1455-
# ╠═c9d0e1f2-0894-4340-a18b-72f8e1204432
1456-
# ╠═9d1ea9be-2d7b-4602-8a8e-8426ea31661a
1457-
# ╠═71ba62e6-bcc1-4e9b-91cd-a8860ba0d2b5
1458-
# ╠═7b4800c2-133d-4793-95b1-a654a4f19558
1459-
# ╠═7961c1d1-3e82-49ea-8201-c5f82066d70d
1433+
# ╟─19dac419-2df3-4878-b7da-608e8ec1e53b
1434+
# ╟─8ed6af99-1c5d-4d27-b60d-17d2e6c6ceff
1435+
# ╟─f742f5f3-d9d3-4374-ac9e-17073c3a2f6d
1436+
# ╟─ad8e9d79-e226-468e-9981-52b7cda7c955
1437+
# ╟─fc329e51-e91c-4d83-b6fe-07a3bce44d5d
1438+
# ╟─d767175f-290d-403e-99de-d3a8f2ccb5b5
1439+
# ╟─c9d0e1f2-0894-4340-a18b-72f8e1204432
1440+
# ╟─9d1ea9be-2d7b-4602-8a8e-8426ea31661a
1441+
# ╟─71ba62e6-bcc1-4e9b-91cd-a8860ba0d2b5
1442+
# ╟─7b4800c2-133d-4793-95b1-a654a4f19558
1443+
# ╟─7961c1d1-3e82-49ea-8201-c5f82066d70d
14601444
# ╟─91b8a3e4-81ed-49fe-b785-4feacfd8788d
1461-
# ╠═f72775b9-818c-4a9b-9b66-cfccd88e17ed
1462-
# ╠═53ab9b31-78aa-49b6-9e24-df47aa80f25a
1463-
# ╠═1e337cdf-8add-42ab-a62f-23069e34ec39
1464-
# ╠═23dc8fd4-59a1-414f-a165-b509458abd18
1465-
# ╠═5814ece5-51b3-4dba-953d-c1f4b6ab04a8
1466-
# ╠═14499803-6315-4dfb-82f6-de4916e4ab57
1467-
# ╠═c1d2e3f4-0894-4340-a18b-72f8e1204445
1468-
# ╠═7fc7a97e-0364-42ce-9039-d3718359061d
1469-
# ╠═ca8dc9ed-0974-4205-9af4-a21c8a7cb707
1470-
# ╠═111d764c-c6e1-4b79-aad5-31a32fad0719
1471-
# ╠═9716f6a5-54d6-4abc-b0df-82f5a30e0196
1472-
# ╠═7212aae0-0e02-47eb-80c4-a708c4eb205c
1473-
# ╠═a5b6c7d8-0894-4340-a18b-72f8e1204451
1474-
# ╠═34595bd9-874e-4ca9-bf3c-3ebef9a37cec
1475-
# ╠═a9f00e8c-205e-45a9-83d4-1dea5b7627c1
1476-
# ╠═85c737d7-ace0-4b25-8d63-f35c318ccc5b
1477-
# ╠═22d5c113-82f0-4598-8c47-ead1face730e
1478-
# ╠═47e011b8-4fb8-4534-a504-ffe3009beb6e
1479-
# ╠═a3786b2d-9951-440f-854c-dfd40ad727f1
1480-
# ╠═c3d4e5f6-0894-4340-a18b-72f8e1204458
1481-
# ╠═946ad231-4ddf-43a3-b2b9-95d502f4b5e9
1482-
# ╠═64fce728-f80a-49de-a332-ca31139962cf
1483-
# ╠═f6399741-9b5f-4bd3-bae7-6cc1ed1bd718
1484-
# ╠═2a36f90d-6020-4a12-a1ff-d719214414bb
1485-
# ╠═214eacc5-0b60-44b8-8a53-9cce369debdd
1486-
# ╠═a7b8c9d0-0894-4340-a18b-72f8e1204464
1487-
# ╠═6b64a495-6039-408c-91a9-4dfddf21d857
1488-
# ╠═b5159081-3b0a-459a-9c5b-c2b4911d79e2
1489-
# ╠═ad22ab28-884e-4c3b-8265-51a44685343d
1490-
# ╠═01ebbe37-0681-47bb-b851-5f16b9f4aeb5
1491-
# ╠═86d07665-753e-4dbe-aa84-5b23ec0a616f
1492-
# ╠═8e4dc912-14ff-4290-8f96-926493e5ef81
1493-
# ╠═c5d6e7f8-0894-4340-a18b-72f8e1204471
1494-
# ╠═c0cc1b94-e651-40c2-8084-e9ebfad2a457
1495-
# ╠═4702e992-a163-40f3-ab55-f9e8e848d0c7
1496-
# ╠═1566dce2-fd36-4110-8220-97eefe043cbb
1497-
# ╠═9bd48789-5d3d-495c-acd3-6586ae616136
1498-
# ╠═3a911e1a-5ec9-4eb0-9ec5-4ee2502e5103
1499-
# ╠═a9b0c1d2-0894-4340-a18b-72f8e1204477
1500-
# ╠═abcd31d0-c6eb-4bc7-a752-83a8d7f6fda1
1501-
# ╠═b16732b7-ec08-43c7-9c08-489c8c8bbecb
1502-
# ╠═8ee16365-6d48-4073-9482-44dd58b7e338
1503-
# ╠═f05940b2-5a30-46dc-8811-5f3d6b0c74a0
1504-
# ╠═75deac76-f89c-4b84-a132-67591177f5dd
1505-
# ╠═0a2c4c0a-c68e-4f21-afbb-1b80791ec166
1506-
# ╠═c7d8e9f0-0894-4340-a18b-72f8e1204484
1507-
# ╠═20d5d03f-0225-4d3c-b0d2-d7440340b821
1508-
# ╠═37f242b9-454f-4361-a2e1-98acae57b6fe
1445+
# ╟─f72775b9-818c-4a9b-9b66-cfccd88e17ed
1446+
# ╟─53ab9b31-78aa-49b6-9e24-df47aa80f25a
1447+
# ╟─1e337cdf-8add-42ab-a62f-23069e34ec39
1448+
# ╟─23dc8fd4-59a1-414f-a165-b509458abd18
1449+
# ╟─5814ece5-51b3-4dba-953d-c1f4b6ab04a8
1450+
# ╟─14499803-6315-4dfb-82f6-de4916e4ab57
1451+
# ╟─c1d2e3f4-0894-4340-a18b-72f8e1204445
1452+
# ╟─7fc7a97e-0364-42ce-9039-d3718359061d
1453+
# ╟─ca8dc9ed-0974-4205-9af4-a21c8a7cb707
1454+
# ╟─111d764c-c6e1-4b79-aad5-31a32fad0719
1455+
# ╟─9716f6a5-54d6-4abc-b0df-82f5a30e0196
1456+
# ╟─7212aae0-0e02-47eb-80c4-a708c4eb205c
1457+
# ╟─a5b6c7d8-0894-4340-a18b-72f8e1204451
1458+
# ╟─34595bd9-874e-4ca9-bf3c-3ebef9a37cec
1459+
# ╟─a9f00e8c-205e-45a9-83d4-1dea5b7627c1
1460+
# ╟─85c737d7-ace0-4b25-8d63-f35c318ccc5b
1461+
# ╟─22d5c113-82f0-4598-8c47-ead1face730e
1462+
# ╟─47e011b8-4fb8-4534-a504-ffe3009beb6e
1463+
# ╟─a3786b2d-9951-440f-854c-dfd40ad727f1
1464+
# ╟─c3d4e5f6-0894-4340-a18b-72f8e1204458
1465+
# ╟─946ad231-4ddf-43a3-b2b9-95d502f4b5e9
1466+
# ╟─64fce728-f80a-49de-a332-ca31139962cf
1467+
# ╟─f6399741-9b5f-4bd3-bae7-6cc1ed1bd718
1468+
# ╟─2a36f90d-6020-4a12-a1ff-d719214414bb
1469+
# ╟─214eacc5-0b60-44b8-8a53-9cce369debdd
1470+
# ╟─a7b8c9d0-0894-4340-a18b-72f8e1204464
1471+
# ╟─6b64a495-6039-408c-91a9-4dfddf21d857
1472+
# ╟─b5159081-3b0a-459a-9c5b-c2b4911d79e2
1473+
# ╟─ad22ab28-884e-4c3b-8265-51a44685343d
1474+
# ╟─01ebbe37-0681-47bb-b851-5f16b9f4aeb5
1475+
# ╟─86d07665-753e-4dbe-aa84-5b23ec0a616f
1476+
# ╟─8e4dc912-14ff-4290-8f96-926493e5ef81
1477+
# ╟─c5d6e7f8-0894-4340-a18b-72f8e1204471
1478+
# ╟─c0cc1b94-e651-40c2-8084-e9ebfad2a457
1479+
# ╟─4702e992-a163-40f3-ab55-f9e8e848d0c7
1480+
# ╟─1566dce2-fd36-4110-8220-97eefe043cbb
1481+
# ╟─9bd48789-5d3d-495c-acd3-6586ae616136
1482+
# ╟─a9b0c1d2-0894-4340-a18b-72f8e1204477
1483+
# ╟─abcd31d0-c6eb-4bc7-a752-83a8d7f6fda1
1484+
# ╟─b16732b7-ec08-43c7-9c08-489c8c8bbecb
1485+
# ╟─8ee16365-6d48-4073-9482-44dd58b7e338
1486+
# ╟─f05940b2-5a30-46dc-8811-5f3d6b0c74a0
1487+
# ╟─75deac76-f89c-4b84-a132-67591177f5dd
1488+
# ╟─0a2c4c0a-c68e-4f21-afbb-1b80791ec166
1489+
# ╟─c7d8e9f0-0894-4340-a18b-72f8e1204484
1490+
# ╟─20d5d03f-0225-4d3c-b0d2-d7440340b821
1491+
# ╟─37f242b9-454f-4361-a2e1-98acae57b6fe
15091492
# ╠═4211a2c2-4a3a-4a63-8d2e-dc6c94e0cfc6
1510-
# ╠═2644c1ad-c1aa-4b03-ab27-fb414c03e3af
1511-
# ╠═8ca0ad91-2fb5-4e64-9f6f-5498fa39d44b
1493+
# ╟─8ca0ad91-2fb5-4e64-9f6f-5498fa39d44b
15121494
# ╠═a1b2c3d4-0894-4340-a18b-72f8e1204490
1513-
# ╠═64252a52-551a-4119-9e6e-78a0b3338ef9
1514-
# ╠═160fd7d9-a3c2-4f22-951e-deed6f32e09b
1515-
# ╠═56b58c9f-f8ce-4117-8105-70083c23fde9
1516-
# ╠═03d81d40-f285-47d6-bbf4-db3e8efc7bd1
1517-
# ╠═a4b027e0-15e6-4097-acc9-358fb075fd7f
1518-
# ╠═e93c6dc1-2f8d-4e2f-bbed-db926643f32a
1519-
# ╠═c9d0e1f2-0894-4340-a18b-72f8e1204497
1520-
# ╠═3f7130a0-51d6-4493-b07e-e5bf178ce834
1521-
# ╠═18207180-a40b-4bb7-87bb-9a0752286cea
1522-
# ╠═4d6fd1e2-9457-4f4c-84b1-62958a8b49de
1523-
# ╠═011a1e50-0316-42ec-9295-eeee64b76299
1524-
# ╠═81952b3e-93c9-4179-8b12-5933d49749a6
1525-
# ╠═a3b4c5d6-0894-4340-a18b-72f8e1204503
1495+
# ╟─160fd7d9-a3c2-4f22-951e-deed6f32e09b
1496+
# ╟─56b58c9f-f8ce-4117-8105-70083c23fde9
1497+
# ╟─03d81d40-f285-47d6-bbf4-db3e8efc7bd1
1498+
# ╟─a4b027e0-15e6-4097-acc9-358fb075fd7f
1499+
# ╟─e93c6dc1-2f8d-4e2f-bbed-db926643f32a
1500+
# ╟─3f7130a0-51d6-4493-b07e-e5bf178ce834
1501+
# ╟─18207180-a40b-4bb7-87bb-9a0752286cea
1502+
# ╟─4d6fd1e2-9457-4f4c-84b1-62958a8b49de
1503+
# ╟─011a1e50-0316-42ec-9295-eeee64b76299
1504+
# ╟─81952b3e-93c9-4179-8b12-5933d49749a6
1505+
# ╟─a3b4c5d6-0894-4340-a18b-72f8e1204503

0 commit comments

Comments
 (0)