Forum: GNU Radio A problem to the FFT Block

Posted by Zhiwen He (Guest)
on 2012-11-13 16:44
(Received via mailing list)
hello all,


When I use the fft blcok, it seems not right.

I build the test system like this:   Square source -> IFFT -> FFT -> 
File
Sink,  when the input is 1, the output in the file sink is 1, and when 
the
intput is 0, the output is random, sometimes 0, sometimes between -1 and 
1.

Like this:

input:







0 0 0 0 0 0 0





0 0 0 0 0 0 0





0 0 0 0 0 0 0





0




0





0




0





0




0





0




0





0




0





0




0





0




0





0




0





0




0





0




0





0




0





0




0





0




0





0




0





0




0  0 0 0 0 0 0 0




0 0 0 0 0 0 0 0




0 0 0 0 0 0 0 0




0
output:






0 0 0 0 0 0 0





0 0 0 0 0 0 0





0 0 0 0 0 0 0





0




0





0




0





0




0
0



0




0





0




0





0




0  0




0




0

0


0




0





0




0


0
0 0




0
0
0

0




0
0



0




0

0
0
0




0 0


0 0 0




0 0
0 0 0
0




0





0




0





0




0




0 0




0




How should I do, so that the source data is the same as the sink data?

Thanks.

Heyutu
Posted by Tom Rondeau (Guest)
on 2012-11-14 04:40
(Received via mailing list)
On Tue, Nov 13, 2012 at 10:43 AM, Zhiwen He <heyutu@gmail.com> wrote:

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> 0 0 0 0 0 0 0
>
>
>
>
> 0
> 0
> 0  0
>
>
>
> 0
>
>
> 0 0 0
>
>
> 0 0
>
> Thanks.
>
> Heyutu
>

Hi Heyutu,

I just tried this right now and don't have a problem. This is my full 
graph:

sig_source (square wave) -> throttle -> stream_to_vector(fftsize) ->
fft(fftsize, reverse) -> multiply_const(fftsize*[1/fftsize], fftsize) ->
fft(fftsize, forward) -> vector_to_stream -> time sink

Tom
Posted by Zhiwen He (Guest)
on 2012-11-15 04:11
Attachment: square_test.png (35,7 KB)
Attachment: square_test2.png (65,7 KB)
(Received via mailing list)
Thank you very much. I have solved the problem, I find that, I didn't 
use
the multiply_const block. But there is another question, when I see the
data in Matlab with plot function, the figure before fft and after ifft 
is
not same, there are something wrong on the position, where the valueis 0 
in
the square source. why?

Thanks

Zhiwen He
Posted by Tom Rondeau (Guest)
on 2012-11-20 16:48
(Received via mailing list)
On Wed, Nov 14, 2012 at 5:08 AM, Zhiwen He <heyutu@gmail.com> wrote:

> Thank you very much. I have solved the problem, I find that, I didn't use
> the multiply_const block. But there is another question, when I see the
> data in Matlab with plot function, the figure before fft and after ifft is
> not same, there are something wrong on the position, where the valueis 0 in
> the square source. why?
>
> Thanks
>
> Zhiwen He


I feel like there's a representational issue here. Why is your scale 
x10^9
(before the FFT) when the amplitude of the signal generator is 1? I'm 
also
not clear what I'm looking at in the plotted figures. Can you label 
them?

Tom
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.