Skip to content

Commit 1527af9

Browse files
committed
💡 Add references and sources for heat exchanger and PID controller
1 parent 2cdaf18 commit 1527af9

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

Plant/heat_exchnager.py

+7
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,10 @@ def __calculate_heat_transfer(self) -> float:
7777
* self.heat_transfer_area # A
7878
* (self.previous_temperature - self.temperature) # delta_T
7979
)
80+
81+
82+
# sources:
83+
# https://en.wikipedia.org/wiki/Heat_transfer_coefficient
84+
# https://www.geeksforgeeks.org/heat-transfer-formulas/
85+
# https://sciencing.com/calculate-change-temperature-2696.html
86+
# https://www.geeksforgeeks.org/python-os-environ-object/

controller/PIDController.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import random
2+
from os import environ
23

34
import matplotlib.pyplot as plt
45
from dotenv import load_dotenv
56
from jax.numpy import clip
6-
from os import environ
77

88
from controller.GeneralController import GeneralController
99

10+
1011
class PIDController(GeneralController):
1112
"""PID controller class"""
1213

@@ -67,6 +68,7 @@ def update_params(self, grad: dict) -> None:
6768
Parameters update of the PID controller
6869
:param grad: the gradients (dict)
6970
:return: None
71+
https://www.ibm.com/topics/gradient-descent
7072
"""
7173

7274
# update the parameters
@@ -82,6 +84,7 @@ def __clip_grad(self, grad: dict, clip_value: float) -> dict:
8284
:param grad: the gradients (dict)
8385
:param clip_value: the clip value (float)
8486
:return: the clipped gradients (dict)
87+
https://neptune.ai/blog/understanding-gradient-clipping-and-how-it-can-fix-exploding-gradients-problem
8588
"""
8689
grad = [
8790
(
@@ -114,3 +117,6 @@ def __track_params(self):
114117
self.track_K_p.append(self.params["K_p"])
115118
self.track_K_i.append(self.params["K_i"])
116119
self.track_K_d.append(self.params["K_d"])
120+
121+
122+
# https://softinery.com/blog/implementation-of-pid-controller-in-python/

0 commit comments

Comments
 (0)