Re: FM Transmitter tuning issue (pre-emphais, modulation index..)

2022-04-05 Thread Kyle A Logue
If you are modulating a bitstream what are you are really doing is 2-FSK in 
this situation, not traditional analog FM - so that may help you find the 
definitions you are looking for a bit easier.

If you want a modulation index of 2 and your rate is 1200K then you want the 
difference between the high and low frequencies to be 2400KHz.

Take a look at the example FSK mod/demod flowgraph on the 
wiki -> it 
explains the 'sensitivity' parameter.

Kyle Logue
Senior Engineering Specialist
⚝ The Aerospace Corporation

From: Discuss-gnuradio  
on behalf of Anthony 
Sent: Monday, April 4, 2022 00:23
To: Discuss Gnuradio 
Subject: FM Transmitter tuning issue (pre-emphais, modulation index..)

Hello all,

I am implementing a FM Transceiver following this prerequisites :

Frequency modulation with a pre-emphasis of 6 dB/octave (phase modulation) with 
frequency-shift of the modulating sub-carrier :
– frequency-shift between 1 300 and 2 100 Hz; the sub-carrier being at 1 700 Hz;
– the frequency tolerance of the 1 300 and 2 100 Hz tones is  10 Hz;
– the modulation rate is 1 200 (bit/s) * (1 ± 30 * 10−6);
– the index of modulation is 2.0  10%.

To implement the frequency modulation, I've followed the example based on the 
use of a VCO in GNU Radio :
https://wiki.gnuradio.org/index.php/VCO
with these parameters :
- full-scale frequency of 3000 Hz -> VCO sensitivity of 2*pi*3000 (I chose 3000 
to fit my 2 frequencies of interest).
- I adapted the Multiply and Add Const block to set the space/mark frequency to 
1300 and 2100 Hz.

The input of the VCO is quite the same as in the example : I am sending bursts 
of bytes from a ZMQ socket that pass in a Repeat Block to be interpolated 40 
times.
I have managed the sample rate with a USRP B210 at the end, so that the input 
sample rate before the Repeat block is 1200 (1200x40 = 48 KS/s, 48 KS/s being 
the VCO's sample rate).
I then interpolate the output signal of the VCO using a Rational Resampler to 
match the sampling rate used in the USRP block (960 kS/s).

In this scheme, I don't know if I have the right approach to implementing this 
modulation. Especially :
- How the pre-emphasis is added in this scenario, where my input data has a 
rather constant frequency (bitstream at 1.2 kHz) ?
- How is the modulation index set (which variables can affect it ?). I've found 
a definition like this : m = deviation frequency / modulating frequency
-> deviation frequency is +/- 400 Hz to me (around 1.7 kHz)
-> modulating frequency is 1200Hz (as the symbol rate equals the bitrate here)
So my modulation index is 1/3, quite far from 2. I surely misinterpret it, and 
my output signal in frequency is quite thinner than an expected signal.
What parameters could I use in my implementation to set it to 2 ?

I outputted the resulting signal, which is quite thinner but still I see pics 
at 1.3 and 2.1 kHz, and I'm able to demodulate it and recover my data on a RX 
path.

I think I got some obvious things wrong in my FM transmitter.
If you have some resources or advices to point me in the right direction, 
that'd be useful! :)

I am using GNU Radio 3.8.5 (maint branch) and UHD 3.15.

Anthony


GPSDO

2022-04-05 Thread Manuel Caldas
 

Hi! 

I'm a newbie to gnuradio, and am designing a simple radiometer with an
Ettus USRP x300 SDR, which has a board mounted GPSDO (and antenna, of
course). 

What I want now is to get the (GPS) timestamp(s) of my data stream, so
that I can match datapoints to correspondig UTC (gps)time. 

So what I have done is I've set "Mbx Time Source" in the USRP Source
Block to "O/B GPSDO". I understand that I'm missing a step, possibly in
the File Meta Sink block, so gps time is included in the data stream and
contained in the data header (possibly in "rx_time")? Btw, what exactly
is this rx_time (only info I've found is "format from UHD")? Is it
expressed in days, hours? Referred to what date? 

Thanks in advance! 

/Manuel 
-- 

Mag. Ing Manuel Caldas 
Facultad de Ciencias 
Instituto de Física 
Iguá 4225 CP 11400 Montevideo 
Of. 303
Tel. (+598)+98663352
mcal...@fisica.edu.uy 
 

Re: GPSDO

2022-04-05 Thread Marcus D. Leech

On 2022-04-05 22:18, Manuel Caldas wrote:


Hi!

I'm a newbie to gnuradio, and am designing a simple radiometer with an 
Ettus USRP x300 SDR, which has a board mounted GPSDO (and antenna, of 
course).


What I want now is to get the (GPS) timestamp(s) of my data stream, so 
that I can match datapoints to correspondig UTC (gps)time.


So what I have done is I've set "Mbx Time Source" in the USRP Source 
Block to "O/B GPSDO". I understand that I'm missing a step, possibly 
in the File Meta Sink block, so gps time is included in the data 
stream and contained in the data header (possibly in "rx_time")? Btw, 
what exactly is this rx_time (only info I've found is "format from 
UHD")? Is it expressed in days, hours? Referred to what date?


Thanks in advance!

/Manuel



You should probably look at the sync_to_gps  UHD example.

But the "rx_time" tag is a PMT with

   uint64 seconds
   double fractions_of_second

https://www.gnuradio.org/doc/doxygen-3.7.8/page_metadata.html

My recollection is that if you have  a B2xx with a built-in GPSDO, UHD 
will set the time-of-day on the device at startup from GPS data.  And 
the time returned in the tag

  will basically be GPS time coerced into UTC with the standard Unix Epoch.

But if the GPSDO hasn't locked when you create a session, UHD cannot 
determine the valid time to stuff into the time registers.    Which is 
what the "sync_to_gps" example

  is all about.

The "clock source" is about where it gets its 10Mhz reference clock, NOT 
about "time of day".  In truth, the on-board GPSDO is *primarily* about 
providing a stable and precise
  10Mhz reference and precise 1PPS pulse, and the GPS time-of-day as a 
bit of an "also ran".   There's not really good support within GRC for 
doing the kind of "dance"

  that "sync_to_gps" does.


It *could* be that with the new "code snippets" one could do what 
"sync_to_gps" does, but I haven't really investigated, TBH.


If it were my problem, I'd bring the B2xx up, let the GPS "warm up" for 
an hour, then run "sync_to_gps".   Then whenever you run your 
flow-graph, make sure
  that "sync" is set to "none" (you don't want the program touching the 
clock on the radio), and use "O/B GPSDO" for both the reference clock 
and 1PPS options.