[1]: https://www.keysight.com/blogs/tech/sim-des/2021/06/10/autom...
[1]: https://www.keysight.com/blogs/tech/sim-des/2021/06/10/autom...
This setup is easy to put together but might not be optimal. I don't have a lot of experience with SQLite performance tuning, and I wonder if it will be faster to have worker threads pass everything thru IPC to a writer thread, which batches rows and writes to a centralized database.
Curious to see how far off I am :)
But at 4000 samples per second? You'd think twenty would be plenty.
NyQuist: 4000 samples per second means we are looking to get information about an up to 1800 Hz signal. A6 on the piano keyboard (excluding harmonics).
Sorry, I mean Nyquist. I was confused by NyQuil, the night time flu medicine.
Doesn't seem unreasonable to want to sample at that rate, especially for tweaking suspension and such.
The propagation speed can be misleading.
All that matters is whether there are oscillations in the suspension that go up to 1800 Hz, not how fast the car is going forward. If there are, those would have to be harmonics. You'd think would be beyond the frequency response of the suspension. Suspensions are heavy, bulky components and are heavily dampened (which is a kind of low-pass filter).
If the suspension moves anywhere near 17 mm per sample (250 km/h vertically), that car is in serious trouble.
Surely you care about more than just oscillations, for example how exactly the suspension compresses during breaking. If you've seen slow-mo shots from high-speed race cars riding a curb, it can be quite violent with lots of movement.
In this article[1] about Formula 1, they state they sample vibration data at 200kHz. This is then filtered to a lower rate for logging, but getting say 5kHz out of 200kHz raw sensor data doesn't seem unreasonable to me.
They also mention they collect about 30MB per lap of sensor data from more than 250 sensor, and laps are typically around 1.5-2 minutes long. If one assumes a 2 minute lap and 250 sensors, that's 1kB/s per sensor on average.
[1]: https://www.racecar-engineering.com/articles/how-data-works-...
The entire graph of suspension vs time should be well below the frequency range. It doesn't matter whether we are looking for frequency domain features or time domain features.
(Like someone said upthread, it's probably 4000 events per second as an aggregate from numerous sensors, mutiplexed into one sqlite. Or maybe even a total across the three sqlites.)
Maybe not quite 4kSps is needed but for vibration and such it'd make sense to me.
But sure, could very well be an aggregate rate.
[1]: https://www.speedwaymotors.com/the-toolbox/general-sprint-ca...
The sample rate you need to reconstruct the motion of shocks is entirely determined by Nyquist, just like sampling audio or any other signal.
You need some 2.2x the highest frequency you want to capture, and make sure you filter out anything above that (if it exists).
If there is nothing above 20 Hz in the suspension's movement, or nothing you're interested in, then you need a 44 Hz sample rate. (More if you implement oversampling, but not 10 times more let alone 100.)
Lots of folks put work into a car and they all have metrics of interest to tell how their systems perform. An ideal telemetry system for us captures all this information and makes it available both in real time and analysis.