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.