|
| 1 | +.. _storage: |
| 2 | + |
| 3 | +Storage |
| 4 | +======= |
| 5 | + |
| 6 | +Storage is a way of transforming energy that is available at a given instant, |
| 7 | +for use at a later time. The way in which this energy is stored can vary |
| 8 | +depending on the storage technology. It can be potential energy, heat or |
| 9 | +chemical, among others. Storage is literally everywhere, in small electronic |
| 10 | +devices like mobile phones or laptops, to electric vehicles, to huge dams. |
| 11 | + |
| 12 | +While humanity shifts from fossil fuels to renewable energy, it faces the |
| 13 | +challenges of integrating more energy sources that are not always stable nor |
| 14 | +predictable. The energy transition requires not only to replace current |
| 15 | +electricity generation plants to be renewable, but also to replace heating |
| 16 | +systems and combustion engines in the whole transportation sector to be |
| 17 | +electric. |
| 18 | + |
| 19 | +Unfortunately, electrical energy cannot easily be stored so, if electricity is |
| 20 | +becoming the main way of generating and consuming energy, energy storage |
| 21 | +systems need to be capable of storing the excess electrical energy that is |
| 22 | +produced when the generation is higher than the demand. Storage sysems need to |
| 23 | +be: |
| 24 | + |
| 25 | +- Efficient: in the round-trip conversion from electrical to other type of |
| 26 | + energy, and back to electrical again. |
| 27 | + |
| 28 | +- Capable: to store large quantities of energy. |
| 29 | + |
| 30 | +- Durable: to last longer. |
| 31 | + |
| 32 | +There are many specific use cases in which storage can be beneficial. In all of |
| 33 | +them the underlying effect is the same: to make the grid more stable and |
| 34 | +predictable. |
| 35 | + |
| 36 | +Some use cases are not necessarily always coupled with PV. For instance, with |
| 37 | +power peak shaving, storage can be fed from the grid without a renewable energy |
| 38 | +source directly connected to the system. Other use cases, however, are tightly |
| 39 | +coupled with PV and hence, are of high interest for this project. |
| 40 | + |
| 41 | +Power versus energy |
| 42 | +------------------- |
| 43 | + |
| 44 | +Module and inverter models in pvlib compute the power generation (DC and AC |
| 45 | +respectively). This means the computation happens as an instant, without taking |
| 46 | +into account the previous state nor the duration of the calculated power. It |
| 47 | +is, in general, the way most models work in pvlib, with the exception of some |
| 48 | +cell temperature models. It also means that time, or timestamps associated to |
| 49 | +the power values, are not taken into consideration for the calculations. |
| 50 | + |
| 51 | +When dealing with storage systems, state plays a fundamental role. Degradation |
| 52 | +and parameters like the state of charge (SOC) greatly affect how the systems |
| 53 | +operates. This means that power computation is not sufficient. Energy is what |
| 54 | +really matters and, in order to compute energy, time needs to be well defined. |
| 55 | + |
| 56 | +Conventions |
| 57 | +*********** |
| 58 | + |
| 59 | +In order to work with time series pvlib relies on pandas and pytz to handle |
| 60 | +time and time zones. See "Time and time zones" section for a brief |
| 61 | +introduction. |
| 62 | + |
| 63 | +Also, when dealing with storage systems and energy flow, you need to take into |
| 64 | +account the following conventions: |
| 65 | + |
| 66 | +- Timestamps are associated to the beginning of the interval |
| 67 | + |
| 68 | +- The time series frequency needs to be well defined in the time series |
| 69 | + |
| 70 | +- Values represent power throughout the interval, in W |
| 71 | + |
| 72 | +- Positive values represent power provided by the storage system (i.e.: |
| 73 | + discharging), hence negative values represent power into the storage system |
| 74 | + (i.e.: charging) NOTE: should we use values representing the energy instead? |
| 75 | + sounds more intuitive to me but if NREL chose to use power instead there may |
| 76 | + be a good reason |
| 77 | + |
| 78 | +The left-labelling of the bins can be in conflict with energy meter series data |
| 79 | +provided by the electricity retailer companies, where the timestamp represents |
| 80 | +the time of the reading (the end of the interval). However, using labels at the |
| 81 | +beginning of the interval eases typical group operations with time series like |
| 82 | +resampling, where Pandas will assume by default that the label is at the |
| 83 | +beginning of the interval. |
| 84 | + |
| 85 | +As an example, here you can see 15-minutes-period time series representing 1000 |
| 86 | +W power throughout all the periods: |
| 87 | + |
| 88 | +.. ipython:: python |
| 89 | +
|
| 90 | + from pandas import date_range |
| 91 | + from pandas import Series |
| 92 | +
|
| 93 | + index = date_range( |
| 94 | + "2022-01", |
| 95 | + "2022-02", |
| 96 | + closed="left", |
| 97 | + freq="15T", |
| 98 | + tz="Europe/Madrid", |
| 99 | + ) |
| 100 | + power = Series(1000.0, index=index) |
| 101 | + power[0:2] |
| 102 | +
|
| 103 | +Energy series |
| 104 | +************* |
| 105 | + |
| 106 | +You can convert the power series into energy series very easily: |
| 107 | + |
| 108 | +.. ipython:: python |
| 109 | +
|
| 110 | + from pvlib.battery import power_to_energy |
| 111 | +
|
| 112 | + energy = power_to_energy(power) |
| 113 | + energy[0:2] |
| 114 | +
|
| 115 | +And just as easily, you can resample the energy series to use a different |
| 116 | +period thanks to Pandas built-in methods: |
| 117 | + |
| 118 | +.. ipython:: python |
| 119 | +
|
| 120 | + daily = energy.resample("D").sum() |
| 121 | + daily[0:2] |
| 122 | +
|
| 123 | +Batteries |
| 124 | +--------- |
| 125 | + |
| 126 | +TODO |
| 127 | + |
| 128 | +Energy flow |
| 129 | +----------- |
| 130 | + |
| 131 | +TODO |
0 commit comments