2012-12-09 00:12 LunaVorax has quit [Quit: Quitte] 2012-12-09 00:12 urandom__ has joined #qi-hardware 2012-12-09 02:19 emeb has quit [Quit: Leaving.] 2012-12-09 02:23 urandom__ has quit [Quit: Konversation terminated!] 2012-12-09 03:12 nerd has quit [Quit: WeeChat 0.3.9.2] 2012-12-09 03:42 wolfspra1l has quit [Quit: Lost terminal] 2012-12-09 04:04 DocScrutinizer05 has quit [Disconnected by services] 2012-12-09 04:04 DocScrutinizer05 has joined #qi-hardware 2012-12-09 04:48 wolfspraul has joined #qi-hardware 2012-12-09 05:21 panda|x201 has joined #qi-hardware 2012-12-09 07:28 Hoolxi has joined #qi-hardware 2012-12-09 08:27 LunaVorax has joined #qi-hardware 2012-12-09 08:42 pcercuei has quit [Quit: dodo] 2012-12-09 10:23 LunaVorax has quit [Quit: Quitte] 2012-12-09 10:26 Hoolxi has quit [Ping timeout: 264 seconds] 2012-12-09 10:31 urandom__ has joined #qi-hardware 2012-12-09 11:04 antgreen has joined #qi-hardware 2012-12-09 11:08 Hoolxi has joined #qi-hardware 2012-12-09 11:48 LunaVorax has joined #qi-hardware 2012-12-09 11:55 Hoolxi has quit [Remote host closed the connection] 2012-12-09 12:55 LunaVorax has quit [Quit: Quitte] 2012-12-09 14:32 jurting has joined #qi-hardware 2012-12-09 14:35 jurting has quit [Read error: Connection reset by peer] 2012-12-09 14:35 jurting has joined #qi-hardware 2012-12-09 14:37 jurting has quit [Read error: Connection reset by peer] 2012-12-09 14:37 Jurting_ has joined #qi-hardware 2012-12-09 14:37 Jurting_ is now known as Jurting 2012-12-09 14:39 Jurting has quit [Read error: Connection reset by peer] 2012-12-09 14:39 Jurting_ has joined #qi-hardware 2012-12-09 14:39 Jurting_ is now known as Jurting 2012-12-09 14:41 Jurting has quit [Read error: Connection reset by peer] 2012-12-09 14:41 Jurting_ has joined #qi-hardware 2012-12-09 14:41 Jurting_ is now known as Jurting 2012-12-09 14:41 Jurting has quit [Client Quit] 2012-12-09 14:46 hmm. given a tiny little AVR with not a lot of memory (1 kB) and an analog signal that's somewhat periodic with period ~700 samples, but in a fairly chaotic way. (it's the output of an acceleration sensor at the of of a chain) how to detect the period ? of course the chip is far too weak for, say, fft. 2012-12-09 14:47 actually, the data is so messy that i may even be looking at the wrong axis. checking ... 2012-12-09 14:47 pcercuei has joined #qi-hardware 2012-12-09 15:11 guanucoluis has joined #qi-hardware 2012-12-09 16:38 rz2k has joined #qi-hardware 2012-12-09 18:11 wpwrak: I'd try this: 2012-12-09 18:12 add a table for your estimation of what the signal could be, and then for each sample compare the value at dt corresponding with predicted period with the actual value 2012-12-09 18:12 then adjust predicted period with something like PID based on the error 2012-12-09 18:46 whitequark: how do you suggest to predict period? 2012-12-09 18:46 there's an algorithm that takes two waveform and calculates something like the integral of |f(t)-f(t+x)|, varying x over the expected range of the period. the value of x that yields the smallest difference is the period. 2012-12-09 18:47 unfortunately, the details of the difference may be tricky (for quantization errors, etc.). and it needs to store many samples and needs lots of cycles. all things that little critter doesn't have :( 2012-12-09 18:49 lekernel__ has joined #qi-hardware 2012-12-09 18:49 lekernel_ has quit [Ping timeout: 255 seconds] 2012-12-09 18:52 basically what you are suggesting is an optimization algorithm, which finds local minimum. So you must provide a good estimation (i.e. initial value) 2012-12-09 18:55 i have a range of plausible values. the underlying movement is a rotation, and it can't be too slow (or the thing doesn't work) and there are also (human) limits to how fast you can spin it 2012-12-09 19:07 ah, and when i flip axes, things look much better :) 2012-12-09 19:13 here's a data set: http://downloads.qi-hardware.com/people/werner/tornado/monitor-0.bz2 2012-12-09 19:13 to visualize with gnuplot: plot " sample rate is 2 kHz. it's from an acceleration sensor that faces towards the center of rotation, so as centrifugal force increases, the values get smaller. 512 is 0 g, 0 is 18 g. 1023 would be -18 g. 2012-12-09 19:17 there are basically two regimes: smooth rotation, e.g. from 20-40k or from 80-110k where the signal is a bumpy sine wave (in an ideal world, it would of course be perfectly smooth) 2012-12-09 19:20 when going fast, around 40-60k, the rotation isn't so smooth anymore because the chain "jumps". so the sinusoid is overlaid with sharp kicks 2012-12-09 19:24 the DC component reflects the expected centrifugal force very accurate. (from 2 Hz to 3 Hz, the ratio is about 4:9). good. i have not disproven the basic laws of physics :) 2012-12-09 19:25 guanucoluis has quit [Ping timeout: 240 seconds] 2012-12-09 20:45 panda|x201 has quit [Ping timeout: 245 seconds] 2012-12-09 21:06 rz2k has quit [] 2012-12-09 21:24 guanucoluis has joined #qi-hardware 2012-12-09 21:45 guanucoluis has quit [Ping timeout: 240 seconds] 2012-12-09 23:04 with a bit of smoothing and tweaking: http://downloads.qi-hardware.com/people/werner/tornado/mon-clk-0.png 2012-12-09 23:05 not the greatest clock recovery but it works reasonably well. now ... tweaking the phase ... 2012-12-09 23:09 MistahDarcy has joined #qi-hardware 2012-12-09 23:21 jluis has joined #qi-hardware 2012-12-09 23:25 urandom__ has quit [Quit: Konversation terminated!]