# Decoding TDF's Phase Modulated Time Signal

**URL:** <https://www.ruby-forum.com/t/decoding-tdfs-phase-modulated-time-signal/241309>\
**Category:** GNU Radio\
**Created:** [May 22, 2014, 9:32pm UTC](https://www.ruby-forum.com/t/decoding-tdfs-phase-modulated-time-signal/241309 "2014-05-22T21:32:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [May 22, 2014, 9:32pm UTC](https://www.ruby-forum.com/t/decoding-tdfs-phase-modulated-time-signal/241309/1 "2014-05-22T21:32:54Z")

</div>

Hi Folks,

I am continuing with developing my SDR radio clocks. TDF uses Phase  
Modulation (Details Here[1] and Here [2]), and I’m coming up against  
my limits of understanding, so am after some pointers or at least  
confirmation that I’m doing it wrong or am on the right path from  
those better versed in the art.

I did some googling for how to do phase change detection in gnuradio.  
I came across a post from Eric some years ago[3], and also a URL[4]  
where someone had developed a PSK-31 receiver.

Not having much experience with decoding PM, I decided to try both  
approaches. [5] and [6] are the flowgraphs in .png format. [7] and  
[8] are the screenshots of them running.

The two are laid out the same. At the bottom is the output of the  
multiply block. The middle graph is from post the LPF/Complex-to-Arg/  
Complex to Real as appropriate. The top graph is the output from the  
Binary slicer.

[Note while very tight low pass filters of 10Hz have been shown, wider  
ones have been tried as well - 100Hz, 1kHz, and 10kHz, with similar  
results]

According to [1] there will be 100 milliseconds of no phase modulation  
before the start of second and data bit. While I do see some periods  
(from looking at the binary slicer output) of around 100ms (usually  
a bit longer than 100ms), I also see them more than once a second  
(Well with devel 3 anyway…)

Additionally, there is supposed to be a full second before the start  
of the minute, with no phase modulation (in this case that should be  
around 48000 samples). I never see it, hence me thinking something may  
not be quite right in my approach.

So, am I going about this the “right way” for what I am trying to do ?  
Or is there a better method ? It may just be how weak TDF is with me,  
but while the station itself is pretty weak audio wise:

a) 15dB above the noise floor  
b) I can see a “pip pii pip” on a waterfall, even when I reduce the  
LPF down to 10 Hz (See [9])

[10] and [11] are the GRC files themselves if anyone in Europe wants to  
try them. Source is my Funcube dongle, tuned to 180kHz, and then the  
FIR filter drops down 18kHz to make the 162kHz of TDF.

Thanks in Advance for any suggestions

Iain

[1][ALS162 time signal - Wikipedia](http://en.wikipedia.org/wiki/TDF_time_signal)  
[2][Time and Standard Frequency Station TDF (France)](http://www.eecis.udel.edu/~mills/ntp/tdf.html)  
[3][Re: [Discuss-gnuradio] Compare Phase block](http://lists.gnu.org/archive/html/discuss-gnuradio/2008-04/msg00027.html)  
[4][GNURadio PSK31 Decoder, Part 1 | SDR Adventure](http://sdradventure.wordpress.com/2011/10/15/gnuradio-psk31-decoder-part-1/)  
[5][http://hal.g7iii.net/GRC/TDF/TDF\_Devel\_1.grc.png](http://hal.g7iii.net/GRC/TDF/TDF_Devel_1.grc.png)  
[6][http://hal.g7iii.net/GRC/TDF/TDF\_Devel\_3.grc.png](http://hal.g7iii.net/GRC/TDF/TDF_Devel_3.grc.png)  
[7][http://hal.g7iii.net/GRC/TDF/TDF\_Devel\_1.run.png](http://hal.g7iii.net/GRC/TDF/TDF_Devel_1.run.png)  
[8][http://hal.g7iii.net/GRC/TDF/TDF\_Devel\_3.run.png](http://hal.g7iii.net/GRC/TDF/TDF_Devel_3.run.png)  
[9][http://hal.g7iii.net/GRC/TDF/TDF\_FCD\_Test\_Harness.png](http://hal.g7iii.net/GRC/TDF/TDF_FCD_Test_Harness.png)  
[10][http://hal.g7iii.net/GRC/TDF/TDF\_Devel\_1.grc](http://hal.g7iii.net/GRC/TDF/TDF_Devel_1.grc)  
[11][http://hal.g7iii.net/GRC/TDF/TDF\_Devel\_3.grc](http://hal.g7iii.net/GRC/TDF/TDF_Devel_3.grc)
