Call Search
     

New to Ham Radio?
My Profile

Community
Articles
Forums
News
Reviews
Friends Remembered
Strays
Survey Question

Operating
Contesting
DX Cluster Spots
Propagation

Resources
Calendar
Classifieds
Ham Exams
Ham Links
List Archives
News Articles
Product Reviews
QSL Managers

Site Info
eHam Help (FAQ)
Support the site
The eHam Team
Advertising Info
Vision Statement
About eHam.net

   Home   Help Search  
Pages: [1]   Go Down
  Print  
Author Topic: Bayesian Morse decoder for FLDIGI - new test results  (Read 7804 times)
AG1LE
Member

Posts: 137


WWW

Ignore
« on: June 11, 2014, 07:30:23 PM »

I did some more development and testing on the experimental Bayesian Morse decoder that I have integrated with FLDIGI.
I used it at CQ WW WPX CW contest and discovered some interesting new behaviors that are documented in my blog
http://ag1le.blogspot.com/2014/06/new-morse-decoder-part-4.html

I did also new CER vs. SNR testing round using different pre-filter bandwidth settings and discovered some unexpected behaviors.
See the example graphs below:


Latest source code version is available here http://www.w1hkj.com/ag1le/fldigi-3.21.77.bayes.v3.tar.gz if anybody in this forum is interested to try out.

73
Mauri AG1LE
Logged
JAHAM2BE
Member

Posts: 277


WWW

Ignore
« Reply #1 on: June 11, 2014, 08:05:17 PM »

Very interesting to read your blog on this topic.

Question: how feasible is it to attempt, in fldigi, to use the same Bayesian approach in order to decode all CW signals in the passband, like CW skimmer?

I have a hard enough time grasping the concepts behind decoding a single CW signal... decoding multiple CW signals simultaneously is really an interesting problem. Reading your blog, it seems that one approach might be a two-level approach: first, determine the probability that a signal is present, or not, at each frequency in the passband; for a given frequency, if the probability exceeds some threshold, then automatically start running another decoder instance at that frequency (that then tries to interpret the signal). Might that work?
« Last Edit: June 11, 2014, 08:17:22 PM by JAHAM2BE » Logged

N3QE
Member

Posts: 2341




Ignore
« Reply #2 on: June 11, 2014, 09:04:50 PM »

Just my experience by ear:

I know there are some out there who swear up and down that super narrow filters are the best way to copy morse code but they're nuts. 20 Hz wide filters make any piece of noise sound exactly like a dit, and any actual signal sounds all mushy.

IMHO even 80Hz is too narrow for all but the most ridiculous QRM. Again, any noise crash sounds like a dit, and actual signal gets all mushed out.

I doubt the computer quite gets the psychosis that the human ear+brain develops under extremely narrow filtering, but even then, much of the actual information is in the sidebands of the keyed signal.
Logged
KI6LZ
Member

Posts: 599




Ignore
« Reply #3 on: June 11, 2014, 09:41:18 PM »

Confirms my listening experience. On very weak signals if the bandwidth is too narrow (<200 Hz) the noise starts sounding like code. Make sense that if filter is very narrow the noise frequency becomes the center passband of the filter approaching a single tone. Really need some integration to pull out the weak signals.
Logged
N4OI
Member

Posts: 210




Ignore
« Reply #4 on: June 12, 2014, 06:02:30 AM »

[...] I know there are some out there who swear up and down that super narrow filters are the best way to copy morse code but they're nuts. [...] IMHO even 80Hz is too narrow for all but the most ridiculous QRM. [...] I doubt the computer quite gets the psychosis that the human ear+brain develops under extremely narrow filtering, [...]

My experience: the K3's 50Hz bandwidth makes me feel like the only QSO on a crowded band.   Call me psychotic, but this comparison of computer decoders and my brain has me feeling a little bit like John Henry and the steam drill... 

http://en.wikipedia.org/wiki/John_Henry_(folklore)

73  Grin
Logged
N3QE
Member

Posts: 2341




Ignore
« Reply #5 on: June 12, 2014, 07:24:22 AM »

Confirms my listening experience. On very weak signals if the bandwidth is too narrow (<200 Hz) the noise starts sounding like code. Make sense that if filter is very narrow the noise frequency becomes the center passband of the filter approaching a single tone. Really need some integration to pull out the weak signals.

While we aren't supposed to have key clicks, the phase information in "on"/"off" transitions of real code help our ears and brains do decoding.

This shows up in some of the best RTTY decoders. e.g. 2Tone RTTY decoder works best when receiver bandwidth is 500Hz or wider. I think super-narrow filtering at the receiver actually distorts/destroys important phase information that the best decoders can make use of.
Logged
N3QE
Member

Posts: 2341




Ignore
« Reply #6 on: June 12, 2014, 07:41:52 AM »

[...] I know there are some out there who swear up and down that super narrow filters are the best way to copy morse code but they're nuts. [...] IMHO even 80Hz is too narrow for all but the most ridiculous QRM. [...] I doubt the computer quite gets the psychosis that the human ear+brain develops under extremely narrow filtering, [...]

My experience: the K3's 50Hz bandwidth makes me feel like the only QSO on a crowded band.   Call me psychotic, but this comparison of computer decoders and my brain has me feeling a little bit like John Henry and the steam drill... 

http://en.wikipedia.org/wiki/John_Henry_(folklore)

K3 and other modern DSP rigs are very good. Still, in high QRM situations I sometimes find myself turning bandwidth down and down and down inducing "narrow ringing psychosis". Then I widen back up to 600Hz or more, and all of a sudden that seems like the right solution instead.

I think that by experimenting with machine decoders, we also learn things, mathematical or computational or information theory or just work habits, that help us decode by ear.

On John Henry vs the Steam Hammer... interestingly, a whole lot of modern information theory and electrical engineering came out of the efforts of mathematicians working on improving the linkages in steam engines. For example, Chesbyshev developed the whole theory of Chesbyshev polynomials to model steam engines.  Today these polynomials are used to build important Chesbyshev filters used for many types of analog and digital signal processing. http://www2.math.ou.edu/~jalbert/chebyshev.pdf
Logged
AG1LE
Member

Posts: 137


WWW

Ignore
« Reply #7 on: June 12, 2014, 06:59:54 PM »

Question: how feasible is it to attempt, in fldigi, to use the same Bayesian approach in order to decode all CW signals in the passband, like CW skimmer?

I have a hard enough time grasping the concepts behind decoding a single CW signal... decoding multiple CW signals simultaneously is really an interesting problem. Reading your blog, it seems that one approach might be a two-level approach: first, determine the probability that a signal is present, or not, at each frequency in the passband; for a given frequency, if the probability exceeds some threshold, then automatically start running another decoder instance at that frequency (that then tries to interpret the signal). Might that work?
Your proposed concept sounds doable.  I have implemented the Bayesian decoder as C++ class so it is fairly trivial to start new independent instances. In the standalone version (posted in Github https://github.com/ag1le/morse-wip)  there is also some code to find spectrum peaks (given threshold)  and associated frequencies.  This would need some more work to make a complete CW skimmer like decoder.  Are you interested in working on this?

73
Mauri AG1LE
Logged
JAHAM2BE
Member

Posts: 277


WWW

Ignore
« Reply #8 on: June 12, 2014, 08:56:52 PM »

Reading your blog, it seems that one approach might be a two-level approach: first, determine the probability that a signal is present, or not, at each frequency in the passband; for a given frequency, if the probability exceeds some threshold, then automatically start running another decoder instance at that frequency
Your proposed concept sounds doable.  I have implemented the Bayesian decoder as C++ class so it is fairly trivial to start new independent instances. In the standalone version (posted in Github https://github.com/ag1le/morse-wip)  there is also some code to find spectrum peaks (given threshold)  and associated frequencies.  This would need some more work to make a complete CW skimmer like decoder.  Are you interested in working on this?

In my case the salient question has not so much to do with interest, but rather with knowledge (or lack thereof) to pursue this... all I remember about Bayesian inference is the general concept: "knowing the probability of a feature occurrence for a given category, what is the probability of the category given the observed feature?"

In the case of attempting to decide if a signal is present, or not, at a frequency in the passband: you mentioned a threshold-based peak-finding approach, but is that really optimal, or could a Bayesian approach be used here? And how would such a Bayesian problem be formulated, to decide if "a morse signal" is present at any specific frequency f? I suppose the categories are "morse signal present" or "no morse signal present", but what features do we observe? And do we need to take the WPM into account? Perhaps a 5 WPM morse signal appears quantitatively different than a 20 WPM morse signal in terms of the observed features...

Anyway, as a first step, I'll have a go at getting your latest code up and running.

----

EDIT: regarding what features to observe to decide if a morse signal is present at a specific frequency in the waterfall: my thinking is still very foggy on this, but further reading of your blog suggests the lowest level features might be "tone" and "silence"... given those probabilistic observations, we might then decide if those tone/silence features can combine - with computed probability - to morse symbols, then at an even higher level we can decide if those morse symbols can combine - with computed probability - to a QSO, then we finally have the probability that a QSO is occurring at a specific frequency. Is something like that a possibly valid approach?
« Last Edit: June 12, 2014, 09:19:46 PM by JAHAM2BE » Logged

AG1LE
Member

Posts: 137


WWW

Ignore
« Reply #9 on: June 28, 2014, 03:12:37 AM »

Reading your blog, it seems that one approach might be a two-level approach: first, determine the probability that a signal is present, or not, at each frequency in the passband; for a given frequency, if the probability exceeds some threshold, then automatically start running another decoder instance at that frequency


In my case the salient question has not so much to do with interest, but rather with knowledge (or lack thereof) to pursue this... all I remember about Bayesian inference is the general concept: "knowing the probability of a feature occurrence for a given category, what is the probability of the category given the observed feature?"

In the case of attempting to decide if a signal is present, or not, at a frequency in the passband: you mentioned a threshold-based peak-finding approach, but is that really optimal, or could a Bayesian approach be used here? And how would such a Bayesian problem be formulated, to decide if "a morse signal" is present at any specific frequency f? I suppose the categories are "morse signal present" or "no morse signal present", but what features do we observe? And do we need to take the WPM into account? Perhaps a 5 WPM morse signal appears quantitatively different than a 20 WPM morse signal in terms of the observed features...

Anyway, as a first step, I'll have a go at getting your latest code up and running.

----

EDIT: regarding what features to observe to decide if a morse signal is present at a specific frequency in the waterfall: my thinking is still very foggy on this, but further reading of your blog suggests the lowest level features might be "tone" and "silence"... given those probabilistic observations, we might then decide if those tone/silence features can combine - with computed probability - to morse symbols, then at an even higher level we can decide if those morse symbols can combine - with computed probability - to a QSO, then we finally have the probability that a QSO is occurring at a specific frequency. Is something like that a possibly valid approach?

You may want to read this paper http://www.phas.ubc.ca/~gregory/papers/bayesrevol.pdf on Bayesian periodic signal detection. It has some examples how to use FFT to calculate Bayesian probability density to find spectral peaks.  This method has been used in analysing NMR data as well as in radio astronomy to find periodic signals from noisy data. The next problem would then be to find a good model for estimating noise variance.

73
Mauri AG1LE
Logged
N4OI
Member

Posts: 210




Ignore
« Reply #10 on: June 28, 2014, 04:28:55 AM »


[...]
On John Henry vs the Steam Hammer... interestingly, a whole lot of modern information theory and electrical engineering came out of the efforts of mathematicians working on improving the linkages in steam engines. For example, Chesbyshev developed the whole theory of Chesbyshev polynomials to model steam engines.  Today these polynomials are used to build important Chesbyshev filters used for many types of analog and digital signal processing. http://www2.math.ou.edu/~jalbert/chebyshev.pdf

When first reading this, I assumed it was a wild story to just get us back on the subject... but then I read the referenced article.  These great thinkers behind the mechanisms of the day were truly gifted and amazing!  Thanks for sharing!

73
Logged
N3QE
Member

Posts: 2341




Ignore
« Reply #11 on: July 04, 2014, 10:07:29 AM »


[...]
On John Henry vs the Steam Hammer... interestingly, a whole lot of modern information theory and electrical engineering came out of the efforts of mathematicians working on improving the linkages in steam engines. For example, Chesbyshev developed the whole theory of Chesbyshev polynomials to model steam engines.  Today these polynomials are used to build important Chesbyshev filters used for many types of analog and digital signal processing. http://www2.math.ou.edu/~jalbert/chebyshev.pdf

When first reading this, I assumed it was a wild story to just get us back on the subject... but then I read the referenced article.  These great thinkers behind the mechanisms of the day were truly gifted and amazing!  Thanks for sharing!

You should try going back and reading the original Bell Labs papers about feedback theory (especially Harry Nyquist, famed by the "Nyquist plot", and Hendrik Bode, famed by the "Bode Plot") and information theory (again Nyquist, "Nyquist rate").

By the time I learned these in the 1980's, the textbooks seemed to have completely lost the context in which these discoveries were made, and often didn't even mention their discoverers. In fact, the original papers and work these guys were doing were absolutely nitty-gritty stuff... improving frequency response or flatness of tube amplifiers, or putting more telegraph channels across a limited number of long-line wires. But in doing their work they came up with such fundamental concepts that folks today who have never seen a vacuum tube, or used a telegraph, consider them the building blocks of everything today in control systems design and information theory.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!