Technical discussions about the TI C54x DSPs (including the c5401, c5402, c5402a, c5404, c5407, c5409, c5409a, c5410, c5410a, c5416, c5420, c5421, c5441, c549, c5470 and c5471).
|
Hi everyone, I've got some questions for you. Please consider i'm not a specialist and so that some questions may appear very simple for you. My aim is to determine the magnitude of an analog incoming signal at 9 kHz. This incoming signal is made of several frequencies, let's say from 0 to 30 kHz. First i digitize this signal and then i treat it thanks to a DSP (the TMS320C5402). The treatment deals with the determination of this magnitude. I've been told to use the Goertzel algorithm rather than a classsic FFT since i only need to know the magnitude at one given frequency. I studied this algorithm and tried to use it. Now i've got some questions : Q1 : To make some tests i send a sine at 9 kHz into the ADC input. This ADC is an 8 bit one. - What is the magnitude of this sine, knowing that the sine goes from 0.5 V to 2V? Can we say the magnitude is the square root of (Re^2+Im^2) ? If yes, what is the value of Re and Im? Q2 : I implemented the Goertzel algorithm but the results look strange. - The final result i get, the magnitude squared, varies quite widely. I thought it must remain almost the same?! Is Goertzel algorithm really efficient? I told one of my professor about it and he doubts it can give me good results. Is he right or wrong? Is my way of making test good (sending a sine wave at 9 kHz)? If no what should i'd better do? Q3 : If i use a classic FFT, how can i get the magnitude at 9 kHz? I guess that if Fs (sampling frequency) is 140 kHz for example and if i chose N=256, the FFT will compute the real and imaginary part of the signal for each frequency between 0 and Fs/2, with a space between these frequencies of Fs/2N=273.438 Hz. Am i wrong? If i'm right, i guess the results are saved on a table et so that it's possible to find in which position the results of the about 9 kHz is. And if i succeed in finding the real and imaginary parts i can determine the magnitude. Is this right or wrong? I looked at the functions given by TI in dsplib. There is one called RFFT256.asm. I thought i could use it, but i can't see how i can find the results of the FFT. Are they put in the same table in which the input samples were saved before the FFT? As you can see my post is very long. That's why I do apreciate your help. Thanks in advance. |