Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added diagram for available charging power calculation #472

Open
wants to merge 86 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
4df8727
Uploaded available charging power diagram
TheNinth7 Nov 13, 2023
160707b
Added available charging power diagram
TheNinth7 Nov 13, 2023
efd7934
Removed file
TheNinth7 Nov 13, 2023
1eae38c
Added available charging power diagram
TheNinth7 Nov 13, 2023
6832c76
Added available charging power diagram
TheNinth7 Nov 13, 2023
fe780e3
Delete i18n/en/docusaurus-plugin-content-docs/current/reference/confi…
TheNinth7 Nov 13, 2023
d5cd6c2
Uploaded updated available charging power diagram
TheNinth7 Nov 13, 2023
9d85e4d
Delete diagram to be replaced
TheNinth7 Nov 13, 2023
621e25c
Replaced file with corrected version
TheNinth7 Nov 13, 2023
98b2415
Removed image
TheNinth7 Nov 13, 2023
c6a3890
Updated file
TheNinth7 Nov 13, 2023
c96a3fe
Added detailed description of enable:threshold
TheNinth7 Nov 14, 2023
1166235
Updated file
TheNinth7 Nov 20, 2023
c03d8b2
New diagram for showing inputs/outputs of evcc
TheNinth7 Nov 20, 2023
7da16b3
Updated diagrams
TheNinth7 Nov 20, 2023
cae07c5
Updated innards and added diagrams
TheNinth7 Nov 20, 2023
2d07ec7
Updated diagrams
TheNinth7 Nov 20, 2023
ace6517
Updated diagrams
TheNinth7 Nov 20, 2023
28ec76e
Updated diagrams
TheNinth7 Nov 20, 2023
dd0a7cd
Improve diagrams
TheNinth7 Nov 20, 2023
3f6b35b
Merge branch 'evcc-io:main' into TheNinth7-available-charging-power-doc
TheNinth7 Nov 20, 2023
3e7fb09
Delete i18n/en/docusaurus-plugin-content-docs/current/reference/confi…
TheNinth7 Nov 20, 2023
2561e74
Delete i18n/en/docusaurus-plugin-content-docs/current/reference/confi…
TheNinth7 Nov 20, 2023
5f09d76
Uploaded updated diagrams
TheNinth7 Nov 20, 2023
d23c94f
Improved diagram
TheNinth7 Nov 20, 2023
95673b6
Improved diagram
TheNinth7 Nov 20, 2023
d78d049
Improved diagram again
TheNinth7 Nov 20, 2023
8cd75d6
Updated description of enable/disable, with more details how the thre…
TheNinth7 Nov 20, 2023
7ff27ad
Updated diagrams with additional details
TheNinth7 Nov 25, 2023
f92aa05
Add files via upload
TheNinth7 Nov 25, 2023
c9a156b
Added maxSurplusWhileBatteryCharging
TheNinth7 Nov 28, 2023
ff22361
Added loadpoint.priority and site.maxGridSupplyWhileBatteryCharging t…
TheNinth7 Nov 28, 2023
f9db66e
Created drawio file for diagrams
TheNinth7 Dec 1, 2023
9545965
Update evcc.drawio
TheNinth7 Dec 1, 2023
51c6f67
Update evcc.drawio
TheNinth7 Dec 1, 2023
ddd8f83
Rename evcc.drawio to evcc-innards.drawio
TheNinth7 Dec 1, 2023
6ebd836
Added evcc-innards.drawio
TheNinth7 Dec 1, 2023
d0b4dd9
Added evcc-inner-workings.drawio
TheNinth7 Dec 1, 2023
1c83d18
Create innards.mdx
TheNinth7 Dec 3, 2023
917eea6
Update innards.mdx
TheNinth7 Dec 3, 2023
c8e8d64
Update wallbox.mdx
TheNinth7 Dec 3, 2023
3922d4f
Update vehicles.mdx
TheNinth7 Dec 3, 2023
055f127
Update meters.mdx
TheNinth7 Dec 3, 2023
2fda668
Added Solar mode in-depth page
TheNinth7 Dec 3, 2023
ff8732e
Started work on innards.mdx
TheNinth7 Dec 3, 2023
097dd8f
Started work on innards.mdx
TheNinth7 Dec 3, 2023
0878450
Create img folder for guides
TheNinth7 Dec 3, 2023
3a73946
Added diagrams for innards guide
TheNinth7 Dec 3, 2023
8ada2f9
Delete i18n/en/docusaurus-plugin-content-docs/current/guides/img/test
TheNinth7 Dec 3, 2023
8705ebe
Rename evcc-inards-i-o.png to evcc-innards-i-o.png
TheNinth7 Dec 3, 2023
061753c
Continued work on innards.md
TheNinth7 Dec 3, 2023
c29e38f
Update innards.md
TheNinth7 Dec 3, 2023
d87a34f
Update innards.md
TheNinth7 Dec 3, 2023
6bfe478
Update innards.md
TheNinth7 Dec 3, 2023
eee67fb
Rename evcc-innards-2 loadpoints 1.png to evcc-innards-2-loadpoints-1…
TheNinth7 Dec 3, 2023
3c592ba
Rename evcc-innards-2 loadpoints 2.png to evcc-innards-2-loadpoints-2…
TheNinth7 Dec 3, 2023
f6d4c32
Update innards.md
TheNinth7 Dec 3, 2023
80cbbba
Update and rename innards.md to solar-mode-innards.md
TheNinth7 Dec 3, 2023
61a5c40
Update solar-mode-innards.md
TheNinth7 Dec 3, 2023
6b92d1e
Update index.md
TheNinth7 Dec 3, 2023
d17135e
Update index.md
TheNinth7 Dec 3, 2023
bebb2f3
Update index.md
TheNinth7 Dec 3, 2023
7ab7c10
Added link to solar mode guide
TheNinth7 Dec 4, 2023
4caec2a
Update index.md
TheNinth7 Dec 4, 2023
9080812
Update index.md
TheNinth7 Dec 4, 2023
4d8b51e
Added links to explanation on use without grid meter, and on Solar mo…
TheNinth7 Dec 4, 2023
7849ecd
Added link to solar mode innards guide ...
TheNinth7 Dec 4, 2023
91e5d30
Added links to solar mode guide
TheNinth7 Dec 4, 2023
1587988
Added links to solar mode guide
TheNinth7 Dec 4, 2023
50a4a3b
Corrected logic diagram
TheNinth7 Dec 4, 2023
0cd9e02
Delete i18n/en/docusaurus-plugin-content-docs/current/reference/confi…
TheNinth7 Dec 4, 2023
b017675
Delete i18n/en/docusaurus-plugin-content-docs/current/reference/confi…
TheNinth7 Dec 4, 2023
b86a4c4
Delete i18n/en/docusaurus-plugin-content-docs/current/reference/confi…
TheNinth7 Dec 4, 2023
e9baea1
Delete i18n/en/docusaurus-plugin-content-docs/current/reference/confi…
TheNinth7 Dec 4, 2023
3c997b8
Create solar-mode-innards.md in german doc directory
TheNinth7 Dec 7, 2023
637fb62
Added English content
TheNinth7 Dec 7, 2023
91ae4c7
Added German guide file and updated sidebar title
TheNinth7 Dec 7, 2023
4fd48c6
Minor correction
TheNinth7 Dec 7, 2023
51f2066
Reworked text flow in inner-working sections and updated references.
TheNinth7 Dec 11, 2023
ad7e6f4
Added "what you'll learn" infos to inner-workings.
TheNinth7 Dec 15, 2023
aebb769
Removed zooming buttons from draw.io toolbar
TheNinth7 Dec 16, 2023
d6219ca
Reworked available charging power page.
TheNinth7 Dec 17, 2023
f44c0a7
Simplified diagrams
TheNinth7 Dec 17, 2023
ae283de
Removed PNGs
TheNinth7 Dec 17, 2023
85e922a
Extended introduction and refined texts ...
TheNinth7 Dec 19, 2023
b6c4e9c
Removed diagram backup
TheNinth7 Dec 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8,686 changes: 8,686 additions & 0 deletions docs/devices/chargers.mdx

Large diffs are not rendered by default.

22,379 changes: 22,379 additions & 0 deletions docs/devices/meters.mdx

Large diffs are not rendered by default.

5,853 changes: 5,853 additions & 0 deletions docs/devices/vehicles.mdx

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/guides/faq.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 7
sidebar_position: 6
---

import SponsorshipRequired from "/docs/_sponsorship_required.mdx";
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/meters.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 5
sidebar_position: 4
---

import SponsorshipRequired from "/docs/_sponsorship_required.mdx";
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/wallbox.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 6
sidebar_position: 5
---

import SponsorshipRequired from "/docs/_sponsorship_required.mdx";
Expand Down
4 changes: 4 additions & 0 deletions docs/inner-workings/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Inner-workings",
"position": 6
}
83 changes: 83 additions & 0 deletions docs/inner-workings/available-charging-power.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
sidebar_position: 5
---

import Drawio from '@theme/Drawio'
import diagrams from '!!raw-loader!./img/diagrams.drawio';

# Available charging power

---
**What you'll learn**: how available surplus is calculated in `Solar` and `Min+Solar` mode.

---

In the `Solar` and `Min+Solar` mode, the system constantly monitors the `available charging power` (surplus), and [starts](./startstop) the charging process if it exceeds the [`minimum charging power`](./minmaxphases) required for the vehicle and charger. If the `available charging power` changes, evcc adapts the charging power or [stops](./startstop) charging accordingly.

The `Min+Solar` mode adapts the charging power in the same fashion, but continuously charges the EV with at least `minimum charging power` instead of starting or stopping based on surplus.

For calulating the `available charging power`, an electric meter measuring the power on your grid connection point (grid meter) is important. Power generated by the photovoltaic system can also be measured and displayed, but has no effect on the function, [except if no grid meter is available](./meters#i-have-a-solar-installation-but-i-dont-have-a-readable-grid-connection-meter---can-i-still-use-evcc). Evcc also considers power consumption by batteries and other devices, which may be diverted to vehicle charging depending on your priorities.

The `available charging power` is calculated in [intervals](./timing-interval). If you have [multiple loadpoints](./timing-multiple-loadpoints), at each `interval` only one will be calculated and adjusted. This way each `loadpoint` represents its own independent control circuit. `Available charging power` for one `loadpoint` also includes the `charging power` used by `loadpoints` with lower priority, enabling power to be diverted from them.

## Inputs and configuration

Let's start with a closer look at the inputs that are used in the calculation of `available charging power`.

For power values in Watt, the tables below will indicate the meaning of positive and negative values. Generally, for `grid power`, `PV power` and `battery power` as suppliers, positive means power being supplied and negative means power being feed into grid or battery. For `charging power` and `aux power` as consumers, positive means power consumed. In line with `charging power` also the calculated values for `minimum charging power`, `maximum charging power` and `available charging power` are positive.

|Input|Description|Positive|Negative|Aggregation|
|-----|-----------|--------|--------|-----------|
|[Grid power](../reference/configuration/site/#metersgrid) (W)|The most important factor in the calculation, showing available surplus that is fed into the grid.|Power drawn from the grid|Power is feed to the grid|-|
|[Battery power](../reference/configuration/site/#metersbattery) (W)|With power readings from batteries that are also charged with surplus, evcc can prioritize vehicle charging. It does that by increasing the charging power of the vehicle, practically forcing the battery to reduce or stop charging.|Power is drawn from the battery|Power is charged into the battery|Sum of all batteries|
|[Battery state-of-charge](../reference/configuration/site/#metersbattery) (%)|Enables prioritization of vehicle charging depending on the charge level of the batteries (see above).|-|-|Average of all batteries, weighted by capacity|
|[Aux power](../reference/configuration/site/#metersaux) (W)|Represents power used by other surplus-operated devices that should be diverted to vehicle charging.|Power available for vehicle charging|Power that should be left for the aux device|Sum of all aux devices|
|[PV power](../reference/configuration/site/#meterspv) (W)|The output of your PV system(s) can also be measured, mostly for display purposes. Only if [grid power cannot be measured](./meters#i-have-a-solar-installation-but-i-dont-have-a-readable-grid-connection-meter---can-i-still-use-evcc), PV power will be used instead and you can set `residualPower` (see below) to a constant value for assumed house consumption to approximate surplus|Power that is produced by the PV system|-|Sum of all PV systems|
|[Charging power](../devices/chargers) (W)|The actual charging power consumed by the charger is also measured. If the charger itself does not provide this measurement, [a separate meter](../reference/configuration/loadpoints#meter) can be configured for the `loadpoint` representing the charger. If that is not available as well, then instead the power last set by evcc will be used.|The amount of power the vehicle(s) is/are currently charged with|-|If multiple `loadpoints`, `charging power` also includes `loadpoints` with lower `priority`.|

Additionally, the following other configuration parameters influence the calculation of `available charging power`:

|Parameter|Description|Positive|Negative|
|---------|-----------|--------|--------|
|[`site.residualPower`](../reference/configuration/site/#residualpower) (W)|Is incorporated in the `available charging power` to set the target operating level for `grid power`. In other words, the system will aim to keep `grid power` at the value set for `residualPower`.|Power vehicle charging should leave for grid or battery|Power vehicle charging may draw from the grid or battery|
|[`site.prioritySoc`](../reference/configuration/site/#prioritysoc) (%)|If the `battery state-of-charge` is above this limit, vehicle charging will be prioritized.|-|-|
|[`loadpoint.priority`](../reference/configuration/loadpoints/#priority) (Int)|Defines priorities between multiple chargers. The higher the number, the higher the priority.|-|-|
|[`site.maxGridSupplyWhileBatteryCharging`](../reference/configuration/site/#maxgridsupplywhilebatterycharging)&nbsp;(W)|Deals with situations where vehicle charging is prioritized over battery charging but measured battery power may not be fully accessible for vehicle charging.<br/><br/>With an inverter with directly connected DC battery, the DC capacity of the panels may exceed the inverter’s AC output capacity, additional surplus can then only be charged into the battery. In this case, evcc would still include the battery power into available charging power, but the power then has to be drawn from the grid because of the bottle neck of the inverter’s AC output. `maxGridSupplyWhileBatteryCharging` was introduced to help with that: if consumed `grid power` exceeds that limit, then `battery power` will be excluded from `available charging power`, even if `battery state-of-charge` is higher than `prioritySoc`.|-|-|

Next, we'll learn how `available charging power` is calculated under different circumstances.

## Calculation of available charging power

`Available charging power` is a positive value indicating how much power in Watt is available for charging the vehicle connected to a `loadpoint`.

The following diagrams shows how the variables listed above are factored into the calculation of `available charging power`. The formulas are not necessarily those programmed into evcc, but rather provide a mathematical model that helps understanding how the software works.

### Based on grid power

Without a battery, the following formula shows how 'available charging power' is calculated with data from a grid meter:

<Drawio content={diagrams} zoom={0.7} pageId={"acp"} toolbar={"lightbox"} /><br/>

### With a battery

If you have a battery for which you can measure `battery power` and `battery state-of-charge`, then depending on the charge level and configured `prioritySoc` the `battery power` will be included in the `available charging power`. That increases the power going to the vehicle, practically forcing the battery to reduce or stop charging.

Note that in combination with battery it is possible but not recommended to set a negative `residualPower`. With a battery, a negative `residualPower` will lead to power be drawn from the battery for vehicle charging, regardless of configured priorities.

<Drawio content={diagrams} zoom={0.7} pageId={"acp-battery"} toolbar={"lightbox"} /><br/>

In the next chapter we'll have a look at how `minimum charging power` and `maximum charging power` are calculated.

### With a battery and maxGridSupplyWhileBatteryCharging

As outlined above, `maxGridSupplyWhileBatteryCharging` introduces another condition for including battery power into the `available charging power`, to deal with situations where power that is fed into the battery cannot be diverted to vehicle charging due to limits in the interface between the battery inverter and rest of the system.

If `maxGridSupplyWhileBatteryCharging` is set, then `battery power` is included only if both `grid power` is below that set limit and `battery state-of-charge` is higher than `prioritySoc`.

<Drawio content={diagrams} zoom={0.7} pageId={"acp-battery-maxsupply"} toolbar={"lightbox"} /><br/>

### Based on PV power

If you have [no grid meter](./meters#i-have-a-solar-installation-but-i-dont-have-a-readable-grid-connection-meter---can-i-still-use-evcc), you can use PV power instead. House consumption is not known in this case, but as described above, you can use a positive value for `residualPower` to assume a constant for house consumption. If no grid meter is configured, the system will replace `charging power` and `grid power` with `PV power`:

<Drawio content={diagrams} zoom={0.7} pageId={"acp-pv"} toolbar={"lightbox"} /><br/>
24 changes: 24 additions & 0 deletions docs/inner-workings/charging-modes.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
sidebar_position: 2
---

# Charging modes

---
**What you'll learn**: what's the purpose of the the three charging modes `Fast`, `Solar` and `Min+Solar` as well as charging plans. A basic introduction can also be found in the [charging guide](/docs/guides/charging).

---

With evcc you can use one of the following three modes to charge your vehicle:

- `Fast` mode enables charging with the highest amount of power possible, without consideration of PV surplus. This mode basically replicates what the typical charger is already able to do on its own.

- `Solar` mode is where the magic happens: based on available surplus, evcc starts and stops the charging process and adapts the amount of power. If you have a battery you can set priorities between battery and EV charging.

- `Min+Solar` mode charges continuously with the minimum power needed by the charger, regardless of surplus. If more surplus is available, evcc will adapt the amount of power.

Charging plans are an additional option to control charging. Departure plans set a time when a certain charge limit shall be reached, the vehicle is charged in `Solar` mode with surplus and at the latest possible time `Fast` mode is activated to meet the targeted charge limit. With arrival plans the vehicle will be charged in `Fast` mode to a certain charge limit, and after that with surplus in `Solar` mode.

The following screenshot shows the selection of the charging modes:

![charging modes](img/screenshot-modes.png)
7 changes: 7 additions & 0 deletions docs/inner-workings/conclusion.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 9
---

# Conclusion

We hope this section of the documentation succeeded in providing you a comprehensible overview of the intricate but powerful charging modes of evcc. While the dependencies between the different settings are not always easy to understand, they allow the system to adapt to many situations - the right setup is always a balance between many factors, among them: the output of your PV system, the consumption of your house and vehicle, the presence of batteries or other surplus controlled devices and the rates that apply to feeding power into the grid or drawing from it. With evcc you have a powerful tool at hand to accommodate these factors and optimize solar-charging of your vehicle based on your individual needs.
23 changes: 23 additions & 0 deletions docs/inner-workings/config-io.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
sidebar_position: 3
---

import Drawio from '@theme/Drawio'
import diagrams from '!!raw-loader!./img/diagrams.drawio';

# Configuration and interactions

---
**What you'll learn**: what are the inputs and settings that define evcc's control of your vehicle’s charging.

---

Let's start with a diagram showing the settings we'll discuss in the subsequent chapters of this section. As mentioned in the introduction, we will leave aside the details of how devices are integrated with evcc but will focus evcc's control of your vehicle’s charging, especially in the `Solar` and `Min+Solar` modes.

<Drawio content={diagrams} pageId={"er"} toolbar={"lightbox"}/><br/>

Evcc is just in process of migrating from file-based to user-interface-based configuration. Most parameters still need to be set in `evcc.yaml`, but the battery settings can already be done on the user interface and will be saved in the evcc database.

The next diagram shows evcc's configuration sources, internal computations and interactions with external devices:

<Drawio content={diagrams} pageId={"io"} toolbar={"lightbox"}/><br/>
Loading