Open CamDavidsonPilon opened 3 years ago
I wonder if I collect raw adc samples with stirring on, and perform a FFT, would I see the stirring rpm? Would I see the AC noise too?
x = np.array([timestamps])
y = np.array([demeaned signal!])
rad_per_sec = np.linspace(1, 1000, 2000)
pgram = signal.lombscargle(x, y, rad_per_sec, normalize=True)
plt.plot(rad_per_sec, pgram)
# convert to freq with dividing by 2pi
Some raw data (two PDs, one is the reference)
[(0.00019999800133518875, 880), (0.03385359700769186, 864), (0.06947817400214262, 1040), (0.10378776598372497, 1120), (0.13957333998405375, 1104), (0.17438892601057887, 1008), (0.20827452398953028, 960), (0.24369210199802183, 784), (0.27814569300971925, 672), (0.3145882599928882, 656), (0.34971584199229255, 784), (0.3838094369857572, 848), (0.41944601299474016, 1024), (0.45415559998946264, 1104), (0.4883281939837616, 1136), (0.5235877750092186, 1072), (0.5612513269879855, 688), (0.5972138989891391, 624), (0.6321084839873947, 688), (0.6661290799966082, 816), (0.7016286579892039, 1008), (0.7361642470059451, 1056), (0.7722608179901727, 1104), (0.8074054000026081, 1008), (0.8415959939884488, 912)]
[(0.012045857001794502, 9312), (0.04609545200946741, 9280), (0.08082803900470026, 9280), (0.11538362799910828, 9344), (0.1503842120000627, 9488), (0.18525979699916206, 9616), (0.2191683939890936, 9648), (0.25454897299641743, 9712), (0.28912656198372133, 9696), (0.3255831289861817, 9456), (0.36063171198475175, 9312), (0.39463630798854865, 9264), (0.4302098850021139, 9216), (0.4651414699910674, 9328), (0.499265063990606, 9344), (0.5368706170120277, 9648), (0.5721801969921216, 9680), (0.6079557719931472, 9504), (0.64351734900265, 9280), (0.6771639490034431, 9280), (0.7125375279865693, 9200), (0.7476771099900361, 9216), (0.7830886890005786, 9376), (0.8187502649961971, 9568), (0.853310854989104, 9616)]
[(0.00016099799540825188, 912), (0.03395159600768238, 944), (0.06911817801301368, 1056), (0.1033577710040845, 1136), (0.13912734601763077, 1120), (0.17397393201827072, 960), (0.20783053000923246, 928), (0.24323310900945216, 768), (0.27768769901013, 704), (0.31367227202281356, 640), (0.3487128550186753, 784), (0.38279445000807755, 864), (0.418439027009299, 1072), (0.45314661401789635, 1104), (0.486889213003451, 1136), (0.5221507940150332, 1136), (0.5564703860145528, 1072), (0.5923599600209855, 800), (0.6272495450102724, 688), (0.6612101409991737, 640), (0.6967407189949881, 624), (0.7312923080171458, 688), (0.7673678800056223, 960), (0.8025164620194118, 1088), (0.8367000560101587, 1120)]
[(0.011029868997866288, 9328), (0.044746468018274754, 9296), (0.08067604101961479, 9312), (0.11548062702058814, 9424), (0.1499372179969214, 9536), (0.18516479901154526, 9648), (0.2187164000060875, 9664), (0.25537396501749754, 9696), (0.28862256900174543, 9680), (0.3248341389989946, 9392), (0.35952272699796595, 9344), (0.394106316001853, 9264), (0.42940289599937387, 9216), (0.46428148201084696, 9280), (0.49785808302112855, 9296), (0.5331836630066391, 9472), (0.5672522580134682, 9536), (0.6043808170070406, 9680), (0.6382314140209928, 9664), (0.672074012021767, 9632), (0.7077785879955627, 9440), (0.7422011790040415, 9344), (0.7781067519972567, 9184), (0.8133113340009004, 9200), (0.8477079250151291, 9264)]
[(0.00016399798914790154, 816), (0.03383859799942002, 800), (0.06902317999629304, 688), (0.10375676699914038, 624), (0.13954634199035354, 720), (0.1744109279825352, 848), (0.2082695249991957, 896), (0.24418109899852425, 1072), (0.2786336889839731, 1104), (0.3146472609951161, 1008), (0.34970384498592466, 864), (0.3838594389962964, 784), (0.41948501599836163, 640), (0.4541666040022392, 608), (0.4883751980087254, 608), (0.5236567780084442, 768), (0.5579763709974941, 864), (0.5938549439888448, 1056), (0.6287515299918596, 1104), (0.662746126006823, 1104), (0.6983317029953469, 976), (0.7330372910073493, 832), (0.7690588629920967, 656), (0.805528430006234, 720), (0.8398790220089722, 720)]
[(0.012181854981463403, 9760), (0.044567470002220944, 9744), (0.08028004600782879, 9712), (0.1145996380073484, 9632), (0.15045621199533343, 9408), (0.18641178499092348, 9264), (0.21931339398724958, 9280), (0.2552309669845272, 9280), (0.2895605599915143, 9344), (0.32608412599074654, 9600), (0.36049771698890254, 9664), (0.3952153039863333, 9696), (0.43041888598236255, 9648), (0.4650944739987608, 9552), (0.5003210559953004, 9360), (0.5345396490010899, 9296), (0.5693382360041142, 9232), (0.605470805981895, 9248), (0.6396434000052977, 9296), (0.6743559879832901, 9424), (0.7101555629924405, 9616), (0.7451591469871346, 9664), (0.7812097189889755, 9536), (0.8180132810084615, 9264), (0.8564568249857984, 9312)]
[(0.00016499802586622536, 720), (0.03382959801820107, 704), (0.06902318002539687, 640), (0.10326077401987277, 656), (0.13949834302184172, 880), (0.17434092902112752, 1024), (0.2081955270259641, 1056), (0.2435951070219744, 1136), (0.2780406980018597, 1120), (0.3140652700094506, 912), (0.34910385400871746, 768), (0.38318744901334867, 688), (0.41882502601947635, 608), (0.4535066140233539, 656), (0.4872272140055429, 688), (0.5225047950225417, 848), (0.5572893820062745, 976), (0.5933199540013447, 1120), (0.6282695390109438, 1088), (0.6628711280063726, 1008), (0.6984737050079275, 784), (0.7330872940074187, 720), (0.7692188650253229, 624), (0.8058064299984835, 864), (0.8401400220172945, 944)]
[(0.011735861015040427, 9696), (0.045883455022703856, 9680), (0.08081004000268877, 9520), (0.11427164301858284, 9504), (0.1504282130044885, 9312), (0.18579879301250912, 9248), (0.21919639702537097, 9248), (0.25432398001430556, 9328), (0.2887285710021388, 9456), (0.3251091389975045, 9648), (0.35993572502047755, 9696), (0.393937321001431, 9696), (0.4297448960132897, 9568), (0.4643834849994164, 9440), (0.4984330800070893, 9376), (0.5333106660109479, 9264), (0.5682822510134429, 9200), (0.6053658110031392, 9408), (0.6404493940062821, 9552), (0.6755989759985823, 9648), (0.7106415599992033, 9664), (0.7450181520252954, 9616), (0.7918685960175935, 9616), (0.8176162900053896, 9200), (0.8572098200093023, 9552)]
Using a colored LED and looking down any of the pockets, we do see periodic noise at the same frequency as the stirring - do we see this in our signal, too?
It's hard to model, since it's not a precise RPM (+- 5%)...