Wiimote and Auto Power Spectrum
Modal analysis is used to obtain Power Spectrum from accelerometer. Quickly (see the tech. note for more info.), the aim of this analysis is an identification of frequencies from a recorded signal. The wiimote's accelerometer is able to record signal with a range of frequency between [0Hz 25Hz]. This range is useful for mechanical constraints of human body. (Soldering skills can allow you to extend this range but this is not the purpose of this post). Then, some notions from signal processing need to be described.
1. Sampling
Theorically, the bluetooth connection allows an acquisition of 100 frames per second. But the bluetooth stack management, the Operating System, applications and other peripherals are very disturbing for the acquisition chain Wiimote-Matlab :
Theor., acquisition step is around 0.01s.
A Gaussian distribution with a short standard deviation centered around 0.01s is tolerated. However, this
statistical distribution is not temporally-granted. So, a re-sampling is necessary without too much information losses. Here, an acquisition step of 0.02s (25Hz) were chosen. Well, thoughtful by Nintendo engineers, capacitor limitations of accelerometer range (max. 25Hz) can be considered as an anti-aliasing filter. (Be aware of anti-aliasing if re-sampling period is up to 0.02s.)
Recording Wiimote data with fWIIne ]
One example of an application of FFT to wiimote measurements :
Auto Power Spectrum (APS) comes from FFT computation and provides signal power for a given frequency.
It was necessary to compare Power Spectrum of Both signals before and after re-sampling in order to control efficiency of the re-sampling :
with a peak frequency of 10.2Hz]
3. Experiment - Technical aspects :
Steps :
Pulses were produced at a defined frequency - 1Hz, 2Hz, 10Hz - from a subwoofer (from a computer). The wiimote is located on the top of the subwoofer, horizontally. Recording the values with fWIIne v0.2 for Matlab/Windows XP :
- 1st step : Data Acquisition. At the end, a filename is asked in order to save a txt file.
- 2nd step : Data analysis. In the same directory, loading the file.
N | Comment | Matlab file | Example Stimulus / Measure |
---|---|---|---|
1 | Data acquisitionwith fWIIne |
| test_#Hz.wav |
2 | Spectrum analysis |
| Acquis#Hz_1.txt |
Then some stimuli and measures were performed :
Frq | Stimulus | Measurement files of Wii Remote accel. sensor |
---|---|---|
1 Hz |
|
|
2 Hz |
|
|
10 Hz |
|
|
NB: Using an older release fWIIne v0.1 for Matlab/WinXP, the user will have to adapt the acquisition file, slightly.
In spite of a restricted frequency range, the wiimote allows recording data and Power Spectrum analysis for given experiments and for educational purposes.
6 comments:
Looks like you have done some good work here. I am trying to do some similar computations with LabView and MatLab and I can not find info on the Auto Power Spectrum, could you elaborate on what you have done in your matlab code
Hi,
Quickly, you will find a description of required steps to provide the power spectrum from accelerometer data :
- resampling (around the average sampling values) and zero-cleaning
- filtering (lowpass filter, mainly)
- FFT (including a Hanning Window)
- averaging (...)
- Displaying |X(f)|²
- Finally displaying spectrogram
Hope it will help you.
Wiilliam
Can you give info on the sub-woofer used? Can it reliably produce the frequencies involved?
Many thanks,
L.
Hi,
Please note : Here the analysis is based on periodic [pulses]. You can listen to the audio files.
The analyse is not based on a "pure" sine signal to 1Hz which isn't possible with a .wav file, I suppose.
Wiilliam
(just FYI : Altec Lansing )
hi,
Actually I am doing some tests about Operational Modal analysis.
could you give me some refrence regarding matlab codes?
also, is there a specific code for auto power spectrum in matlab?
is it different from usual power spectrum?
Thx
Hi,
Well, you could find some examples inside the fwiine sourcefiles and also inside Mathworks forums/ressources available on the net.
No, there is no difference between power strum and auto power spectrum. (just to make the difference with cross power spectrum).
Hope my explanations will help you
- Wiilliam
Post a Comment