[Elecraft] HRD cw copy
wayne burdick
n6kr at elecraft.com
Thu Jan 22 12:18:04 EST 2009
Dan Romanchik KB6NU wrote:
> But copying CW isn't like trying to understand natural language. If
> computers can now beat grandmasters at chess, computers should be able
> to copy any code that a good operator can decipher. I don't even
> think we need more powerful computers; we just need better algorithms.
Humans use lexicographical and semantic clues to fill in dropped CW
characters, and computers can do the same. But this goes way beyond the
simple signal processing used in, say, the K3's present CW decoder or
the one used in HRD. (I studied natural language recognition in college
and was anxious to play with either neural networks or traditional AI
methods as the foundation for CW decoding, but my other classes got in
the way :)
One idea from the early days of AI is the so-called "blackboard" model.
Imagine a garbled sentence on a blackboard, with various experts
offering their opinions about what each letter and word is based on
their specialized knowledge of word morphology, letter frequency,
syntax, semantics, etc. You weigh these opinions based on degree of
confidence, and once there's enough evidence for a letter or word, you
fill it in, which in turn offers additional information to the
highest-level expert, who might be considering the actual meaning of a
phrase. His predictions can then strengthen the evidence for lower
level symbols, and so on. Such methods are very algorithm-intensive,
but might be useful for some aspects of CW stream parsing.
A neural network could handle this, too, and has the advantage of
self-organization. This is how I'd approach it (assuming unlimited free
time--not!). You could use any of several different types of networks
that have been proven successful at NLP (natural language processing).
For example, you might take the incoming CW, break it into samples (say
a few samples per bit at the highest code speed to be processed), shift
the serial data representing 5 to 20 letters into a serial-to-parallel
shift register, then feed the parallel data to the network's inputs. Or
you could use a network with internal feedback (memory), with just one
input, which itself could be "fuzzy" (the analog voltage from an
envelope detector) or digital (0 or 1 depending on the output of a
comparator, looking at the CW stream). The output might be a parallel
binary word, perhaps ASCII, or a single output with multiple levels,
where the voltage itself represents a symbol.
To make this work, you need at least three things: an input
representation that provides adequate context (e.g., if you want to
decode a letter, the input should contain at least a few letters on
either side of the target); a sufficiently complex network; and a large
corpus of clean text with which to train the network (probably
thousands of words, drawn from actual on-air content).
One classic method of training the network involves placing known-good
signals at the input, then comparing the desired outputs to the actual
outputs, and "back-propagating" the resulting error through the
network--from outputs to hidden layers to inputs--so that the network's
nodes gradually acquire the proper "weights." Once the network has been
trained to the point that it perfectly copies clean CW, you can then
present it with a noisy signal stream. A well-designed network would be
able to correct dropped CW elements or even letters if its internal
representation is highly evolved. The network will have learned
language-specific rules, and you don't have to know how it works,
anymore than you know how your own brain does it.
The actual implementation is left as an exercise for the reader. If you
come up with an algorithm written in 'C', let me know and I'll try to
port it to the K3's PIC.
Wayne
N6KR
---
http://www.elecraft.com
More information about the Elecraft
mailing list