Hi Marcus, Thanks so much for your quick response. Actually, I got the strongest frequency already and it is now at the output of an "Add Const" block in GNURadio. I wonder how can I use such number (frequency number e.g. 151 MHz) as the center frequency for a "UHD Sink" or "Osmocom Sink" block? (on the same flowgraph in GNURadio Companion). The procedure should be: Step 1: FFT + Arithmetic --> Obtain the strongest frequency Fs [I did it already] Step 2: Transmit a cosine signal (via UHD or Osmocom) using the strongest frequency obtained in step 1 [I am asking about this] Again, I really appreciate your help. Best, Anh
On Fri, Apr 10, 2020 at 10:02 PM Marcus D. Leech <[email protected]> wrote: > On 04/10/2020 04:35 AM, Phan Anh wrote: > > Hi there. Please kindly help me with this minor problem as I am very new > to USRP and GNURadio. > I have a number output from a series of block for FFT (Log Power FFT) > which is the dominant frequency obtain from the FFT spectrum saying e.g. > 150 MHz. I want to use this number directly as the input frequency for UHD > Sink to transmit a pure sine signal at that freq. I have been searching for > a while and could not find any solution for this on GNURadio. Please kindly > advise. > > I *THINK* what you're asking is: > > I have an FFT bin-number that corresponds to the strongest input > frequency, and I want to convert that into an actual frequency. How about > some simple arithmetic? That might work. > > You know your center frequency. You know your bandwidth. You know that > the FFT represents frequencies from: > > Fc - bandwidth/2 to Fc + bandwidth/2 > > You know how many bins are in your FFT, so you know what the > frequency-increment is. Arithmetic. > > > Moreover, I want to insert a delay block between each transmit and receive > phase. The process could be like this: receive + FFT + [delay = 5 ms] + UHD > Transmit in 50 ms + ... and so on. Is there any way to do this directly by > GNURadio? > I really appreciate any support from you guys. > Best regards > Anh > > -- > > *Anh Phan * > > *Institute of Electrical Engineering, Vietnam * > > > *The University of Melbourne, Australia University of New South Wales, > Australia * > *Tel: +84 165 911 0465* > > > -- *Anh Phan* *Institute of Electrical Engineering, Vietnam* *The University of Melbourne, AustraliaUniversity of New South Wales, Australia* *Tel: +84 165 911 0465*
