open-fdd 0.1.7__tar.gz → 0.1.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. open_fdd-0.1.9/PKG-INFO +137 -0
  2. open_fdd-0.1.9/README.md +110 -0
  3. open_fdd-0.1.9/open_fdd/air_handling_unit/faults/__init__.py +30 -0
  4. open_fdd-0.1.9/open_fdd/air_handling_unit/faults/fault_condition_eight.py +135 -0
  5. open_fdd-0.1.9/open_fdd/air_handling_unit/faults/fault_condition_eleven.py +108 -0
  6. open_fdd-0.1.9/open_fdd/air_handling_unit/faults/fault_condition_fifteen.py +189 -0
  7. open_fdd-0.1.9/open_fdd/air_handling_unit/faults/fault_condition_five.py +126 -0
  8. open_fdd-0.1.9/open_fdd/air_handling_unit/faults/fault_condition_four.py +128 -0
  9. open_fdd-0.1.9/open_fdd/air_handling_unit/faults/fault_condition_fourteen.py +177 -0
  10. open_fdd-0.1.9/open_fdd/air_handling_unit/faults/fault_condition_nine.py +140 -0
  11. open_fdd-0.1.9/open_fdd/air_handling_unit/faults/fault_condition_one.py +113 -0
  12. open_fdd-0.1.9/open_fdd/air_handling_unit/faults/fault_condition_seven.py +106 -0
  13. open_fdd-0.1.9/open_fdd/air_handling_unit/faults/fault_condition_six.py +228 -0
  14. open_fdd-0.1.9/open_fdd/air_handling_unit/faults/fault_condition_sixteen.py +196 -0
  15. open_fdd-0.1.9/open_fdd/air_handling_unit/faults/fault_condition_ten.py +119 -0
  16. open_fdd-0.1.9/open_fdd/air_handling_unit/faults/fault_condition_thirteen.py +139 -0
  17. open_fdd-0.1.9/open_fdd/air_handling_unit/faults/fault_condition_three.py +112 -0
  18. open_fdd-0.1.9/open_fdd/air_handling_unit/faults/fault_condition_twelve.py +164 -0
  19. open_fdd-0.1.9/open_fdd/air_handling_unit/faults/fault_condition_two.py +112 -0
  20. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd/air_handling_unit/faults/helper_utils.py +29 -19
  21. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd/air_handling_unit/reports/__init__.py +6 -4
  22. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd/air_handling_unit/reports/fault_report.py +3 -2
  23. open_fdd-0.1.9/open_fdd/chiller_plant/faults/__init__.py +7 -0
  24. open_fdd-0.1.9/open_fdd/chiller_plant/faults/fault_condition_one.py +113 -0
  25. open_fdd-0.1.9/open_fdd/chiller_plant/faults/fault_condition_two.py +100 -0
  26. open_fdd-0.1.9/open_fdd/tests/ahu/__init__.py +0 -0
  27. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd/tests/ahu/test_ahu_fc1.py +2 -2
  28. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd/tests/ahu/test_ahu_fc10.py +1 -0
  29. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd/tests/ahu/test_ahu_fc11.py +24 -33
  30. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd/tests/ahu/test_ahu_fc12.py +56 -18
  31. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd/tests/ahu/test_ahu_fc13.py +15 -8
  32. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd/tests/ahu/test_ahu_fc14.py +11 -3
  33. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd/tests/ahu/test_ahu_fc15.py +15 -4
  34. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd/tests/ahu/test_ahu_fc16.py +15 -6
  35. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd/tests/ahu/test_ahu_fc2.py +1 -0
  36. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd/tests/ahu/test_ahu_fc3.py +1 -0
  37. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd/tests/ahu/test_ahu_fc4.py +3 -1
  38. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd/tests/ahu/test_ahu_fc5.py +1 -0
  39. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd/tests/ahu/test_ahu_fc6.py +1 -0
  40. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd/tests/ahu/test_ahu_fc7.py +1 -0
  41. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd/tests/ahu/test_ahu_fc8.py +1 -0
  42. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd/tests/ahu/test_ahu_fc9.py +1 -0
  43. open_fdd-0.1.9/open_fdd/tests/chiller/__init__.py +0 -0
  44. open_fdd-0.1.9/open_fdd/tests/chiller/test_chiller_fc1.py +122 -0
  45. open_fdd-0.1.9/open_fdd/tests/chiller/test_chiller_fc2.py +95 -0
  46. open_fdd-0.1.9/open_fdd.egg-info/PKG-INFO +137 -0
  47. open_fdd-0.1.9/open_fdd.egg-info/SOURCES.txt +56 -0
  48. {open_fdd-0.1.7 → open_fdd-0.1.9}/setup.py +3 -3
  49. open_fdd-0.1.7/PKG-INFO +0 -95
  50. open_fdd-0.1.7/README.md +0 -78
  51. open_fdd-0.1.7/open_fdd/air_handling_unit/faults/__init__.py +0 -2284
  52. open_fdd-0.1.7/open_fdd/air_handling_unit/faults/fault_condition.py +0 -69
  53. open_fdd-0.1.7/open_fdd/air_handling_unit/faults/shared_utils.py +0 -90
  54. open_fdd-0.1.7/open_fdd/air_handling_unit/images/example1.jpg +0 -0
  55. open_fdd-0.1.7/open_fdd/air_handling_unit/images/example2.jpg +0 -0
  56. open_fdd-0.1.7/open_fdd/air_handling_unit/images/fc10_definition.png +0 -0
  57. open_fdd-0.1.7/open_fdd/air_handling_unit/images/fc11_definition.png +0 -0
  58. open_fdd-0.1.7/open_fdd/air_handling_unit/images/fc12_definition.png +0 -0
  59. open_fdd-0.1.7/open_fdd/air_handling_unit/images/fc13_definition.png +0 -0
  60. open_fdd-0.1.7/open_fdd/air_handling_unit/images/fc1_definition.png +0 -0
  61. open_fdd-0.1.7/open_fdd/air_handling_unit/images/fc1_report_screenshot_all.png +0 -0
  62. open_fdd-0.1.7/open_fdd/air_handling_unit/images/fc2_definition.png +0 -0
  63. open_fdd-0.1.7/open_fdd/air_handling_unit/images/fc3_definition.png +0 -0
  64. open_fdd-0.1.7/open_fdd/air_handling_unit/images/fc4_definition.png +0 -0
  65. open_fdd-0.1.7/open_fdd/air_handling_unit/images/fc5_definition.png +0 -0
  66. open_fdd-0.1.7/open_fdd/air_handling_unit/images/fc6_definition.png +0 -0
  67. open_fdd-0.1.7/open_fdd/air_handling_unit/images/fc7_definition.png +0 -0
  68. open_fdd-0.1.7/open_fdd/air_handling_unit/images/fc8_definition.png +0 -0
  69. open_fdd-0.1.7/open_fdd/air_handling_unit/images/fc9_definition.png +0 -0
  70. open_fdd-0.1.7/open_fdd/air_handling_unit/images/latex_generator.py +0 -208
  71. open_fdd-0.1.7/open_fdd/air_handling_unit/images/params.docx +0 -0
  72. open_fdd-0.1.7/open_fdd/air_handling_unit/images/params.pdf +0 -0
  73. open_fdd-0.1.7/open_fdd/air_handling_unit/images/plot_for_repo.png +0 -0
  74. open_fdd-0.1.7/open_fdd.egg-info/PKG-INFO +0 -95
  75. open_fdd-0.1.7/open_fdd.egg-info/SOURCES.txt +0 -55
  76. {open_fdd-0.1.7 → open_fdd-0.1.9}/LICENSE +0 -0
  77. {open_fdd-0.1.7 → open_fdd-0.1.9}/MANIFEST.in +0 -0
  78. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd/__init__.py +0 -0
  79. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd/air_handling_unit/__init__.py +0 -0
  80. {open_fdd-0.1.7/open_fdd/tests → open_fdd-0.1.9/open_fdd/chiller_plant}/__init__.py +0 -0
  81. {open_fdd-0.1.7/open_fdd/tests/ahu → open_fdd-0.1.9/open_fdd/tests}/__init__.py +0 -0
  82. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd.egg-info/dependency_links.txt +0 -0
  83. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd.egg-info/requires.txt +0 -0
  84. {open_fdd-0.1.7 → open_fdd-0.1.9}/open_fdd.egg-info/top_level.txt +0 -0
  85. {open_fdd-0.1.7 → open_fdd-0.1.9}/setup.cfg +0 -0
@@ -0,0 +1,137 @@
1
+ Metadata-Version: 2.4
2
+ Name: open_fdd
3
+ Version: 0.1.9
4
+ Summary: A package for fault detection and diagnosis in HVAC systems
5
+ Home-page: https://bbartling.github.io/open-fdd/
6
+ Author: Ben Bartling
7
+ Author-email: ben.bartling@gmail.com
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.6
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: pandas
15
+ Requires-Dist: matplotlib
16
+ Requires-Dist: pytest
17
+ Dynamic: author
18
+ Dynamic: author-email
19
+ Dynamic: classifier
20
+ Dynamic: description
21
+ Dynamic: description-content-type
22
+ Dynamic: home-page
23
+ Dynamic: license-file
24
+ Dynamic: requires-dist
25
+ Dynamic: requires-python
26
+ Dynamic: summary
27
+
28
+ # open-fdd
29
+
30
+ ![CI](https://github.com/bbartling/open-fdd/actions/workflows/ci.yml/badge.svg?branch=master)
31
+ ![MIT License](https://img.shields.io/badge/license-MIT-green.svg)
32
+ ![Black](https://img.shields.io/badge/code%20style-black-000000.svg)
33
+ ![PyPI](https://img.shields.io/pypi/v/open-fdd?color=blue&label=pypi%20version)
34
+
35
+ ![Fault Detection Visualization](https://raw.githubusercontent.com/bbartling/open-fdd/master/open_fdd/air_handling_unit/images/plot_for_repo.png)
36
+
37
+ ## 🔥 What is open-fdd?
38
+ **open-fdd** is an **open-source Fault Detection and Diagnostics (FDD) tool** designed for analysts and engineers using local toolsets like Jupyter notebooks. It is not necessarily an IoT tool for **Grafana**, which an MSI (Master Systems Integrator) might use, though it could be adapted for that purpose. Instead, it is tailored for **individual engineers analyzing historical HVAC system data** using the **Pandas computing library**. While it could potentially be integrated with a database, doing so may require additional effort. It leverages **ASHRAE** and **NIST**-inspired fault equations. Built on Python and **Pandas**, this library enables efficient detection of operational issues in HVAC systems with:
39
+
40
+ This version improves clarity and flow while keeping it professional and readable. 🚀 Let me know if you want any more refinements!
41
+
42
+ ✅ **Pre-built fault equations** for detecting HVAC anomalies
43
+ ✅ **Seamless Pandas integration** for time-series analysis
44
+ ✅ **Extensible architecture** for custom fault conditions
45
+ ✅ **Open-source & community-driven** development
46
+
47
+
48
+ 📖 **See Online Documentation:**
49
+ [📚 Open-FDD Docs](https://bbartling.github.io/open-fdd/)
50
+
51
+ ---
52
+
53
+ ## 🚀 Getting Started
54
+ ### Installation
55
+ Install `open-fdd` from PyPI with:
56
+ ```bash
57
+ pip install open-fdd
58
+ ```
59
+
60
+ ### Quick Example
61
+ ```python
62
+ import pandas as pd
63
+ from open_fdd.air_handling_unit.fault_condition_one import FaultConditionOne
64
+
65
+ # Sample data
66
+ data = {
67
+ "timestamp": pd.date_range(start="2023-01-01", periods=10, freq="15T"),
68
+ "supply_air_temp": [54, 55, 56, 57, 58, 59, 60, 61, 62, 63],
69
+ "return_air_temp": [70, 70, 70, 70, 70, 70, 70, 70, 70, 70],
70
+ }
71
+ df = pd.DataFrame(data)
72
+
73
+ # Run fault detection
74
+ fault_checker = FaultConditionOne(df)
75
+ df_faults = fault_checker.process()
76
+ print(df_faults)
77
+ ```
78
+
79
+ ---
80
+
81
+ ## 📌 Project Goals
82
+ `open-fdd` aims to provide a full-featured **Fault Detection & Diagnostics (FDD) platform** with:
83
+
84
+ ### ✅ Completed Features
85
+ - [x] Air handling unit (AHU) fault conditions & reports (aligned with ASHRAE/NIST)
86
+ - [x] PyPI distribution for easy installation
87
+
88
+ ### 🔄 In Progress
89
+ - [ ] Jupyter notebook tutorials showcasing AHU FDD examples + BRICK metadata integration
90
+ - [ ] Expansion to **central plant** fault conditions (chillers, boilers, pumps)
91
+ - [ ] Jupyter notebook tutorials showcasing AHU FDD examples + BRICK metadata integration
92
+
93
+ ### ⏳ Upcoming
94
+ - [ ] **Energy Efficiency** fault detection & reporting
95
+ - [ ] **Metering** fault analytics & data modeling
96
+ - [ ] **SQL Integration** for storing results & visualizing in Grafana
97
+ - [ ] Dedicated documentation site (`github.io` or ReadTheDocs)
98
+
99
+ ---
100
+
101
+ ## 🤝 How to Contribute
102
+ We welcome contributions from the community! To get started:
103
+
104
+ 1. **Clone the repository:**
105
+ ```bash
106
+ git clone https://github.com/bbartling/open-fdd.git && cd open-fdd
107
+ ```
108
+ 2. **Install dependencies:**
109
+ ```bash
110
+ py -3.12 -m pip install -r requirements.txt
111
+ ```
112
+ 3. **Run tests:**
113
+ ```bash
114
+ py -3.12 -m pytest
115
+ ```
116
+ 4. **Format with Black:**
117
+ ```bash
118
+ py -3.12 -m black .
119
+ ```
120
+ 5. **Submit a Pull Request (PR)**
121
+
122
+ ---
123
+
124
+ ## 📜 License
125
+ `open-fdd` is released under the **MIT License**, ensuring it remains free and accessible for all.
126
+
127
+ ```
128
+
129
+ 【MIT License】
130
+
131
+ Copyright 2025 Ben Bartling
132
+
133
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
134
+
135
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
136
+
137
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,110 @@
1
+ # open-fdd
2
+
3
+ ![CI](https://github.com/bbartling/open-fdd/actions/workflows/ci.yml/badge.svg?branch=master)
4
+ ![MIT License](https://img.shields.io/badge/license-MIT-green.svg)
5
+ ![Black](https://img.shields.io/badge/code%20style-black-000000.svg)
6
+ ![PyPI](https://img.shields.io/pypi/v/open-fdd?color=blue&label=pypi%20version)
7
+
8
+ ![Fault Detection Visualization](https://raw.githubusercontent.com/bbartling/open-fdd/master/open_fdd/air_handling_unit/images/plot_for_repo.png)
9
+
10
+ ## 🔥 What is open-fdd?
11
+ **open-fdd** is an **open-source Fault Detection and Diagnostics (FDD) tool** designed for analysts and engineers using local toolsets like Jupyter notebooks. It is not necessarily an IoT tool for **Grafana**, which an MSI (Master Systems Integrator) might use, though it could be adapted for that purpose. Instead, it is tailored for **individual engineers analyzing historical HVAC system data** using the **Pandas computing library**. While it could potentially be integrated with a database, doing so may require additional effort. It leverages **ASHRAE** and **NIST**-inspired fault equations. Built on Python and **Pandas**, this library enables efficient detection of operational issues in HVAC systems with:
12
+
13
+ This version improves clarity and flow while keeping it professional and readable. 🚀 Let me know if you want any more refinements!
14
+
15
+ ✅ **Pre-built fault equations** for detecting HVAC anomalies
16
+ ✅ **Seamless Pandas integration** for time-series analysis
17
+ ✅ **Extensible architecture** for custom fault conditions
18
+ ✅ **Open-source & community-driven** development
19
+
20
+
21
+ 📖 **See Online Documentation:**
22
+ [📚 Open-FDD Docs](https://bbartling.github.io/open-fdd/)
23
+
24
+ ---
25
+
26
+ ## 🚀 Getting Started
27
+ ### Installation
28
+ Install `open-fdd` from PyPI with:
29
+ ```bash
30
+ pip install open-fdd
31
+ ```
32
+
33
+ ### Quick Example
34
+ ```python
35
+ import pandas as pd
36
+ from open_fdd.air_handling_unit.fault_condition_one import FaultConditionOne
37
+
38
+ # Sample data
39
+ data = {
40
+ "timestamp": pd.date_range(start="2023-01-01", periods=10, freq="15T"),
41
+ "supply_air_temp": [54, 55, 56, 57, 58, 59, 60, 61, 62, 63],
42
+ "return_air_temp": [70, 70, 70, 70, 70, 70, 70, 70, 70, 70],
43
+ }
44
+ df = pd.DataFrame(data)
45
+
46
+ # Run fault detection
47
+ fault_checker = FaultConditionOne(df)
48
+ df_faults = fault_checker.process()
49
+ print(df_faults)
50
+ ```
51
+
52
+ ---
53
+
54
+ ## 📌 Project Goals
55
+ `open-fdd` aims to provide a full-featured **Fault Detection & Diagnostics (FDD) platform** with:
56
+
57
+ ### ✅ Completed Features
58
+ - [x] Air handling unit (AHU) fault conditions & reports (aligned with ASHRAE/NIST)
59
+ - [x] PyPI distribution for easy installation
60
+
61
+ ### 🔄 In Progress
62
+ - [ ] Jupyter notebook tutorials showcasing AHU FDD examples + BRICK metadata integration
63
+ - [ ] Expansion to **central plant** fault conditions (chillers, boilers, pumps)
64
+ - [ ] Jupyter notebook tutorials showcasing AHU FDD examples + BRICK metadata integration
65
+
66
+ ### ⏳ Upcoming
67
+ - [ ] **Energy Efficiency** fault detection & reporting
68
+ - [ ] **Metering** fault analytics & data modeling
69
+ - [ ] **SQL Integration** for storing results & visualizing in Grafana
70
+ - [ ] Dedicated documentation site (`github.io` or ReadTheDocs)
71
+
72
+ ---
73
+
74
+ ## 🤝 How to Contribute
75
+ We welcome contributions from the community! To get started:
76
+
77
+ 1. **Clone the repository:**
78
+ ```bash
79
+ git clone https://github.com/bbartling/open-fdd.git && cd open-fdd
80
+ ```
81
+ 2. **Install dependencies:**
82
+ ```bash
83
+ py -3.12 -m pip install -r requirements.txt
84
+ ```
85
+ 3. **Run tests:**
86
+ ```bash
87
+ py -3.12 -m pytest
88
+ ```
89
+ 4. **Format with Black:**
90
+ ```bash
91
+ py -3.12 -m black .
92
+ ```
93
+ 5. **Submit a Pull Request (PR)**
94
+
95
+ ---
96
+
97
+ ## 📜 License
98
+ `open-fdd` is released under the **MIT License**, ensuring it remains free and accessible for all.
99
+
100
+ ```
101
+
102
+ 【MIT License】
103
+
104
+ Copyright 2025 Ben Bartling
105
+
106
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
107
+
108
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
109
+
110
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,30 @@
1
+ """Base module for all fault conditions in the air handling unit (AHU) module."""
2
+
3
+ from open_fdd.air_handling_unit.faults.fault_condition_eight import FaultConditionEight
4
+ from open_fdd.air_handling_unit.faults.fault_condition_eleven import (
5
+ FaultConditionEleven,
6
+ )
7
+ from open_fdd.air_handling_unit.faults.fault_condition_fifteen import (
8
+ FaultConditionFifteen,
9
+ )
10
+ from open_fdd.air_handling_unit.faults.fault_condition_five import FaultConditionFive
11
+ from open_fdd.air_handling_unit.faults.fault_condition_four import FaultConditionFour
12
+ from open_fdd.air_handling_unit.faults.fault_condition_fourteen import (
13
+ FaultConditionFourteen,
14
+ )
15
+ from open_fdd.air_handling_unit.faults.fault_condition_nine import FaultConditionNine
16
+ from open_fdd.air_handling_unit.faults.fault_condition_one import FaultConditionOne
17
+ from open_fdd.air_handling_unit.faults.fault_condition_seven import FaultConditionSeven
18
+ from open_fdd.air_handling_unit.faults.fault_condition_six import FaultConditionSix
19
+ from open_fdd.air_handling_unit.faults.fault_condition_sixteen import (
20
+ FaultConditionSixteen,
21
+ )
22
+ from open_fdd.air_handling_unit.faults.fault_condition_ten import FaultConditionTen
23
+ from open_fdd.air_handling_unit.faults.fault_condition_thirteen import (
24
+ FaultConditionThirteen,
25
+ )
26
+ from open_fdd.air_handling_unit.faults.fault_condition_three import FaultConditionThree
27
+ from open_fdd.air_handling_unit.faults.fault_condition_twelve import (
28
+ FaultConditionTwelve,
29
+ )
30
+ from open_fdd.air_handling_unit.faults.fault_condition_two import FaultConditionTwo
@@ -0,0 +1,135 @@
1
+ import numpy as np
2
+ import pandas as pd
3
+
4
+ from open_fdd.core.base_fault import BaseFaultCondition
5
+ from open_fdd.core.components import FaultInputColumn, InstanceAttribute
6
+ from open_fdd.core.exceptions import InvalidParameterError, MissingColumnError
7
+ from open_fdd.core.mixins import FaultConditionMixin
8
+
9
+ INPUT_COLS = [
10
+ FaultInputColumn(
11
+ name="mat_col",
12
+ constant_form="MAT_COL",
13
+ description="Mixed air temperature",
14
+ unit="°F",
15
+ required=True,
16
+ type=float,
17
+ ),
18
+ FaultInputColumn(
19
+ name="sat_col",
20
+ constant_form="SAT_COL",
21
+ description="Supply air temperature",
22
+ unit="°F",
23
+ required=True,
24
+ type=float,
25
+ ),
26
+ FaultInputColumn(
27
+ name="economizer_sig_col",
28
+ constant_form="ECONOMIZER_SIG_COL",
29
+ description="Economizer signal",
30
+ unit="%",
31
+ required=True,
32
+ type=float,
33
+ ),
34
+ FaultInputColumn(
35
+ name="cooling_sig_col",
36
+ constant_form="COOLING_SIG_COL",
37
+ description="Cooling signal",
38
+ unit="%",
39
+ required=True,
40
+ type=float,
41
+ ),
42
+ ]
43
+
44
+ FAULT_PARAMS = [
45
+ InstanceAttribute(
46
+ name="delta_t_supply_fan",
47
+ constant_form="DELTA_T_SUPPLY_FAN",
48
+ description="Temperature rise across supply fan",
49
+ unit="°F",
50
+ type=float,
51
+ ),
52
+ InstanceAttribute(
53
+ name="mix_degf_err_thres",
54
+ constant_form="MIX_DEGF_ERR_THRES",
55
+ description="Mixed air temperature error threshold",
56
+ unit="°F",
57
+ type=float,
58
+ ),
59
+ InstanceAttribute(
60
+ name="supply_degf_err_thres",
61
+ constant_form="SUPPLY_DEGF_ERR_THRES",
62
+ description="Supply air temperature error threshold",
63
+ unit="°F",
64
+ type=float,
65
+ ),
66
+ InstanceAttribute(
67
+ name="ahu_min_oa_dpr",
68
+ constant_form="AHU_MIN_OA_DPR",
69
+ description="Minimum outdoor air damper position",
70
+ unit="fraction",
71
+ type=float,
72
+ ),
73
+ ]
74
+
75
+
76
+ class FaultConditionEight(BaseFaultCondition, FaultConditionMixin):
77
+ """Class provides the definitions for Fault Condition 8.
78
+ Supply air temperature and mix air temperature should
79
+ be approx equal in economizer mode.
80
+
81
+ py -3.12 -m pytest open_fdd/tests/ahu/test_ahu_fc8.py -rP -s
82
+ """
83
+
84
+ input_columns = INPUT_COLS
85
+ fault_params = FAULT_PARAMS
86
+ equation_string = (
87
+ "fc8_flag = 1 if |SAT - MAT - ΔT_fan| > √(εSAT² + εMAT²) "
88
+ "in economizer mode for N consecutive values else 0 \n"
89
+ )
90
+ description_string = (
91
+ "Fault Condition 8: Supply air temperature and mixed air temperature should "
92
+ "be approximately equal in economizer mode \n"
93
+ )
94
+ error_string = "One or more required columns are missing or None \n"
95
+
96
+ @FaultConditionMixin._handle_errors
97
+ def apply(self, df: pd.DataFrame) -> pd.DataFrame:
98
+ """Apply the fault condition to the DataFrame."""
99
+ # Apply common checks
100
+ self._apply_common_checks(df)
101
+
102
+ # Get column values using accessor methods
103
+ mat_col = self.get_input_column("mat_col")
104
+ sat_col = self.get_input_column("sat_col")
105
+ economizer_sig_col = self.get_input_column("economizer_sig_col")
106
+ cooling_sig_col = self.get_input_column("cooling_sig_col")
107
+
108
+ # Get parameter values using accessor methods
109
+ delta_t_supply_fan = self.get_param("delta_t_supply_fan")
110
+ mix_degf_err_thres = self.get_param("mix_degf_err_thres")
111
+ supply_degf_err_thres = self.get_param("supply_degf_err_thres")
112
+ ahu_min_oa_dpr = self.get_param("ahu_min_oa_dpr")
113
+
114
+ # Check analog outputs [data with units of %] are floats only
115
+ columns_to_check = [
116
+ economizer_sig_col,
117
+ cooling_sig_col,
118
+ ]
119
+ self._apply_analog_checks(df, columns_to_check, check_greater_than_one=True)
120
+
121
+ # Perform checks
122
+ sat_fan_mat = abs(df[sat_col] - delta_t_supply_fan - df[mat_col])
123
+ sat_mat_sqrted = np.sqrt(supply_degf_err_thres**2 + mix_degf_err_thres**2)
124
+
125
+ combined_check = (
126
+ (sat_fan_mat > sat_mat_sqrted)
127
+ # Verify AHU is running in OS 3 cooling mode with minimum OA
128
+ & (df[economizer_sig_col] > ahu_min_oa_dpr)
129
+ & (df[cooling_sig_col] < 0.1)
130
+ )
131
+
132
+ # Set fault flag
133
+ self._set_fault_flag(df, combined_check, "fc8_flag")
134
+
135
+ return df
@@ -0,0 +1,108 @@
1
+ import numpy as np
2
+ import pandas as pd
3
+
4
+ from open_fdd.core.base_fault import BaseFaultCondition
5
+ from open_fdd.core.components import FaultInputColumn, InstanceAttribute
6
+ from open_fdd.core.exceptions import InvalidParameterError
7
+ from open_fdd.core.mixins import FaultConditionMixin
8
+
9
+ INPUT_COLS = [
10
+ FaultInputColumn(
11
+ name="oat_col",
12
+ constant_form="OAT_COL",
13
+ description="Outside air temperature",
14
+ unit="°F",
15
+ required=True,
16
+ type=float,
17
+ ),
18
+ FaultInputColumn(
19
+ name="mat_col",
20
+ constant_form="MAT_COL",
21
+ description="Mixed air temperature",
22
+ unit="°F",
23
+ required=True,
24
+ type=float,
25
+ ),
26
+ FaultInputColumn(
27
+ name="economizer_sig_col",
28
+ constant_form="ECONOMIZER_SIG_COL",
29
+ description="Economizer signal",
30
+ unit="%",
31
+ required=True,
32
+ type=float,
33
+ ),
34
+ ]
35
+
36
+ FAULT_PARAMS = [
37
+ InstanceAttribute(
38
+ name="outdoor_degf_err_thres",
39
+ constant_form="OUTDOOR_DEGF_ERR_THRES",
40
+ description="Outdoor air temperature error threshold",
41
+ unit="°F",
42
+ type=float,
43
+ range=(0.0, 10.0),
44
+ ),
45
+ InstanceAttribute(
46
+ name="mix_degf_err_thres",
47
+ constant_form="MIX_DEGF_ERR_THRES",
48
+ description="Mixed air temperature error threshold",
49
+ unit="°F",
50
+ type=float,
51
+ range=(0.0, 10.0),
52
+ ),
53
+ ]
54
+
55
+
56
+ class FaultConditionEleven(BaseFaultCondition, FaultConditionMixin):
57
+ """Class provides the definitions for Fault Condition 11.
58
+ Outdoor air temperature and mix air temperature should
59
+ be approx equal in economizer mode.
60
+
61
+ py -3.12 -m pytest open_fdd/tests/ahu/test_ahu_fc11.py -rP -s
62
+ """
63
+
64
+ input_columns = INPUT_COLS
65
+ fault_params = FAULT_PARAMS
66
+ equation_string = (
67
+ "fc11_flag = 1 if |OAT - MAT| > √(εOAT² + εMAT²) in "
68
+ "economizer mode for N consecutive values else 0 \n"
69
+ )
70
+ description_string = (
71
+ "Fault Condition 11: Outdoor air temperature and mixed air temperature "
72
+ "should be approximately equal in economizer mode \n"
73
+ )
74
+ error_string = "One or more required columns are missing or None \n"
75
+
76
+ @FaultConditionMixin._handle_errors
77
+ def apply(self, df: pd.DataFrame) -> pd.DataFrame:
78
+ """Apply the fault condition to the DataFrame."""
79
+ # Apply common checks
80
+ self._apply_common_checks(df)
81
+
82
+ # Get column values using accessor methods
83
+ mat_col = self.get_input_column("mat_col")
84
+ oat_col = self.get_input_column("oat_col")
85
+ economizer_sig_col = self.get_input_column("economizer_sig_col")
86
+
87
+ # Get parameter values using accessor methods
88
+ mix_degf_err_thres = self.get_param("mix_degf_err_thres")
89
+ outdoor_degf_err_thres = self.get_param("outdoor_degf_err_thres")
90
+
91
+ # Check analog outputs [data with units of %] are floats only
92
+ columns_to_check = [economizer_sig_col]
93
+ self._apply_analog_checks(df, columns_to_check, check_greater_than_one=True)
94
+
95
+ # Perform calculations
96
+ abs_mat_minus_oat = abs(df[mat_col] - df[oat_col])
97
+ mat_oat_sqrted = np.sqrt(mix_degf_err_thres**2 + outdoor_degf_err_thres**2)
98
+
99
+ combined_check = (
100
+ (abs_mat_minus_oat > mat_oat_sqrted)
101
+ # Verify AHU is running in economizer mode
102
+ & (df[economizer_sig_col] > 0.9)
103
+ )
104
+
105
+ # Set fault flag
106
+ self._set_fault_flag(df, combined_check, "fc11_flag")
107
+
108
+ return df