antitheft159 commited on
Commit
e1d3f05
·
verified ·
1 Parent(s): ab1b6e6

Create References

Browse files
Files changed (1) hide show
  1. References +587 -0
References ADDED
@@ -0,0 +1,587 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ import torch.nn as nn
3
+ import numpy as np
4
+ import matplot.pyplot as plt
5
+
6
+ num_nodes = 100
7
+ time_steps = 1000
8
+ frequency = 1
9
+ amplitude = 1.0
10
+ sampling_rate = 1000
11
+ infrared_voltage = 0.7
12
+ pulse_width_modulatoin_frequency = 50
13
+
14
+ def generate_spwm_signal(time, frequency, amplitude):
15
+ sine_wave = amplitude * np.sin(2 * np.pi * frequency * time)
16
+ pwm_signal = np.where(sine_wave > np.random.rand(len(time)), 1, 0)
17
+ return pwm_signal
18
+
19
+ def infrared_storage(pwm_signal, voltage):
20
+ stored_signal = pwm_signal * voltage
21
+ return stored_signal
22
+
23
+ def directional_transmission(stored_signal, phase_shift):
24
+ transmitted_signal = np.roll(stored_signal, phase_shift)
25
+
26
+ time = np.linspace(0, 1, time_steps)
27
+
28
+ spwm_signal = generate_spwm_signal(time, frequency, amplitude)
29
+
30
+ infrared_stored_signal = infrared_storage(spwm_signal, infrared_voltage)
31
+
32
+ transmitted_signal = directional_transmission(infrared_stored_signal, phase_shift=100)
33
+ plt.figure(figsize=(15, 8))
34
+
35
+ plt.subplot(3, 1, 1)
36
+ plt.plot(time, spwm_signal, color='blue', label='SPWM Signal')
37
+ plt.title('Sinusoidal Pulse Width Modulation (SPWM) Signal')
38
+ plt.xlabel('Time (s)')
39
+ plt.ylabel('Amplitude')
40
+ plt.grid(True)
41
+ plt.legend()
42
+
43
+ plt.subplot(3, 1, 2)
44
+ plt.plot(time, infrared_stored_signal, color='red', label='Infrared Stored Signal')
45
+ plt.title('Data Stored using Infrared Voltage Energy')
46
+ plt.xlabel('Time (s)')
47
+ plt.ylabel('Voltage')
48
+ plt.grid(True)
49
+ plt.legend()
50
+
51
+ plt.subplot(3, 1, 3)
52
+ plt.plot(time, tranmitted_signal, color='green', label=Transmitted Signal')
53
+ plt.title('Transmitted Signal towards a Given Direction')
54
+ plt.xlabel('Time (s)')
55
+ plt.ylabel('Amplitude')
56
+ plt.grid(True)
57
+ plt.legend()
58
+
59
+ plt.tight_layout()
60
+ plt.show()
61
+
62
+ import torch
63
+ import torch.nn as nn
64
+ import numpy as np
65
+ import matplotlib.pyplot as plt
66
+
67
+ num_nodes = 100
68
+ time_steps = 1000
69
+ frequency = 1
70
+ amplitude = 1.0
71
+ sampling_rate = 1000
72
+ infrared_voltage = 0.7
73
+ pulse_width_modulation_frequency = 50
74
+ attenuation_factor = 0.5
75
+ noise_intensity = 0.2
76
+ multi_path_delay = 50
77
+ multi_path_amplitude = 0.3
78
+
79
+ def generate_spwm_signal(time, frequency, amplitude):
80
+ sine_wave = amplitude * np.sin(2 * np.pi * frequency * time)
81
+ pwn_signal = np.where(sine_wave > np.random.rand(len(time)), 1, 0)
82
+ return pwm_signal
83
+
84
+ def infrared_storage(pwm_signal, voltage):
85
+ stored_signal = pwm_signal * voltage
86
+ return stored_signal
87
+
88
+ def directional_transmission(stored_signal, phase_shift):
89
+ transmitted_signal = np.roll(stored_signal, phase_shift)
90
+ return transmitted_signal
91
+
92
+ def attenuate_signal(signal, attenuation_factor):
93
+ attenuation = np.exp(-attenuation_factor * np.arange(len(signal)) / len(signal))
94
+ attenuated_signal = signal * attenuation
95
+ return attenuated_signal
96
+
97
+ def add_noise(signal, noise_intensity):
98
+ noise = noise_intensity * np.random.randn(len(signal))
99
+ return noisy_signal
100
+
101
+ def multi_path_effects(signal, delaym amplitude):
102
+ delayed_signal = np.roll(signal, delay) * amplitude
103
+ combined_signal = signal + delayed_signal
104
+ return combined_signal
105
+
106
+ time = np.linspace(0, 1, time_steps)
107
+
108
+ spwm_signal = generate_spwm_signal(time, frequency, amplitude)
109
+
110
+ infrared_stored_signal = infrared_storage(spwm_signal, infrared_voltage)
111
+
112
+ transmitted_signal = directional_transmission(infreared_stored_signal, phase_shift=100)
113
+
114
+ attenuated_signal = attenuate_signal(transmitted_signal, attenuation_factor)
115
+
116
+ noisy_signal, add_noise(attenuated_signal, noise_intensity)
117
+
118
+ final_signal = multi_path_effects(noisy_signal, multi_path_delay, mutli_path_amplitude
119
+
120
+ plt.figure(figsize=(15, 12))
121
+
122
+ plt.subplot(4, 1, 1)
123
+ plt.plot(time, spwm_signal, color='blue', label='SPWM Signal')
124
+ plt.title('Sinusodial Pulse Width Modulation (SPWM) Signal')
125
+ plt.xlabel('Time (s)')
126
+ plt.ylabel('Amplitude')
127
+ plt.grid(True)
128
+ plt.legend()
129
+
130
+ plt.subplot(4, 1, 2)
131
+ plt.plot(time, infrared_stored_signal, color='red', label='Infrared Stored Signal')
132
+ plt.title('Data Stored using Infrared Voltage Energy')
133
+ plt.xlabel('Time (s)')
134
+ plt.ylabel('Voltage')
135
+ plt.grid(True)
136
+ plt.legend()
137
+
138
+ plt.subplot(4, 1, 3)
139
+ plt.plot(time, transmited_signal, color='green', label='Transmitted Signal')
140
+ plt.title('Transmitted Signal towards a Given Direction')
141
+ plt.xlabel('Time (s)')
142
+ plt.ylabel('Amplitude')
143
+ plt.grid(True)
144
+ plt.legend()
145
+
146
+ plt.subplot(4, 1, 4)
147
+ plt.plot(time, final_signal, color='purple', lable='Final Signal with Attenuation, Noise, and Multi-Path Effects')
148
+ plt.title('Final Signal in Dense Space')
149
+ plt.xlabel('Time (s)')
150
+ plt.ylabel('Amplitude')
151
+ plt.grid(True)
152
+ plt.legend()
153
+
154
+ plt.tight_layout()
155
+ plt.show()
156
+
157
+ import torch
158
+ import torch.nn as nn
159
+ import numpy as np
160
+ import matplotlib.pyplot as plt
161
+ from matplotlib.animatoin import FuncAnimation
162
+
163
+ num_nodes = 100
164
+ time_steps = 1000
165
+ frequency = 1
166
+ amplitude = 1.0
167
+ sampling_rate = 1000
168
+ infrared_voltage = 0.7
169
+ pulse_width_modulation_frequency = 50
170
+ atenuation_factor = 0.5
171
+ noise_intensity = 0.2
172
+ multi_path_delay = 50
173
+ multi_path_amplitude = 0.3
174
+
175
+ def generate_spwm_signal(time, frequency, amplitude):
176
+ sine_wave = amplitude * np.sin(2 * np.pi * frequency * time)
177
+
178
+ pwn_signal = np.where(sine_wave > np.random.rand(len(time)), 1, 0)
179
+ return pwm_signal
180
+
181
+ def infrared_storage(pwm_signal, voltage):
182
+ stored_signal = pwm_signal * voltage
183
+ return stored_signal
184
+
185
+ def directional_transmission(stored_signal, phase_shift):
186
+ transmitted_signal = np.roll(stored_signal, phase_shift)
187
+ return transmitted_signal
188
+
189
+ def add_noise(signal, noise_intensity):
190
+ noise = noise_intensity * np.random.randn(len(signal))
191
+ noisy_signal = signal + noise
192
+ return noisy_signal
193
+
194
+ def multi_path_effects(signal, delay, amplitude):
195
+ delayed_signal = np.roll(signal, delay) * amplitude
196
+ combined_signal = signal + delayed_signal
197
+ return combined_signal
198
+
199
+ time = np.linspace(0, 1, time_steps)
200
+
201
+ spwm_signal = generate_spwm_signal(time, frequency, amplitude)
202
+
203
+ infrared_stored_signal = infrared_storage(spwm_signal, infrared_voltage)
204
+ transmitted_signal = directional_transmission(infrared_stored_signal, phase_shift=100)
205
+
206
+ attenuated_signal = attenuated_signal(transmitted_signal, attenuation_factor)
207
+
208
+ noisy_signal = add_noise(attenuated_signal, noise_intensity
209
+
210
+ final_signal = multi_paht_effects(noisy_signal, multi_path_delay, multi_path_amplitude
211
+
212
+ fig, ax = plt.subplots(figsize=(15, 6))
213
+ line, = ax.plot([], [], color='purple')
214
+ ax.set_xlim(0, time_steps)
215
+ ax.set_ylim(-1.5, 1.5)
216
+ ax.set_title('Animated Signal Transmission')
217
+ ax.set_xlabel('Time Step')
218
+ ax.set_ylabel('Amplitude')
219
+ ax.grid(True)
220
+
221
+ def animate(frame):
222
+ current_signal = np.roll(final_signal, frame)
223
+ line.set_data(np.arange(len(current_signal)), current_signal)
224
+ return line,
225
+
226
+ ani = FuncAnimation(fig, animate, frames=time_steps, interval=20, blit=True)
227
+
228
+ plt.show()
229
+
230
+ import torch
231
+ import torch.nn as nn
232
+ import numpy as np
233
+ import matplotlib.pyplot as plt
234
+ from matplotlib.animation import FuncAnimation
235
+
236
+ num_nodes = 100
237
+ time_steps = 1000
238
+ frequency = 1
239
+ amplitude = 1.0
240
+ sampling_rate = 1000
241
+ infrared_voltage = 0.7
242
+ pulse_width_modulation_frequency = 50
243
+ attenuation_factor = 0.5
244
+ noise_intensity = 0.2
245
+ mutli_path_delay = 50
246
+ multi_path_amplitude = 0.3
247
+
248
+ encryption_keys = [0.5, 1.2, 0.9]
249
+
250
+ def generate_spwm_signal(time, frequency, amplitude):
251
+ sine_wave = amplitude * np.sin(2 * np.pi * frequency * time)
252
+ pwm_signal = np.where(sine_wave > np.random.rand(len(time)), 1, 0)
253
+ return pwm_signal
254
+
255
+ def infrared_storage(pwm_signal, voltage):
256
+ stored_signal = pwm_signal * voltage
257
+ return stored_signal
258
+
259
+ def directional_transmissoin(stored_signal, phase_shift):
260
+ transmitted_signal = np.roll(stored_signal, phase_shift)
261
+ return transmitted_signal
262
+
263
+ def attenuate_signal(signal, attenuation_factor):
264
+ attenuatoin = np.exp(-attenuation_factor * np.arange(len(signal)) / len(signal))
265
+ attenuated_signal = signal * attenuation
266
+ return attenuated_signal
267
+
268
+ def add_noise(signal, noise_intensity):
269
+ noise = noise_intensity * np.random.randn(len(signal))
270
+ noisy_signal = signal + noise
271
+ return noisy_signal
272
+
273
+ def multi_path_effects(signal, delay, amplitude):
274
+ delayed_signal = np.roll(signal, delay) * amplitude
275
+ combined_signal = signal + delayed_signal
276
+ return combined_signal
277
+
278
+ def layered_encryption(signal, keys):
279
+ encrypted_signal = signal.copy()
280
+ for key in keys:
281
+ encrypted_signal = np.sin(encrypted_signal * key)
282
+ return encrypted_signal
283
+
284
+ def layered_decryption(encrypted_signal, keys):
285
+ decrypted_signal = encrypted_signal.copy()
286
+ for key in reversed(keys):
287
+ decrypted_signal = np.arcsin(decrypted)signal) / key
288
+ return decrypted_signal
289
+
290
+ time = np.linspace(0, 1, time_steps)
291
+
292
+ spwm_signal = generate_spwm_signal(time, frequency, amplitude)
293
+
294
+ infrared_stored_signla = infrared_storage(spwm_signal, infreared_voltage)
295
+
296
+ transmitted_signal = directional_transmission(infrared_stored_signal, phase_shift=100)
297
+
298
+ attenuated_signal = attenuate_signal(transmitted_signal, attenuation_factor)
299
+
300
+ noisy_signal = add_noise(attenuated_signal, noise_intensity)
301
+
302
+ final_signal = multi_path_effects(noisy_signal, multi_path_delay, multi_path_amplitude)
303
+
304
+ encrypted_signal = layered_encryption(final_signal, encryption_keys)
305
+
306
+ decrypted_signal = layered_decryption(encrypted_signal, encryption_keys)
307
+
308
+ fig, ax = plt.subplots(2, 1, figsize=(15, 12))
309
+
310
+ ax[0].plot(np.arange(len(encrypted_signal)), encrypted_signal, color='purple')
311
+ ax[0].set_title('Encrypted Signal w/Layered VPN Protection')
312
+ ax[0].set_xlabel('Time Step')
313
+ ax[0].set_ylabel('Amplitude')
314
+ ax[0].grid(True)
315
+
316
+ ax[1].plot(np.arange(len(decrypted_signal)), decrypted_signal, color='green')
317
+ ax[1].set_title('Decrypted Signal w/Layered VPN Decryption')
318
+ ax[1].set_xlabel('Time Step')
319
+ ax[1].set_ylabel('Amplitude')
320
+ ax[1].grid(True)
321
+
322
+ plt.tight_layour()
323
+ plt.show()
324
+
325
+ import torch
326
+ import torch.nn as nn
327
+ import numpy as np
328
+ import matplotlib.pyplot as plt
329
+ from matplotlib.animation import FuncAnimation
330
+
331
+ num_nodes = 100
332
+ time_steps = 1000
333
+ frequency = 1
334
+ amplitude = 1.0
335
+ sampling_rate = 1000
336
+ infrared_voltage = 0.7
337
+ pulse_width_modulatoin_frequency = 50
338
+ attenuation_factor = 0.5
339
+ noise_intensity = 0.2
340
+ multi_path_delay = 50
341
+ multi_path_amplitude = 0.3
342
+
343
+ encryption_keys = [0.5, 1.2, 0.9]
344
+
345
+ def generate_spwm_signal(time, frequency, amplitude):
346
+ sine_wave = amplitude * np.sin(2 * np.pi * frequency * time)
347
+ threshold = np.mean(sine_wave_
348
+ pwm_signal = np.where(sine_wave > threshold, 1, 0)
349
+ return pwm_signal
350
+
351
+ def infrared_storage(pwm_signal, voltage):
352
+ stored_signal = pwm_signal * voltage
353
+ return stored_signal
354
+
355
+ def directional_transmissoin(stored_signal, phase_shift):
356
+ transmitted_signal = np.roll(stored_signal, phase_shift)
357
+ return transmitted_signal
358
+
359
+ def attenuate_signal(signal, attenuation_factor):
360
+ attenuation = np.exp(-attenuation_factor * np.arange(len(signal)) / len(signal))
361
+ attenuated_signal = signal * attenuation
362
+ return attenuated_signal
363
+
364
+ def add_noise(signal, noise_intensity):
365
+ noise = noise_intensity * np.random.randn(len(signal))
366
+ noisy_signal = signal + noise
367
+ return noisy signal
368
+
369
+ def multi_path_effects(signal, delay, amplitude):
370
+ delayed_signal = np.roll(signal, delay) * amplitude
371
+ combined_signal = signal + delayed_signal
372
+ return combined_signal
373
+
374
+ def layered_encryption(signal, keys):
375
+ encrypted_signal = signal.copy()
376
+ for key in keys:
377
+ encrypted_signal = np.sin(encrypted_signal * key)
378
+ return encrypted_signal
379
+
380
+ def layered_decryption(encrypted_signal, keys):
381
+ decrypted_signal = encrypted_signal.copy()
382
+ for key in reversed(keys):
383
+ decrypted_signal = np.arcsin(decrypted_signal) / key
384
+ return decrypted_signal
385
+
386
+ def validate_encryption(original_signal, encrypted_signal, decrypted_signal):
387
+ assert np.allclose(original_signal, decrypted_signal, atol=1e-2), "Decryption failed to recover the original signal."
388
+
389
+ time = np.linspace(0, 1, time_steps)
390
+
391
+ spwm_signal = generate_spwm_signal(time, frequency, amplitude)
392
+
393
+ infrared_stored_signal = infrared_storage(spwm_signal, infrared_voltage)
394
+
395
+ transmitted_signal = directional_transmission(infrared_stored_signal, phase_shift=100)
396
+
397
+ attenuated_signal = attenuate_signal(transmitted_signal, attenuation_factor)
398
+
399
+ noisy_signal = add_noise(attenuated_signal, noise_intensity)
400
+
401
+ final_signal = multi_path_effects(noisy_signal, multi_path_delay, multi_path_amplitude)
402
+
403
+ encrypted_signal = layered_encryption(final_signal, encryption_keys)
404
+
405
+ decrypted_signal = layered_decryption(encrypted_signal, encryption_keys)
406
+
407
+ fig, ax= plt.subplots(2, 1, figsize=(15, 12))
408
+
409
+ ax[0].plot(np.arant(len(encrypted_signal)), encrypted_signal, color='purple')
410
+ ax[0].set_title('Encrypted Signal w/Layered VPN Protection')
411
+ ax[0].set_xlabel('Time Step')
412
+ ax[0].set_ylabel('Amplitude')
413
+ ax[0].grid(True)
414
+
415
+ ax[1].plot(np.arange(len(decrypted_signal)), decrypted_signal, color='green')
416
+ ax[1].set_title('Decrypted Signal w/Layered VPN Decryption')
417
+ ax[1].set_xlabel('Time Step')
418
+ ax[1].set_ylabel('Amplitude')
419
+ ax[1].grid(True)
420
+
421
+ plt.tight_layout()
422
+ plt.show()
423
+
424
+ import torch
425
+ import torch.nn as nn
426
+ import numpy as np
427
+ import matplotlib.pyplot as plt
428
+ from matplotlib.animation import FuncAnimation
429
+
430
+ num_nodes = 100
431
+ time_steps = 1000
432
+ frequency = 1
433
+ amplitude = 1.0
434
+ sampling_rate = 1000
435
+ infrared_voltage = 0.7
436
+ pulse_width_modulation_frequency = 50
437
+ attenuation_factor = 0.5
438
+ noise_intensity = 0.2
439
+ multi_path_delay = 50
440
+ multi_path_amplitude = 0.3
441
+
442
+ encryption_keys = [0.5, 1.2, 0.9]
443
+
444
+ def generate_spwm_signal(time, frequency, amplitude):
445
+ sine_wave = amplitude * np.sin(2 * np.pi * frequency * time)
446
+ threshold = np.mean(sine_wave)
447
+ pwm_signal = np.where(sine_wave)
448
+ return pwm_signal
449
+
450
+ def infrared_storage(pwm_signal, voltage):
451
+ stored_signal = pwm_signal * voltage
452
+ return stored_signal
453
+
454
+ def directional_transmission(stored_signal, phase_shift):
455
+ transmitted_signal = np.roll(stored_signal, phase_shift)
456
+ return transmited_signal
457
+
458
+ def attenuate_signal(signal, attenuation_factor):
459
+ attenuation = np.exp(-attenuation_factor * np.arange(len(signal)) / len(signal))
460
+ attenuated_signal = signal * attenuation
461
+ return attenuated_signal
462
+
463
+ def add_noise(signal, noise_intensity):
464
+ noise = noise_intensity * np.random.randn(len(signal))
465
+ noisy_signal = signal + noise
466
+ return noisy_signal
467
+
468
+ def multi_path_effects(signal, delay, amplitude):
469
+ delayed_signal = np.roll(signal, delay) * amplitude
470
+ combined_signal = signal + delayed_signal
471
+ return combined_signal
472
+
473
+ def layered_encryption(signal, keys):
474
+ encrypted_signal = signal.copy()
475
+ for key in keys:
476
+ encrypted_signal = np.sin(encrypted_signal * key)
477
+ return encrypted_signal
478
+
479
+ def layered_decryption(encrypted_signal, keys):
480
+ decrypted_signal = encrypted_signal.copy()
481
+ for key in reveresed(keys):
482
+ decrypted_signal = np.arcsin(decrypted_signal) / key
483
+ return decrypted_signal
484
+
485
+ def validate_encryption(original_signal, encrypted_signal, decrypted_signal):
486
+ assert np.allclose(original_signal, decrypted_signal, atol=1e-2), "Decryption failed to recover the original signal."
487
+
488
+ time = np.linspace(0, 1, time_steps)
489
+
490
+ spwm_signal = generate_spwm_signal(time, frequency, amplitude)
491
+
492
+ infrared_stored_signal = infrared_storage(spwm_signal, infared_voltage)
493
+
494
+ transmitted_signal = directional_transmission(infrared_stored_signal, phase_shift=100)
495
+
496
+ attenuated_signal = attenuate_signal(transmitted_signal, attenuation_factor)
497
+
498
+ noisy_signal = add_noise(attenuated_signal, noise_intensity)
499
+
500
+ final_signal = multi_path_effects(noisy_signal, multi_path_delay, multi_path_amplitude_
501
+
502
+ encrypted_signal = layered_encryption(final_signal, encryption_keys)
503
+
504
+ decrypted_signal = layered_decryption(encrypted_signal, encryption_keys)
505
+
506
+ fig, ax = plt.subplots(2, 1, figsize=(15, 12))
507
+
508
+ ax[0].plot(np.arange(len(encrypted_signal)), encrypted_signal, color='purple')
509
+ ax[0].set_title('Encrypted Signal w/Layered VPN Protection')
510
+ ax[0].set_xlabel('Time Step')
511
+ ax[0].set_ylabel('Amplitude')
512
+ ax[0].grid(True)
513
+
514
+ ax[1].plot(np.arange(len(decrypted_signal)), decrypted_signal, color='green')
515
+ ax[1].set_title('Decrypted Signal w/Layered VPN Decryption')
516
+ ax[1].set_xlabel('Time Step')
517
+ ax[1].set_ylabel('Amplitude')
518
+ ax[1].grid(True)
519
+
520
+ plt.tight_layout()
521
+ plt.show()
522
+
523
+ import matplotlib.pyplot as plt
524
+ import numpy as np
525
+
526
+ def gradient_color(signal, cmap='viridis'):
527
+ norm = plt.Normalizer(signal.min(), signal.max())
528
+ colors = plt.get_cmap(cmap)norm(signal))
529
+ return colors
530
+
531
+ time = np.arange(len(final_signal))
532
+
533
+ colors = gradient_color(final_signal)
534
+
535
+ fig, ax = plt.subplots(figsize(15, 6))
536
+
537
+ ax.plot(time, final_signal, color='blue', label='Final Signal')
538
+
539
+ reflection_factor = 0.3
540
+ reflection = final_signal * reflection_factor
541
+ reflection_color = 'lightblue'
542
+
543
+ ax.plot(time, -reflection - reflection.min(), color=reflection_color, linestyle='--', alpha=0.6, label='Signal Reflection')
544
+
545
+ for i in range*len(final_signal) - 1):
546
+ ax.plot(time[i:i+2], final_signal[i:i+2], color=colors[i], lw=2)
547
+
548
+ ax.set_title('Final Signal with Reflection and Color Gradient')
549
+ ax.set_ylabel('Amplitude')
550
+ ax.legend()
551
+ ax.grid(True)
552
+
553
+ plt.show()
554
+
555
+ import matplotlib.pyplot as plt
556
+ iport numpy as np
557
+ import matplotlib.colors as mcolors
558
+
559
+ def gradient_color(signal, cmap='viridis'):
560
+ norm = plt.Normalize(signal.min(), signal.max())
561
+ colors = plt.get_cmap(cmap(norm(signal))
562
+ return colors
563
+
564
+ time = np.arange(len(final_signal))
565
+
566
+ colors = gradient_color(final_signal)
567
+
568
+ fig, ax = plt.subplots(figsize=(15, 6))
569
+
570
+ for i in range(len(final_signal) - 1):
571
+ ax.plot(time[i:i+2], final_signal[i:i+2], color=colors[i], lw=2)
572
+
573
+ ax.plot(time, final_signal, color='blue', alpha=0.5, label='Signal')
574
+
575
+ reflection_factor = 0.3
576
+ reflection = final_signal * reflection_factor
577
+ reflection_color = 'lightblue'
578
+
579
+ ax.plot(time, -reflection - reflectoin.min(), color=reflection_color, linestyle='--', alpha=0.6, lable='Reflection')
580
+
581
+ ax.set_title('PulseWavefront')
582
+ ax.set_xlabel('Time Step')
583
+ ax.set_ylabel('Amplitude')
584
+ ax.legend()
585
+ ax.grid(True)
586
+
587
+ plt.show()