DSPRelated.com
Forums

FFT for ADC output

Started by wks_19 June 15, 2010
Hi, 
    I'm new to DSP and FFT. My question is how to do FFT for ADC digital
output code,as FFT algorithms i've seen in Internet always ask for real and
imaginary parts input for the FFT algorithm.

   So what is the input for FFT, if we want to do it for digital codes?

Thanks


On 6/15/2010 7:46 AM, wks_19 wrote:
> Hi, > I'm new to DSP and FFT. My question is how to do FFT for ADC digital > output code,as FFT algorithms i've seen in Internet always ask for real and > imaginary parts input for the FFT algorithm. > > So what is the input for FFT, if we want to do it for digital codes? > > Thanks
A general imaginary number is x + i*y. The output of an ADC is real, so that y = 0. There are canned FFT routines that assume the input is a pure real. They are a bit simpler to use and run a bit faster than the generalized ones. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
>On 6/15/2010 7:46 AM, wks_19 wrote: >> Hi, >> I'm new to DSP and FFT. My question is how to do FFT for ADC
digital
>> output code,as FFT algorithms i've seen in Internet always ask for real
and
>> imaginary parts input for the FFT algorithm. >> >> So what is the input for FFT, if we want to do it for digital
codes?
>> >> Thanks > >A general imaginary number is x + i*y. The output of an ADC is real, so >that y = 0. There are canned FFT routines that assume the input is a >pure real. They are a bit simpler to use and run a bit faster than the >generalized ones. > >Jerry >-- >Engineering is the art of making what you want from things you can get. >����������������������������������������������������������������������� >
Thanks for the reply. My doubt is that the decimal numbers that we obtain from the digital codes exactly how it can be taken as a Voltage sampled? Is that I've to do some calculation with the ADC's Vlsb and give the obtained voltage levels to FFT algorithm.
On 6/15/2010 11:32 PM, wks_19 wrote:

 > Thanks for the reply. My doubt is that the decimal numbers that we
 > obtain from the digital codes exactly how it can be taken as a
 > Voltage sampled? Is that I've to do some calculation with the ADC's
 > Vlsb and give the obtained voltage levels to FFT algorithm.

You may interpret the numbers any way you like: decimal, hexadecimal, 
octal, or binary for some. They are different representations of the 
same thing. As for the scale factor, that depends on the hardware. A 
full-scale reading mat represent 50 mV ot 50V or any other value in or 
outside that range.
-- 
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
>On 6/15/2010 11:32 PM, wks_19 wrote: > > > Thanks for the reply. My doubt is that the decimal numbers that we > > obtain from the digital codes exactly how it can be taken as a > > Voltage sampled? Is that I've to do some calculation with the ADC's > > Vlsb and give the obtained voltage levels to FFT algorithm. > >You may interpret the numbers any way you like: decimal, hexadecimal, >octal, or binary for some. They are different representations of the >same thing. As for the scale factor, that depends on the hardware. A >full-scale reading mat represent 50 mV ot 50V or any other value in or >outside that range. >-- >Engineering is the art of making what you want from things you can get. >����������������������������������������������������������������������� > Thanks Jerry for ur reply,
I'll elaborate you my issue and i hope that you will provide me a sln. I'm capturing a 8-bit ADC output with a digital comparator and it gives me the decimal numbers for the corresponding digital codes. Is that this decimal number is enough to give directly as an input for the real-part of the FFT and imag. part to zero. Actually, I can't able to understand how mere numbers and not voltage levels are enough to calculate FFT, as many FFT algorithms take sinusoidal sampled voltage levels as their input.
>On 6/15/2010 11:32 PM, wks_19 wrote: > > > Thanks for the reply. My doubt is that the decimal numbers that we > > obtain from the digital codes exactly how it can be taken as a > > Voltage sampled? Is that I've to do some calculation with the ADC's > > Vlsb and give the obtained voltage levels to FFT algorithm. > >You may interpret the numbers any way you like: decimal, hexadecimal, >octal, or binary for some. They are different representations of the >same thing. As for the scale factor, that depends on the hardware. A >full-scale reading mat represent 50 mV ot 50V or any other value in or >outside that range. >-- >Engineering is the art of making what you want from things you can get. >����������������������������������������������������������������������� > Thanks Jerry for ur reply,
I'll elaborate you my issue and i hope that you will provide me a sln. I'm capturing a 8-bit ADC output with a digital comparator and it gives me the decimal numbers for the corresponding digital codes. Is that this decimal number is enough to give directly as an input for the real-part of the FFT and imag. part to zero. Actually, I can't able to understand how mere numbers and not voltage levels are enough to calculate FFT, as many FFT algorithms take sinusoidal sampled voltage levels as their input.
On 6/16/2010 1:57 AM, wks_19 wrote:
>> On 6/15/2010 11:32 PM, wks_19 wrote: >> >>> Thanks for the reply. My doubt is that the decimal numbers that we >>> obtain from the digital codes exactly how it can be taken as a >>> Voltage sampled? Is that I've to do some calculation with the ADC's >>> Vlsb and give the obtained voltage levels to FFT algorithm. >> >> You may interpret the numbers any way you like: decimal, hexadecimal, >> octal, or binary for some. They are different representations of the >> same thing. As for the scale factor, that depends on the hardware. A >> full-scale reading mat represent 50 mV ot 50V or any other value in or >> outside that range.
>> Thanks Jerry for ur reply, > I'll elaborate you my issue and i hope that you will provide me a sln. > I'm capturing a 8-bit ADC output with a digital comparator and it gives me > the decimal numbers for the corresponding digital codes. Is that this > decimal number is enough to give directly as an input for the real-part of > the FFT and imag. part to zero. Actually, I can't able to understand how > mere numbers and not voltage levels are enough to calculate FFT, as many > FFT algorithms take sinusoidal sampled voltage levels as their input.
Any Fourier transform is a mathematical operation. It takes numbers or functions as input and yields numbers or functions as output. The FFT, being a digital algorithm, deals with numbers, not functions. It is up to the user to determine what those numbers represent. The FFT of a year's worth of the times of sunrise is interesting. I don't know what constraints you assume about Fourier transforms, but there must be some that unwarranted. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
>On 6/16/2010 1:57 AM, wks_19 wrote: >>> On 6/15/2010 11:32 PM, wks_19 wrote: >>> >>>> Thanks for the reply. My doubt is that the decimal numbers that we >>>> obtain from the digital codes exactly how it can be taken as a >>>> Voltage sampled? Is that I've to do some calculation with the ADC's >>>> Vlsb and give the obtained voltage levels to FFT algorithm. >>> >>> You may interpret the numbers any way you like: decimal, hexadecimal, >>> octal, or binary for some. They are different representations of the >>> same thing. As for the scale factor, that depends on the hardware. A >>> full-scale reading mat represent 50 mV ot 50V or any other value in or >>> outside that range. > >>> Thanks Jerry for ur reply, >> I'll elaborate you my issue and i hope that you will provide me a
sln.
>> I'm capturing a 8-bit ADC output with a digital comparator and it gives
me
>> the decimal numbers for the corresponding digital codes. Is that this >> decimal number is enough to give directly as an input for the real-part
of
>> the FFT and imag. part to zero. Actually, I can't able to understand
how
>> mere numbers and not voltage levels are enough to calculate FFT, as
many
>> FFT algorithms take sinusoidal sampled voltage levels as their input. > >Any Fourier transform is a mathematical operation. It takes numbers or >functions as input and yields numbers or functions as output. The FFT, >being a digital algorithm, deals with numbers, not functions. It is up >to the user to determine what those numbers represent. > >The FFT of a year's worth of the times of sunrise is interesting. I >don't know what constraints you assume about Fourier transforms, but >there must be some that unwarranted. > >Jerry >-- >Engineering is the art of making what you want from things you can get. >����������������������������������������������������������������������� >
Jerry, Can you give me an example FFT algorithm which acts directly on digital data and not any sampled voltage levels in "C"? Thanks a lot
On 6/16/2010 10:26 AM, wks_19 wrote:

   ...

> Jerry, > > Can you give me an example FFT algorithm which acts directly on > digital data and not any sampled voltage levels in "C"?
A Fast Fourier Transform is an algorithm (well, OK, a family of algorithms) that takes a sequence of numbers x[n] and produces another sequence X[n]. Can you show me an example of an FFT that operates directly on a voltage? Most analog-to-digital converters measure voltages, but many respond to currents. Digital thermometers convert temperatures to numbers. An FFT works with numbers, not with physical phenomena that the numbers describe. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Jerry Avins <jya@ieee.org> wrote:
> On 6/16/2010 10:26 AM, wks_19 wrote:
>> Can you give me an example FFT algorithm which acts directly on >> digital data and not any sampled voltage levels in "C"?
> A Fast Fourier Transform is an algorithm (well, OK, a family of > algorithms) that takes a sequence of numbers x[n] and produces another > sequence X[n]. Can you show me an example of an FFT that operates > directly on a voltage?
It would seem that it might be possible, but not easy. Storing voltages as analog values on an array of capacitors, to start with. Now, at some point the voltages are quantized, as charge is quantized and Q=CV, but if you ignore that.... The FFT algorithms add and multiply values, and so a series of analog mutlipliers and analog adders could, theoretically do it. I would expect the errors, non-linearities in the amplifiers involved, to build up pretty fast, though.
> Most analog-to-digital converters measure voltages, but many respond to > currents. Digital thermometers convert temperatures to numbers. An FFT > works with numbers, not with physical phenomena that the numbers describe.
If you take N bit A/D and D/A converters, in the limit as N goes to infinity, then you at least have the appropriate algorithm. Now, how many electrons are stored on a typical capacitor in a DRAM array these days? -- glen