Forums

IQ Demod Questions

Started by EfiimoFunk July 4, 2005
Hey guys,
  I have a few questions regarding digital I/Q demodulation that I can't
seem to figure out on my own.  I notice that if you sample at 4 times the
carrier frequency you can essectially get the I/Q channels for free.  This
is due to the fact that the samples are 0,90,180,270 etc. (Note: of course
this is only for the carrier frequency and other frequencies will not have
the correct phase offset but nevermind that for now).  So every other
sample becomes a channel and a +1/-1 multiply gives you the correct demod.
 Now here's my question: Everybody seems to be using this technique so I
know that it works but I cannot seem to look at a sin/cos wave and plot
the points out and see that you get the correct demodulation.  Is there
any way to actually visualize a signal and see the I/Q demod easily? Any
help on this would be greatly appreciated.

--Ryan  


		
This message was sent using the Comp.DSP web interface on
www.DSPRelated.com
"EfiimoFunk" <rfrankel@ufl.edu> writes:

> Hey guys, > I have a few questions regarding digital I/Q demodulation that I can't > seem to figure out on my own. I notice that if you sample at 4 times the > carrier frequency you can essectially get the I/Q channels for free. This > is due to the fact that the samples are 0,90,180,270 etc. (Note: of course > this is only for the carrier frequency and other frequencies will not have > the correct phase offset but nevermind that for now). So every other > sample becomes a channel and a +1/-1 multiply gives you the correct demod. > Now here's my question: Everybody seems to be using this technique so I > know that it works but I cannot seem to look at a sin/cos wave and plot > the points out and see that you get the correct demodulation. Is there > any way to actually visualize a signal and see the I/Q demod easily? Any > help on this would be greatly appreciated.
Ryan, I/Q modulation and demodulation is almost trivial if you look at it a certain way. That way is this: an IQ demodulator takes a piece of spectrum from F1 to F2 and moves it to -B/2 to +B/2, where B = F2 - F1. The important thing to notice is that the piece of spectrum from F1 to F2 is not necessarily symmetric about F2 - B/2 (i.e., the carrier), and so therefore neither is the spectrum from -B/2 to +B/2 symmetric. This means (you may have to brush up on your Fourier transforms and properties a bit here) that the time-domain signal (samples, if this is a digital system) at the demodulator output are complex instead of real. Conversely, an IQ modulator takes the (not necessarily symmetric) spectrum from -B/2 to +B/2, which is comprised of complex samples, and moves that spectrum to Fc - B/2 to Fc + B/2 AND to -Fc - B/2 to -Fc + B/2. THAT new spectrum IS symmetric once again and thus the output of the IQ modulator is always real. To represent a sin or cos at complex baseband simply yields samples in which the imaginary components are zero (remember, at complex baseband the samples are complex) and the real part is the plain old vanilla sin or cos function. I don't see how your technique of oversampling by four can implement a quadrature demodulator. -- % Randy Yates % "With time with what you've learned, %% Fuquay-Varina, NC % they'll kiss the ground you walk %%% 919-577-9882 % upon." %%%% <yates@ieee.org> % '21st Century Man', *Time*, ELO http://home.earthlink.net/~yatescr
Randy Yates wrote:
> "EfiimoFunk" <rfrankel@ufl.edu> writes: > > >>Hey guys, >> I have a few questions regarding digital I/Q demodulation that I can't >>seem to figure out on my own. I notice that if you sample at 4 times the >>carrier frequency you can essectially get the I/Q channels for free. This >>is due to the fact that the samples are 0,90,180,270 etc. (Note: of course >>this is only for the carrier frequency and other frequencies will not have >>the correct phase offset but nevermind that for now). So every other >>sample becomes a channel and a +1/-1 multiply gives you the correct demod. >> Now here's my question: Everybody seems to be using this technique so I >>know that it works but I cannot seem to look at a sin/cos wave and plot >>the points out and see that you get the correct demodulation. Is there >>any way to actually visualize a signal and see the I/Q demod easily? Any >>help on this would be greatly appreciated. > > > Ryan, > > I/Q modulation and demodulation is almost trivial if you look at it a > certain way. That way is this: an IQ demodulator takes a piece of > spectrum from F1 to F2 and moves it to -B/2 to +B/2, where B = F2 - > F1. The important thing to notice is that the piece of spectrum from > F1 to F2 is not necessarily symmetric about F2 - B/2 (i.e., the > carrier), and so therefore neither is the spectrum from -B/2 to +B/2 > symmetric. This means (you may have to brush up on your Fourier > transforms and properties a bit here) that the time-domain signal > (samples, if this is a digital system) at the demodulator output > are complex instead of real. > > Conversely, an IQ modulator takes the (not necessarily symmetric) > spectrum from -B/2 to +B/2, which is comprised of complex samples, and > moves that spectrum to Fc - B/2 to Fc + B/2 AND to -Fc - B/2 to -Fc + > B/2. THAT new spectrum IS symmetric once again and thus the output of > the IQ modulator is always real. > > To represent a sin or cos at complex baseband simply yields samples in > which the imaginary components are zero (remember, at complex baseband > the samples are complex) and the real part is the plain old vanilla > sin or cos function. > > I don't see how your technique of oversampling by four can implement > a quadrature demodulator.
The quadrature demodulator drops out: For the I channel multiply by 1, 0, -1, 0, 1, 0, -1, ... For the Q channel multiply by 0, 1, 0, -1, 0, 1, 0, ... -- ------------------------------------------- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Tim Wescott wrote:
> Randy Yates wrote: > >> "EfiimoFunk" <rfrankel@ufl.edu> writes: >> >> >>> Hey guys, >>> I have a few questions regarding digital I/Q demodulation that I can't >>> seem to figure out on my own. I notice that if you sample at 4 times >>> the >>> carrier frequency you can essectially get the I/Q channels for free. >>> This >>> is due to the fact that the samples are 0,90,180,270 etc. (Note: of >>> course >>> this is only for the carrier frequency and other frequencies will not >>> have >>> the correct phase offset but nevermind that for now). So every other >>> sample becomes a channel and a +1/-1 multiply gives you the correct >>> demod. >>> Now here's my question: Everybody seems to be using this technique so I >>> know that it works but I cannot seem to look at a sin/cos wave and plot >>> the points out and see that you get the correct demodulation. Is there >>> any way to actually visualize a signal and see the I/Q demod easily? Any >>> help on this would be greatly appreciated. >> >> >> >> Ryan, >> >> I/Q modulation and demodulation is almost trivial if you look at it a >> certain way. That way is this: an IQ demodulator takes a piece of >> spectrum from F1 to F2 and moves it to -B/2 to +B/2, where B = F2 - >> F1. The important thing to notice is that the piece of spectrum from >> F1 to F2 is not necessarily symmetric about F2 - B/2 (i.e., the >> carrier), and so therefore neither is the spectrum from -B/2 to +B/2 >> symmetric. This means (you may have to brush up on your Fourier >> transforms and properties a bit here) that the time-domain signal >> (samples, if this is a digital system) at the demodulator output >> are complex instead of real. >> >> Conversely, an IQ modulator takes the (not necessarily symmetric) >> spectrum from -B/2 to +B/2, which is comprised of complex samples, and >> moves that spectrum to Fc - B/2 to Fc + B/2 AND to -Fc - B/2 to -Fc + >> B/2. THAT new spectrum IS symmetric once again and thus the output of >> the IQ modulator is always real. >> >> To represent a sin or cos at complex baseband simply yields samples in >> which the imaginary components are zero (remember, at complex baseband >> the samples are complex) and the real part is the plain old vanilla >> sin or cos function. >> >> I don't see how your technique of oversampling by four can implement >> a quadrature demodulator. > > > The quadrature demodulator drops out: > > For the I channel multiply by > > 1, 0, -1, 0, 1, 0, -1, ... > > For the Q channel multiply by > > 0, 1, 0, -1, 0, 1, 0, ... >
A related technique - If your sampling frequency and decimation factor are chosen appropriately you avoid the multiplication / frequency shift and just filter and decimate. Essentially one of the aliased images ends up appearing in the baseband. Cheers, David
>> The quadrature demodulator drops out: >> >> For the I channel multiply by >> >> 1, 0, -1, 0, 1, 0, -1, ... >> >> For the Q channel multiply by >> >> 0, 1, 0, -1, 0, 1, 0, ...
Tim, I understand the +1/-1 after the multiplexing of the input samples but I am trying to prove that it works (to my boss) and he wants to see it as a sin and cosine wave added/subtracted and then sampled to give us back the correct signal. My problem is that when I do this I get the sine wave multiplied by one and the cosine wave multiplied by -1 (instead of the every other sample type). Any idea on how to visually construct a signal that will show how this process is fundamentally working. It is easy enough to visuallize using a real/imag plot and samples in the four needed places but this is not extremely intuitive for a non-DSP person. I would like to be able to show a signal and show how sampling it at the correct frequency yields the I and Q components. Thanks a bunch for all your guys help. It is great they have a site like this around to help all of us out. --Ryan This message was sent using the Comp.DSP web interface on www.DSPRelated.com
Don't quite know where you're coming from, but the I & Q channels are 
typically your incoming wave coherently multiplied by a the sine and cosine 
of another wave. Are you doing phase demodulation? BPSK QPSK QAM? The fact 
is, you don't need both I and Q channels to do phase demodulation. You can 
use a digital PLL that only requires a single channel (and some feedback).

"EfiimoFunk" <rfrankel@ufl.edu> wrote in message 
news:YuednZBbePZEt1TfRVn-pQ@giganews.com...
> Hey guys, > I have a few questions regarding digital I/Q demodulation that I can't > seem to figure out on my own. I notice that if you sample at 4 times the > carrier frequency you can essectially get the I/Q channels for free. This > is due to the fact that the samples are 0,90,180,270 etc. (Note: of course > this is only for the carrier frequency and other frequencies will not have > the correct phase offset but nevermind that for now). So every other > sample becomes a channel and a +1/-1 multiply gives you the correct demod. > Now here's my question: Everybody seems to be using this technique so I > know that it works but I cannot seem to look at a sin/cos wave and plot > the points out and see that you get the correct demodulation. Is there > any way to actually visualize a signal and see the I/Q demod easily? Any > help on this would be greatly appreciated. > > --Ryan > > > > This message was sent using the Comp.DSP web interface on > www.DSPRelated.com
Hey guys,
  Thanks for all your help.  I think I have got it now.  If your input
"wave" is a DC 1 then you can show that after using this IQ demod
technique you do recieve the correct "wave" after digital IQ demod.  I
appreciate all your help as it was very informative.  Thanks a bunch.

--Ryan

>Don't quite know where you're coming from, but the I & Q channels are >typically your incoming wave coherently multiplied by a the sine and
cosine
>of another wave. Are you doing phase demodulation? BPSK QPSK QAM? The
fact
>is, you don't need both I and Q channels to do phase demodulation. You
can
>use a digital PLL that only requires a single channel (and some
feedback).
> >"EfiimoFunk" <rfrankel@ufl.edu> wrote in message >news:YuednZBbePZEt1TfRVn-pQ@giganews.com... >> Hey guys, >> I have a few questions regarding digital I/Q demodulation that I
can't
>> seem to figure out on my own. I notice that if you sample at 4 times
the
>> carrier frequency you can essectially get the I/Q channels for free.
This
>> is due to the fact that the samples are 0,90,180,270 etc. (Note: of
course
>> this is only for the carrier frequency and other frequencies will not
have
>> the correct phase offset but nevermind that for now). So every other >> sample becomes a channel and a +1/-1 multiply gives you the correct
demod.
>> Now here's my question: Everybody seems to be using this technique so
I
>> know that it works but I cannot seem to look at a sin/cos wave and
plot
>> the points out and see that you get the correct demodulation. Is
there
>> any way to actually visualize a signal and see the I/Q demod easily?
Any
>> help on this would be greatly appreciated. >> >> --Ryan >> >> >> >> This message was sent using the Comp.DSP web interface on >> www.DSPRelated.com > > >
This message was sent using the Comp.DSP web interface on www.DSPRelated.com
Tim Wescott <tim@seemywebsite.com> writes:
> [...] > The quadrature demodulator drops out: > > For the I channel multiply by > > 1, 0, -1, 0, 1, 0, -1, ... > > For the Q channel multiply by > > 0, 1, 0, -1, 0, 1, 0, ...
So you mean that _if_ the original signal were sampled at the carrier frequency, and _then_ the signal was oversampled by four and the said mixing performed, and _then_ the result was decimated (including filtering) back down to the original sample rate, you'd have a quadrature demodulator? Yes, I agree with that, and perhaps this is what the OP meant, but if he did he was quite terse. -- % Randy Yates % "Watching all the days go by... %% Fuquay-Varina, NC % Who are you and who am I?" %%% 919-577-9882 % 'Mission (A World Record)', %%%% <yates@ieee.org> % *A New World Record*, ELO http://home.earthlink.net/~yatescr
Randy Yates wrote:
> Tim Wescott <tim@seemywebsite.com> writes: > >>[...] >>The quadrature demodulator drops out: >> >>For the I channel multiply by >> >>1, 0, -1, 0, 1, 0, -1, ... >> >>For the Q channel multiply by >> >>0, 1, 0, -1, 0, 1, 0, ... > > > So you mean that _if_ the original signal were sampled at > the carrier frequency, and _then_ the signal was oversampled > by four and the said mixing performed, and _then_ the result > was decimated (including filtering) back down to the original > sample rate, you'd have a quadrature demodulator? Yes, I > agree with that, and perhaps this is what the OP meant, but > if he did he was quite terse.
I was taking the term "IQ Demod" in the sense used by the semiconductor companies when they sell quadrature demodulators which go straight from RF to baseband. -- ------------------------------------------- Tim Wescott Wescott Design Services http://www.wescottdesign.com
EfiimoFunk wrote:
>>>The quadrature demodulator drops out: >>> >>>For the I channel multiply by >>> >>>1, 0, -1, 0, 1, 0, -1, ... >>> >>>For the Q channel multiply by >>> >>>0, 1, 0, -1, 0, 1, 0, ... > > Tim, > I understand the +1/-1 after the multiplexing of the input samples but > I am trying to prove that it works (to my boss) and he wants to see it as > a sin and cosine wave added/subtracted and then sampled to give us back > the correct signal. My problem is that when I do this I get the sine wave > multiplied by one and the cosine wave multiplied by -1 (instead of the > every other sample type). Any idea on how to visually construct a signal > that will show how this process is fundamentally working. It is easy > enough to visuallize using a real/imag plot and samples in the four needed > places but this is not extremely intuitive for a non-DSP person. I would > like to be able to show a signal and show how sampling it at the correct > frequency yields the I and Q components. Thanks a bunch for all your guys > help. It is great they have a site like this around to help all of us out. > > > --Ryan > > > > > This message was sent using the Comp.DSP web interface on > www.DSPRelated.com
Sample a sine wave at a rate four times its frequency, taking care that half the sample instants fall on zero crossings. You get 0, +1, 0, -1, repeat. Do the same with a cosine. You get +1, 0, -1, 0, repeat. Sp by multiplying by those pulse trains, you are multiplying by sampled sine and cosine waveforms. Jerry -- Engineering is the art of making what you want from things you can get. &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;