On Fri, 3 Oct 2008 07:28:53 -0700 (PDT), bulegoge@columbus.rr.com
wrote:
>On Oct 3, 6:43�am, Rick Lyons > Hello Bulegoge,
>>
>> � � �From my experience, in DSP we cannot have
>> a discrete sinusoidal signal whose frequency is
>> more positive than Fs/2 or more negative than -Fs/2.
>> I say that based on my understanding of (1) the
>> Nyquist sampling criterion, (2) Euler's equations,
>> and (3) the frequency range of the Unit Circle in
>> the theory of the z-transform.
>>
>> Try generating a real-valued discrete sequence
>> representing an integer number of cycles of
>> a sampled sinusoid whose frequency
>> is more positive than +Fs/2. �When you perform
>> the FFT on that sequence you will see that the
>> positive-frequency spectral energy will always
>> be somewhere in the range of 0 -to- +Fs/2.
>>
>> What we can say is: that real sinusoidal sequence has
>> an infinite number of positive-frequency spectral
>> components (aliases), one of which will always
>> be in the range of 0 -to- +Fs/2. �For real-valued
>> input sinusoidal sequences, the FFT enables us to
>> determine the frequency of the one spectral component
>> residing in the range of 0 -to- +Fs/2.
>>
>> With a real-valued input to an FFT, the FFT's
>> "independent" frequency range of analysis is
>> 0 -to- +Fs/2 Hz. �(In this case, the FFT's
>> negative-frequency samples are conjugates of
>> the positive-frequency components, and are
>> thus NOT independent.)
>>
>> With a complex-valued input to an FFT, the FFT's
>> "independent" frequency range of analysis is
>> -Fs/2 -to- +Fs/2 Hz. �(In this case, all of
>> the FFT's frequency samples are independent.) �
>>
>> At least, that's my opinion,
>> [-Rick-]
>
>Thanks for the input Rick. So my conclusion that you get twice the
>bandwidth is correct, except I missunderstood the +/-Fs part of it.
>Now I have to scratch my head and figure out what an independent set
>of negative frequencies means.
Hi,
Well, the notion of negative frequency is a bit
troublesome to think about when we first encounter it.
I've even read, over the years, a few sig. proc.
articles and an in one textbook that "negative frequencies
don't exist." I cannot defend the idea of negative
frequency in the time domain, but I sure can defend the
idea of negative frequency in the frequency domain.
Our hero Leonard Euler showed how a real-valued cosine wave,
of frequency Fo Hz, can be described as the sum a
positive-frequency complex exponential (of frequency Fo Hz)
and a negative-frequency complex exponential (of frequency
Fo Hz).
If you perform the FFT on a real-valued discrete sequence
representing an integer number of cycles of a sampled
cosine wave whose frequency is Fo Hz, your FFT results
will show both positive- and negative-frequency spectral
components. Those spec components are exactly what Euler
described in his equations.
Now, say you created a complex-valued discrete sequence
representing an integer number of cycles of a sampled
complex exponential wave whose frequency is -Fo Hz.
That sequence could be expressed as:
x(n) = e^(-j*2*pi*Fo*n/Fs)
= cos(2*pi*Fo*n/Fs) -j*sin(2*pi*Fo*n/Fs)
If you perform the FFT on the above x(n) time sequence
your FFT results will show *only* a negative-frequency
spectral component.
This whole subject is *NOT* mathematical mumbo-jumbo.
Figure 8-7 of the 2nd edition of my book shows how to
generate an analog complex exponential (x(t)) in the
laboratory (with real-world) electronic equipment.
>
>BTW, I want to thank you for writing your book. I have been studying
>DSP seriously for almost two years now and I would not be anywhere
>near where I am in my understanding without your book. ( I am an EE
>that has done RF design for years). I am digging through a bunch of
>assembly code to understand a radio , and just this week your book
>helped me decifer a Complex Band Pass FIR filter that they
>implemented.
Ah ha. Great. I'm tickled to hear that.
Thanks for sharing that with me.
Bulegoge, if I haven't said it before, then I'll
say it now:
If you have an American version of the 2nd Edition of
my "Understanding DSP" book, I can send you the appropriate
errata if you can tell me the "Printing Number" of
your copy of the book.
You can determine the "Printing Number" of the American
version (ISBN# 0-13-108989-7) of the 2nd Edition of my
book by looking at the page just before the "Dedication"
page.
On that page (before the Dedication) you'll see all
sorts of publisher-related information, including the
ISBN number. Down toward the bottom of the page you
should see lines printed something like:
Printed in the United States of America
First Printing
indicating the "First Printing" of the book. However, for
later printings the second line above may have the words
like: "Second Printing" or "Seventh Printing".
>I struggled greatly with decimation becuase I was expecting a LPF
>process to occur prior to the decimation, and in the code the
>decimation occured before the filtering. I realized that even though
>the decimation occured before the FIR convolution, that they were
>drawing the filter samples from a buffer that occured at the higher
>sampling rate (as your book made me know must be true). They just did
>the calculations at the lower rate, but used the higher rate data
>samples to not do the filter calculations on the points that were
>going to get tossed anyhow.
Humm, that sounds like "polyphase decimation filtering" to me.
Regards,
[-Rick-]
Reply by ●October 3, 20082008-10-03
On Oct 3, 6:43�am, Rick Lyons > Hello Bulegoge,
>
> � � �From my experience, in DSP we cannot have
> a discrete sinusoidal signal whose frequency is
> more positive than Fs/2 or more negative than -Fs/2.
> I say that based on my understanding of (1) the
> Nyquist sampling criterion, (2) Euler's equations,
> and (3) the frequency range of the Unit Circle in
> the theory of the z-transform.
>
> Try generating a real-valued discrete sequence
> representing an integer number of cycles of
> a sampled sinusoid whose frequency
> is more positive than +Fs/2. �When you perform
> the FFT on that sequence you will see that the
> positive-frequency spectral energy will always
> be somewhere in the range of 0 -to- +Fs/2.
>
> What we can say is: that real sinusoidal sequence has
> an infinite number of positive-frequency spectral
> components (aliases), one of which will always
> be in the range of 0 -to- +Fs/2. �For real-valued
> input sinusoidal sequences, the FFT enables us to
> determine the frequency of the one spectral component
> residing in the range of 0 -to- +Fs/2.
>
> With a real-valued input to an FFT, the FFT's
> "independent" frequency range of analysis is
> 0 -to- +Fs/2 Hz. �(In this case, the FFT's
> negative-frequency samples are conjugates of
> the positive-frequency components, and are
> thus NOT independent.)
>
> With a complex-valued input to an FFT, the FFT's
> "independent" frequency range of analysis is
> -Fs/2 -to- +Fs/2 Hz. �(In this case, all of
> the FFT's frequency samples are independent.) �
>
> At least, that's my opinion,
> [-Rick-]
Thanks for the input Rick. So my conclusion that you get twice the
bandwidth is correct, except I missunderstood the +/-Fs part of it.
Now I have to scratch my head and figure out what an independent set
of negative frequencies means.
------------
BTW, I want to thank you for writing your book. I have been studying
DSP seriously for almost two years now and I would not be anywhere
near where I am in my understanding without your book. ( I am an EE
that has done RF design for years). I am digging through a bunch of
assembly code to understand a radio , and just this week your book
helped me decifer a Complex Band Pass FIR filter that they
implemented.
I struggled greatly with decimation becuase I was expecting a LPF
process to occur prior to the decimation, and in the code the
decimation occured before the filtering. I realized that even though
the decimation occured before the FIR convolution, that they were
drawing the filter samples from a buffer that occured at the higher
sampling rate (as your book made me know must be true). They just did
the calculations at the lower rate, but used the higher rate data
samples to not do the filter calculations on the points that were
going to get tossed anyhow.
Reply by ●October 3, 20082008-10-03
On Sep 30, 8:12�am, cincy...@gmail.com wrote:
> Some of your other assumptions on the workings of an I/Q front-end
> aren't as true. Look at the block diagram of the prototypical I/Q
> receiver that you'll find in any communications systems text: you'll
> see a local oscillator with a 90 degree phase shifter (to generate a
> sine and cosine at the same frequency), feeding two separate mixers
> (one for each of the I and Q channels). The output from the mixers
> would then be filtered and sampled with separate A/D converters;
> however, it is very likely that the two ADCs would have coherent clock
> inputs. You really want the real and imaginary parts of the complex
> samples to be sampled at the same time, or they really start to lose
> their meaning. So, if you had an input signal at 25 kHz, you would
> actually have two ADCs with a single 25 kHz clock signal driving them.
Thanks for the input. I based my idea on the sample frequency on I/Q
demodulator chips that require a clock frequency that is four times
the sampling rate and then they use an internal digital divider to
create an I channel LO and Q channel LO that are 90 degrees apart.
Reply by Rick Lyons●October 3, 20082008-10-03
On Tue, 30 Sep 2008 03:40:42 -0700 (PDT), bulegoge@columbus.rr.com
wrote:
(Snipped by Lyons)
>
>
>I have not gone through the math, but I believe the end result is that
>the FFT now truly represents frequencies up to the sampling rate and
>not just to half the sampling rate. In other words, the conjugate
>pairing process is not happening. Each spectral line represents a
>unique frequeny, and it does not need help from a second FFT data
>point to construct the frequeny.
>
> Is this interpretation correct?
>
Hello Bulegoge,
From my experience, in DSP we cannot have
a discrete sinusoidal signal whose frequency is
more positive than Fs/2 or more negative than -Fs/2.
I say that based on my understanding of (1) the
Nyquist sampling criterion, (2) Euler's equations,
and (3) the frequency range of the Unit Circle in
the theory of the z-transform.
Try generating a real-valued discrete sequence
representing an integer number of cycles of
a sampled sinusoid whose frequency
is more positive than +Fs/2. When you perform
the FFT on that sequence you will see that the
positive-frequency spectral energy will always
be somewhere in the range of 0 -to- +Fs/2.
What we can say is: that real sinusoidal sequence has
an infinite number of positive-frequency spectral
components (aliases), one of which will always
be in the range of 0 -to- +Fs/2. For real-valued
input sinusoidal sequences, the FFT enables us to
determine the frequency of the one spectral component
residing in the range of 0 -to- +Fs/2.
With a real-valued input to an FFT, the FFT's
"independent" frequency range of analysis is
0 -to- +Fs/2 Hz. (In this case, the FFT's
negative-frequency samples are conjugates of
the positive-frequency components, and are
thus NOT independent.)
With a complex-valued input to an FFT, the FFT's
"independent" frequency range of analysis is
-Fs/2 -to- +Fs/2 Hz. (In this case, all of
the FFT's frequency samples are independent.)
At least, that's my opinion,
[-Rick-]
Reply by glen herrmannsfeldt●September 30, 20082008-09-30
bulegoge@columbus.rr.com wrote:
(snip)
> So what about I/Q processing? Where you put in, not a real data
> stream into the FFT, but a complex data stream into the FFT?
(snip)
> After thinking about the way the data is generated in IQ format, I
> started to realize that you cannot generate an IQ data stream with a
> simple 25 KHz sampling clock. In order to get a sin and cosine data
> point at 25 KHz you really need a hidden clock in your A/D converter
> that runs at 100 KHz. This is becuase in order to get a data point
> the sampling clock must be able to get the sampling rate and a point
> that is 90 degrees ( 40usec/4) later. So with an IQ data stream you
> have two points of data that are stacked together and come out of the
> A/D every 40 usec, however, that data really represents a "behind the
> scenes" sampling rate of 100 KHz.
Well, you could generate it from a lookup table, or some way
other than as the output of an A/D converter...
(snip)
> I have not gone through the math, but I believe the end result is that
> the FFT now truly represents frequencies up to the sampling rate and
> not just to half the sampling rate. In other words, the conjugate
> pairing process is not happening. Each spectral line represents a
> unique frequeny, and it does not need help from a second FFT data
> point to construct the frequeny.
> Is this interpretation correct?
It should be, unless you happen to be unlucky.
If you happen to set the boundary condition such that only
sine terms are allowed, or only cosine terms, then the other
terms don't help any.
As long as the terms contribute to the result, they contribute
to the needed sample points.
-- glen
Reply by ●September 30, 20082008-09-30
On Sep 30, 6:40�am, buleg...@columbus.rr.com wrote:
> I have been analyzing a system that has data that is formated in IQ.
> This data is used to feed an FFT. �The data rate of the FFT is 25 KHz
> and the FFT has 64 points.
>
> I have spent a fair amount of time thinking about a real data stream
> entering an FFT and I know that when you enter a real data stream into
> a 64 pt. FFT at 25 KHz that you will get 64 complex spectral lines.
> These 64 lines form conjugate pairs so that you effectivly have the
> signal represented as frequency content up to half the sampling rate
> (Actually, part of the frequeny content is also in the results of the
> FFT at half the sampling rate).
>
> So what about I/Q processing? �Where you put in, not a real data
> stream into the FFT, but a complex data stream into the FFT?
>
> -----------------------------------------------------------
> A few thoughts on sampling rate and FFT:
>
> When �generating IQ data (lets say at 25 KHz) it is different than
> generating a single data stream at 25 KHz. �With a single data stream,
> you get one point every 40usec. �With an IQ data stream you get 2
> points.
>
> After thinking about the way the data is generated in IQ �format, I
> started to realize that you cannot generate an IQ data stream with a
> simple 25 KHz sampling clock. �In order to �get a sin and cosine data
> point at 25 KHz you really need a hidden clock in your A/D converter
> that runs at 100 KHz. �This is becuase in order to get a data point
> the sampling clock must be able to get the sampling rate and a point
> that is 90 degrees ( 40usec/4) later. �So with an IQ data stream you
> have two points of data that are stacked together and come out of the
> A/D every 40 usec, however, that data really represents a "behind the
> scenes" sampling rate of 100 KHz.
> -----------------------------------------------------------
>
> So what happens when you put the IQ data stream through an FFT at a
> rate of 25 KHz and with 64 points? �What do the results represent as
> compared to a simple real data stream at 25 KHz?
>
> You have twice as many points going into the FFT ( in that there is a
> complex component for each data point now), and there is kind of a 100
> KHz sampling rate kind of going on behind the scenes, even though the
> data rate is still "25 KHz"
>
> I have not gone through the math, but I believe the end result is that
> the FFT now truly represents frequencies up to the sampling rate and
> not just to half the sampling rate. �In other words, the conjugate
> pairing process is not happening. �Each spectral line represents a
> unique frequeny, and it does not need help from a second FFT data
> point to construct the frequeny.
>
> �Is this interpretation correct?
You're mostly right on your conclusion. A complex signal at sample
rate Fs can unambiguously represent frequency content from 0 Hz to Fs.
Sometimes, we say that a complex signal can represent those mysterious
"negative frequencies," so the usable bandwidth of a complex signal
becomes [-Fs/2, Fs/2]. With that said, complex signals are often just
a mathematical convenience; you're not really getting a benefit here
in terms of "bandwidth per byte," since a complex signal has two
scalar components in each sample.
Some of your other assumptions on the workings of an I/Q front-end
aren't as true. Look at the block diagram of the prototypical I/Q
receiver that you'll find in any communications systems text: you'll
see a local oscillator with a 90 degree phase shifter (to generate a
sine and cosine at the same frequency), feeding two separate mixers
(one for each of the I and Q channels). The output from the mixers
would then be filtered and sampled with separate A/D converters;
however, it is very likely that the two ADCs would have coherent clock
inputs. You really want the real and imaginary parts of the complex
samples to be sampled at the same time, or they really start to lose
their meaning. So, if you had an input signal at 25 kHz, you would
actually have two ADCs with a single 25 kHz clock signal driving them.
Jason
Reply by ●September 30, 20082008-09-30
I have been analyzing a system that has data that is formated in IQ.
This data is used to feed an FFT. The data rate of the FFT is 25 KHz
and the FFT has 64 points.
I have spent a fair amount of time thinking about a real data stream
entering an FFT and I know that when you enter a real data stream into
a 64 pt. FFT at 25 KHz that you will get 64 complex spectral lines.
These 64 lines form conjugate pairs so that you effectivly have the
signal represented as frequency content up to half the sampling rate
(Actually, part of the frequeny content is also in the results of the
FFT at half the sampling rate).
So what about I/Q processing? Where you put in, not a real data
stream into the FFT, but a complex data stream into the FFT?
-----------------------------------------------------------
A few thoughts on sampling rate and FFT:
When generating IQ data (lets say at 25 KHz) it is different than
generating a single data stream at 25 KHz. With a single data stream,
you get one point every 40usec. With an IQ data stream you get 2
points.
After thinking about the way the data is generated in IQ format, I
started to realize that you cannot generate an IQ data stream with a
simple 25 KHz sampling clock. In order to get a sin and cosine data
point at 25 KHz you really need a hidden clock in your A/D converter
that runs at 100 KHz. This is becuase in order to get a data point
the sampling clock must be able to get the sampling rate and a point
that is 90 degrees ( 40usec/4) later. So with an IQ data stream you
have two points of data that are stacked together and come out of the
A/D every 40 usec, however, that data really represents a "behind the
scenes" sampling rate of 100 KHz.
-----------------------------------------------------------
So what happens when you put the IQ data stream through an FFT at a
rate of 25 KHz and with 64 points? What do the results represent as
compared to a simple real data stream at 25 KHz?
You have twice as many points going into the FFT ( in that there is a
complex component for each data point now), and there is kind of a 100
KHz sampling rate kind of going on behind the scenes, even though the
data rate is still "25 KHz"
I have not gone through the math, but I believe the end result is that
the FFT now truly represents frequencies up to the sampling rate and
not just to half the sampling rate. In other words, the conjugate
pairing process is not happening. Each spectral line represents a
unique frequeny, and it does not need help from a second FFT data
point to construct the frequeny.
Is this interpretation correct?