Thanks for all your help guys. For those of you who wish to take a closer look at exactly what I was talking about check out a paper called "Digital I/Q Demodulator" by C. Ziomek and P Corredoura which can be found on IEEE Xplore. It gives a pretty gove overview of the technique as well as some good examples. Of course it just glances over what we were talking about here. The best method I have found to demonstrate this method is to input a DC "1" multiplied by the sine and cosine and added to give you your outgoing signal. If you sample this at 4 times the frequency of the carriers then you get exactly what Tim has previously shown. Or you get back a DC "1" signal. It is a bit harder to show that it works with sine input because of the oversampling that is created. Thanks again for all your help. I now have a new love for this website. --Ryan -------------------------- SPAWAR>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 samplesbut>> I am trying to prove that it works (to my boss) and he wants to see itas>> a sin and cosine wave added/subtracted and then sampled to give usback>> the correct signal. My problem is that when I do this I get the sinewave>> multiplied by one and the cosine wave multiplied by -1 (instead of the >> every other sample type). Any idea on how to visually construct asignal>> that will show how this process is fundamentally working. It is easy >> enough to visuallize using a real/imag plot and samples in the fourneeded>> places but this is not extremely intuitive for a non-DSP person. Iwould>> like to be able to show a signal and show how sampling it at thecorrect>> frequency yields the I and Q components. Thanks a bunch for all yourguys>> help. It is great they have a site like this around to help all of usout.>> >> >> --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. >����������������������������������������������������������������������� >This message was sent using the Comp.DSP web interface on www.DSPRelated.com
IQ Demod Questions
Started by ●July 4, 2005
Reply by ●July 5, 20052005-07-05
Reply by ●July 6, 20052005-07-06
On Mon, 04 Jul 2005 14:02:20 -0400, David Kirkland <spam@netscape.net> wrote: (snipped)>> > >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, >DavidHi David, You make a really good point here. I can see that your method always works fine if the time sequence is complex, but I'm wondering under what conditions will it work for real-valued time samples. Humm, ... I'll have to model this sometime. See Ya', [-Rick-]
Reply by ●July 6, 20052005-07-06
R.Lyons@_BOGUS_ieee.org (Rick Lyons) writes:> On Mon, 04 Jul 2005 14:02:20 -0400, David Kirkland <spam@netscape.net> > wrote: > > (snipped) >>> >> >>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 > > Hi David, > > You make a really good point here. > I can see that your method always works fine > if the time sequence is complex, but I'm wondering > under what conditions will it work for real-valued > time samples. > > Humm, ... I'll have to model this sometime. > > See Ya', > [-Rick-]Hey Rick, I think David means that you start out with a real sequence, then when you "decimate," one sample becomes real and one imaginary. I think I see the technique - the trick (in addition to carefully choosing your sampling frequencies and bandwidths) is to downsample by four by keeping samples 0 and 1 every 8 instead of samples 0 and 4. I think - shooting from the hip (and probably missing). -- % 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
Reply by ●July 7, 20052005-07-07
On Wed, 06 Jul 2005 21:15:57 GMT, Randy Yates <yates@ieee.org> wrote:>R.Lyons@_BOGUS_ieee.org (Rick Lyons) writes: > >> On Mon, 04 Jul 2005 14:02:20 -0400, David Kirkland <spam@netscape.net> >> wrote: >> >> (snipped) >>>> >>> >>>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 >> >> Hi David, >> >> You make a really good point here. >> I can see that your method always works fine >> if the time sequence is complex, but I'm wondering >> under what conditions will it work for real-valued >> time samples. >> >> Humm, ... I'll have to model this sometime. >> >> See Ya', >> [-Rick-] > >Hey Rick, > >I think David means that you start out with a real sequence, then >when you "decimate," one sample becomes real and one imaginary. > >I think I see the technique - the trick (in addition to carefully >choosing your sampling frequencies and bandwidths) is to downsample >by four by keeping samples 0 and 1 every 8 instead of samples 0 and >4. I think - shooting from the hip (and probably missing). >-- >% Randy Yates % "Maybe one day I'll feel her cold embrace,Hi Randy, Ah, here we go with our ever-present symantics problems. When David said "... one of the aliased images ends up appearing in the baseband", I ASSUMED he meant a signal image ends up centered at zero Hz. Next I thought, "Yep, if a narrowband complex signal (a signal with only positive freq components) is centered at Fs/3, then I can decimate that signal by 3. The resulting decimated sequence's spectrum will be centered at zero Hz." That way, we've performed down-conversion with no multiplication. A fairly neat trick. Then I thought, "If we have a narrowband real signal centered at Fs/3, what happens when I decimate that signal by 3?" I believe the answer is that the signal's positive freq components get shifted to be centered at zero Hz, and its negative freq components also get shifted to be centered at zero Hz. Then I was wondering, off the top of my head, under what conditions will that decimation of a real signal by 3 give me a useable (no alising errors) signal whose spectrum is centered at zero Hz. Am ashamed to say but I don't have a solid answer, in which I'm confident, just by thinking about this. I sure wish I knew more about DSP. See Ya' Randy, [-Rick-]
Reply by ●July 7, 20052005-07-07
"Rick Lyons" <R.Lyons@_BOGUS_ieee.org> wrote in message news:42cd109b.834470500@news.sf.sbcglobal.net...> On Wed, 06 Jul 2005 21:15:57 GMT, Randy Yates <yates@ieee.org> wrote: > > >R.Lyons@_BOGUS_ieee.org (Rick Lyons) writes: > > > >> On Mon, 04 Jul 2005 14:02:20 -0400, David Kirkland <spam@netscape.net> > >> wrote: > >> > >> (snipped) > >>>> > >>> > >>>A related technique - If your sampling frequency and decimation factor > >>>are chosen appropriately you avoid the multiplication / frequencyshift> >>>and just filter and decimate. Essentially one of the aliased imagesends> >>>up appearing in the baseband. > >>> > >>>Cheers, > >>>David > >> > >> Hi David, > >> > >> You make a really good point here. > >> I can see that your method always works fine > >> if the time sequence is complex, but I'm wondering > >> under what conditions will it work for real-valued > >> time samples. > >> > >> Humm, ... I'll have to model this sometime. > >> > >> See Ya', > >> [-Rick-] > > > >Hey Rick, > > > >I think David means that you start out with a real sequence, then > >when you "decimate," one sample becomes real and one imaginary. > > > >I think I see the technique - the trick (in addition to carefully > >choosing your sampling frequencies and bandwidths) is to downsample > >by four by keeping samples 0 and 1 every 8 instead of samples 0 and > >4. I think - shooting from the hip (and probably missing). > >-- > >% Randy Yates % "Maybe one day I'll feel her coldembrace,> > Hi Randy, > > Ah, here we go with our ever-present symantics > problems. When David said "... one of the aliased images > ends up appearing in the baseband", > I ASSUMED he meant a signal image ends up centered at zero Hz. > > Next I thought, "Yep, if a narrowband complex signal > (a signal with only positive freq components) > is centered at Fs/3, then I can decimate that signal > by 3. The resulting decimated sequence's spectrum will > be centered at zero Hz." > > That way, we've performed down-conversion with no > multiplication. A fairly neat trick. > > Then I thought, "If we have a narrowband real signal > centered at Fs/3, what happens when I decimate that signal > by 3?" > > I believe the answer is that the signal's > positive freq components get shifted to be centered at > zero Hz, and its negative freq components also get > shifted to be centered at zero Hz. Then I was > wondering, off the top of my head, under what conditions > will that decimation of a real signal by 3 give me a > useable (no alising errors) signal whose spectrum is > centered at zero Hz.I'm not very sure of my answer but I think the condition where you would get a useable signal centered at zero Hz is when the real signal has a symmetric spectrum around it's carrier (fs/3)> Am ashamed to say but I don't have a solid answer, > in which I'm confident, just by thinking about > this. > > I sure wish I knew more about DSP.Don't we all...but I think you say such things to make the rest of us feel small. Cheers Bhaskar> > See Ya' Randy, > [-Rick-] >
Reply by ●July 8, 20052005-07-08
Bhaskar Thiagarajan wrote:> "Rick Lyons" <R.Lyons@_BOGUS_ieee.org> wrote in message > news:42cd109b.834470500@news.sf.sbcglobal.net... > >>On Wed, 06 Jul 2005 21:15:57 GMT, Randy Yates <yates@ieee.org> wrote: >> >> >>>R.Lyons@_BOGUS_ieee.org (Rick Lyons) writes: >>> >>> >>>>On Mon, 04 Jul 2005 14:02:20 -0400, David Kirkland <spam@netscape.net> >>>>wrote: >>>> >>>> (snipped) >>>> >>>>>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 >>>> >>>>Hi David, >>>> >>>> You make a really good point here. >>>>I can see that your method always works fine >>>>if the time sequence is complex, but I'm wondering >>>>under what conditions will it work for real-valued >>>>time samples. >>>> >>>>Humm, ... I'll have to model this sometime. >>>> >>>>See Ya', >>>>[-Rick-] >>> >>>Hey Rick, >>> >>>I think David means that you start out with a real sequence, then >>>when you "decimate," one sample becomes real and one imaginary. >>> >>>I think I see the technique - the trick (in addition to carefully >>>choosing your sampling frequencies and bandwidths) is to downsample >>>by four by keeping samples 0 and 1 every 8 instead of samples 0 and >>>4. I think - shooting from the hip (and probably missing). >>>-- >>>% Randy Yates % "Maybe one day I'll feel her cold > > embrace, > >>Hi Randy, >> >> Ah, here we go with our ever-present symantics >>problems. When David said "... one of the aliased images >>ends up appearing in the baseband", >>I ASSUMED he meant a signal image ends up centered at zero Hz. >> >>Next I thought, "Yep, if a narrowband complex signal >>(a signal with only positive freq components) >>is centered at Fs/3, then I can decimate that signal >>by 3. The resulting decimated sequence's spectrum will >>be centered at zero Hz." >> >>That way, we've performed down-conversion with no >>multiplication. A fairly neat trick. >> >>Then I thought, "If we have a narrowband real signal >>centered at Fs/3, what happens when I decimate that signal >>by 3?" >> >>I believe the answer is that the signal's >>positive freq components get shifted to be centered at >>zero Hz, and its negative freq components also get >>shifted to be centered at zero Hz. Then I was >>wondering, off the top of my head, under what conditions >>will that decimation of a real signal by 3 give me a >>useable (no alising errors) signal whose spectrum is >>centered at zero Hz. > > > I'm not very sure of my answer but I think the condition where you would get > a useable signal centered at zero Hz is when the real signal has a symmetric > spectrum around it's carrier (fs/3) > > > >>Am ashamed to say but I don't have a solid answer, >>in which I'm confident, just by thinking about >>this. >> >>I sure wish I knew more about DSP. > > > Don't we all...but I think you say such things to make the rest of us feel > small. > > Cheers > Bhaskar > > >>See Ya' Randy, >>[-Rick-] >> > > >Hi Guys, I wasn't able to look able to find the source for this that I was thinking of. I was able to find adescription of the technique in Crochiere and Rabiner's book "Multirate Digital Signal Processing". There is also a similar section in Whalen's Book "Detection of Signals in Noise" First, by related I meant in terms of computational savings. The technique I mentioned doesn't give the full I/Q samples - the signal still stays real (if it started that way). Essentially the left edge of the +ve freq components are moved down close to the right side of zero, and the right edge of the -ve freq components are moved down close to the left side of 0. Moving them close to 0 prevents them from overlaping and causing corruption. Compared to full I/Q, the sample rate is ~ twice, but the samples are still real because the complex conjugate symmetry is still preserved. I hope that helps clear things up. I also apologize for not including any rigourous mathematics - I hate putting math into plain text formats such as this. If more detail is required then let me know and I will put it in. For those looking for a reference, in the previously mentioned C&R book see section 2.4.2, pg 43, "Integer Band Decimation and Interpolation" Copyright 1983. I'm glad to see guys like Randy, Rick and Bhaskar reading my posts :) I know I'm in good company! All the best. Cheers, David
Reply by ●July 13, 20052005-07-13
On Thu, 7 Jul 2005 09:02:19 -0700, "Bhaskar Thiagarajan" <bhaskart@deja.com> wrote: (snipped)>> Then I thought, "If we have a narrowband real signal >> centered at Fs/3, what happens when I decimate that signal >> by 3?" >> >> I believe the answer is that the signal's >> positive freq components get shifted to be centered at >> zero Hz, and its negative freq components also get >> shifted to be centered at zero Hz. Then I was >> wondering, off the top of my head, under what conditions >> will that decimation of a real signal by 3 give me a >> useable (no alising errors) signal whose spectrum is >> centered at zero Hz. > >I'm not very sure of my answer but I think the condition where you would get >a useable signal centered at zero Hz is when the real signal has a symmetric >spectrum around it's carrier (fs/3)Hi Bhaskar, I willing to bet one bottle of beer that you are correct.>> Am ashamed to say but I don't have a solid answer, >> in which I'm confident, just by thinking about >> this. >> >> I sure wish I knew more about DSP. > >Don't we all...but I think you say such things to make the rest of us feel >small.Ha ha Bhaskar, you're a good guy. But please know, I am unable to count the number of times when someone asked me a fairly simple DSP question and I was forced to admit to myself, "Sheece Rick! Why don't you *KNOW* the answer to such a simple question(!!)?" See Ya, [-Rick-]
Reply by ●July 13, 20052005-07-13
On Fri, 08 Jul 2005 09:12:27 -0400, David Kirkland <spam@netscape.net> wrote: (snipped)>> >Hi Guys, > >I wasn't able to look able to find the source for this that I was >thinking of. I was able to find adescription of the technique in >Crochiere and Rabiner's book "Multirate Digital Signal Processing". >There is also a similar section in Whalen's Book "Detection of Signals >in Noise" > >First, by related I meant in terms of computational savings. The >technique I mentioned doesn't give the full I/Q samples - the signal >still stays real (if it started that way). Essentially the left edge of >the +ve freq components are moved down close to the right side of zero, >and the right edge of the -ve freq components are moved down close to >the left side of 0. Moving them close to 0 prevents them from overlaping >and causing corruption.Hi David, Ah, I misunderstood you. When I first learned about it, I thought the freq translation method that you descibe was pretty neat. Neat enough that I covered that topic in the 2nd edition of my DSP book. Thanks David, [-Rick-] (snipped)