Re: Demodulating AM pulse width coding (long post)
- From: rickman <gnuarm@xxxxxxxxx>
- Date: Wed, 30 Apr 2008 21:00:47 -0700 (PDT)
On Apr 30, 9:05 pm, "nrclark" <nicholas.cl...@xxxxxxxxx> wrote:
I'm a little confused. As I understand IRIG-B, it is _either_ modulated
onto a 1kHz carrier _or_ it is pulse-width modulated DC - not both. There
is more information about IRIG here:
http://www.meinberg.de/english/info/irig.htm
Are you talking about IRIG-B 123? That's one of the most common ones, but
it is amplitude modulated, not pulse-width modulated.
I am talking about IRIG-B 120. The "trit" is coded into a pulse
width, either 2, 5 or 8 mS long with a 10 mS period. 100 of these
"trits" make up a 1 second time message. The pulses are then
modulated onto a 1 kHz, synchronized carrier as AM with a modulation
of between 3:1 and 6:1. I am working from the "IRIG STANDARD 200-04,
IRIG SERIAL TIME CODE FORMATS" document, dated SEPTEMBER 2004,
prepared by the TIMING COMMITTEE TELECOMMUNICATIONS AND TIMING GROUP
RANGE COMMANDERS COUNCIL with a full pages of other participating DOD
groups. I don't recall where I found this, but they say it can be
downloaded at http://jcs.mil/RCC.
If you have this document, turn to page 4-8, figure 4-2. It shows all
three modulation options together. Format B0xx, PWM is essentially an
unmodulated signal while B1xx is AM of the PWM and B2xx is Manchester
encoded PWM. At least that is the way I see it. If you demodulate
the AM, you get the PWM signal, not bits. The same is true for the
Manchester signal because it is 10x the bit rate and also returns the
PWM in a digital form 10x oversampled.
I wouldn't bother with correlating it, low-pass filtering it, or anything
else. Ignoring all of the stuff to be done _after_ you work it out into
binary, the actual sinusoid-to-binary conversion could be done by reading
in an initial 20-30 samples and measuring two or three local maxes to
figure out approximately what phase your signal is coming in at.
Once you find a maxima, you can keep track of which of your 8 samples it's
coming in on, since each carrier cycle's maxima will always occur in the
same sample place unless the incoming phase changes or you change your
sampling phase.
Hmmm... but if my master frequency is not *exactly* the a multiple of
the time code, my phase will vary continuously. Of course, I could
use a PLL to sync my sample clock to the carrier, but I did not
include one capable of driving the CODEC. I may need a DPLL, but it
will be to create the ref carrier (1 kHz) to support the demodulation,
not the sample clock which is driven from a 12.288 MHz clock.
I think the low-pass filter and correlation are needed if the signal
is not perfectly clean. My initial concept was to find the peaks to
detect the phase and amplitude of the AM signal. But I realized that
this would not be very robust in the presence of noise. The
correlation is a good way to effectively filter and average (in a
weighted manner) the 8 samples of a single cycle. My zero crossing
detector based on the incoming signal is still sensitive to noise as
Tim pointed out. Using a DPLL to sync the sample clock to the carrier
would greatly reduce the sensitivity of the zero crossing to noise.
Although you probaby won't hit the precise peak of your 1kHz sinusoid this
way, with 8 samples per cycle you're guaranteed to be close enough to your
maximum that you can tell the difference.
Yes, I realize that. But the correlation, whether it is auto or to a
reference, it much more robust when there is noise. I don't want my
board to fail where others don't. Of course, my first pass is due out
next week and it won't have any bells or whistles. It will just work
enough to support the software people.
Then you can just read the value every 8 samples (starting at whatever
sample you determined to be your maxima) and make an amplitude-based
decision about whether that particular cycle is a binary '1' or a '0'.
Thanks for your input. I appreciate all opinions. When working
alone, sometimes it can be hard to judge how good of a solution you
come up with, either not good enough or maybe too good as you seem to
be saying. I like getting feedback, pro or con... in fact it is
usually much more educational to get constructive criticism. I have
learned a few things doing this design, mainly in the opamp driver
circuit. It was tough making that work in the tiny space I had
available.
Rick
.
- Follow-Ups:
- References:
- Re: Demodulating AM pulse width coding (long post)
- From: nrclark
- Re: Demodulating AM pulse width coding (long post)
- Prev by Date: Re: Demodulating QPSK
- Next by Date: Re: ding dong, the witch is dead!
- Previous by thread: Re: Demodulating AM pulse width coding (long post)
- Next by thread: Re: Demodulating AM pulse width coding (long post)
- Index(es):
Relevant Pages
|