DSPRelated.com
Forums

AM demodulation using DSP

Started by c1910 June 3, 2007
Jerry Avins <jya@ieee.org> writes:

> Randy Yates wrote: >> Jerry Avins <jya@ieee.org> writes: >>> [...] >>> Randy Yates wrote: >>>> Jerry Avins <jya@ieee.org> writes: >>>>> You don't even need an explicit filter if you don't care about the >>>>> inaudible stuff. >>>> Well it would be audible in this case due to aliasing. >>> There would be no aliasing in the demodulated signal. Where would it >>> come from? >> I know you know this, Jerry - you must have something else in your >> head. Take a simple example: Let's say your carrier frequency is 1 >> MHz and >> the signal bandwidth is 100 kHz (+/- 50 kHz around a 1 MHz carrier). >> Then if you bandpass filter the signal at 1 MHz using a filter with >> a 100 kHz bandwidth, and then sample the signal at 100 kHz, you're >> done. >> If you don't use a filter and sample the signal at 100 kHz, then >> you'll get all the garbage between -950 kHz and 900 kHz down in your >> baseband as well as the stuff from +/- 950 to 1050 kHz. So you need >> to filter. > > "Phase locked to the carrier" would mean sampling at 1 MHz, bringing > the upper sideband down to DC to 50 KHz and -50 KHz to DC properly > phased to add. Without a filter, you also get other garbage outside > that range, inaudibly.
1. I didn't say the sample rate was "phase locked to the carrier" - YOU did. What is required for the method I have in mind to work is that Fc = M*Fs, where Fs is the sampling rate, Fc is the carrier frequency, and M is an integer. I call this "frequency-locked." In one case you know the frequency AND the phase of the sample rate, in the other, you only know the frequency. 2. EVEN if the sample rate WAS phase-locked to the carrier, it wouldn't HAVE to be 1 MHz. Think frequency synthesizer. 3. EVEN if the sample rate WAS phase-locked to the carrier, AND it was 1 MHz, the resulting digital signal could STILL have garbage IN-BAND if you didn't filter for the exact same reason that any sampled-data system could have garbage in-band if it isn't properly filtered: aliasing of out-of-band components. This is DSP 101. I'm not sure why there is this massive disconnect. Am I missing something? Are you sure you have the same system block diagram in mind that I do? -- % Randy Yates % "Maybe one day I'll feel her cold embrace, %% Fuquay-Varina, NC % and kiss her interface, %%% 919-577-9882 % til then, I'll leave her alone." %%%% <yates@ieee.org> % 'Yours Truly, 2095', *Time*, ELO http://home.earthlink.net/~yatescr
Jerry Avins <jya@ieee.org> writes:
> [...] > "Phase locked to the carrier" would mean sampling at 1 MHz, bringing > the upper sideband down to DC to 50 KHz and -50 KHz to DC properly > phased to add. Without a filter, you also get other garbage outside > that range, inaudibly.
WRONG! You get everything from N*Fs-50 kHz to N*Fs+50 kHz in the "digital" bandwidth of -50 kHz to +50 kHz, where N is any integer. For example, if you had a tone at 2.01 MHz, in addition to the desired AM signal at 1 MHz, then you'd get a nasty 10 kHz tone in your output. HENCE the need to filter. I can't believe we're having this discussion. One of us (and it could be me) is missing something very basic. -- % Randy Yates % "So now it's getting late, %% Fuquay-Varina, NC % and those who hesitate %%% 919-577-9882 % got no one..." %%%% <yates@ieee.org> % 'Waterfall', *Face The Music*, ELO http://home.earthlink.net/~yatescr

Jerry Avins wrote:

>> Diode: >> >> I = Io (exp(V/Vt) - 1) > > > A thermionic diode accounting for contact potential?
The classic equation of Shottky, which is more or less accurate for any solid state junction. I wonder who is the originator of the common belief that the drop across the silicon diode is 0.65V. This is totally wrong. BTW, if you put the two spoons: one made of steel, the other of aluminum into a glass with a solution of household soda, this works as the diode capable of rectifying the AC power. I have no idea how and why.
> There are more > things in heaven and earth, Vladimir, ... :-)
"I have seen all the works that have been done under the sun, and lo, the whole is vanity and vexation of spirit" Ecclesiastes 1:14 Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Randy Yates wrote:
> Jerry Avins <jya@ieee.org> writes: > >> Randy Yates wrote: >>> Jerry Avins <jya@ieee.org> writes: >>>> [...] >>>> Randy Yates wrote: >>>>> Jerry Avins <jya@ieee.org> writes: >>>>>> You don't even need an explicit filter if you don't care about the >>>>>> inaudible stuff. >>>>> Well it would be audible in this case due to aliasing. >>>> There would be no aliasing in the demodulated signal. Where would it >>>> come from? >>> I know you know this, Jerry - you must have something else in your >>> head. Take a simple example: Let's say your carrier frequency is 1 >>> MHz and >>> the signal bandwidth is 100 kHz (+/- 50 kHz around a 1 MHz carrier). >>> Then if you bandpass filter the signal at 1 MHz using a filter with >>> a 100 kHz bandwidth, and then sample the signal at 100 kHz, you're >>> done. >>> If you don't use a filter and sample the signal at 100 kHz, then >>> you'll get all the garbage between -950 kHz and 900 kHz down in your >>> baseband as well as the stuff from +/- 950 to 1050 kHz. So you need >>> to filter. >> "Phase locked to the carrier" would mean sampling at 1 MHz, bringing >> the upper sideband down to DC to 50 KHz and -50 KHz to DC properly >> phased to add. Without a filter, you also get other garbage outside >> that range, inaudibly. > > 1. I didn't say the sample rate was "phase locked to the carrier" - > YOU did.
Exactly! I wrote that the sampler being phase locked amounts to synchronous demodulation; at least I tried to. Then you described some other scenario and and implied that it refuted my assertion.
> What is required for the method I have in mind to work is > that Fc = M*Fs, where Fs is the sampling rate, Fc is the carrier > frequency, and M is an integer. I call this "frequency-locked." In > one case you know the frequency AND the phase of the sample rate, in > the other, you only know the frequency.
Sure.
> 2. EVEN if the sample rate WAS phase-locked to the carrier, it > wouldn't HAVE to be 1 MHz. Think frequency synthesizer.
Actually, it would probably work at IF. Being able to do all the messy stuff at one frequency is a major advantage of superhet receivers.
> 3. EVEN if the sample rate WAS phase-locked to the carrier, AND it was > 1 MHz, the resulting digital signal could STILL have garbage IN-BAND > if you didn't filter for the exact same reason that any sampled-data > system could have garbage in-band if it isn't properly filtered: > aliasing of out-of-band components.
The IF selectivity is invariably enough to avoid that.
> This is DSP 101. I'm not sure why there is this massive disconnect. Am > I missing something? Are you sure you have the same system block diagram > in mind that I do?
You're not accounting for the advantages that standard ways of doing things provide as side effects. Just as "white" noise is only white within some band, so an RF signal is bandlimited too. It may not be well enough bandlimited for some purposes, but it is for synchronous sampling. Aliasing frequencies must be at least half a carrier frequency away. Practical receivers just aren't that broadband. In DSP 101 theory points out the obstacles. A careful look at practice shows how they are often swept aside. Synchronous demodulators aren't often used outside of instrumentation (LVDTs, lock-in amplifiers, etc.) and demodulating TV's color subcarrier, but I find the concept handy to have in mind. Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
Randy Yates wrote:

   ...

> I can't believe we're having this discussion. One of us (and it > could be me) is missing something very basic.
According to theory, I'm wrong. If I build what I prescribe, it will work because all the filtering needed is had simply by not sweating a broadband design. Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
Vladimir Vassilevsky <antispam_bogus@hotmail.com> writes:

> Jerry Avins wrote: > >>> Diode: >>> >>> I = Io (exp(V/Vt) - 1) >> A thermionic diode accounting for contact potential? > > The classic equation of Shottky, which is more or less accurate for > any solid state junction. > > I wonder who is the originator of the common belief that the drop > across the silicon diode is 0.65V. This is totally wrong.
From a worn-out copy of [boylstaddevices], p.21 ff, It [diode forward-bias voltage] is typically in the order of magnitude of 0.6 V for silicon and 0.35 V for Germanium. This is what I was taught as a baby engineer at DeVry circa 1976. --Randy @book{boylstaddevices, title = "Electronic Devices and Circuit Theory", author = "Robert L. Boylestad and Louis Hashelsky", publisher = "Prentice-Hall", edition = "first", year = "1972"} -- % Randy Yates % "Remember the good old 1980's, when %% Fuquay-Varina, NC % things were so uncomplicated?" %%% 919-577-9882 % 'Ticket To The Moon' %%%% <yates@ieee.org> % *Time*, Electric Light Orchestra http://home.earthlink.net/~yatescr
Vladimir Vassilevsky wrote:
> > > Jerry Avins wrote: > >>> Diode: >>> >>> I = Io (exp(V/Vt) - 1) >> >> >> A thermionic diode accounting for contact potential? > > The classic equation of Shottky, which is more or less accurate for any > solid state junction.
I know it. I wanted to make it clear that there is more than one species of diode, and that they have different equations.
> I wonder who is the originator of the common belief that the drop across > the silicon diode is 0.65V. This is totally wrong.
It can be close enough to correct to be a useful design approximation in many circuits.
> BTW, if you put the two spoons: one made of steel, the other of aluminum > into a glass with a solution of household soda, this works as the diode > capable of rectifying the AC power. I have no idea how and why.
When the aluminum is the anode, an insulating film of aluminum oxide forms. The film breaks down when the polarity reverses. (The dielectric film is thin. The aluminum and the electrolyte act as the plates of a capacitor. Ach! The electrolytic capacitor has already been invented? Too bad!)
>> There are more things in heaven and earth, Vladimir, ... :-) > > "I have seen all the works that have been done under the sun, and lo, > the whole is vanity and vexation of spirit" > > Ecclesiastes 1:14
Yes, that too. jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
Jerry Avins <jya@ieee.org> writes:

> Randy Yates wrote: >> 3. EVEN if the sample rate WAS phase-locked to the carrier, AND it was >> 1 MHz, the resulting digital signal could STILL have garbage IN-BAND >> if you didn't filter for the exact same reason that any sampled-data >> system could have garbage in-band if it isn't properly filtered: >> aliasing of out-of-band components. > > The IF selectivity is invariably enough to avoid that.
That's a filter, isn't it? I think then that this falls within the statement I made: you could have in-band products unless you filter.
>> This is DSP 101. I'm not sure why there is this massive disconnect. Am >> I missing something? Are you sure you have the same system block diagram >> in mind that I do? > > You're not accounting for the advantages that standard ways of doing > things provide as side effects.
Who said the OP was doing things the "standard way?" Are you saying I wasn't accounting for things that we could account for if we made assumptions about the way things would be done? Wellll, yyyyyeees...
> Just as "white" noise is only white > within some band, so an RF signal is bandlimited too. It may not be > well enough bandlimited for some purposes, but it is for synchronous > sampling. Aliasing frequencies must be at least half a carrier > frequency away. Practical receivers just aren't that broadband.
Who said anything about a practical receiver?
> In DSP 101 theory points out the obstacles. A careful look at practice > shows how they are often swept aside. Synchronous demodulators aren't > often used outside of instrumentation (LVDTs, lock-in amplifiers, > etc.) and demodulating TV's color subcarrier, but I find the concept > handy to have in mind.
Jerry, Jerry, Jerry. You are turning this into a discussion about synchronous demodulators, but that's not what this is about. You originally told the OP that you couldn't perform AM demodulation with just a filter. I said you could. The method I proposed is a technique that Rick calls bandpass sampling. I looked up synchronous demodulation in [haykin], p.95 (which is apparently more commonly known as "synchronous detection") and the method I proposed is NOT the same. Synchronous demodulation requires a multiplier; bandpass sampling does not. --Randy @book{haykin, title = "Communication Systems", author = "Simon Haykin", publisher = "Wiley", edition = "fourth", year = "2001"} -- % Randy Yates % "Maybe one day I'll feel her cold embrace, %% Fuquay-Varina, NC % and kiss her interface, %%% 919-577-9882 % til then, I'll leave her alone." %%%% <yates@ieee.org> % 'Yours Truly, 2095', *Time*, ELO http://home.earthlink.net/~yatescr
Randy Yates <yates@ieee.org> writes:

> @book{boylstaddevices, > title = "Electronic Devices and Circuit Theory", > author = "Robert L. Boylestad and Louis Hashelsky", > publisher = "Prentice-Hall", > edition = "first", > year = "1972"}
That should be "Louis Nashelsky." My apologies for the typo. -- % Randy Yates % "She tells me that she likes me very much, %% Fuquay-Varina, NC % but when I try to touch, she makes it %%% 919-577-9882 % all too clear." %%%% <yates@ieee.org> % 'Yours Truly, 2095', *Time*, ELO http://home.earthlink.net/~yatescr
Randy Yates wrote:
> Jerry Avins <jya@ieee.org> writes: > >> Randy Yates wrote: >>> 3. EVEN if the sample rate WAS phase-locked to the carrier, AND it was >>> 1 MHz, the resulting digital signal could STILL have garbage IN-BAND >>> if you didn't filter for the exact same reason that any sampled-data >>> system could have garbage in-band if it isn't properly filtered: >>> aliasing of out-of-band components. >> The IF selectivity is invariably enough to avoid that. > > That's a filter, isn't it? I think then that this falls within the > statement I made: you could have in-band products unless you filter. > >>> This is DSP 101. I'm not sure why there is this massive disconnect. Am >>> I missing something? Are you sure you have the same system block diagram >>> in mind that I do? >> You're not accounting for the advantages that standard ways of doing >> things provide as side effects. > > Who said the OP was doing things the "standard way?" Are you saying I > wasn't accounting for things that we could account for if we made > assumptions about the way things would be done? Wellll, yyyyyeees... > >> Just as "white" noise is only white >> within some band, so an RF signal is bandlimited too. It may not be >> well enough bandlimited for some purposes, but it is for synchronous >> sampling. Aliasing frequencies must be at least half a carrier >> frequency away. Practical receivers just aren't that broadband. > > Who said anything about a practical receiver? > >> In DSP 101 theory points out the obstacles. A careful look at practice >> shows how they are often swept aside. Synchronous demodulators aren't >> often used outside of instrumentation (LVDTs, lock-in amplifiers, >> etc.) and demodulating TV's color subcarrier, but I find the concept >> handy to have in mind. > > Jerry, Jerry, Jerry. You are turning this into a discussion about > synchronous demodulators, but that's not what this is about. > > You originally told the OP that you couldn't perform AM demodulation > with just a filter. I said you could. The method I proposed is a > technique that Rick calls bandpass sampling.
That won't demodulate either without some way to beat one of the sidebands to baseband (with inversion if it's the lower one. *A filter alone* can't do that.
> I looked up synchronous demodulation in [haykin], p.95 (which is > apparently more commonly known as "synchronous detection") and the > method I proposed is NOT the same. Synchronous demodulation requires a > multiplier; bandpass sampling does not.
A diode bridge is usually used instead of a multiplier. It simply inverts the negative part of the signal. (Harmonics of the square wave can make aliases.) A linear multiplier driven by a sinusoid suppresses them. Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;