Discussion:
[Freetel-codec2] 4FSK with random bits
Steve
2016-03-23 22:35:53 UTC
Permalink
I've been playing with the 4FSK modulator. Every once in awhile I would get
some bad decodes when I throw random data bits at it.

For example here's the frequency peaks decoded from a random 96 bit pattern:

1218.75
2671.875
4546.875
5718.75

Input:
100010001100010011100100001100001011000101101101111111110111001000100100111100000010000100001100

Decoded:
000100010010000100101001000010000001100001010110011010101001100001000101001010000000010001000010

The 4FSK frequency peaks didn't do too well, so I plotted the output using
audacity:


​
I don't know where it got that 5700 Hz number from, ha. But you can see
that this random 96-bit sequence didn't really produce a 4FSK spectrum.

If I send it "01" or "10", all "1" or all "0" it can very well be a CW
signal.

Anyway, I was thinking of a way to make sure that each of the 4 frequencies
were hit about 25% of the time. Maybe I'm just playing too hard...
glen english
2016-03-23 22:49:15 UTC
Permalink
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Gregory Maxwell
2016-03-23 22:59:40 UTC
Permalink
should be able to pass continuous random sequence. that sort of testing
usually finds and breaks clock and bit recovery under pathological
conditions. testing can take 'quite a while' - days- to test almost every
conceivable run length condition that is a couple of bandwidth multiples of
the recovery loops..... usually the cause of much frustration and for me,
usually leads to a simplification of what I had.....
If you're not using one already, you want a 2^(symbits),
recovery_loop_len_in_symbols debrujin sequence as your test input. These
get pretty big pretty fast if your recovery loop is many symbols long...
but nothing brings out the corner cases like an exhaustive test. :)
glen english
2016-03-23 23:56:50 UTC
Permalink
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Brady O'Brien
2016-03-23 22:53:08 UTC
Permalink
The frequency estimator works by taking an FFT of the sample buffer,
averaging it with the FFT of the last few sample buffers, and finding the
four (or two for 2FSK) frequency peaks. It's pretty simple, but allows us
to track a good deal of frequency drift and possible weird spacing from
different modulators. If there isn't enough of one of the symbols, it will
throw the estimator off. If you make a few assumptions about the frequency
spacing and drift, it wouldn't be too difficult to re-work the estimator to
handle a situation with less of each of the four tones. We're not too
worried about it for 2400A, as the UW and frame padding provides enough
variety to not knock the freq. estimator out of whack.

If you want to mess around with it yourself, the frequency estimation
happens in fsk_demod_freq_est
Post by Steve
I've been playing with the 4FSK modulator. Every once in awhile I would
get some bad decodes when I throw random data bits at it.
1218.75
2671.875
4546.875
5718.75
100010001100010011100100001100001011000101101101111111110111001000100100111100000010000100001100
000100010010000100101001000010000001100001010110011010101001100001000101001010000000010001000010
The 4FSK frequency peaks didn't do too well, so I plotted the output using
​
I don't know where it got that 5700 Hz number from, ha. But you can see
that this random 96-bit sequence didn't really produce a 4FSK spectrum.
If I send it "01" or "10", all "1" or all "0" it can very well be a CW
signal.
Anyway, I was thinking of a way to make sure that each of the 4
frequencies were hit about 25% of the time. Maybe I'm just playing too
hard...
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
Freetel-codec2 mailing list
https://lists.sourceforge.net/lists/listinfo/freetel-codec2
Steve
2016-03-24 00:13:30 UTC
Permalink
Post by Brady O'Brien
If you want to mess around with it yourself, the frequency estimation
happens in fsk_demod_freq_est

I converted that algorithm to java and played with it. One thing I noticed
though, and I'm not much of a DSP person, was that it is doing a size 1024
FFT with a 1920 samples, so I assume it just ignores the extra samples at
the end.

I'm wondering if a 2048 FFT would be better (more memory though, and wasted
at the end). Maybe downsample the 1024 reals back to 512 reals again.

Maybe not enough to worry about??

Thanks all, interesting stuff!
Brady O'Brien
2016-03-24 00:50:40 UTC
Permalink
Where are you hosting your port at? There was a one-liner bug in the C fsk
modem having to do with the frequency estimation that you may be running in
to.
Post by Brady O'Brien
Post by Brady O'Brien
If you want to mess around with it yourself, the frequency estimation
happens in fsk_demod_freq_est
I converted that algorithm to java and played with it. One thing I noticed
though, and I'm not much of a DSP person, was that it is doing a size 1024
FFT with a 1920 samples, so I assume it just ignores the extra samples at
the end.
I'm wondering if a 2048 FFT would be better (more memory though, and
wasted at the end). Maybe downsample the 1024 reals back to 512 reals again.
Maybe not enough to worry about??
Thanks all, interesting stuff!
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
Freetel-codec2 mailing list
https://lists.sourceforge.net/lists/listinfo/freetel-codec2
Steve
2016-03-24 01:05:38 UTC
Permalink
https://goo.gl/p0CM5J

Just on my google drive for now. I simplified some things for 4FSK only, so
some of the dynamics are fixed set.
Post by Brady O'Brien
Where are you hosting your port at? There was a one-liner bug in the C fsk
modem having to do with the frequency estimation that you may be running in
to.
Post by Brady O'Brien
Post by Brady O'Brien
If you want to mess around with it yourself, the frequency estimation
happens in fsk_demod_freq_est
I converted that algorithm to java and played with it. One thing I
noticed though, and I'm not much of a DSP person, was that it is doing a
size 1024 FFT with a 1920 samples, so I assume it just ignores the extra
samples at the end.
I'm wondering if a 2048 FFT would be better (more memory though, and
wasted at the end). Maybe downsample the 1024 reals back to 512 reals again.
Maybe not enough to worry about??
Thanks all, interesting stuff!
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
Freetel-codec2 mailing list
https://lists.sourceforge.net/lists/listinfo/freetel-codec2
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
Freetel-codec2 mailing list
https://lists.sourceforge.net/lists/listinfo/freetel-codec2
Steve
2016-03-24 01:36:55 UTC
Permalink
I made it a bit easier, and uploaded it to:

https://github.com/a-la-mode/FSKModem

I didn't realize google drive can't view java :-)

Steve

Loading...