Landracing Forum Home
January 21, 2018, 09:24:17 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
BACK TO LANDRACING.COM HOMEPAGE
 
   Home   Help Search Calendar Login Register  


(Note: Donations are not tax deductible)







Live Audio Streaming and Archives of Past Events
Next Live Event: TBD
Pages: [1]   Go Down
  Print  
Author Topic: Extract RPM info from Video  (Read 308 times)
0 Members and 1 Guest are viewing this topic.
mtiberio
Full Member
***
Offline Offline

Location: Arlington, VA
Posts: 62


El Mirage M-PG 1000cc record, 141.693




Ignore
« on: November 02, 2017, 09:11:59 AM »

I have no data logging on my motorcycle. I'd like to know what RPM I'm shifting at and what my terminal RPM is. I have gopro video of my run. I could extract the audio from those files. Does anyone have any signal processing software (matlab scripts preferred) which could extract RPM from an audio feed? Exhaust Pulses detected per second could easily be converted to RPM given the number of cylinders and firing order (known). I cant believe I'm the first to think of this, so If I cant find what I want I might have to write it.

Mike
Logged
manta22
Hero Member
*****
Offline Offline

Age: 79
Location: Tucson, AZ
Posts: 3055


What, me worry?




Ignore
« Reply #1 on: November 02, 2017, 11:11:02 AM »

Mike;

You can probably digitize the audio using the Mic input on your computer and then use free software such as Audacity to plot the waveform on-screen. Then measure the pulse period or frequency using the time mark cursors.

http://www.audacityteam.org/download/

Regards, Neil  Tucson, AZ
Logged

Regards, Neil  Tucson, AZ
mtiberio
Full Member
***
Offline Offline

Location: Arlington, VA
Posts: 62


El Mirage M-PG 1000cc record, 141.693




Ignore
« Reply #2 on: November 02, 2017, 11:53:26 AM »

googling around I found some matlab scripts to create spectrograms. it plots in RPS (S=seconds), so you have to multiply by 60. There are a lot of harmonics and at least one sub harmonic in my data, so knowing what the rpm should be helps pick the correct line. Here is my 2nd run from the October El Mirage event. I topped out at 136 which by my calculations should have been ~7400 RPM. The plot shows a bright line at about 125 HZ which when multiplied by 60 yields 7500, so getting close. You can see the RPM variation in 1st gear due to it being too tall, clutch slip and bogging off the line. 2nd, 3rd and 4th are clear (only used 4 gears of a 5 speed due to available gearing options).



here is the code I ran (extracts from 40 to 84 seconds in the input file foo.wav):
[data, fs] = wavread('foo.wav');
data = data(fs*40:fs*84);
winL = 32768;
win = hamming(winL);
nfft = winL;
[S,F,T,P]=spectrogram(data, win, winL/2, nfft, fs, 'yaxis');
surf(T,F,10*log10(P),'edgecolor','none');
axis tight;
view(0,90);
colormap(hot);
set(gca,'clim',[-80 -30]);
xlabel('Time (Seconds)');
ylabel('Frequency (Hz)');
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Simple Audio Video Embedder
Valid XHTML 1.0! Valid CSS!