You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
self_consumption_flow.groupby(self_consumption_flow.index.hour).mean()[["System to load", "Grid to load"]].plot.bar(stacked=True, xlabel="Hour", ylabel="Power (W)", title="Average power flow to load")
325
-
@suppress
326
-
plt.close()
327
-
328
-
@savefigpower_flow_self_consumption_system.png
329
-
self_consumption_flow.groupby(self_consumption_flow.index.hour).mean()[["System to load", "System to grid"]].plot.bar(stacked=True, xlabel="Hour", ylabel="Power (W)", title="Average system power flow")
375
+
self_consumption_flow.groupby(self_consumption_flow.index.hour).mean()[["System to load", "Grid to load", "System to grid"]].plot.bar(stacked=True, xlabel="Hour", ylabel="Power (W)", title="Average power flow")
330
376
@suppress
331
377
plt.close()
332
378
@@ -412,28 +458,110 @@ load/battery/grid, from battery to load and from grid to load/system:
412
458
.. ipython:: python
413
459
414
460
@savefigflow_self_consumption_ac_battery_load.png
415
-
flow.groupby(flow.index.hour).mean()[["System to load", "Battery to load", "Grid to load"]].plot.bar(stacked=True, legend=True, xlabel="Hour", ylabel="Power (W)", title="Average power flow to load")
461
+
flow.groupby(flow.index.hour).mean()[["System to load", "Battery to load", "Grid to load", "System to battery", "System to grid"]].plot.bar(stacked=True, legend=True, xlabel="Hour", ylabel="Power (W)", title="Average power flow")
flow.groupby(flow.index.hour).mean()[["System to load", "System to battery", "System to grid"]].plot.bar(stacked=True, legend=True, xlabel="Hour", ylabel="Power (W)", title="Average system power flow")
465
+
466
+
Self consumption with DC-connected battery
467
+
******************************************
468
+
469
+
The self-consumption with DC-connected battery is a completely different use
470
+
case. As opposed to the AC-connected battery use case, you cannot just take
471
+
into account the system's AC ouput and the load. Instead, you need to note that
472
+
the battery is connected to a single inverter, and the inverter imposes some
473
+
restrictions on how the power can flow from PV and from the battery.
474
+
475
+
Hence, for this use case, you need to consider the PV power output (DC
476
+
generation) and the inverter model as well in order to be able to calculate the
477
+
inverter's output power (AC).
478
+
479
+
The restrictions are as follow:
480
+
481
+
- PV and battery are DC-connected to the same single inverter
482
+
483
+
- Battery can only charge from PV
484
+
485
+
- The PV generation (DC) is well-known
486
+
487
+
- A custom dispatch series must be defined, but there is no guarantee that it
488
+
will be followed
489
+
490
+
- The battery cannot charge with higher power than PV can provide
491
+
492
+
- The battery cannot discharge with higher power if the inverter cannot
493
+
handle the total power provided by PV and the battery
494
+
495
+
- The battery will be charged to avoid clipping AC power
496
+
497
+
For this use case, you can start with the same self-consumption power flow
498
+
solution and dispatch series as in the AC battery use case:
dc_battery_flow["PV to load"] = dc_battery_flow["System to load"] * (1- results["Battery factor"])
535
+
dc_battery_flow["Battery to load"] = dc_battery_flow["System to load"] * results["Battery factor"]
536
+
@savefigflow_self_consumption_dc_battery_load.png
537
+
dc_battery_flow.groupby(dc_battery_flow.index.hour).mean()[["PV to load", "Battery to load", "Grid to load", "System to grid"]].plot.bar(stacked=True, legend=True, xlabel="Hour", ylabel="Power (W)", title="Average power flow")
421
538
@suppress
422
539
plt.close()
423
540
424
541
425
-
While the self-consumption with AC-connected battery use case imposes many
426
-
restrictions to the power flow, it still allows some flexibility to decide when
427
-
to allow charging and discharging. If you wanted to simulate a use case where
428
-
discharging should be avoided from 00:00 to 08:00, you could do that by simply:
542
+
Dispatching strategies
543
+
**********************
544
+
545
+
While the self-consumption-with-battery use case imposes many restrictions to
546
+
the power flow, it still allows some flexibility to decide when to charge and
547
+
discharge the battery.
548
+
549
+
An example of a different dispatching strategy is to set a well-defined
550
+
schedule that determines when the energy should flow into or out of the
551
+
battery. This is a common use case when you want to tie the battery flow to the
552
+
grid energy rates (i.e.: avoid discharging when the energy rates are low).
553
+
554
+
For example, if you wanted to simulate an AC-connected battery in a system
555
+
where discharging should be avoided between 21:00 and 00:00, you could do that
556
+
by simply:
429
557
430
558
.. ipython:: python
431
559
432
560
dispatch = self_consumption_flow["Grid to load"] - self_consumption_flow["System to grid"]
flow.groupby(flow.index.hour).mean()[["System to load", "Battery to load", "Grid to load"]].plot.bar(stacked=True, legend=True, xlabel="Hour", ylabel="Power (W)", title="Average power flow to load")
0 commit comments