DSPRelated.com
Forums

AM digital demodulation methods

Started by gretzteam April 23, 2010
Hi,
I'm having trouble understanding the similarities/differences/advantages of
various AM digital demodulation methods, which makes me incapable of
deciding what to use. I would like to go throug a few methods here and here
your thoughts. 

First, I assume the common goal of all those techniques is to shift the
carrier back down to DC and there are a few ways to do this that have
different behavior. Right?

Method 1)
-Bandpass filter around the carrier.
-Take the absolute value. THIS is what shifts the carrier down to DC. 
-Low-pass filter. 
Now I guess taking the absolute value is not a very good way to shift the
carrier down to DC and is sensitive to anything other signal in the stream.
This is why we need to bandpass? 
Is the performance of the system pretty much only dominated by the bandpass
filter? In other words, is taking the abs() value messing up my data EVEN
if there was only the carrier/data in the stream?

Method 2)
-Multiply incoming stream with sin(wc*t) and cos(wc*t) sample by sample. 
-Lowpass filter each output. This gives I and Q.
-Calculate sqrt(I^2+Q^2).

Here, the carrier is perfectly shifted down to DC no matter what the stream
contains, which is why we don't need the bandpass filter. Can we say that
the performance of such a system is only dependent on the lowpass filter? 
What about the precision of the sin(wc*t) and cos(wc*t)? Keeping only one
bit here would mean using a square wave, which can't be really good. Is
there any way to know how much this affects performance?

And probably most importantly, how can I measure performance of the system?
Is there a standard way. I'm not yet looking for complicated theoretical
explanations...something intuitive is better to learn at first - at least
for me!

Thanks!


gretzteam wrote:
> Hi, > I'm having trouble understanding the similarities/differences/advantages of > various AM digital demodulation methods, which makes me incapable of > deciding what to use. I would like to go throug a few methods here and here > your thoughts. > > First, I assume the common goal of all those techniques is to shift the > carrier back down to DC and there are a few ways to do this that have > different behavior. Right?
Not quite. There are two methods to demodulate AM: use carrier from incoming signal as it is or regenerate carrier locally and demodulate synchronously. There is a gazillion of ways to implement either method.
> Method 1) > -Bandpass filter around the carrier. > -Take the absolute value.
> Method 2) > -Multiply incoming stream with sin(wc*t) and cos(wc*t) sample by sample. > -Lowpass filter each output. This gives I and Q. > -Calculate sqrt(I^2+Q^2).
Method 1 === Method 2. Both do non-synchronous demodulation. (1) does it in real domain, (2) does it in complex domain.
> And probably most importantly, how can I measure performance of the system?
For analog system, the figure of merit is S/(THD + N). For digital system, the figure of merit is BER. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On 4/23/2010 9:53 AM, gretzteam wrote:
> Hi, > I'm having trouble understanding the similarities/differences/advantages of > various AM digital demodulation methods, which makes me incapable of > deciding what to use. I would like to go throug a few methods here and here > your thoughts. > > First, I assume the common goal of all those techniques is to shift the > carrier back down to DC and there are a few ways to do this that have > different behavior. Right?
Wrong. The object is to extract the modulating signal.
> Method 1) > -Bandpass filter around the carrier. > -Take the absolute value. THIS is what shifts the carrier down to DC. > -Low-pass filter.
There is a potentially serious flaw here. You must not assume that your samples are anywhere near the carrier peaks.
> Now I guess taking the absolute value is not a very good way to shift the > carrier down to DC and is sensitive to anything other signal in the stream. > This is why we need to bandpass?
If you bandpassed adequately, the only other signal would overlay the signal you hoped to recover. That's called "interference" (hams call it QRM) and is outside the scope of your question.
> Is the performance of the system pretty much only dominated by the bandpass > filter? In other words, is taking the abs() value messing up my data EVEN > if there was only the carrier/data in the stream?
No. You must not assume that your samples are anywhere near the carrier peaks.
> Method 2) > -Multiply incoming stream with sin(wc*t) and cos(wc*t) sample by sample. > -Lowpass filter each output. This gives I and Q. > -Calculate sqrt(I^2+Q^2).
You can think of this another way. Sqrt(I^2+Q^2) gives the magnitude of the envelope, exactly what you want.
> Here, the carrier is perfectly shifted down to DC no matter what the stream > contains, which is why we don't need the bandpass filter.
Of course you need the bandpass filter. You want to operate on the carrier and its sidebands only, not on every frequency from power line to X-rays. If there is more than one signal in the passband, that's still QRM, and the signal is contaminated.
> Can we say that > the performance of such a system is only dependent on the lowpass filter? > What about the precision of the sin(wc*t) and cos(wc*t)? Keeping only one > bit here would mean using a square wave, which can't be really good. Is > there any way to know how much this affects performance?
Try it and see.
> And probably most importantly, how can I measure performance of the system? > Is there a standard way. I'm not yet looking for complicated theoretical > explanations...something intuitive is better to learn at first - at least > for me!
Before you can measure or calculate performance, you need a definition of it. Jerry -- "It does me no injury for my neighbor to say there are 20 gods, or no God. It neither picks my pocket nor breaks my leg." Thomas Jefferson to the Virginia House of Delegates in 1776. ���������������������������������������������������������������������
On Apr 23, 9:53&#4294967295;am, "gretzteam" <gretzteam@n_o_s_p_a_m.yahoo.com>
wrote:
> Hi, > I'm having trouble understanding the similarities/differences/advantages of > various AM digital demodulation methods, which makes me incapable of > deciding what to use. I would like to go throug a few methods here and here > your thoughts. > > First, I assume the common goal of all those techniques is to shift the > carrier back down to DC and there are a few ways to do this that have > different behavior. Right? > > Method 1) > -Bandpass filter around the carrier. > -Take the absolute value. THIS is what shifts the carrier down to DC. > -Low-pass filter. > Now I guess taking the absolute value is not a very good way to shift the > carrier down to DC and is sensitive to anything other signal in the stream. > This is why we need to bandpass? > Is the performance of the system pretty much only dominated by the bandpass > filter? In other words, is taking the abs() value messing up my data EVEN > if there was only the carrier/data in the stream? > > Method 2) > -Multiply incoming stream with sin(wc*t) and cos(wc*t) sample by sample. > -Lowpass filter each output. This gives I and Q. > -Calculate sqrt(I^2+Q^2). > > Here, the carrier is perfectly shifted down to DC no matter what the stream > contains, which is why we don't need the bandpass filter. Can we say that > the performance of such a system is only dependent on the lowpass filter? > What about the precision of the sin(wc*t) and cos(wc*t)? Keeping only one > bit here would mean using a square wave, which can't be really good. Is > there any way to know how much this affects performance? > > And probably most importantly, how can I measure performance of the system? > Is there a standard way. I'm not yet looking for complicated theoretical > explanations...something intuitive is better to learn at first - at least > for me! > > Thanks!
Method 2 is solid. After implementing method 2 you can try to do tricks that may give you some improvements. One trick I know of is to sychronize the carrier with a digital PLL. This is tough, it has some other aspects to it that can go wrong and you get a maximum 3 dB improvement over method 2. If you are in a hurry and have enough signal to noise ratio use method 2.
On 4/23/2010 11:54 AM, brent wrote:
> On Apr 23, 9:53 am, "gretzteam"<gretzteam@n_o_s_p_a_m.yahoo.com> > wrote: >> Hi, >> I'm having trouble understanding the similarities/differences/advantages of >> various AM digital demodulation methods, which makes me incapable of >> deciding what to use. I would like to go throug a few methods here and here >> your thoughts. >> >> First, I assume the common goal of all those techniques is to shift the >> carrier back down to DC and there are a few ways to do this that have >> different behavior. Right? >> >> Method 1) >> -Bandpass filter around the carrier. >> -Take the absolute value. THIS is what shifts the carrier down to DC. >> -Low-pass filter. >> Now I guess taking the absolute value is not a very good way to shift the >> carrier down to DC and is sensitive to anything other signal in the stream. >> This is why we need to bandpass? >> Is the performance of the system pretty much only dominated by the bandpass >> filter? In other words, is taking the abs() value messing up my data EVEN >> if there was only the carrier/data in the stream? >> >> Method 2) >> -Multiply incoming stream with sin(wc*t) and cos(wc*t) sample by sample. >> -Lowpass filter each output. This gives I and Q. >> -Calculate sqrt(I^2+Q^2). >> >> Here, the carrier is perfectly shifted down to DC no matter what the stream >> contains, which is why we don't need the bandpass filter. Can we say that >> the performance of such a system is only dependent on the lowpass filter? >> What about the precision of the sin(wc*t) and cos(wc*t)? Keeping only one >> bit here would mean using a square wave, which can't be really good. Is >> there any way to know how much this affects performance? >> >> And probably most importantly, how can I measure performance of the system? >> Is there a standard way. I'm not yet looking for complicated theoretical >> explanations...something intuitive is better to learn at first - at least >> for me! >> >> Thanks! > > Method 2 is solid. After implementing method 2 you can try to do > tricks that may give you some improvements. One trick I know of is to > sychronize the carrier with a digital PLL. This is tough, it has some > other aspects to it that can go wrong and you get a maximum 3 dB > improvement over method 2. If you are in a hurry and have enough > signal to noise ratio use method 2.
Use it, but understand it. Understand the implication of in-band interference. Understand the need to exclude out-of-band signals from the demodulation process. (The baseband low-pass filter can't remove aliases.) Replacing sinusoids with square waves adds harmonics that may or may not matter. There are some quick-and-dirty ways to calculate sqrt(I^2+Q^2) that might be good enough if some distortion is tolerable. See http://www.dspguru.com/dsp/tricks/magnitude-estimator. Jerry -- "It does me no injury for my neighbor to say there are 20 gods, or no God. It neither picks my pocket nor breaks my leg." Thomas Jefferson to the Virginia House of Delegates in 1776. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Apr 23, 12:15&#4294967295;pm, Jerry Avins <j...@ieee.org> wrote:
> On 4/23/2010 11:54 AM, brent wrote: > > > > > > > On Apr 23, 9:53 am, "gretzteam"<gretzteam@n_o_s_p_a_m.yahoo.com> > > wrote: > >> Hi, > >> I'm having trouble understanding the similarities/differences/advantages of > >> various AM digital demodulation methods, which makes me incapable of > >> deciding what to use. I would like to go throug a few methods here and here > >> your thoughts. > > >> First, I assume the common goal of all those techniques is to shift the > >> carrier back down to DC and there are a few ways to do this that have > >> different behavior. Right? > > >> Method 1) > >> -Bandpass filter around the carrier. > >> -Take the absolute value. THIS is what shifts the carrier down to DC. > >> -Low-pass filter. > >> Now I guess taking the absolute value is not a very good way to shift the > >> carrier down to DC and is sensitive to anything other signal in the stream. > >> This is why we need to bandpass? > >> Is the performance of the system pretty much only dominated by the bandpass > >> filter? In other words, is taking the abs() value messing up my data EVEN > >> if there was only the carrier/data in the stream? > > >> Method 2) > >> -Multiply incoming stream with sin(wc*t) and cos(wc*t) sample by sample. > >> -Lowpass filter each output. This gives I and Q. > >> -Calculate sqrt(I^2+Q^2). > > >> Here, the carrier is perfectly shifted down to DC no matter what the stream > >> contains, which is why we don't need the bandpass filter. Can we say that > >> the performance of such a system is only dependent on the lowpass filter? > >> What about the precision of the sin(wc*t) and cos(wc*t)? Keeping only one > >> bit here would mean using a square wave, which can't be really good. Is > >> there any way to know how much this affects performance? > > >> And probably most importantly, how can I measure performance of the system? > >> Is there a standard way. I'm not yet looking for complicated theoretical > >> explanations...something intuitive is better to learn at first - at least > >> for me! > > >> Thanks! > > > Method 2 is solid. &#4294967295;After implementing method 2 you can try to do > > tricks that may give you some improvements. &#4294967295;One trick I know of is to > > sychronize the carrier with a digital PLL. &#4294967295;This is tough, it has some > > other aspects to it that can go wrong and you get a maximum 3 dB > > improvement over method 2. &#4294967295;If you are in a hurry and have enough > > signal to noise ratio use method 2. > > Use it, but understand it. Understand the implication of in-band > interference. Understand the need to exclude out-of-band signals from > the demodulation process. (The baseband low-pass filter can't remove > aliases.) Replacing sinusoids with square waves adds harmonics that may > or may not matter. There are some quick-and-dirty ways to calculate > sqrt(I^2+Q^2) that might be good enough if some distortion is tolerable. > Seehttp://www.dspguru.com/dsp/tricks/magnitude-estimator. > > Jerry > -- > "It does me no injury for my neighbor to say there are 20 gods, or no > God. It neither picks my pocket nor breaks my leg." > &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; Thomas Jefferson to the Virginia House of Delegates in 1776. > &#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#4294967295;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#4294967295;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;- Hide quoted text - > > - Show quoted text -
Agreed. I am assuming that he is properly prepping the signal prior to the multiplication by sin/cos and will pick appropriate filters at baseband.
>> Use it, but understand it. Understand the implication of in-band >> interference. Understand the need to exclude out-of-band signals from >> the demodulation process. (The baseband low-pass filter can't remove >> aliases.) > >I am assuming that he is properly prepping the signal prior to the >multiplication by sin/cos and will pick appropriate filters at >baseband.
Ok I must admit that I'm more confused than before! Why do you still need a bandpass filter for method 2? Isn't multiplying by sin/cos shifting the carrier frequency to DC? About method 1 having the problem of peak values not being close to full scale, can we say that this is not a problem when fs >> carrier? Thanks.
On Apr 23, 1:52&#4294967295;pm, "gretzteam" <gretzteam@n_o_s_p_a_m.yahoo.com>
wrote:
> >> Use it, but understand it. Understand the implication of in-band > >> interference. Understand the need to exclude out-of-band signals from > >> the demodulation process. (The baseband low-pass filter can't remove > >> aliases.) > > >I am &#4294967295;assuming that he is properly prepping the signal prior to the > >multiplication by sin/cos and will pick appropriate filters at > >baseband. > > Ok I must admit that I'm more confused than before! Why do you still need a > bandpass filter for method 2? Isn't multiplying by sin/cos shifting the > carrier frequency to DC? >
I was talking about a bandpass filter prior to the mixing process to assure that you do not get "out of band" "out of interest" signals that alias into your baseband signal. If your signals are clean , with no outside interference outside the band of interest, then you can ignore the BPF comment.
> About method 1 having the problem of peak values not being close to full > scale, can we say that this is not a problem when fs >> carrier? >
Perhaps I do not fully understand your method 1, but if you are fishing for peak values to construct an envelope , this is a real pain in the butt. If you build an I/Q signal at baseband, then you know the envelope of the signal AT EVERY SINGLE SAMPLE by doing the I^2 + Q^2 thing. No fishing or interpreting or interpolating required.
> Thanks.
On 4/23/2010 1:52 PM, gretzteam wrote:
>>> Use it, but understand it. Understand the implication of in-band >>> interference. Understand the need to exclude out-of-band signals from >>> the demodulation process. (The baseband low-pass filter can't remove >>> aliases.) >> >> I am assuming that he is properly prepping the signal prior to the >> multiplication by sin/cos and will pick appropriate filters at >> baseband. > > > Ok I must admit that I'm more confused than before! Why do you still need a > bandpass filter for method 2? Isn't multiplying by sin/cos shifting the > carrier frequency to DC?
What Brent said. Keep in mind that you not only shift the carrier to baseband, you also shift everything else down by a similar amount. Where do the aliases of the out-of-band signals go?
> About method 1 having the problem of peak values not being close to full > scale, can we say that this is not a problem when fs>> carrier?
When the carrier is adequately oversampled, method 1 works. I leave it to you to determine what "adequate" means. How many samples per carrier cycle are needed to ensure that one is at least 95% of either peak? Is that a reasonable expenditure of resources? Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Apr 23, 2:19&#4294967295;pm, Jerry Avins <j...@ieee.org> wrote:
> On 4/23/2010 1:52 PM, gretzteam wrote: > > >>> Use it, but understand it. Understand the implication of in-band > >>> interference. Understand the need to exclude out-of-band signals from > >>> the demodulation process. (The baseband low-pass filter can't remove > >>> aliases.) > > >> I am &#4294967295;assuming that he is properly prepping the signal prior to the > >> multiplication by sin/cos and will pick appropriate filters at > >> baseband. > > > Ok I must admit that I'm more confused than before! Why do you still need a > > bandpass filter for method 2? Isn't multiplying by sin/cos shifting the > > carrier frequency to DC? > > What Brent said. Keep in mind that you not only shift the carrier to > baseband, you also shift everything else down by a similar amount. Where > do the aliases of the out-of-band signals go? > > > About method 1 having the problem of peak values not being close to full > > scale, can we say that this is not a problem when fs>> &#4294967295;carrier? > > When the carrier is adequately oversampled, method 1 works. I leave it > to you to determine what "adequate" means. How many samples per carrier > cycle are needed to ensure that one is at least 95% of either peak? Is > that a reasonable expenditure of resources? > > Jerry > -- > Engineering is the art of making what you want from things you can get.
This is a wonderful example of how a trivial method in analog (diode and RC filter) is not really how you want to do it in digital. Now if he has an analytic signal .... Clay