Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
2bee6cb
sensor_optimal_frequency.py
aanyajain6 Apr 6, 2026
966914a
sensor_optimal_frequency.py
aanyajain6 Apr 6, 2026
2a86aa4
Delete sensor_optimal_frequency.py
aanyajain6 Apr 6, 2026
7a5a1c3
Create sensor_optimal_frequency
aanyajain6 Apr 6, 2026
6925880
Create sensor_optimal_frequency_graphs.md
aanyajain6 Apr 6, 2026
5a2e736
Update sensor_optimal_frequency_graphs.md
aanyajain6 Apr 6, 2026
3670fc8
moved and some notes
goob10000 Apr 6, 2026
dafd550
Create wheel_speed_br.py
aanyajain6 Apr 9, 2026
4ebb758
Add files via upload
aanyajain6 Apr 9, 2026
fee1af7
Create wheel_speed_fl.py
aanyajain6 Apr 9, 2026
6c5f57f
Add files via upload
aanyajain6 Apr 9, 2026
ccf0a8f
Create wheel_speed_fr.py
aanyajain6 Apr 9, 2026
932b28b
Add files via upload
aanyajain6 Apr 9, 2026
2f255cb
Create wheel_speed_bl.py
aanyajain6 Apr 9, 2026
6f33ac4
Add files via upload
aanyajain6 Apr 9, 2026
213bc39
Create suspension_travel_fr.py
aanyajain6 Apr 9, 2026
e03609b
Add files via upload
aanyajain6 Apr 9, 2026
86cddfa
Create suspension_travel_bl.py
aanyajain6 Apr 9, 2026
43f9448
Add files via upload
aanyajain6 Apr 9, 2026
5091f1c
Create suspension_travel_br.py
aanyajain6 Apr 9, 2026
601c881
Add files via upload
aanyajain6 Apr 9, 2026
26ebb14
Create tire_temp_fl.py
aanyajain6 Apr 9, 2026
55cf578
Add files via upload
aanyajain6 Apr 9, 2026
78ff055
Create tire_temp_bl.py
aanyajain6 Apr 9, 2026
b2689c0
Create tire_temp_bl.py
aanyajain6 Apr 9, 2026
782c112
Add files via upload
aanyajain6 Apr 9, 2026
325235a
Create brake_temp.py
aanyajain6 Apr 9, 2026
afdf391
Add files via upload
aanyajain6 Apr 9, 2026
3dc9dcb
Create apps.py
aanyajain6 Apr 9, 2026
5285d4b
Add files via upload
aanyajain6 Apr 9, 2026
9c37e4b
Create battery_voltage.py
aanyajain6 Apr 9, 2026
6589147
Add files via upload
aanyajain6 Apr 9, 2026
ffe5797
Create battery_current.py
aanyajain6 Apr 9, 2026
fb6d06b
Add files via upload
aanyajain6 Apr 9, 2026
689f544
Create battery_tray_temp.py
aanyajain6 Apr 9, 2026
7f0f610
Add files via upload
aanyajain6 Apr 9, 2026
707649e
Create cell_temp.py
aanyajain6 Apr 9, 2026
c222874
Add files via upload
aanyajain6 Apr 9, 2026
6c2fdae
Create cell_voltage.py
aanyajain6 Apr 9, 2026
c004afe
Add files via upload
aanyajain6 Apr 9, 2026
de53561
examples and notes
goob10000 Apr 10, 2026
4d3a5e3
Create graphs
aanyajain6 Apr 28, 2026
b077b88
Update summary.md
aanyajain6 Apr 28, 2026
692c4e8
Update apps.py
aanyajain6 Apr 28, 2026
71c640d
Update battery_current.py
aanyajain6 Apr 28, 2026
ea1b28f
Update battery_tray_temp.py
aanyajain6 Apr 28, 2026
c954bed
Update battery_voltage.py
aanyajain6 Apr 28, 2026
9808897
Update brake_temp.py
aanyajain6 Apr 28, 2026
01e6968
Update cell_temp.py
aanyajain6 Apr 28, 2026
4919f1b
Update cell_voltage.py
aanyajain6 Apr 28, 2026
cb5de08
Update suspension_travel_bl.py
aanyajain6 Apr 28, 2026
5317976
Update suspension_travel_br.py
aanyajain6 Apr 28, 2026
459fd14
Update suspension_travel_fr.py
aanyajain6 Apr 28, 2026
4254075
Update tire_temp_bl.py
aanyajain6 Apr 28, 2026
1875798
Update tire_temp_fl.py
aanyajain6 Apr 28, 2026
7d1362b
Update wheel_speed_bl.py
aanyajain6 Apr 28, 2026
6284e80
Update wheel_speed_br.py
aanyajain6 Apr 28, 2026
cd5b80d
Update wheel_speed_fl.py
aanyajain6 Apr 28, 2026
eaa8115
Update wheel_speed_fr
aanyajain6 Apr 28, 2026
9bad47f
Correct image syntax in summary.md
goob10000 Apr 30, 2026
99017e9
Add files via upload
aanyajain6 May 4, 2026
d87902a
Delete Data/SensorFrequencyAnalysis/import scipy import numpy as np i…
aanyajain6 May 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions Data/SensorFrequencyAnalysis/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import scipy
import numpy as np
import polars as pl
import matplotlib.pyplot as plt

df = pl.read_parquet('/Users/aanyajain/Documents/GitHub/fs-data/FS-3/01112026/011026-23.parquet')
df = df.fill_null(strategy="forward").fill_null(strategy="backward")
signal = df["ETC_STATUS_PEDAL_TRAVEL"].to_numpy()

fft = scipy.fft.fft(signal)
freqs = scipy.fft.fftfreq(len(signal), d=0.01)

attempts = [6, 6.5, 7]
ffts = []
iffts = []
for i, attempt in enumerate(attempts):
ffts.append(fft.copy())
ffts[-1][np.log(np.abs(fft)) < attempt] = 0
ifft = scipy.fft.ifft(ffts[-1])
iffts.append(ifft)

RMSs = [np.sqrt(np.mean((ifft.real - signal)**2)) for ifft in iffts]
plt.plot(attempts, RMSs)
plt.xlabel("Attempt")
plt.ylabel("RMS")
plt.title("APPS - RMS vs Attempt")
plt.show()

plt.plot(signal, label="Real")
for ifft, attempt in zip(iffts, attempts):
plt.plot(ifft.real, label=f"Attempt {attempt}")
plt.xlabel("Time")
plt.ylabel("Amplitude")
plt.legend()
plt.show()

plt.scatter(freqs, np.log(np.abs(fft)), s=0.25)
plt.xlabel("Frequency (Hz)")
plt.ylabel("Magnitude")
plt.title("APPS - Frequency Spectrum")
plt.show()
Binary file added Data/SensorFrequencyAnalysis/apps_graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Data/SensorFrequencyAnalysis/apps_log_graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions Data/SensorFrequencyAnalysis/battery_current.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import scipy
import numpy as np
import polars as pl
import matplotlib.pyplot as plt

df = pl.read_parquet('/Users/aanyajain/Documents/GitHub/fs-data/FS-3/11222025/11222025_22.parquet')
df = df.fill_null(strategy="forward").fill_null(strategy="backward")
signal = df["ACC_POWER_CURRENT"].to_numpy()

fft = scipy.fft.fft(signal)
freqs = scipy.fft.fftfreq(len(signal), d=0.01)

attempts = [5, 6, 7]
ffts = []
iffts = []
for i, attempt in enumerate(attempts):
ffts.append(fft.copy())
ffts[-1][np.log(np.abs(fft)) < attempt] = 0
ifft = scipy.fft.ifft(ffts[-1])
iffts.append(ifft)

RMSs = [np.sqrt(np.mean((ifft.real - signal)**2)) for ifft in iffts]
plt.plot(attempts, RMSs)
plt.xlabel("Attempt")
plt.ylabel("RMS")
plt.title("Battery Current - RMS vs Attempt")
plt.show()

plt.plot(signal, label="Real")
for ifft, attempt in zip(iffts, attempts):
plt.plot(ifft.real, label=f"Attempt {attempt}")
plt.xlabel("Time")
plt.ylabel("Amplitude")
plt.legend()
plt.show()

plt.scatter(freqs, np.log(np.abs(fft)), s=0.25)
plt.xlabel("Frequency (Hz)")
plt.ylabel("Magnitude")
plt.title("Battery Current - Frequency Spectrum")
plt.show()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions Data/SensorFrequencyAnalysis/battery_tray_temp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import scipy
import numpy as np
import polars as pl
import matplotlib.pyplot as plt

df = pl.read_parquet('/Users/aanyajain/Documents/GitHub/fs-data/FS-3/11222025/11222025_1.parquet')
df = df.fill_null(strategy="forward").fill_null(strategy="backward")
signal = df["ACC_TRAY_TEMPS_BUSBAR"].to_numpy()

fft = scipy.fft.fft(signal)
freqs = scipy.fft.fftfreq(len(signal), d=0.01)

attempts = [4, 5, 6]
ffts = []
iffts = []
for i, attempt in enumerate(attempts):
ffts.append(fft.copy())
ffts[-1][np.log(np.abs(fft)) < attempt] = 0
ifft = scipy.fft.ifft(ffts[-1])
iffts.append(ifft)

RMSs = [np.sqrt(np.mean((ifft.real - signal)**2)) for ifft in iffts]
plt.plot(attempts, RMSs)
plt.xlabel("Attempt")
plt.ylabel("RMS")
plt.title("Battery Tray Temp - RMS vs Attempt")
plt.show()

plt.plot(signal, label="Real")
for ifft, attempt in zip(iffts, attempts):
plt.plot(ifft.real, label=f"Attempt {attempt}")
plt.xlabel("Time")
plt.ylabel("Amplitude")
plt.legend()
plt.show()

plt.scatter(freqs, np.log(np.abs(fft)), s=0.25)
plt.xlabel("Frequency (Hz)")
plt.ylabel("Magnitude")
plt.title("Battery Tray Temp - Frequency Spectrum")
plt.show()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions Data/SensorFrequencyAnalysis/battery_voltage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import scipy
import numpy as np
import polars as pl
import matplotlib.pyplot as plt

df = pl.read_parquet('/Users/aanyajain/Documents/GitHub/fs-data/FS-3/01112026/011026-14.parquet')
df = df.fill_null(strategy="forward").fill_null(strategy="backward")
signal = df["ACC_POWER_PACK_VOLTAGE"].to_numpy()

fft = scipy.fft.fft(signal)
freqs = scipy.fft.fftfreq(len(signal), d=0.01)

attempts = [4.5, 5.5, 6.5]
ffts = []
iffts = []
for i, attempt in enumerate(attempts):
ffts.append(fft.copy())
ffts[-1][np.log(np.abs(fft)) < attempt] = 0
ifft = scipy.fft.ifft(ffts[-1])
iffts.append(ifft)

RMSs = [np.sqrt(np.mean((ifft.real - signal)**2)) for ifft in iffts]
plt.plot(attempts, RMSs)
plt.xlabel("Attempt")
plt.ylabel("RMS")
plt.title("Battery Voltage - RMS vs Attempt")
plt.show()

plt.plot(signal, label="Real")
for ifft, attempt in zip(iffts, attempts):
plt.plot(ifft.real, label=f"Attempt {attempt}")
plt.xlabel("Time")
plt.ylabel("Amplitude")
plt.legend()
plt.show()

plt.scatter(freqs, np.log(np.abs(fft)), s=0.25)
plt.xlabel("Frequency (Hz)")
plt.ylabel("Magnitude")
plt.title("Battery Voltage - Frequency Spectrum")
plt.show()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Data/SensorFrequencyAnalysis/brake_temp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions Data/SensorFrequencyAnalysis/brake_temp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import scipy
import numpy as np
import polars as pl
import matplotlib.pyplot as plt

df = pl.read_parquet('/Users/aanyajain/Documents/GitHub/fs-data/FS-3/11222025/11222025_1.parquet')
df = df.fill_null(strategy="forward").fill_null(strategy="backward")
signal = df["IZZE_BRAKETEMP_S1_CH1"].to_numpy()

fft = scipy.fft.fft(signal)
freqs = scipy.fft.fftfreq(len(signal), d=0.01)

attempts = [5.5, 6.5, 7.5]
ffts = []
iffts = []
for i, attempt in enumerate(attempts):
ffts.append(fft.copy())
ffts[-1][np.log(np.abs(fft)) < attempt] = 0
ifft = scipy.fft.ifft(ffts[-1])
iffts.append(ifft)

RMSs = [np.sqrt(np.mean((ifft.real - signal)**2)) for ifft in iffts]
plt.plot(attempts, RMSs)
plt.xlabel("Attempt")
plt.ylabel("RMS")
plt.title("Brake Temp - RMS vs Attempt")
plt.show()

plt.plot(signal, label="Real")
for ifft, attempt in zip(iffts, attempts):
plt.plot(ifft.real, label=f"Attempt {attempt}")
plt.xlabel("Time")
plt.ylabel("Amplitude")
plt.legend()
plt.show()

plt.scatter(freqs, np.log(np.abs(fft)), s=0.25)
plt.xlabel("Frequency (Hz)")
plt.ylabel("Magnitude")
plt.title("Brake Temp - Frequency Spectrum")
plt.show()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions Data/SensorFrequencyAnalysis/cell_temp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import scipy
import numpy as np
import polars as pl
import matplotlib.pyplot as plt

df = pl.read_parquet('/Users/aanyajain/Documents/GitHub/fs-data/FS-3/11222025/11222025_1.parquet')
df = df.fill_null(strategy="forward").fill_null(strategy="backward")
signal = df["ACC_SEG0_TEMPS_CELL0"].to_numpy()

fft = scipy.fft.fft(signal)
freqs = scipy.fft.fftfreq(len(signal), d=0.01)

attempts = [4.5, 5.5, 6.5]
ffts = []
iffts = []
for i, attempt in enumerate(attempts):
ffts.append(fft.copy())
ffts[-1][np.log(np.abs(fft)) < attempt] = 0
ifft = scipy.fft.ifft(ffts[-1])
iffts.append(ifft)

RMSs = [np.sqrt(np.mean((ifft.real - signal)**2)) for ifft in iffts]
plt.plot(attempts, RMSs)
plt.xlabel("Attempt")
plt.ylabel("RMS")
plt.title("Cell Temp - RMS vs Attempt")
plt.show()

plt.plot(signal, label="Real")
for ifft, attempt in zip(iffts, attempts):
plt.plot(ifft.real, label=f"Attempt {attempt}")
plt.xlabel("Time")
plt.ylabel("Amplitude")
plt.legend()
plt.show()

plt.scatter(freqs, np.log(np.abs(fft)), s=0.25)
plt.xlabel("Frequency (Hz)")
plt.ylabel("Magnitude")
plt.title("Cell Temp - Frequency Spectrum")
plt.show()
Binary file added Data/SensorFrequencyAnalysis/cell_temp_graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions Data/SensorFrequencyAnalysis/cell_voltage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import scipy
import numpy as np
import polars as pl
import matplotlib.pyplot as plt

df = pl.read_parquet('/Users/aanyajain/Documents/GitHub/fs-data/FS-3/01112026/011026-14.parquet')
df = df.fill_null(strategy="forward").fill_null(strategy="backward")
signal = df["ACC_SEG0_VOLTS_CELL0"].to_numpy()

fft = scipy.fft.fft(signal)
freqs = scipy.fft.fftfreq(len(signal), d=0.01)

attempts = [1.5, 2.5, 3.5]
ffts = []
iffts = []
for i, attempt in enumerate(attempts):
ffts.append(fft.copy())
ffts[-1][np.log(np.abs(fft)) < attempt] = 0
ifft = scipy.fft.ifft(ffts[-1])
iffts.append(ifft)

RMSs = [np.sqrt(np.mean((ifft.real - signal)**2)) for ifft in iffts]
plt.plot(attempts, RMSs)
plt.xlabel("Attempt")
plt.ylabel("RMS")
plt.title("Cell Voltage - RMS vs Attempt")
plt.show()

plt.plot(signal, label="Real")
for ifft, attempt in zip(iffts, attempts):
plt.plot(ifft.real, label=f"Attempt {attempt}")
plt.xlabel("Time")
plt.ylabel("Amplitude")
plt.legend()
plt.show()

plt.scatter(freqs, np.log(np.abs(fft)), s=0.25)
plt.xlabel("Frequency (Hz)")
plt.ylabel("Magnitude")
plt.title("Cell Voltage - Frequency Spectrum")
plt.show()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions Data/SensorFrequencyAnalysis/graphs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Sensor Frequency Analysis Summary

## Wheel Speed BR
Magnitude cutoff of 10 corresponds to approximately 10 Hz. Suggested sampling frequency is 20 Hz.

![Wheel Speed BR Graph](wheel_speed_br_graph.png)
![Wheel Speed BR Frequency Spectrum](wheel_speed_br_log_graph.png)

## Wheel Speed BL
![Wheel Speed BL Graph](wheel_speed_bl_graph.png)
![Wheel Speed BL Frequency Spectrum](wheel_speed_bl_log_graph.png)

## Wheel Speed FL
![Wheel Speed FL Graph](wheel_speed_fl_graph.png)
![Wheel Speed FL Frequency Spectrum](wheel_speed_fl_log_graph.png)

## Wheel Speed FR
![Wheel Speed FR Graph](wheel_speed_fr_graph.png)
![Wheel Speed FR Frequency Spectrum](wheel_speed_fr_log_graph.png)

## Suspension Travel BR
![Suspension Travel BR Graph](Suspension_Travel_BR.png)
![Suspension Travel BR Frequency Spectrum](suspension_travel_br_graph.png)

## Suspension Travel BL
![Suspension Travel BL Graph](suspension_travel_bl_graph.png)
![Suspension Travel BL Frequency Spectrum](suspension_travel_bl_log_graph.png)

## Suspension Travel FR
![Suspension Travel FR Graph](suspension_travel_fr_graph.png)
![Suspension Travel FR Frequency Spectrum](suspension_travel_fr_log_graph.png)

## Tire Temp FL
![Tire Temp FL Graph](tire_temp_fl_graph.png)
![Tire Temp FL Frequency Spectrum](tire_temp_fl_log_graph.png)

## Tire Temp BL
![Tire Temp BL Graph](tire_temp_bl_graph.png)
![Tire Temp BL Frequency Spectrum](tire_temp_bl_log_graph.png)

## Brake Temp
![Brake Temp Graph](brake_temp.png)
![Brake Temp Frequency Spectrum](brake_temp_log_graph.png)

## APPS
![APPS Graph](apps_graph.png)
![APPS Frequency Spectrum](apps_log_graph.png)

## Battery Voltage
![Battery Voltage Graph](battery_voltage_graph.png)
![Battery Voltage Frequency Spectrum](battery_voltage_log_graph.png)

## Battery Current
![Battery Current Graph](battery_current_graph.png)
![Battery Current Frequency Spectrum](battery_current_log_graph.png)

## Battery Tray Temp
![Battery Tray Temp Graph](battery_tray_temp_graph.png)
![Battery Tray Temp Frequency Spectrum](battery_tray_temp_log_graph.png)

## Cell Temp
![Cell Temp Graph](cell_temp_graph.png)
![Cell Temp Frequency Spectrum](cell_temp_log_graph.png)

## Cell Voltage
![Cell Voltage Graph](cell_voltage_graph.png)
![Cell Voltage Frequency Spectrum](cell_voltage_log_graph.png)
Binary file added Data/SensorFrequencyAnalysis/image-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Data/SensorFrequencyAnalysis/image-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Data/SensorFrequencyAnalysis/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading