-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path16_programmable_avoidance.html
More file actions
337 lines (285 loc) · 12.2 KB
/
Copy path16_programmable_avoidance.html
File metadata and controls
337 lines (285 loc) · 12.2 KB
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
<!DOCTYPE html>
<!--
To Do: Update callback functions and remove redundant or minimally effective options
from callback function menu; Add timer with Start/Reset button(s); Replace text-based
status display with bar graph including average/cumulative statistics for current or most
recent timed simulation that freezes at end of timed simulation)
-->
<html lang="en-US" style="display: flex;">
<head>
<title>HLSI Ex 16</title>
<meta charset="UTF-8"/>
<link rel="stylesheet" type="text/css" media="all" href="hlsi.css">
<link rel=stylesheet type=text/css href=codemirror.min.css />
<link rel=stylesheet type=text/css href=blackboard.min.css />
<link rel=stylesheet type=text/css href=sidebar.css />
<link href='https://css.gg/minimize-alt.css' rel='stylesheet'>
<style>
output {font-weight: bold;}
</style>
<script src=d3.v5.min.js></script>
<script src=fft.js></script>
<script src=common.js></script>
<script src=signal.js></script>
<script src=sliders.js></script>
<!-- <script src=powerSpectrumPlot.js></script> -->
<script src=powerSpectrumPlot_2D.js></script>
<script src=powerSpectrumPlot_3D.js></script>
<script src=spectralEfficiencyPlot.js></script>
<script src=sinrPlot_BarChart.js></script>
<script src="averageThroughputPlot_BarChart.js"></script>
<script src="modeController.js"></script>
<script src=label.js></script>
<script src=timer.js></script>
<script src=capacityBanner.js></script>
<script src=codemirror.min.js></script>
<script src=codeMirror_javascript.js></script>
<script src=scriptController.js></script>
<script src=capacityRunner_multisignal.js></script>
<script src=throughputPlotMultiSignals.js></script>
<script src=hoppingInterferer.js></script>
<script src="https://unpkg.com/d3-simple-slider"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.7.1/chart.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels@2.0.0"></script>
<style>
.grid-container {
display: grid;
grid-template-columns: auto auto;
padding: 2px;
}
.grid-item {
padding: 2px;
font-size: 30px;
text-align: center;
}
/* Style the tab */
.tab {
overflow: hidden;
border: 1px solid #ccc;
background-color: black;
width: fit-content;
border: groove;
border-radius: 8px;
height: 3rem;
}
/* Style the buttons inside the tab */
.tab button {
background-color: inherit;
float: left;
border: none;
outline: none;
cursor: pointer;
padding: 14px 16px;
transition: 0.3s;
font-size: 17px;
color: white;
/* width: 5vw; */
}
/* Change background color of buttons on hover */
.tab button:hover {
background-color: lightgray;
color: black;
}
/* Create an active/current tablink class */
.tab button.active {
background-color: darkkhaki;
color: black;
}
.timer {
margin-left: 2rem;
display: none;
width: 60vw;
justify-content: start;
}
.PU_controls {
display: flex;
flex-direction: row;
}
.argsTable{
height: 320px;
overflow-y: auto;
overflow-x: hidden;
display: block;
}
.minimizeBtn {
background-color: black; padding: 10px; border: groove; border-radius: 8px;
cursor: pointer;
}
.minimizeBtn:hover {
background-color: darkkhaki;
}
@media screen and (max-width: 1000px) {
.grid-container {
width: 25%;
grid-template-columns: none;
}
}
@media screen and (min-width: 1500px) {
.grid-container {
width: 25%;
grid-template-columns: auto auto;
}
}
</style>
</head>
<body style="margin:0;">
<section class="banner" style="position: fixed; z-index: 11; background: rgba(0,0,0,0.85)">
<label for="menu-control" class="hamburger">
<i class="hamburger__icon"></i>
<i class="hamburger__icon"></i>
<i class="hamburger__icon"></i>
</label>
<input type="checkbox" id="menu-control" class="menu-control">
<aside class="sidebar" style="z-index: 10;">
<nav class="sidebar__menu">
<a href="01_bw.html"><b>1</b> Bandwidth</a>
<a href="02_freq.html"><b>2</b> Frequency</a>
<a href="03_gn.html"><b>3</b> Gain</a>
<a href="04_freq_bw_gn.html"><b>4</b> Frequency, Bandwidth, and Gain</a>
<a href="05_capacity.html"><b>5</b> Information Capacity</a>
<a href="06_interference.html"><b>6</b> Interference and Information Capacity</a>
<a href="07_capacity.html"><b>7</b> Information Capacity</a>
<a href="08_capacity.html"><b>8</b> Information Capacity</a>
<a href="09_capacity.html"><b>9</b> Information Capacity</a>
<a href="10_capacity.html"><b>10</b> Information Capacity</a>
<a href="11_pathloss.html"><b>11</b> Path Loss</a>
<a href="12_pathloss_interference.html"><b>12</b> Path Loss with Interference</a>
<a href="13_manual_avoidance.html"><b>13</b> Manual Interferer Avoidance</a>
<a href="" onclick="alert('Exercise 14: reserved for future use')"><b>14</b> SAS (Spectrum Access System)</a>
<a href="15_rule_based_avoidance.html"><b>15</b> Rule Based Interferer Avoidance</a>
<a href="16_programmable_avoidance.html" class="selected"><b>16</b> Programmable Interferer Avoidance</a>
<a href="17_machine_learning_avoidance.html"><b>17</b> Machine Learning Interferer Avoidance</a>
<a href="18_machine_learning_time_based_avoidance.html"><b>18</b> Machine Learning With Periodic Interferer Avoidance</a>
<a href="19_rf_front_end_spectrum_sharing.html"><b>19</b> RF Front End Spectrum Sharing</a>
<a href="20_rf_front_end_spectrum_sharing.html"><b>20</b> Programmable RF Front End Spectrum Sharing</a>
<a href="21_rf_front_end_spectrum_sharing_with_interferer.html"><b>21</b> RF Front End Spectrum Sharing with Interferer</a>
<a href="22_rf_front_end_spectrum_sharing_with_interferer.html"><b>22</b> Programmable Spectrum Sharing with Interferer</a>
<a href="23_rf_front_end_spectrum_sharing_sliders_programmable.html"><b>23</b> RFFE Spectrum Sharing - Manual and Programmable</a>
<a href="25_rf_front_end_spectrum_sharing_menu.html"><b>25</b> RFFE Spectrum Sharing - Calculate SINR options menu</a>
<a href="26_rf_front_end_spectrum_sharing_ programmable.html"><b>26</b> RFFE Spectrum Sharing -- SINR Calculations Programmable</a>
</nav>
<label for="menu-control" class="sidebar__close"></label>
</aside>
<div style="margin-left: 6%; font-size: 1.3rem; margin-top: 0.3%; font-family: sans-serif; order: 1; width: inherit;"><span style="color: #ddd;">Exercise 16</span> Programmable Interferer Avoidance</div>
<div style="order: 2; margin-left: auto; margin-right: 2%; display: flex;">
<span style="font-size: 250%; font-family: monospace; letter-spacing: 2px; margin-left: auto; margin-right: 5px; color: #e6d9ba;"></span>
<div style="width: 20%;">
<img style="width: 100%;" src="images/wireless-logo.png">
</div>
</div>
</section>
<div class="content-section" style="margin: 0% 2%; margin-top: 5%;">
<div style="display: inline-flex;">
<div class="tab">
<button class="tablinks" onclick="onTabChange(event, 'normal', signalList)">Normal</button>
<button class="tablinks" onclick="onTabChange(event, 'timer', signalList)">Timer</button>
</div>
<div class="timer" id="timer">
<p id=capacityRunner></p>
</div>
</div>
<div class="PU_controls">
<p><label for="pu_mode">Type of co-existing signal:</label>
<select id="pu_mode" onchange="onPUModeChange()">
<option id="interference" value="interference">Interference</option>
<option id="radar_primary_user" value="radar_primary_user">Radar Primary User</option>
<option id="comms_primary_user" value="comms_primary_user">Comms Primary User</option>
</select>
</p>
<div id="sinr_thresholdDiv" style="margin-top: 1rem; margin-left: 1rem; display: none;">
<label for="sinr_threshold">SINR Threshold (dB)</label>
<input style="width: 3.5rem;" id="sinr_threshold" type="text" value="20"
oninput="this.value = this.value
.replace(/[^0-9.-]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/^0[^.]/, '0').replace(/^[-]*[0-9]+[.]*[0-9]*[-]/, '0');" />
</div>
<div id="rate_thresholdDiv" style="margin-top: 1rem; margin-left: 1rem; display: none;">
<label for="rate_threshold">Data Rate Threshold (M bits/sec)</label>
<input style="width: 3.5rem;" id="rate_threshold" type="text" value="2"
oninput="this.value = this.value
.replace(/[^0-9.-]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/^0[^.]/, '0').replace(/^[-]*[0-9]+[.]*[0-9]*[-]/, '0');" />
</div>
<div class="applyDiv" style="margin-top: 1rem; margin-left: 1rem;">
<input id="apply" type="button" value="Apply" onclick="onPUModeChange()">
</div>
</div>
<p id=scriptController style="margin-bottom: 2%;"></p>
<p id=hoppingInterferer></p>
<p id=capacityBanner></p>
<p>
<input type="range" id=freq />
</p>
<p>
<input type="range" id=bw />
</p>
<p>
<input type="range" id=mcs />
</p>
<div style="display:inline-flex;">
<span style="font-size: 24px; margin-right: 8px;">3D</span>
<label class="switch">
<input id="psd_3d_checkbox" type="checkbox" onclick="power_spectral_density_3d_checkbox_change();">
<span class="slider round"></span>
</label>
</div>
</div>
<div class="grid-container">
<div class="grid-item">
<div id="psd_svg_figure_parent" style="float: left; margin-left: 1%;"></div>
</div>
<div class="grid-item">
<div class="grid-container">
<div class="grid-item" id="sinr_parent" style="width: 360px; height: 320px;">
<canvas id="sinr-bar-chart" style="width: 100%; height: 100%;"></canvas>
</div>
<div class="grid-item">
<div id="avg_throughput" style="width: 360px; height: 320px;">
<!-- <canvas id="avg-throughput-bar-chart" style="width: 100%; height: 100%; margin-top:-25px;"></canvas> -->
</div>
</div>
</div>
</div>
<div class="grid-item">
<div id="throughput-multisignal" style="width: 720px;"></div>
</div>
<div class="grid-item">
<div id="spectral_efficiency_parent" style="width: 720px;"></div>
</div>
</div>
</body>
<script>
'use strict';
var sig = new Signal(conf.sig0, '', {
bw_max: 38.0e6, // Hz
bw_init: 10.0e6, // Hz
bw_min: 2.0e6, // Hz
gn_max: 1.0, // dB
gn_init: -10.0, // dB
gn_min: -40, // dB
mcs_init: 4 // array index int 0 to 11
});
var interferer = new Signal(conf.sig0, 'interferer', {
bw_max: 38.0e6, // Hz
bw_init: 2.5e6, // Hz
gn_max: 0.0, // dB
gn_init: -12, // dB
gn_min: -40, // dB
freq_init: 1785.0e6 // Hz
});
var noise = Signal(conf.noise, "Noise", { gn_init: -40});
var signalList = [sig, interferer];
new ScriptController([ sig, interferer ], {
element: '#scriptController',
functionFiles: 'functions/ex16_1_2.js'
});
HoppingInterferer(interferer, '#hoppingInterferer');
Slider(sig, 'freq', '#freq');
Slider(sig, 'bw', '#bw');
Slider(sig, 'mcs', '#mcs');
var funcs = null;
CapacityBanner(sig, '#capacityBanner');
PowerSpectrumPlot_2D();
ThroughputPlot([sig]);
SpectralEfficiencyPlot(sig);
SinrPlot_BarChart.init([sig], "sinr-bar-chart", ["User Signal"], null, ["rgb(48, 25, 72)", "rgba(230,97,0)"]);
</script>
</html>