Browse Source

Tested manual fingerprinting for ferrite setup

master
seyffejn 3 years ago
parent
commit
0c9278c54e
48 changed files with 18 additions and 13 deletions
  1. 1
    1
      BachelorThesis/Software/PyPrecisionGUI/ART.py
  2. BIN
      BachelorThesis/Software/PyPrecisionGUI/__pycache__/ART.cpython-38.pyc
  3. BIN
      BachelorThesis/Software/PyPrecisionGUI/__pycache__/localization.cpython-38.pyc
  4. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_2_sf=0.001.npy
  5. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_2_sf=0.0015.npy
  6. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_2_sf=0.002.npy
  7. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_2_sf=0.0025.npy
  8. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_2_sf=0.003.npy
  9. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=0.001.npy
  10. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=0.0015.npy
  11. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=0.002.npy
  12. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=0.0025.npy
  13. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=0.003.npy
  14. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=0.01.npy
  15. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=0.1.npy
  16. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=0.8.npy
  17. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=0.9.npy
  18. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=1.1.npy
  19. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=1.2.npy
  20. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=1.npy
  21. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=10.npy
  22. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=100.npy
  23. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_6_sf=0.75.npy
  24. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_6_sf=0.8.npy
  25. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_6_sf=0.9.npy
  26. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_6_sf=1.1.npy
  27. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_6_sf=1.2.npy
  28. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_6_sf=1.25.npy
  29. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_6_sf=1.npy
  30. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_9_sf=0.8.npy
  31. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_9_sf=0.9.npy
  32. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_9_sf=1.1.npy
  33. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_9_sf=1.2.npy
  34. BIN
      BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_9_sf=1.npy
  35. BIN
      BachelorThesis/Software/PyPrecisionGUI/fingerprinting_tables/SmallManualFingerprint.npy
  36. 0
    0
      BachelorThesis/Software/PyPrecisionGUI/fingerprinting_tables/SmallManualFingerprint_Ferrite.npy
  37. 6
    2
      BachelorThesis/Software/PyPrecisionGUI/localization.py
  38. 11
    10
      BachelorThesis/Software/PyPrecisionGUI/main_script.py
  39. 0
    0
      BachelorThesis/Software/PyPrecisionGUI/plots/check Ferrite Data/Recording_10_(testing_ferrite_data).png
  40. 0
    0
      BachelorThesis/Software/PyPrecisionGUI/plots/check Ferrite Data/Recording_11_(testing_ferrite_data)_sdad.png
  41. 0
    0
      BachelorThesis/Software/PyPrecisionGUI/plots/check Ferrite Data/Recording_1_(testing_ferrite_data).png
  42. 0
    0
      BachelorThesis/Software/PyPrecisionGUI/plots/check Ferrite Data/Recording_1_(testing_ferrite_data)_2.png
  43. 0
    0
      BachelorThesis/Software/PyPrecisionGUI/plots/check Ferrite Data/Recording_2_(testing_ferrite_data).png
  44. 0
    0
      BachelorThesis/Software/PyPrecisionGUI/plots/check Ferrite Data/Recording_2_(testing_ferrite_data)_2.png
  45. 0
    0
      BachelorThesis/Software/PyPrecisionGUI/plots/check Ferrite Data/Recording_2_(testing_ferrite_data)_3.png
  46. BIN
      BachelorThesis/Software/PyPrecisionGUI/plots/check Ferrite Data/Recording_6_manual_fingerprinting.png
  47. BIN
      BachelorThesis/Software/PyPrecisionGUI/plots/check Ferrite Data/Recording_6_manual_fingerprinting_2.png
  48. 0
    0
      BachelorThesis/Software/PyPrecisionGUI/plots/check Ferrite Data/Recording_8_(testing_ferrite_data).png

+ 1
- 1
BachelorThesis/Software/PyPrecisionGUI/ART.py View File

@@ -51,7 +51,7 @@ class ART_plotting:
"color":"black",
"size":15}

plt.plot(art_info[:, 1], art_info[:, 2], color="lightgreen", label="ART System", linewidth=5, marker="x")
plt.plot(art_info[:, 1], art_info[:, 2], color="green", label="ART System", linewidth=5, marker="x")

print("x=", art_info[:, 1])
print("y=", art_info[:, 2])

BIN
BachelorThesis/Software/PyPrecisionGUI/__pycache__/ART.cpython-38.pyc View File


BIN
BachelorThesis/Software/PyPrecisionGUI/__pycache__/localization.cpython-38.pyc View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_2_sf=0.001.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_2_sf=0.0015.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_2_sf=0.002.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_2_sf=0.0025.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_2_sf=0.003.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=0.001.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=0.0015.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=0.002.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=0.0025.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=0.003.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=0.01.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=0.1.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=0.8.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=0.9.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=1.1.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=1.2.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=1.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=10.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_5_sf=100.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_6_sf=0.75.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_6_sf=0.8.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_6_sf=0.9.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_6_sf=1.1.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_6_sf=1.2.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_6_sf=1.25.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_6_sf=1.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_9_sf=0.8.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_9_sf=0.9.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_9_sf=1.1.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_9_sf=1.2.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/calculated_positions/Recording_9_sf=1.npy View File


BIN
BachelorThesis/Software/PyPrecisionGUI/fingerprinting_tables/SmallManualFingerprint.npy View File


BachelorThesis/Software/PyPrecisionGUI/fingerprinting_tables/SmallManualFingerprint_withAnglesAndCoil.npy → BachelorThesis/Software/PyPrecisionGUI/fingerprinting_tables/SmallManualFingerprint_Ferrite.npy View File


+ 6
- 2
BachelorThesis/Software/PyPrecisionGUI/localization.py View File

@@ -6,7 +6,9 @@ class Localization:
def __init__(self):
self.scale_factor = 0.003
self.k_nearest = 15
self.table = np.load('fingerprinting_tables/Julian_1cm_precision_corrected_antenas.npy')
#self.table = np.load('fingerprinting_tables/Julian_1cm_precision_corrected_antenas.npy') # corrected table made by Ihm (No ferrite)
#self.table = np.load('fingerprinting_tables/SmallManualFingerprint_Ferrite.npy') # manual fingerprinting table (Ferrite) [A bit off]
#self.table = np.load('fingerprinting_tables/Julian_BThesis_table2_switchedAnt5&6 and 7&8.npy') # Switched Ant5<->6 and 7<->8 in Excel (No Ferrite) [Does not work!]
self.data = np.load('recorded_data/current_recording.npy')


@@ -24,10 +26,12 @@ class Localization:
Output: - position [type = np.array[3]]:
The estimated position of the object in this sample x,y,z
"""
#print("fv =", fv)
print("fv =", fv)
feature_vector = fv * self.scale_factor

print("table=", self.table)
repeated_feature_vector = np.square(self.table[:, 9:] - feature_vector)

euclidean_distances = np.sum(repeated_feature_vector, 1)
order = np.argsort(euclidean_distances)


+ 11
- 10
BachelorThesis/Software/PyPrecisionGUI/main_script.py View File

@@ -19,13 +19,13 @@ plt.subplots_adjust(left=0.07, bottom=0.07, right=0.89, top=0.89, wspace=0.2, hs
# Set Axis
ax1.set_xlim([-0.02*mm, 0.52*mm])
ax1.set_ylim([-0.02*mm, 0.52*mm])
ax1.set_xticks(np.arange(0.0*mm, 0.55*mm, 0.05*mm))
ax1.set_yticks(np.arange(0.0*mm, 0.55*mm, 0.05*mm))
#ax1.set_xticks(np.arange(0.0*mm, 0.55*mm, 0.05*mm))
#ax1.set_yticks(np.arange(0.0*mm, 0.55*mm, 0.05*mm))
ax1.set_xlabel('X-Position of object [mm]', fontdict=font)
ax1.set_ylabel('Y-Position of object [mm]', fontdict=font)
ax1.grid(alpha=0.6)
for label in ax1.xaxis.get_ticklabels():
label.set_rotation(90)
#for label in ax1.xaxis.get_ticklabels():
# label.set_rotation(90)

ax2.set_ylim([0.1*mm, 0.6*mm])
ax2.set_xlim([0.0*mm, 0.2*mm])
@@ -153,7 +153,7 @@ def plot_art(recording_number):

pos_counter += 1

ax1.plot(art_info[:, 1], art_info[:, 2], color="Gold", label="ART System", linewidth=5, marker="x")
ax1.plot(art_info[:, 1], art_info[:, 2], color="green", label="ART System", linewidth=1)

print("x=", art_info[:, 1])
print("y=", art_info[:, 2])
@@ -165,10 +165,11 @@ plotting = Plotting()


# Decide what scaling_factors and Recording
scale_factors = np.arange(0.001, 0.0035, 0.0005)
localization.k_nearest = 5
#scale_factors = np.arange(0.001, 0.0035, 0.0005)
scale_factors = [1]
localization.k_nearest = 15

Recording = 15 # which ART Recording to pick
Recording = 5 # which ART Recording to pick


for sf in scale_factors:
@@ -185,8 +186,8 @@ for sf in scale_factors:
positions = positions * mm # convert from m to mm

# Plot IndLoc Positions
ax1.plot(positions[:, 0], positions[:, 1], label="sf = " + str(sf), linewidth=2)
ax2.plot(positions[:, 2], positions[:, 1], label="sf = " + str(sf), linewidth=2)
ax1.plot(positions[:, 0], positions[:, 1], label="sf = " + str(sf), linewidth=1)
ax2.plot(positions[:, 2], positions[:, 1], label="sf = " + str(sf), linewidth=1)


plot_art(Recording)

BachelorThesis/Software/PyPrecisionGUI/plots/Recording_10_(testing_ferrite_data).png → BachelorThesis/Software/PyPrecisionGUI/plots/check Ferrite Data/Recording_10_(testing_ferrite_data).png View File


BachelorThesis/Software/PyPrecisionGUI/plots/Recording_11_(testing_ferrite_data)_sdad.png → BachelorThesis/Software/PyPrecisionGUI/plots/check Ferrite Data/Recording_11_(testing_ferrite_data)_sdad.png View File


BachelorThesis/Software/PyPrecisionGUI/plots/Recording_1_(testing_ferrite_data).png → BachelorThesis/Software/PyPrecisionGUI/plots/check Ferrite Data/Recording_1_(testing_ferrite_data).png View File


BachelorThesis/Software/PyPrecisionGUI/plots/Recording_1_(testing_ferrite_data)_2.png → BachelorThesis/Software/PyPrecisionGUI/plots/check Ferrite Data/Recording_1_(testing_ferrite_data)_2.png View File


BachelorThesis/Software/PyPrecisionGUI/plots/Recording_2_(testing_ferrite_data).png → BachelorThesis/Software/PyPrecisionGUI/plots/check Ferrite Data/Recording_2_(testing_ferrite_data).png View File


BachelorThesis/Software/PyPrecisionGUI/plots/Recording_2_(testing_ferrite_data)_2.png → BachelorThesis/Software/PyPrecisionGUI/plots/check Ferrite Data/Recording_2_(testing_ferrite_data)_2.png View File


BachelorThesis/Software/PyPrecisionGUI/plots/Recording_2_(testing_ferrite_data)_3.png → BachelorThesis/Software/PyPrecisionGUI/plots/check Ferrite Data/Recording_2_(testing_ferrite_data)_3.png View File


BIN
BachelorThesis/Software/PyPrecisionGUI/plots/check Ferrite Data/Recording_6_manual_fingerprinting.png View File


BIN
BachelorThesis/Software/PyPrecisionGUI/plots/check Ferrite Data/Recording_6_manual_fingerprinting_2.png View File


BachelorThesis/Software/PyPrecisionGUI/plots/Recording_8_(testing_ferrite_data).png → BachelorThesis/Software/PyPrecisionGUI/plots/check Ferrite Data/Recording_8_(testing_ferrite_data).png View File


Loading…
Cancel
Save