Hi Marcus,
Thanks for coming back to me and I apologies for the vague description of my problem. Let me try to clarify what i meant please.
The DFT is a sliding window DFT which gives me the output per each sample instead of calculating the DFT for the whole N (well it gives DFT per sample but I take output after 2 samples in my case).
So I take 1024 vector and perform DFT on each sample and then I find, lets say, one top frequency after 2 samples as I mentioned above (because of the nature of my input signal there will be a peak somewhere in that DFT).
All the above happens in one block.
I then store those peaks in a vector. So for each pair of input samples (in that 1024 vector above) the output vector will look something like this - in Hz [0 0 0 2000 2000 2000 -1000 0 0 0 ...]. I now want to take that output vector and generate a tone for each sample pair at time t (ie it doesnt generate all the tones at once but each tone at specific time). So e.g. the first three pairs will have 0Hz, then the 4th pair will have tone at 2000Hz, etc.
I tried feeding that output vector above to vector to stream and then freq mod block but that obviously didnt get me very far. It works fine if my signal is ideal. If i introduce frequency error the output is too distorted.
My question is really, is there an efficient way to convert an output vector of samples to frequency (each input to the vector represents a frequency).
Thanks
Milos
On 11 September 2018 at 08:21, Müller, Marcus (CEL) <mueller@kit.edu> wrote:
Hi Milos,
I must admit I don't fully understand what your "DFT block" does – how
does it reduce from 1024 to 512 values per item? What does each value
mean? why would the frequency mod block deal with these in a way that
generates multiple tones?
Best regards,
Marcus
On Mon, 2018-09-10 at 23:57 +0100, Milos Milosavljevic wrote:
> Dear All,
>
> From my own DFT output I am calculating top frequencies. I want to
> take each of the calculated frequency (e.g. my calculation gives me
> something like -2400, 1024, 0, 0, 0, -2400) and generate a carrier
> with the corresponding frequency. The algorithm is correct and the
> implementation seems fine.
>
> But I tried using the Freq Modulator block to give me the carrier but
> the output is just too distorted. What would be the best way to go
> around this?
>
> I have something like this:
> Input (stream) -> StreamToVector(1024 vlen) --> DFT (out is vector of
> top freqs of len 512) --> VectorToStream (512) --> Repeat(Interpolate
> by 2) --> FreqMod(sensitivity -1.0/(float(samp_rate)/(2*pi)))
>
> Any comments will be appreciated.
>
> Many thanks,
> Milos
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Dr. Milos Milosavljevic
Communications DSP/FPGA Engineer
Communications DSP/FPGA Engineer
Spire Global UK Limited
Unit 5A, Sky Park 5, 45 Finnieston Street, Glasgow, G3 8JU United Kingdom
+44 (0)1413 439 146
No comments:
Post a Comment