On Tue, Nov 13, 2012 at 10:43 AM, Zhiwen He <hey...@gmail.com> wrote:

> 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
>

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
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to