Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
I connected the instrumentation amplifier described in an earlier post to a piezoelectric transducer (buzzer) and made recordings at 5000 gain. The plot below shows 1000 such measurements over 1.0 seconds. There is a 4.0 second (at 1000Hz) sample of the data here piezo.csv. There is a clear sinusoidal signal in these data of about 60Hz. These findings were baffling at first, but apparently result from capacitative coupling between the measurement device and 60Hz household AC power lines.
I fit simple periodic mean model to these data:
The least-squares estimates are as follows:
– 577 ADC units – 7.75 ADC units – 59.9 Hz – 4.80 rad
The estimated frequency (
Assuming there are no other signals in these data (which is likely incorrect), the residuals in this regression ought to resemble independent random variates. The histogram for the residuals looks good (bell shaped, no noticeable bias or skew), however, there is obvious residual autocorrelation. The figure below is a plot of the autocorrelation within the residuals.
It’s clear that this method isn’t quite ready to replace the pseudo-RNGs. As time permits, I plan to try some signal processing with these data, in hopes to isolate the independent noise. If the only signal is that induced by capacitative coupling, then a high pass filter (at 60Hz) ought to do the trick.
A recent blog post at Xi’An’s mentioned some tests for randomness, including the Marsaglia Diehard Battery and the NIST Test Suite. Maybe if I get something that isn’t obviously nonrandom, I’ll try out some of these tests.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.