Re: [time-nuts] Recommendations for Mains Power Monitor / Logger
Hi, I did my recordings of grid frequency and cycle count with my homebrew device. https://www.tindie.com/products/DetlefS/mains-ac-frequency-meter/ http://www.dschuecker.de/ The heart is a STM ARM processor, which samples the grid voltage at 160ks/s behind a step-down transformer, slow enough to handle the data in realtime. It is clocked with a TCXO, off 0.4ppm. I do a sinewave-fit on any single cycle. Measured precision on an artifical 50Hz sine wave is 1.4E-4 Hz, which comes close to a jitter of 60ns. Precision is heavily affected by transients and harmonics, so an aggressive digital filtering is necessary, analog filtering is not sufficient. The step response of this filter limits the response of the device to changing frequency. Cycle count should not be affected by glitches. I use hysteresis and time windowing on the sampled and filtered data for counting. The data is presented on a RS232 interface and pumped to the cloud by a Raspberry running a Python script. I knew a bit about FNET but I was not aware of www.naspi.org. Are there similar initiatives in Europe? Cheers Detlef DD4WV "time-nuts" schrieb am 11.03.2018 23:13:26: > Von: Attila Kinali > An: Discussion of precise time and frequency measurement > Datum: 11.03.2018 23:30 > Betreff: Re: [time-nuts] Recommendations for Mains Power Monitor / Logger > Gesendet von: "time-nuts" > > On Sun, 11 Mar 2018 14:41:23 -0500 > Dana Whitlow wrote: > > > I'll have to take a look around to see if there isn't something cheap that > > can run > > standalone so I don't have to tie up (or wear out) a whole PC for the > > acquistion > > process. > > Blub... I should the whole mailsorry about that. > > How about this: get a uC board (e.g. STM32discovery), replace > the crystal with a 10MHz input from your frequency reference. > Use the on-chip 12bit (really just 6bit) ADC to sample the > sine wave from your mains. Do phasor measurement in software. > > Probably any sampling frequency between 200Hz and 1kHz should > do the job, Which is slow enough so you can still handle the > samples with the uC alone and don't need any fancy DSP. > > > Attila Kinali > > -- >The bad part of Zurich is where the degenerates > throw DARK chocolate at you. > ___ > time-nuts mailing list -- time-nuts@febo.com > To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts > and follow the instructions there. ___ time-nuts mailing list -- time-nuts@febo.com To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts and follow the instructions there.
Re: [time-nuts] Allan variance by sine-wave fitting
The harmonics limit the perfomance if you want to find the frequency of a given, sampled sinewave with linear methods. Thats at least my finding when I built a device to measure grid frequency fast and with high accuracy. I had to use high-Q digital filters for the fundamental. Their slow transient response limited the speed of new frequency measurements. Cheers Detlef DD4WV "time-nuts" schrieb am 23.11.2017 16:34:39: > Von: Tim Shoppa > An: Discussion of precise time and frequency measurement > Datum: 23.11.2017 16:35 > Betreff: Re: [time-nuts] Allan variance by sine-wave fitting > Gesendet von: "time-nuts" > > I wonder how much a fitting approach is affected by distortion (especially > harmonic content) in the waveform. > > Of course we can always filter the waveform to make it more sinusoidal but > then we are adding L's and C's and their tempcos to the measurement for > sure destroying any femtosecond claims. > > Tim N3QE > > On Wed, Nov 22, 2017 at 5:57 PM, Ralph Devoe wrote: > > > Hi, > >The fitting routine only takes up 40 uS of the 1 sec interval > > between measurements, as shown in Fig. 1 of the paper. This is less than > > 10(-4) of the measurement interval. It just determines the phase difference > > at the start of every second. I don't think the filtering effect is very > > large in this case. > > The interesting thing is that good results are achievable with such > > a short fitting interval. One way to think of it is to treat the fitting > > routine as a statistically optimized averaging process. Fitting 40 uS, that > > is 4096 points at 10 ns/point, should reduce the noise by a factor of 64 > > (roughly). The single shot timing resolution of the ADC is about 10 pS (see > > Fig. 4), so dividing this by 64 brings you down into the 100's of fs range, > > which is what you see. > > > > Ralph > > ___ > > time-nuts mailing list -- time-nuts@febo.com > > To unsubscribe, go to https://www.febo.com/cgi-bin/ > > mailman/listinfo/time-nuts > > and follow the instructions there. > > > ___ > time-nuts mailing list -- time-nuts@febo.com > To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts > and follow the instructions there. ___ time-nuts mailing list -- time-nuts@febo.com To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts and follow the instructions there.
Re: [time-nuts] Allan variance by sine-wave fitting
Hi, just my two cents on sine wave fitting. A undamped sine wave is the solution of the difference equation sig(n+1)=2*cos(w)*sig(n)-sig(n-1) This is a linear system of equations mapping the sum of the samples n+1 and n-1 to the sample n. The factor 2*cos(w) is the unknown. The least-squares solution of the overdetermined system is pure linear algebra, no nonlinear fitting involved. The trick also works for a damped sine wave. Care must be taken for high 'oversampling' rates, it works best for 4samples/sinewave, ie near Nyquist/2. Cheers Detlef DD4WV ___ time-nuts mailing list -- time-nuts@febo.com To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts and follow the instructions there.