Re: [time-nuts] WWVB PM Time Questions

2020-07-31 Thread Scud West
The coloring is from matplotlib.  Sometimes I forget what's what. I'm
really not using pandas for much here.  Most of the code in plotting a
minute of data is in making it look fancy.


import numpy as np
import matplotlib.pyplot as plt
import matplotlib.ticker as tkr
import matplotlib.mlab as mlab
import pandas as pd

sFile = 'out.txt'  # in current directory, or give full path

df = pd.read_csv(sFile, header=None,
 names=['sample_time', 'amplitude', 'phase'],
 sep=' ', index_col=0)

phase_deg = np.rad2deg(df_phase.phase)   # phase_deg is a series


plt.subplots(figsize=(15, 3))
ax = plt.subplot(1,1,1)
plt.title('WWVB Phase5 - 70 sec')

ax.plot(phase_deg.clip(-120, 120), lw=0.4)

plt.xlim(6, 71)
plt.ylim(-150, 150)

ax.fill_between(phase_deg.index,
0,
phase_deg.clip(-120, 120), where=phase_deg>=0,
color='green', alpha=0.15)

ax.fill_between(phase_deg.index,
0,
phase_deg.clip(-120, 120), where=phase_deg<0,
color='red', alpha=0.15)


ax.xaxis.set_major_locator(tkr.MaxNLocator(8))
ax.xaxis.set_minor_locator(tkr.AutoMinorLocator(n=10))
ax.grid(b=True, which='major', c='g', linestyle='-', linewidth=0.7)
ax.grid(b=True, which='minor', c='g', linestyle='-', linewidth=0.2)

sSave = 'wwvb_phase_5_70.png'
plt.savefig(sSave, bbox_inches='tight', transparent=False, dpi=100)


Rob

On Fri, Jul 31, 2020 at 1:15 PM jimlux  wrote:
>
> On 7/31/20 11:25 AM, Scud West wrote:
> > Back in December 2018 there was a WWVB thread.
> >
> >  From Poul-Henning's post on 2018-12-05 quoting John N8UR:
> >
> > "While everyone's been talking :-) , I recorded some WWVB IQ data for
> > folks to play with.  You can download it from
> >
> > http://febo.com/pages/wwvb/
> >
> > The receiver ran at 48 ksps and was centered on 80 kHz (to allow a 20
> > kHz IF to move away from 0 Hz crud).  The data was taken in early
> > afternoon in Dayton, Ohio.  WWVB was easily visible in an FFT."
> >
> >
> > I ran the python code posted by Poul-Henning with the WWVB IQ data.
> > The resulting file 'out.txt' has columns for sample time, amplitude,
> > and phase.  It was used for the plots below.  There is about 10
> > minutes of data.
> >
> > initial data: 
> > n8ur_rx_center=0.08MHz_rate=48ksps_start=2018.12.05.13.57.54.bin
> >   (236 MB)
> > plotted data: out.txt   (2.4 MB, 61,000 datapoints)
> >
> > I hadn't looked at phase data before, and it took a while to make any
> > sense of it.  It's surprising how well the bit per second data came
> > through, compared to amplitude modulation.  Different filtering will
> > likely improve the AM performance, but the phase plot looked good now,
> > so here it is.
> >
> > The first graph shows the +90 degree phase shift (top line) and -90
> > (bottom line).  The SDR clock appears relatively stable at first, but
> > drifts lower in frequency at a fairly steady rate until about 550
> > seconds, when it flattens out again.  Overall a bit over 180 degrees
> > more than expected.  A half cycle at 60 kHz, or about 8.3e-06 drift in
> > 10 minutes.  The unpleasantness at about 470 seconds is reflected in
> > the 10 minute plot during minute 7 (3 lines down from the top).  I
> > removed the 'drift' in a crude manner, and it's a wonder it worked as
> > well as it did.
> >
> > The middle two graphs are the same data at different time scales.  I'm
> > not sure if the short term phase variation has any meaning, or if it's
> > 'just noise' at this level.  The WWVB phase change actually takes
> > place 0.1 seconds after the start of the second, but it fit just right
> > for display as is.  The real minute begins at second 6, and this is
> > adjustment is made in the 10 minute waterfall plot.  The first few
> > seconds of data are at the bottom left corner.
> >
> > Green denotes binary 1, phase shift +90 degrees.
> > Red is binary 0, phase shift -90 degrees.
> >
> > A simplified description of WWVB phase-modulated time code:
> >
> > seconds  0 - 12  fixed sync  0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0
> > seconds 13 - 18  time parity (ECC)
> > seconds 19 - 46  binary minute of century
> > seconds 47 - 58  DST and leap sec
> > second  59   fixed sync  0
> >
> > these seconds are notable here:
> >
> > 43, 44, 45, 46 contain changing binary minutes 3, 2, 1, 0
> > 19  a copy of binary minute 0
> > 29, 39  Reserved, but also a copy of binary minute 0 in this sample.
> >
> >
> > I'm using python, numpy, matplotlib, and Pandas.  It all runs pretty
> > quick on my machine, only a fe

Re: [time-nuts] WWV/H Doppler Shift

2018-11-28 Thread Scud West
I think I've seen something similar during and after geomagnetic storms - 
weaker than usual signals, but very low and steady Doppler shifts.  It will be 
interesting to see how things change when solar activity increases. 

The QS1R is a great receiver.  Even with the original TCXO I could see WWV on 
10 and 15 MHz track within 2e-09 while CHU in eastern Canada would have a shift 
of nearly 1 Hz. As long as you're not dealing with voice signals a pretty 
modest antenna will probably do.  I use a bandwidth of 20 Hz for carrier level 
measurements, but the Fldigi would be fine with a wide bandwidth.

Who knew unmodulated carriers could be fun?

Rob


> On Nov 28, 2018, at 1:15 AM, Bill Dailey  wrote:
> 
> I used to measure WWV carrier only (a much more pedestrian approach than 
> yours) with a qs1r locked to a Valon synthesizer driven by a a very nice (for 
> my budget) 1000A oscillator that Corby provided me.
> 
> I often saw (now I could be reading your data wrong) a minimal shift when the 
> signal strength was very low. I researched this phenomenon for quite some 
> time and my hypothesis was that this represents a point where you receive 
> only non-Doppler shifted signal via pure reflection at the ionospher.  From 
> the papers is read this component is always received but it is buried within 
> the usually stronger shifted components.  If I remember right there is a name 
> for that direct (non-shifted) component but it escapes me.
> 
> I then moved, got busy and haven’t gotten an antenna back up.  Your results 
> make me want to get less busy again.
> 
> Thanks,
> 
> Bill Dailey


___
time-nuts mailing list -- time-nuts@lists.febo.com
To unsubscribe, go to 
http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
and follow the instructions there.


[time-nuts] WWV/H Doppler Shift

2018-11-27 Thread Scud West
I’ve been monitoring the Doppler shift of WWV/H and CHU for a while now from my 
location 100 km / 60 mi NW of Seattle.  

The receiver is a QS1R, using an LTC2208 16 bit ADC, and the 125 MHz clock is 
provided by a Bodnar GPSDO.  A Wellbrook ALA1530S+ loop antenna provides good 
coverage for the entire range. 

I use a Python script to tune the QS1R to each frequency for 11 seconds while 
in CW mode.  The 800 Hz beat frequency is measured using the open source 
program Fldigi. 

Fldigi is mainly intended for HF digital modes like RTTY and PSK31, but the 
“Frequency Analysis” function is effectively an audio frequency counter with 
.001 Hz resolution, updated every 1.024 seconds.  The first 5 or 6 samples are 
discarded after a frequency change.  The signal must be within about ± 5 Hz.

During many minutes, WWV transmits a 500 Hz tone, and WWVH a 600 Hz tone (or 
the reverse).  By treating these as separate carriers (e.g. tuning to 5.0006 
MHz) I'm able to separate the Doppler shift and signal strength of the two 
stations.  It's remarkable that Fldigi is able to make an accurate measurement 
of the 500/600 Hz "carriers", since there is a 40 ms gap surrounding the tick 
sound each second.

I've just recently got enough of a handle on Python, Matplotlib, Pandas, 
JupyterLab, and other excellent tools to even begin to analyze and display the 
data.


From my location:

WWV:  Ft Collins, CO1,675 km,  1,040 mi,  113°
WWVH:   Kauai, HI4,335 km,  2,694 mi,  241°




Each datapoint for the 500/600 Hz signal is plotted, to give a sense of the 
signal variation.  Only the smoothed carrier signal is plotted, because 
otherwise it made the graph "too" busy (ha).  The 500/600 Hz plots are moved up 
by 15 dB to correspond with the carrier level.  But this means their displayed 
noise floor is raised as well.  For instance, the WWVH signal from 18:00 until 
past 00:00 is mostly in the noise.




Each observation is for 5 or 6 seconds, and taken a few minutes apart.  If the 
standard deviation of the observation exceeds 0.150 Hz it is rejected.  The 
reject is plotted in light gray, but otherwise ignored.  That's the only filter 
being applied to the data.  WWV is usually stronger at my location, and the 
carrier data correlates with it pretty closely.  Based on looking at a few days 
data, usually WWV gives a more accurate and higher confidence reading than the 
carrier alone, and considerably better than WWVH.  Last week the largest daily 
5 MHz WWV median was .010 Hz (2.0e-09); one other day was .003, but most were 
.001 (2.0e-10).  


I'm just now getting presentable results, and expect to find errors: cosmetic, 
conceptual, and fundamental.  Currently the Python script is as shaky as my 
understanding of basic statistics.

Oh well, back to the data


Rob

___
time-nuts mailing list -- time-nuts@lists.febo.com
To unsubscribe, go to 
http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
and follow the instructions there.