DSPRelated.com
Forums

Question on AM demodulation...

Started by Andre June 13, 2014
On Tue, 17 Jun 2014 18:34:43 +0000 (UTC), glen herrmannsfeldt
<gah@ugcs.caltech.edu> wrote:

>robert bristow-johnson <rbj@audioimagination.com> wrote: >> On 6/17/14 11:19 AM, Eric Jacobsen wrote: >>> On Mon, 16 Jun 2014 21:57:23 -0400, robert bristow-johnson >>>> my point was, from the beginning, that the reason why >>>> unsuppressed-carrier AM works without an additional synchronization >>>> signal is that if you don't over-modulate, then we know the biased >>>> modulated signal is always non-negative and never imposes a polarity >>>> reversal on the carrier. then synchronous detection with the carrier is >>>> functionally equivalent to using a full-wave rectifier, because they >>>> both effectively multiply the signal (with carrier) by a synced periodic >>>> signal that switches polarity precisely when the carrier switches >>>> polarity. so it makes no difference whether you down-mix or rectify. >>>> it is a simple and dependable (but inefficient compared to DSB-SC or >>>> SSB) method to transmit the synchronization. > >>> That's a really cumbersome way of saying that the modulation >>> is in the amplitude. > >> i think you missed the point i was making. i was spelling out why the >> AM we used to listen to with our transistor radios is not DSB-SC. both >> commercial AM and DSB-SC are modulating amplitude, but there is a *big* >> qualitative difference (one has the sync easily derived and the other >> does not). > >>> I think everybody already knew that. > >I am not sure that there is anything that "everyone" in this >newsgroup knows. I would hope that many who work in signal processing >know it, but maybe not all.
Since the subject line indicates that the signal is AM, it is not unreasonable to assume that everyone knows that the modulation of the signal being discussed is AM, and therefore that the modulation is in the amplitude. I'm not sure what benefit was gained by the detailed description of some of the various ways that can be used to remove the modulation from AM, especially since that's not really what the OP's question was, at least as I understood it. "Demodulation" also means downconversion to baseband, which is what the OP was actually discussing. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
I'm not a radio guy but ....

If you are given an AM signal in analog form then conventional full- wave rectification followed by low pass filter will work fine

If you are given a sampled AM signal and the AM carrier is unrelated to the sample- rate then I would guess that a digital abs() instruction will make a mess of the spectrum and you may need to create a quadrature signal and compute the magnitude from the sqrt(Im^2 + Re^2). 

So it seems that the order of detection and A/D conversion is pretty important. 

Bob
On 18.6.14 08:35, radams2000@gmail.com wrote:
> I'm not a radio guy but .... > > If you are given an AM signal in analog form then conventional full- wave rectification followed by low pass filter will work fine > > If you are given a sampled AM signal and the AM carrier is unrelated to the sample- rate then I would guess that a digital abs() instruction will make a mess of the spectrum and you may need to create a quadrature signal and compute the magnitude from the sqrt(Im^2 + Re^2). > > So it seems that the order of detection and A/D conversion is pretty important. > > Bob
Yes - abs() does mess the spectrum, but a multiples of the carrier frequency, which will be filtered away with the low-pass. As long as the Nyquist criterion is fulfilled, the result will be OK. -- -TV
Tauno Voipio <tauno.voipio@notused.fi.invalid> wrote:
> On 18.6.14 08:35, radams2000@gmail.com wrote: >> I'm not a radio guy but ....
>> If you are given an AM signal in analog form then conventional >> full- wave rectification followed by low pass filter will work fine
>> If you are given a sampled AM signal and the AM carrier is >> unrelated to the sample- rate then I would guess that a digital >> abs() instruction will make a mess of the spectrum and you may >> need to create a quadrature signal and compute the magnitude >> from the sqrt(Im^2 + Re^2).
>> So it seems that the order of detection and A/D conversion >> is pretty important.
(snip)
> Yes - abs() does mess the spectrum, but a multiples of the carrier > frequency, which will be filtered away with the low-pass. As long > as the Nyquist criterion is fulfilled, the result will be OK.
Yes, but which Nyquist criterion? Certainly twice the carrier frequency is enough. If the incoming signal isn't filtered much before A/D, such as it contains the whole (540-1600kHz) AM band, then you have to include that. Maybe low-pass at 2MHz, and then A/D, which is pretty slow for A/D these days. You might need more bits, though, to detect weak stations among strong ones. More interesting, A/D the whole (88-108MHz) FM band, at about 50MHz or so, then separate out and demodulate FM stations. Next do a digital FM stereo (DSB-SC) demodulation from that. After you figure out those, then figure out how to extract and decode the digital (HD radio) signal that many stations are now broadcasting. Maybe a good senior CS/EE project. -- glen
On 18.6.14 10:34, glen herrmannsfeldt wrote:
> Tauno Voipio <tauno.voipio@notused.fi.invalid> wrote: >> On 18.6.14 08:35, radams2000@gmail.com wrote: >>> I'm not a radio guy but .... > >>> If you are given an AM signal in analog form then conventional >>> full- wave rectification followed by low pass filter will work fine > >>> If you are given a sampled AM signal and the AM carrier is >>> unrelated to the sample- rate then I would guess that a digital >>> abs() instruction will make a mess of the spectrum and you may >>> need to create a quadrature signal and compute the magnitude >>> from the sqrt(Im^2 + Re^2). > >>> So it seems that the order of detection and A/D conversion >>> is pretty important. > > (snip) >> Yes - abs() does mess the spectrum, but a multiples of the carrier >> frequency, which will be filtered away with the low-pass. As long >> as the Nyquist criterion is fulfilled, the result will be OK. > > Yes, but which Nyquist criterion? Certainly twice the carrier > frequency is enough. If the incoming signal isn't filtered > much before A/D, such as it contains the whole (540-1600kHz) AM > band, then you have to include that. Maybe low-pass at 2MHz, > and then A/D, which is pretty slow for A/D these days. You might > need more bits, though, to detect weak stations among strong ones. > > More interesting, A/D the whole (88-108MHz) FM band, at about 50MHz > or so, then separate out and demodulate FM stations. Next do > a digital FM stereo (DSB-SC) demodulation from that. > > After you figure out those, then figure out how to extract and > decode the digital (HD radio) signal that many stations are > now broadcasting. > > Maybe a good senior CS/EE project. > > -- glen
Thou shalt not attempt to AM detect the whole band at a time ... Before detection, the input must be band-limited to the station of interest (8-9 kHz bandwidth). Without filtering, there will be plenty of intercarrier mixing whistles. -- -TV
Tauno Voipio <tauno.voipio@notused.fi.invalid> wrote:

(snip, I wrote)

>> More interesting, A/D the whole (88-108MHz) FM band, at about 50MHz >> or so, then separate out and demodulate FM stations. Next do >> a digital FM stereo (DSB-SC) demodulation from that.
(snip)
> Thou shalt not attempt to AM detect the whole band at a time ...
> Before detection, the input must be band-limited to the > station of interest (8-9 kHz bandwidth).
> Without filtering, there will be plenty of intercarrier > mixing whistles.
After the A/D, you do digital bandpass filtering to separate out the individual stations, and you have to do that well enough to avoid whistles and such. In an FPGA, it shouldn't be hard to build enough filters to select out all AM radio stations, convert to sampled audio at a convenient sample rate, and store them somewhere. If you have, say, a 1GB DRAM, you can store away for a long time. Then someone can select a radio station, and rewind to hear the beginning of a song, or even the beginning of a baseball game. Or with a 500GB hard disk, you can store even more. I am less sure how many FM stations you can separate out and detect in a reasonable priced FPGA. -- glen
I'm not convinced of this. The abs() non- linearity ( or any other high-order non-linearity) immediately produces aliased components. You can't filter them away once they are already aliased. The effect would be reduced if you are highly over- sampled but it's still an issue I think. 

Bob
Rick Lyons <R.Lyons@_BOGUS_ieee.org> writes:

> On Fri, 13 Jun 2014 17:39:41 -0500, Tim Wescott > <tim@seemywebsite.really> wrote: > >>On Fri, 13 Jun 2014 15:26:22 +0200, Andre wrote: >> >>> Hi all, >>> >>> I am a bit stuck in a demodulation thing. >>> >>> Lets say I have a system that generates an AM signal and wants to detect >>> distorsions of the LF signal after feeding the AM modulated signal >>> through a potentially nonlinear system. >>> >>> This means I have phase locked TX and RX. >> >>How so? AM has never required phase locking -- the TX can free run, and >>the RX can do envelope detection. >> >>> Lets say I modulate a signal at f0 with sine at f1 with 100% modulation: >>> >>> signal = sin(w0*t) * (0.5 + 0.5 * sin(w1*t)) >>> >>> I then receive this signal and downmix it by multiplying with sin and >>> cos of the carrier frequency, in complex writing: >>> >>> baseband = received_signal * e^(i*w0*t) >> >>As mentioned, it's e^(-i*w0*t), but that's a nit -- particularly because >>the operation will still work (why is left as an exercise to the reader). > > Hi Tim, > For normal symmetrial bandpass (commercial) AM, > yes the e^(-i*w0*t) is a "nit".
Is it? For x(t) = sin(w_c * t), one demodulation will give you x(t), the other will give you -x(t). Yes, that's inaudible. Is having all the quadrature components inaudible? I think, but I'm not sure. And who said the application here is audio? I.e., the negation may be a show-stopper. -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
On Wed, 18 Jun 2014 18:01:07 -0400, Randy Yates wrote:

> Rick Lyons <R.Lyons@_BOGUS_ieee.org> writes: > >> On Fri, 13 Jun 2014 17:39:41 -0500, Tim Wescott >> <tim@seemywebsite.really> wrote: >> >>>On Fri, 13 Jun 2014 15:26:22 +0200, Andre wrote: >>> >>>> Hi all, >>>> >>>> I am a bit stuck in a demodulation thing. >>>> >>>> Lets say I have a system that generates an AM signal and wants to >>>> detect distorsions of the LF signal after feeding the AM modulated >>>> signal through a potentially nonlinear system. >>>> >>>> This means I have phase locked TX and RX. >>> >>>How so? AM has never required phase locking -- the TX can free run, >>>and the RX can do envelope detection. >>> >>>> Lets say I modulate a signal at f0 with sine at f1 with 100% >>>> modulation: >>>> >>>> signal = sin(w0*t) * (0.5 + 0.5 * sin(w1*t)) >>>> >>>> I then receive this signal and downmix it by multiplying with sin and >>>> cos of the carrier frequency, in complex writing: >>>> >>>> baseband = received_signal * e^(i*w0*t) >>> >>>As mentioned, it's e^(-i*w0*t), but that's a nit -- particularly >>>because the operation will still work (why is left as an exercise to >>>the reader). >> >> Hi Tim, >> For normal symmetrial bandpass (commercial) AM, >> yes the e^(-i*w0*t) is a "nit". > > Is it? For x(t) = sin(w_c * t), one demodulation will give you x(t), the > other will give you -x(t). Yes, that's inaudible. Is having all the > quadrature components inaudible? I think, but I'm not sure. > > And who said the application here is audio? I.e., the negation may be a > show-stopper.
This reminds me of some advice given me by an old control systems engineer, about getting a loop right the first time: "count all the sign changes, then add in the one you missed". He didn't tell me the part about always designing your circuit so that you could swaps signs with a minimum number of cuts & jumps -- I had to figure that out on my own. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Tim Wescott <tim@seemywebsite.really> writes:
> [...] > "count all the sign changes, then add in the one you missed".
What I described isn't a simple sign change. It's a sine change for just the quadrature components of the signal, i.e., the components that, if transformed, would lie on the imaginary axis. The other components are not inverted. So you can't fix this by simply inverting the entire signal. -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com