DSPRelated.com
Forums

Question on AM demodulation...

Started by Andre June 13, 2014
On 13.6.14 16:26, 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. > > 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) > > I have then a complex baseband signal, in which I expect > sidebands at +- f1. > > Lets say I am after the overtones of that f1 in the complex > baseband signal. For example, I want to detect components > at +-f2 with f2 = 2*f1. > > Can I not just multiply the complex baseband signal with > e^(i*w2*t) to get the (compelex)component at f2? > Like: > > what_i_look_for = baseband * e^(i*w2*t) > > Or do I miss some conjugate etc? > > As said above, everything is phase locked, so I do not need to recover > any phase. > > best regards, > > Andre
It seems that nobody has taken this up yet: An AM signal can be easily decoded from an I/Q signal pair by calculating sqrt(I^2 + Q^2). It decodes correctly even when the downconversion frequency is different from the original carrier. Synchronous AM demodulation has been done so that the injection frequency is phase locked so that the Q signal is zero. The original modulation is then in the I signal. (Rigorous math is left for later, but it works) -- Tauno Voipio
On 6/15/14 4:03 PM, Tauno Voipio wrote:
> On 13.6.14 16:26, Andre wrote: >> >> Lets say I have a system that generates an AM signal and >> wants to detect distortions of the LF signal after feeding >> the AM modulated signal through a potentially nonlinear system. >> >> This means I have phase locked TX and RX. >> >> 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) >>
...
> > > It seems that nobody has taken this up yet: > > An AM signal can be easily decoded from an I/Q signal pair > by calculating sqrt(I^2 + Q^2).
where are you getting the I/Q pair?
> It decodes correctly even > when the downconversion frequency is different from the > original carrier. > > Synchronous AM demodulation has been done so that the > injection frequency is phase locked so that the Q signal > is zero.
or maybe it's the I signal that's zero and it's Q that is non-zero. i.e. sin(w0*t) in
>> >> signal = sin(w0*t) * (0.5 + 0.5 * sin(w1*t)) >>
...
> The original modulation is then in the I signal. > > (Rigorous math is left for later, but it works)
famous last words. sorta like the Far Side cartoon with an airplane's co-pilot asking the pilot "what would mountain goats be doing up here?" -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
robert bristow-johnson <rbj@audioimagination.com> writes:
> [...] > On 6/15/14 4:03 PM, Tauno Voipio wrote: >> (Rigorous math is left for later, but it works) > > famous last words. > > sorta like the Far Side cartoon with an airplane's co-pilot asking the > pilot "what would mountain goats be doing up here?"
"Was that in meters or miles?" -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
On 16.6.14 06:20, robert bristow-johnson wrote:
> On 6/15/14 4:03 PM, Tauno Voipio wrote: >> On 13.6.14 16:26, Andre wrote: >>> >>> Lets say I have a system that generates an AM signal and >>> wants to detect distortions of the LF signal after feeding >>> the AM modulated signal through a potentially nonlinear system. >>> >>> This means I have phase locked TX and RX. >>> >>> 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) >>> > ... >> >> >> It seems that nobody has taken this up yet: >> >> An AM signal can be easily decoded from an I/Q signal pair >> by calculating sqrt(I^2 + Q^2). > > where are you getting the I/Q pair?
The OP already said how to get them. There are other ways, especially if the input is on fixed intermediate frequency. One method used in the tube age was to split the IF output loosely coupled to two tuned circuits. One of the circuits was tuned above the IF and the other below so that both had a phase difference of 45 degrees, for a total phase difference between them 90 degrees. It was a PITA to adjust, but worked. For a digital data stream, there is a good chapter on Hilbert transform in the Rick Lyons' book.
>> It decodes correctly even >> when the downconversion frequency is different from the >> original carrier. >> >> Synchronous AM demodulation has been done so that the >> injection frequency is phase locked so that the Q signal >> is zero. > > or maybe it's the I signal that's zero and it's Q that is non-zero. i.e. > sin(w0*t) in > >>> >>> signal = sin(w0*t) * (0.5 + 0.5 * sin(w1*t)) >>> > > ... > >> The original modulation is then in the I signal. >> >> (Rigorous math is left for later, but it works)
Do you insist? The complex absolute value method produces the modulating waveform with the inevitable DC offset from carrier. The carrier insertion methods produce also some products at twice carrier frequency, in addition to the DC offset and modulating signal. -- -TV
On Sun, 15 Jun 2014 23:20:23 -0400, robert bristow-johnson
<rbj@audioimagination.com> wrote:

>On 6/15/14 4:03 PM, Tauno Voipio wrote: >> On 13.6.14 16:26, Andre wrote: >>> >>> Lets say I have a system that generates an AM signal and >>> wants to detect distortions of the LF signal after feeding >>> the AM modulated signal through a potentially nonlinear system. >>> >>> This means I have phase locked TX and RX. >>> >>> 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) >>> >... >> >> >> It seems that nobody has taken this up yet: >> >> An AM signal can be easily decoded from an I/Q signal pair >> by calculating sqrt(I^2 + Q^2). > >where are you getting the I/Q pair?
From the complex downconversion.
>> It decodes correctly even >> when the downconversion frequency is different from the >> original carrier. >> >> Synchronous AM demodulation has been done so that the >> injection frequency is phase locked so that the Q signal >> is zero. > >or maybe it's the I signal that's zero and it's Q that is non-zero. >i.e. sin(w0*t) in
They're arbitrary.
>>> >>> signal = sin(w0*t) * (0.5 + 0.5 * sin(w1*t)) >>> > >... > >> The original modulation is then in the I signal. >> >> (Rigorous math is left for later, but it works) > >famous last words. > >sorta like the Far Side cartoon with an airplane's co-pilot asking the >pilot "what would mountain goats be doing up here?" > > >-- > >r b-j rbj@audioimagination.com > >"Imagination is more important than knowledge." > >
Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
On 6/16/14 6:57 PM, Eric Jacobsen wrote:
> On Sun, 15 Jun 2014 23:20:23 -0400, robert bristow-johnson > <rbj@audioimagination.com> wrote: > >> On 6/15/14 4:03 PM, Tauno Voipio wrote: >>> On 13.6.14 16:26, Andre wrote: >>>> >>>> Lets say I have a system that generates an AM signal and >>>> wants to detect distortions of the LF signal after feeding >>>> the AM modulated signal through a potentially nonlinear system. >>>> >>>> This means I have phase locked TX and RX. >>>> >>>> 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) >>>> >> ... >>> >>> >>> It seems that nobody has taken this up yet: >>> >>> An AM signal can be easily decoded from an I/Q signal pair >>> by calculating sqrt(I^2 + Q^2). >> >> where are you getting the I/Q pair? > > From the complex downconversion. > >>> It decodes correctly even >>> when the downconversion frequency is different from the >>> original carrier. >>> >>> Synchronous AM demodulation has been done so that the >>> injection frequency is phase locked so that the Q signal >>> is zero. >> >> or maybe it's the I signal that's zero and it's Q that is non-zero. >> i.e. sin(w0*t) in > > They're arbitrary. >
i dunno if it's "arbitrary". i would say it's a convention. given the convention: s(t) = I(t)*cos(w0*t) - Q(t)*sin(w0*t) which is what i see in the lit and the OP's problem statement:
>>>> >>>> signal = sin(w0*t) * (0.5 + 0.5 * sin(w1*t)) >>>> >> >> ... >> >>> The original modulation is then in the I signal.
i would say that it's I that's zero and that the original modulation is then in the Q signal. it *is* arbitrary, until one picks either I or Q, then you gotta stick with it. the OP made the arbitrary decision to put the modulation in the Q signal (according to every expression of the I/Q definition i have seen in the lit) but Mr. Rigorous-Math said it's in the I signal.
>>> >>> (Rigorous math is left for later, but it works)
it would not have worked, given the OP's problem statement, if you had looked for the "original modulation ... in the I signal". but, with regular AM (that is not DSB-SC) that is not over-modulated, Mr. Rigorous-Math *is* correct saying you can get it in sqrt(I^2 + Q^2) since the biased modulation signal is always non-negative. 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. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On Mon, 16 Jun 2014 21:57:23 -0400, robert bristow-johnson
<rbj@audioimagination.com> wrote:

>On 6/16/14 6:57 PM, Eric Jacobsen wrote: >> On Sun, 15 Jun 2014 23:20:23 -0400, robert bristow-johnson >> <rbj@audioimagination.com> wrote: >> >>> On 6/15/14 4:03 PM, Tauno Voipio wrote: >>>> On 13.6.14 16:26, Andre wrote: >>>>> >>>>> Lets say I have a system that generates an AM signal and >>>>> wants to detect distortions of the LF signal after feeding >>>>> the AM modulated signal through a potentially nonlinear system. >>>>> >>>>> This means I have phase locked TX and RX. >>>>> >>>>> 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) >>>>> >>> ... >>>> >>>> >>>> It seems that nobody has taken this up yet: >>>> >>>> An AM signal can be easily decoded from an I/Q signal pair >>>> by calculating sqrt(I^2 + Q^2). >>> >>> where are you getting the I/Q pair? >> >> From the complex downconversion. >> >>>> It decodes correctly even >>>> when the downconversion frequency is different from the >>>> original carrier. >>>> >>>> Synchronous AM demodulation has been done so that the >>>> injection frequency is phase locked so that the Q signal >>>> is zero. >>> >>> or maybe it's the I signal that's zero and it's Q that is non-zero. >>> i.e. sin(w0*t) in >> >> They're arbitrary. >> > >i dunno if it's "arbitrary". i would say it's a convention. given the >convention: > > s(t) = I(t)*cos(w0*t) - Q(t)*sin(w0*t) > >which is what i see in the lit and the OP's problem statement: > >>>>> >>>>> signal = sin(w0*t) * (0.5 + 0.5 * sin(w1*t)) >>>>> >>> >>> ... >>> >>>> The original modulation is then in the I signal. > >i would say that it's I that's zero and that the original modulation is >then in the Q signal. > >it *is* arbitrary, until one picks either I or Q, then you gotta stick >with it. the OP made the arbitrary decision to put the modulation in >the Q signal (according to every expression of the I/Q definition i have >seen in the lit) but Mr. Rigorous-Math said it's in the I signal. > >>>> >>>> (Rigorous math is left for later, but it works) > >it would not have worked, given the OP's problem statement, if you had >looked for the "original modulation ... in the I signal". but, with >regular AM (that is not DSB-SC) that is not over-modulated, Mr. >Rigorous-Math *is* correct saying you can get it in sqrt(I^2 + Q^2) >since the biased modulation signal is always non-negative. > >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 everybody already knew that. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
On 6/17/14 11:19 AM, Eric Jacobsen wrote:
> On Mon, 16 Jun 2014 21:57:23 -0400, robert bristow-johnson > <rbj@audioimagination.com> wrote: > >> >> 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 don't think that everyone knew (or knows now) that a full-wave rectifier operating on AM is doing the same mathematical thing as multiplying by a square wave that is synchronized to the carrier. inside that square wave is a sinusoid at the fundamental. so setting aside the other odd harmonics for the moment, demodulation of AM with a rectifier is doing the same thing as demodulating with a "mixer" in the manner similar to that the OP was spelling out (but just the I part or just the Q part). and most of us would ask "why bother?" when you can get it with a rectifier. if it were DSB-SC, then we would have to mess around in such a way as the OP was describing, but for AM, we don't. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On Tue, 17 Jun 2014 12:22:31 -0400, 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 >> <rbj@audioimagination.com> wrote: >> >>> >>> 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 don't think that everyone knew (or knows now) that a full-wave >rectifier operating on AM is doing the same mathematical thing as >multiplying by a square wave that is synchronized to the carrier. >inside that square wave is a sinusoid at the fundamental. so setting >aside the other odd harmonics for the moment, demodulation of AM with a >rectifier is doing the same thing as demodulating with a "mixer" in the >manner similar to that the OP was spelling out (but just the I part or >just the Q part). and most of us would ask "why bother?" when you can >get it with a rectifier.
The OP actually didn't say much about demodulating the AM, he asked about locating a distortion overtone he was interested in. He was asking specifically about mixing for locating frequencies of interest. Since he was using a complex downconversion for the mixer, and had a complex-valued output as a result, there was some discussion about how that could be exploited. It was pretty simple to start with, and I'm not sure why it's gone off on tangents.
>if it were DSB-SC, then we would have to mess around in such a way as >the OP was describing, but for AM, we don't. > >-- > >r b-j rbj@audioimagination.com > >"Imagination is more important than knowledge." > >
Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
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. Both descriptions of FM stereo and of NTSC color TV well describe the reasons for using and method of decoding DSB-SC signals.
> i don't think that everyone knew (or knows now) that a full-wave > rectifier operating on AM is doing the same mathematical thing as > multiplying by a square wave that is synchronized to the carrier. > inside that square wave is a sinusoid at the fundamental. so setting > aside the other odd harmonics for the moment, demodulation of AM with a > rectifier is doing the same thing as demodulating with a "mixer" in the > manner similar to that the OP was spelling out (but just the I part or > just the Q part). and most of us would ask "why bother?" when you can > get it with a rectifier.
It is, at least, commonly known that a half wave rectifier will do it, but I think you are right that not many go through the math to show how it does it.
> if it were DSB-SC, then we would have to mess around in such a way as > the OP was describing, but for AM, we don't.
I was wondering some years ago in this group, in a discussion with Jerry (haven't heard from him for a while) about synchronous demodulation of AM radio. Consider an AM modulator that generates (carrier)*(1+signal) with a four quadrant multiplier. In other words, put (1+signal) into a doubly-balanced mixer. As long as there is no overmodulation, you get normal AM, but if there is, all the information is still there. Now, to properly demodulate it you need an appropriate demodulator, such as a PLL to lock onto the carrier and another doubly-balanced mixer. As I haven't looked inside AM radios recently, I don't know if any do that. For more on synchronous demodulation, that used to be well described in literature, but maybe not so often now, the FM stero signal, 0.5*(L+R) + 0.5*(L-R)*sin(2*pi*38kHz*t) + 0.1*sin(2*pi*19kHz*t) (I probably have the phase wrong.) can be considered as alternating between L and R at 38kHz (if you filter out any aliases). If you separately extract (L+R) and (L-R) then you need to adjust the relative amplitide in the sum and difference. (and I haven't looked recently to see how they actually do it.) -- glen