Skip to content

Commit 32d3425

Browse files
committed
feat: add energy-based trapezoidal HRV efficiency and fix NTC redundancy labels
1 parent e58ccb1 commit 32d3425

12 files changed

Lines changed: 722 additions & 80 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.9.4] - 2026-05-15
9+
10+
### Added
11+
- **Energiebasierte WRG-Effizienz**: Die Berechnung der Wärmerückgewinnung nutzt nun eine numerische Trapez-Integration über den gesamten Luftzyklus (gemäß DIN EN 13141-8). Dies löst das Problem mathematisch instabiler "Live"-Werte bei geringen Temperaturdifferenzen in der Übergangszeit und liefert ein echtes physikalisches Abbild der zurückgewonnenen Energie.
12+
13+
### Fixed
14+
- **NTC Sensor-Dokumentation**: Korrektur der vertauschten Sensor-Beschreibungen in den Readme-Dateien (Indoor/Outdoor Mapping) zur Vermeidung von Missverständnissen bei der Verkabelung.
15+
- **C++ Namespace Konflikt**: Behebung des Fehlers `ventosync was not declared in this scope` beim Firmware-Build. Die globale Instanziierung des HRV-Rechners über ESPHomes `globals` wurde auf ein natives und threadsicheres C++ Singleton-Pattern (`get_calculator()`) umgestellt.
16+
817
## [0.9.1] - 2026-05-14
918

1019
### Fixed

Readme.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -731,44 +731,40 @@ Exterior → Ceramic heat exchanger → Interior (pre-heated)
731731
### NTC Sensors (Temperature Stabilization)
732732

733733
The NTC sensors measure the temperature at the ceramic heat exchanger inside and outside (`temp_zuluft` and `temp_abluft`). Since the fan direction in heat recovery mode changes cyclically (e.g., every 70 seconds), the sensors require a certain amount of time due to their thermal mass to adapt to the new air temperature. To make the measurement as accurate as possible, very small NTC sensors are used with the lowest possible mass and high accuracy. This makes the adaptation to the changing temperature, depending on the ventilation direction, as fast and precise as possible.
734-
To avoid incorrect intermediate values in Home Assistant, both sensors use **intelligent temperature stabilization**:
734+
To avoid incorrect intermediate values in Home Assistant and to accurately capture the true thermal limits, both sensors use **intelligent, season-aware temperature stabilization**:
735735

736-
- After a change of direction (Push/Pull), measurement value transmission is paused for **40% of the cycle duration (min. 15s)** (which corresponds to approx. 25-30s).
737-
- Then the system collects measured values in a **30-second sliding window**.
738-
- Only when the fluctuation within this window falls to a realistic **0.3 °C** or less is the value considered stable and updated.
736+
- After a change of direction (Push/Pull), measurement value transmission is paused for **40% of the cycle duration (min. 15s)**.
737+
- Then the system collects measured values in a **sliding window (size 3)**.
738+
- **Dynamic Min/Max Selection:** Instead of simple averaging, the system dynamically selects the `min` or `max` value from the window to compensate for thermal inertia of the housing.
739+
- **Winter/Transition:** The outdoor sensor takes the minimum value (true cold outside air), and the indoor sensor takes the maximum value (true warm room air).
740+
- **Summer Cooling:** When the outside air is hotter than the inside air, the logic automatically reverses (outdoor takes max, indoor takes min) to avoid false readings from the cooler/warmer housing.
739741

740-
*Note on redundancy:* `temp_abluft` provides the actual outside temperature when the airflow is directed inward. `temp_zuluft` provides the room temperature when the airflow is directed outward and serves as redundancy for the more precise SCD41 sensor.
742+
*Note on redundancy:* `temp_zuluft` (Outdoor NTC) provides the actual outside temperature when the airflow is directed inward. `temp_abluft` (Indoor NTC) provides the room temperature when the airflow is directed outward and serves as redundancy for the more precise SCD41 sensor.
741743

742744
Specifically, the following sensor is used:
743745

744746
| Manufacturer | Part Number | Source | Accuracy | Data Sheet |
745747
| :--- | :--- | :--- | :--- | :--- |
746748
| **VARIOHM** | `ENTC-EI-10K9777-02` | [Reichelt Elektronik](https://www.reichelt.de/de/de/shop/produkt/thermistor_NTC_-40_bis_125_c-350474) | ± 0.2 °C | [PDF](EasyEDA-Pro/components/NTC_ENTC_EI-10K9777-02.pdf) |
747749

748-
### Efficiency Calculation
750+
### Efficiency Calculation (Energy-Based)
749751

750-
At the end of the supply air phase, the heat recovery is calculated:
752+
The true heat recovery efficiency of a ceramic regenerator over a complete cycle is energy-based, not based on instantaneous temperatures (according to DIN EN 13141-8).
753+
754+
At the end of the supply air phase, the system calculates the efficiency using **numerical trapezoidal integration** over the entire phase duration:
751755

752756
$$
753-
ext{Efficiency} = \frac{T_{\text{Supply}} - T_{\text{Outside}}}{T_{\text{Room}} - T_{\text{Outside}}} \times 100\%
757+
\eta_{WRG} = \frac{\int (\text{T}_{Supply} - \text{T}_{Outside}) dt}{\int (\text{T}_{Room} - \text{T}_{Outside}) dt}
754758
$$
755759

756-
**Example calculation:**
757-
758-
- Room temperature: 21°C
759-
- Outside temperature: 5°C
760-
- Supply temperature: 16°C
761-
762-
$$
763-
ext{Efficiency} = \frac{16°C - 5°C}{21°C - 5°C} \times 100\% = \frac{11°C}{16°C} \times 100\% = 68.75\%
764-
$$,
765-
0
760+
**Why this is mathematically superior:**
761+
If the efficiency was calculated as a simple average of instantaneous point-in-time efficiencies, it would become highly inaccurate and numerically unstable (exploding values) when the temperature difference ($\Delta T$) is very small (e.g., during the transition seasons). By integrating the temperature deltas over time, the calculation remains physically accurate, stable, and provides a true representation of the thermal energy recovered during the cycle.
766762

767763
**Interpretation:**
768764

769765
- **> 70%:** Excellent heat recovery
770766
- **50-70%:** Good heat recovery
771-
- **< 50%:** Ceramic too cold or cycle too short
767+
- **< 50%:** Ceramic too cold, cycle too short, or temperature difference too small
772768

773769
### Optimizing Efficiency
774770

Readme_de.md

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -701,43 +701,40 @@ Außen → Keramikspeicher → Innenraum (vorgewärmt)
701701
### NTC Sensoren (Temperatur-Stabilisierung)
702702

703703
Die NTC Sensoren messen die Temperatur am Keramikspeicher innen und außen (`temp_zuluft` und `temp_abluft`). Da die Lüfterrichtung im Wärmerückgewinnungs-Modus zyklisch (z.B. alle 70 Sekunden) wechselt, benötigen die Sensoren aufgrund ihrer thermischen Masse eine gewisse Zeit, um sich an die neue Lufttemperatur anzupassen. Um die Messung möglichst genau zu machen, werden sehr kleine NTC Sensoren genutzt, mit möglichst geringer Masse und hoher Genauigkeit. Dadurch wird die Anpassung an die wechselnde Temperatur je nach Lüftungsrichtung möglichst schnell und präzise.
704-
Um fehlerhafte Zwischenwerte in Home Assistant zu vermeiden, nutzen beide Sensoren eine **intelligente Temperatur-Stabilisierung**:
704+
Um fehlerhafte Zwischenwerte in Home Assistant zu vermeiden und die wahren thermischen Grenzwerte exakt zu erfassen, nutzen beide Sensoren eine **intelligente, saisonabhängige Temperatur-Stabilisierung**:
705705

706-
- Nach einem Richtungswechsel (Push/Pull) wird die Messwertübertragung für **40% der Zyklusdauer (min. 15s)** pausiert (was ca. 25-30s entspricht).
707-
- Danach sammelt das System Messwerte in einem **30-Sekunden Sliding-Window**.
708-
- Erst wenn die Schwankung innerhalb dieses Fensters auf realistische **0,3 °C** oder weniger fällt, gilt der Wert als stabil und wird aktualisiert.
706+
- Nach einem Richtungswechsel (Push/Pull) wird die Messwertübertragung für **40% der Zyklusdauer (min. 15s)** pausiert.
707+
- Danach sammelt das System Messwerte in einem **Sliding-Window (Größe 3)**.
708+
- **Dynamische Min/Max-Auswahl:** Anstelle einer simplen Durchschnittsbildung wählt das System dynamisch den `min` oder `max` Wert aus dem Fenster, um die thermische Trägheit des Gehäuses zu kompensieren.
709+
- **Winter/Übergangszeit:** Der Außensensor nimmt den Minimalwert (wahre kalte Außenluft), der Innensensor den Maximalwert (wahre warme Raumluft).
710+
- **Sommer-Kühlung:** Wenn die Außenluft heißer ist als die Innenluft, kehrt sich die Logik automatisch um (Außen nimmt Max, Innen nimmt Min), um verfälschte Werte durch das kühlere/wärmere Gehäuse zu vermeiden.
709711

710-
*Hinweis zur Redundanz:* `temp_abluft` liefert bei nach innen gerichtetem Luftstrom die tatsächliche Außentemperatur. `temp_zuluft` liefert bei nach außen gerichtetem Luftstrom die Raumtemperatur und dient als Redundanz zum präziseren SCD41 Sensor.
712+
*Hinweis zur Redundanz:* `temp_zuluft` (Außen-NTC) liefert bei nach innen gerichtetem Luftstrom die tatsächliche Außentemperatur. `temp_abluft` (Innen-NTC) liefert bei nach außen gerichtetem Luftstrom die Raumtemperatur und dient als Redundanz zum präziseren SCD41 Sensor.
711713

712714
Konkret wird der folgende Sensor verwendet:
713715

714716
| Hersteller | Artikelnummer | Bezugsquelle | Genauigkeit | Datenblatt |
715717
| :--- | :--- | :--- | :--- | :--- |
716718
| **VARIOHM** | `ENTC-EI-10K9777-02` | [Reichelt Elektronik](https://www.reichelt.de/de/de/shop/produkt/thermistor_ntc_-40_bis_125_c-350474) | ± 0,2 °C | [PDF](EasyEDA-Pro/components/NTC_ENTC_EI-10K9777-02.pdf) |
717719

718-
### Effizienzberechnung
720+
### Effizienzberechnung (Energiebasiert)
719721

720-
Am Ende der Zuluft-Phase wird die Wärmerückgewinnung berechnet:
722+
Die wahre Wärmerückgewinnungseffizienz eines Keramikspeichers über einen vollständigen Zyklus ist energiebasiert, nicht basierend auf punktuellen Temperaturen (gemäß DIN EN 13141-8).
721723

722-
$$
723-
\text{Effizienz} = \frac{T_{\text{Zuluft}} - T_{\text{Außen}}}{T_{\text{Raum}} - T_{\text{Außen}}} \times 100\%
724-
$$
725-
726-
**Beispielrechnung:**
727-
728-
- Raumtemperatur: 21°C
729-
- Außentemperatur: 5°C
730-
- Zulufttemperatur: 16°C
724+
Am Ende der Zuluft-Phase berechnet das System die Effizienz mittels **numerischer Trapez-Integration** über die gesamte Phasendauer:
731725

732726
$$
733-
\text{Effizienz} = \frac{16°C - 5°C}{21°C - 5°C} \times 100\% = \frac{11°C}{16°C} \times 100\% = 68.75\%
727+
\eta_{WRG} = \frac{\int (\text{T}_{Zuluft} - \text{T}_{Außen}) dt}{\int (\text{T}_{Raum} - \text{T}_{Außen}) dt}
734728
$$
735729

730+
**Warum das mathematisch überlegen ist:**
731+
Würde man die Effizienz als simplen Durchschnitt der momentanen Effizienzwerte berechnen, würde der Wert bei sehr kleinen Temperaturunterschieden ($\Delta T$) extrem ungenau und numerisch instabil werden (explodierende Werte) – etwa in der Übergangszeit. Durch die Integration der Temperaturdifferenzen über die Zeit bleibt die Berechnung physikalisch korrekt, stabil und liefert ein echtes Abbild der während des Zyklus zurückgewonnenen Wärmeenergie.
732+
736733
**Interpretation:**
737734

738735
- **> 70%:** Ausgezeichnete Wärmerückgewinnung
739736
- **50-70%:** Gute Wärmerückgewinnung
740-
- **< 50%:** Keramik zu kalt oder Zyklus zu kurz
737+
- **< 50%:** Keramik zu kalt, Zyklus zu kurz oder Temperaturdifferenz zu gering
741738

742739
### Optimierung der Effizienz
743740

0 commit comments

Comments
 (0)