-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
112 lines (105 loc) · 5.44 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-S25PYSS0G5"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-S25PYSS0G5');
</script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Proportional Integral Differential controller simulator for automated heating system">
<title>PID Online Simulator</title>
<link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
<link rel="manifest" href="favicon/site.webmanifest">
<link rel="stylesheet" href="styles.css">
<link href='https://fonts.googleapis.com/css?family=Raleway' rel='stylesheet'>
<script async custom-element="amp-ad" src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="pid.js" defer></script>
<script src="heating.js" defer></script>
</head>
<body>
<div class="page-container">
<!-- Top Bar -->
<div class="top-bar">
<h1>PID Heating Controller Simulator</h1>
</div>
<div class="main-container">
<!-- Left Block -->
<div class="left-block">
<!-- Left Top -->
<div class="left-top">
<div class="container chart-container">
<canvas id="tempChartCanvas"></canvas>
</div>
</div>
<!-- Left Bottom -->
<div class="left-bottom">
<div class="container info-container">
<div class="info-column info-text">
<p class="info-text">P value: <span id="pTermDisplay" class="value-display">0.00</span></p>
<p class="info-text">I value: <span id="iTermDisplay" class="value-display">0.00</span></p>
<p class="info-text">D value: <span id="dTermDisplay" class="value-display">0.00</span></p>
<p class="info-text">Error: <span id="errorDisplay" class="value-display">0.00</span>°C</p>
</div>
<div class="info-column info-bars">
<p class="info-text">Current Temperature</p>
<div class="progress-bar-container"><div id="currentTempProgress" class="progress-bar-fill"><span id='currentTempText' class="progress-bar-text">0°C</span></div></div>
<p class="info-text">Power Output</p>
<div class="progress-bar-container"><div id="powerOutputProgress" class="progress-bar-fill"><span id='powerOutputText' class="progress-bar-text">0%</span></div></div>
</div>
<div class="info-column">
<button id="dumpHeatBtn">Dump Heat</button>
<button id="clearIntegralBtn">Clear Integral</button>
<button id="resetSimulationBtn">Reset Simulation</button>
</div>
</div>
</div>
</div>
<!-- Right Block with PID Controls -->
<div class="right-block">
<div class="container pid-container">
<h3>Controller Settings</h3>
<br>
<div class="container pid-controls-top">
<label for="kpSlider">Kp: <span id="kpValue">50</span></label>
<input type="range" id="kpSlider" min="0" max="100" step="0.01" value="50">
<label for="kiSlider">Ki: <span id="kiValue">0.01</span></label>
<input type="range" id="kiSlider" min="0" max="1" step="0.01" value="0.01">
<label for="kdSlider">Kd: <span id="kdValue">10</span></label>
<input type="range" id="kdSlider" min="0" max="100" value="10">
<label for="setpointSlider">Setpoint: <span id="setpointValue">20</span>°C</label>
<input type="range" id="setpointSlider" min="10" max="30" value="20">
</div>
<div class="adspace">
<amp-ad width="100vw" height="320"
type="adsense"
data-ad-client="ca-pub-6296958310547499"
data-ad-slot="9822629715"
data-auto-format="rspv"
data-full-width="">
<div overflow=""></div>
</amp-ad>
</div>
<div class="container pid-controls-bottom">
<label for="heatLossSlider">Heat Loss Factor: <span id="heatLossValue">2</span>%</label>
<input type="range" id="heatLossSlider" min="0" max="5" value="2">
<label for="outsideTempSlider">Outside Temperature: <span id="outsideTempValue">5</span>°C</label>
<input type="range" id="outsideTempSlider" min="-10" max="25" value="5">
</div>
</div>
</div>
</div>
<!-- Bottom Bar -->
<div class="bottom-bar">
© 2024 J.Monteiro
</div>
</div>
</body>
</html>