DSPRelated.com
Forums

AM demodulation using I and Q

Started by lightmetal July 3, 2003
lightmetal wrote:
> > Jerry, > > I am using the AM broadcast band for testing. I think the bandwidth > is 10k or 5k per sideband. I am also using WWV at 10.000mhz to get > the regular tones. > > If I set my input filters (one for I and the other for Q) equal to 5k > and tune to Fc, then I get distortion. Adding or subtracting 2.5k, > which puts my LO at Fc - 2.5k gives me a clear signal. > > If you search author:jehancoc@pacbell.net you will see the other > thread and a recommended AM demod from Vlad but it was compute > intensive. > > thanks again
Most AM broadcast channels are 10 KHz including guard bands, but some are -- or were -- allowed to go wider if that caused no interference. At one time, WQXR AM had 15KHz audio. If your bandpass (IF?) is 5 KHz wide and the carrier is at one edge of that, one of the sidebands is gone down the slope. When the carrier is in the middle of passband, you're left with two matching 2.5 KHz sidebands, and that ought to work. Is that what you see, or have I misinterpreted what you wrote? My lady friend is looking daggers at me. More some other time. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Jerry Avins wrote:
> Most AM broadcast channels are 10 KHz including guard bands, but some
That should be 9kHz - unless you live in one of those odd out of the way places that doesn't follow the global mainstream. :-) Regards, Steve
Lightmetal,

Try using a lowpass rather than a bandpass after you beat the signal to 0.
Then do sqrt(i^2+q^2). Bandpass the signal after AM demod to get rid of any
DC offset.

Let me know how it works.

Just curious, did the Simulink version use a bandpass or lowpass before the
sqrt()?

Dirk

Dirk A. Bell
DSP Consultant (ISO WORK)

if you need to get rid of the DC offset.
"lightmetal" <jehancoc@pacbell.net> wrote in message
news:a95870c1.0307031853.3fb83393@posting.google.com...
> I started a thread re: AM demodulation using I and Q a few weeks ago > and I am still having a problem. According to Frerking, AM should be > A=sqrt(i^2+q^2). This works if I tune off the AM zero beat frequency > by 1/2 the low pass filter bandwidth. I don't understand this > problem. > > A little more detail: > > I am using a pair of mixers fed with a sin/cos local osc. to generate > I/Q at baseband. SSB demod works fine for upper and lower sidebands > with excellent opposite sideband rejection. I can zero beat the AM > carrier and receive upper, lower, or both sidebands to stereo output. > I am using a DDS LO and I am able to accurately zero beat the AM > carrier to less than 1hz. When I do this while listening to both > sidebands or I/Q in stereo, I can hear the sidebands come into phase > as I tune the radio. > > Once I have the signal zero beat, I flip it into the AM algorithm and > I hear a great deal of distortion. Assuming I use a low pass filter > (actually a bandpass) from 30-4000hz, prior to the sqrt(i^2+Q^2) math, > if I move off zero beat by 2000hz, the AM sounds great. I can move > either higher or lower by 2000 with the same results. It almost seems > like the filter is acting like a mixer?? > > I'm missing something here. When I modeled this receiver using Matlab > Simulink, it works fine at zero beat. If I get this simple > demodulator working I am going to move onto synch AM. I actually like > listening to the independent sidebands in stereo since it takes care > of some of the fade. > > thanks.
Steve Underwood wrote:
> Jerry Avins wrote: > >> Most AM broadcast channels are 10 KHz including guard bands, but some > > > That should be 9kHz - unless you live in one of those odd out of the way > places that doesn't follow the global mainstream. :-) >
Indeed - it's 9 kHz in every country where A4 paper is used. ;-) Paul

Jerry Avins wrote:
> > Jerry Avins wrote: > > > > lightmetal wrote: > > > > > > I started a thread re: AM demodulation using I and Q a few weeks ago > > > and I am still having a problem. According to Frerking, AM should be > > > A=sqrt(i^2+q^2). This works if I tune off the AM zero beat frequency > > > by 1/2 the low pass filter bandwidth. I don't understand this > > > problem. > > > > > > A little more detail: > > > > > > I am using a pair of mixers fed with a sin/cos local osc. to generate > > > I/Q at baseband. SSB demod works fine for upper and lower sidebands > > > with excellent opposite sideband rejection. I can zero beat the AM > > > carrier and receive upper, lower, or both sidebands to stereo output. > > > I am using a DDS LO and I am able to accurately zero beat the AM > > > carrier to less than 1hz. When I do this while listening to both > > > sidebands or I/Q in stereo, I can hear the sidebands come into phase > > > as I tune the radio. > > > > > > Once I have the signal zero beat, I flip it into the AM algorithm and > > > I hear a great deal of distortion. Assuming I use a low pass filter > > > (actually a bandpass) from 30-4000hz, prior to the sqrt(i^2+Q^2) math, > > > if I move off zero beat by 2000hz, the AM sounds great. I can move > > > either higher or lower by 2000 with the same results. It almost seems > > > like the filter is acting like a mixer?? > > > > > > I'm missing something here. When I modeled this receiver using Matlab > > > Simulink, it works fine at zero beat. If I get this simple > > > demodulator working I am going to move onto synch AM. I actually like > > > listening to the independent sidebands in stereo since it takes care > > > of some of the fade. > > > > > > thanks. > > > > I don't understand the sqrt(i^2+q^2). Intuitition tells me (i + q)/2. > > Nonsense! that's (upper + lower)/2. >
To demodulate AM, you *have* to use its carrier or local reference osc which is phase locked to the carrier. There is no way you can demodulate AM sidebands correctly without phase reference, no matter how accurate is your heterodyne. Vladimir Vassilevsky, Ph.D. DSP and Mixed Signal Design Consultant http://www.abvolt.com
Vladimir Vassilevsky wrote:
>
...
> > > > To demodulate AM, you *have* to use its carrier or local reference osc > which is phase locked to the carrier. > There is no way you can demodulate AM sidebands correctly without phase > reference, no matter how accurate is your heterodyne. > > > Vladimir Vassilevsky, Ph.D. > > DSP and Mixed Signal Design Consultant > > http://www.abvolt.com
Absolutely! Did I seem to imply otherwise? If so, I'm sorry. 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;
Steve Underwood wrote:
> > Jerry Avins wrote: > > Most AM broadcast channels are 10 KHz including guard bands, but some > > That should be 9kHz - unless you live in one of those odd out of the way > places that doesn't follow the global mainstream. :-) > > Regards, > Steve
Like the USA, for example. That's where I live: how provincial! 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;
Jerry Avins wrote:
> Steve Underwood wrote: > >>Jerry Avins wrote: >> >>>Most AM broadcast channels are 10 KHz including guard bands, but some >> >>That should be 9kHz - unless you live in one of those odd out of the way >>places that doesn't follow the global mainstream. :-) >> >>Regards, >>Steve > > Like the USA, for example. That's where I live: how provincial!
It amazes me just how much in the USA is out of line with the rest of the world, like its done just to be different. Still, its strange how much is shown around the world in units that are only really used in the USA. I think the USA must be the last place on Earth to use Fahrenheit. In India it is against the law to sell an instrument capable of reading in Fahrenheit. On the other hand, I recently noticed that all the weather forecasts on Chinese television quote temperatures in Celsius and Fahrenheit. Regards, Steve
Hi Dirk,

A bandpass filter was used in Matlab simulink.  The interesting thing
is that if I eliminate the bandpass digital filter and just use the
very wide bandpass analog filter, I have the same problem though I
have to tune off much farther.  I am starting to think that maybe the
ADSP-21161 compiler I am using might have a problem with square roots.
 I tried taking the square of 4 and got 2, but when I tried a
fractional number I got 1-undef in the visual debugger.  I didn't look
at it closely  and assumed it was debugger problem.  I am going to
look at it this morning.  I am about to just stick to I/Q or sideband
diversity instead of this envelope detection method.  The only reason
I am going this route is to handle the AM amateur nets.  They are
never all on the same frequency and in the other AM detection modes I
get a beat tone unless I retune for every person.

thanks 


"Dirk Bell" <dirkman@erols.com> wrote in message news:<be87d7$p4e$1@bob.news.rcn.net>...
> Lightmetal, > > Try using a lowpass rather than a bandpass after you beat the signal to 0. > Then do sqrt(i^2+q^2). Bandpass the signal after AM demod to get rid of any > DC offset. > > Let me know how it works. > > Just curious, did the Simulink version use a bandpass or lowpass before the > sqrt()? > > Dirk > > Dirk A. Bell > DSP Consultant (ISO WORK) >
Lightmetal,

If I am understanding what you are doing you correctly, you are fairly
accurately mixing the signal back to baseband and then running a bandpass
filter.  If so, it seems that you are effectively changing from am-carrier
to am-suppressed carrier before you compute the amplitude modulation. The
equation you are using is not intended for am-suppressed carrier.   Using it
would full-wave rectify your result.

What other problems you may be having are not clear.  This might be good
time to drop back to a simple case of sinusoidal AM modulation and verify
the results in that case.

Dirk

Dirk A. Bell
DSP Consultant



"lightmetal" <jehancoc@pacbell.net> wrote in message
news:a95870c1.0307060750.38491da3@posting.google.com...
> Hi Dirk, > > A bandpass filter was used in Matlab simulink. The interesting thing > is that if I eliminate the bandpass digital filter and just use the > very wide bandpass analog filter, I have the same problem though I > have to tune off much farther. I am starting to think that maybe the > ADSP-21161 compiler I am using might have a problem with square roots. > I tried taking the square of 4 and got 2, but when I tried a > fractional number I got 1-undef in the visual debugger. I didn't look > at it closely and assumed it was debugger problem. I am going to > look at it this morning. I am about to just stick to I/Q or sideband > diversity instead of this envelope detection method. The only reason > I am going this route is to handle the AM amateur nets. They are > never all on the same frequency and in the other AM detection modes I > get a beat tone unless I retune for every person. > > thanks > > > "Dirk Bell" <dirkman@erols.com> wrote in message
news:<be87d7$p4e$1@bob.news.rcn.net>...
> > Lightmetal, > > > > Try using a lowpass rather than a bandpass after you beat the signal to
0.
> > Then do sqrt(i^2+q^2). Bandpass the signal after AM demod to get rid of
any
> > DC offset. > > > > Let me know how it works. > > > > Just curious, did the Simulink version use a bandpass or lowpass before
the
> > sqrt()? > > > > Dirk > > > > Dirk A. Bell > > DSP Consultant (ISO WORK) > >