Here are some real beginner questions that I would like to have a better understanding of concerning SDR in general and the rtl dongles:
I understand that the I and Q signals are both 8-bit numbers so each one can have 2^8 possible levels. Is the in-phase value related to the amplitude of the signal such that frequency variations within the pass band don't change it much?
Is the Q or Quadrature value something that varies with whether or not the frequency is higher or lower than the center frequency set in to the device?
I could imagine that if the Q value responds to changes in frequency that one could get the effect of a discriminator circuit. I bought a couple of the rtl dongles and tried out the rtl-fm program to receive local FM signals and it worked quite well.
Finally, what determines the pass-band? It did seem to get smaller if I tried a 12,000 HZ sample rate. I also was surprised at how accurate the frequency is.
Other than the fact that I am at the low end of the learning curve, I see all kinds of possibilities.
Martin McCormick WB5AGZ
Hi Martin,
let me quickly address this in-text On 12/30/2016 07:20 PM, Martin McCormick wrote:
Here are some real beginner questions that I would like to have a better understanding of concerning SDR in general and the rtl dongles:
I understand that the I and Q signals are both 8-bit numbers so each one can have 2^8 possible levels. Is the in-phase value related to the amplitude of the signal such that frequency variations within the pass band don't change it much?
Short answer: Yep. Long answer: analog filters are never perfectly flat; in fact, the flatter they are, the more expensive. But: if you use a bandwidth of multiple MHz, and your signal of interest shifts within that by a couple 100 kHz, you can basically assume flatness.
Is the Q or Quadrature value something that varies with whether or not the frequency is higher or lower than the center frequency set in to the device?
You should not consider I and Q to be independent things. I and Q are *two* physical analog signals, but IQ **together** is the baseband signal that represents the passband (==RF) signal that you want to observe. If there is a gain difference, we call that /IQ imbalance/, and it's detrimental to any phase-sensitive modulation; therefore, receivers are designed to minimize that effect. I and Q analog signal chains are always designed to be as identical as possible! In fact, the only difference is that the I signal is the RF signal mixed with a *cosine* of the RF center frequency (and then low-pass filtered), and the Q signal is the RF signal mixed with a *sine* of the same frequency – the two oscillators used for mixing are 90° out-of-phase, which is why the first one is called *I*nphase, and the second *Q*uadrature (if you draw a constellation diagram, the Q axis is orthogonal to the I axis).
I could imagine that if the Q value responds to changes in frequency that one could get the effect of a discriminator circuit.
No, sorry. As explained, I and Q are exactly the same, but for a 90° oscillator phase shift. That's how you convert a *real-valued passband* to a *complex baseband* signal (just to give you two terms to look out for).
I bought a couple of the rtl dongles and tried out the rtl-fm program to receive local FM signals and it worked quite well.
Finally, what determines the pass-band? It did seem to get smaller if I tried a 12,000 HZ sample rate. I also was surprised at how accurate the frequency is.
So: The passband that you can observe is from -f_sample/2 to +f_sample/2 around the frequency you tune to. Filtering is adjusted to give you a perfect-as-feasible part of the spectrum that fits into that.
Other than the fact that I am at the low end of the learning curve, I see all kinds of possibilities.
:) Don't worry, you seem to be doing fine so far. I don't really know from which background you're coming from, but if you're rather curious and want to learn about *why* we use SDR, and how that actually works, I'd recommend something like [1] (which also explains in detail what I and Q are). Beware: It's pretty math-y ! That's why I like SDR: It's really just doing math, but that math actually does something to a signal that converts an intangible RF wave to something very /practical/ (e.g. audible, if audio) and /understandable, rather than just observable/ (as math concepts). If you're not *that* curious (which I really couldn't blame you for), a simple explanation for I and Q is that if you simply mix something with a tone of its center frequency, than half of the signal (the upper sideband) ends up on low, positive frequencies, whereas the other half ends up on the negative frequencies, theoretically: mixing with a tone shifts by the tone's frequency, and if you mix with the center frequency, what was originally right and left of that center frequency in spectrum ends up around 0Hz. Since with "normal" real signals, you can't tell positive from negative frequencies (I can look at a cosine of frequency f or -f for as long as I want, cos(f t) == cos (-f t)), you need a way to tell positive from negative frequencies. The combination of the two mixing products of sine and cosine of the same frequency does that.
Best regards, Marcus
[1] Free PDF: http://www.afidc.ethz.ch/A_Foundation_in_Digital_Communication/Getting_The_B...
Thanks and sorry for my delay. I will respond to several points.
=?UTF-8?Q?Marcus_M=c3=bcller?= marcus.mueller@ettus.com writes:
Hi Martin,
let me quickly address this in-text On 12/30/2016 07:20 PM, Martin McCormick wrote:
Is the in-phase
value related to the amplitude of the signal such that frequency variations within the pass band don't change it much?
Short answer: Yep. Long answer: analog filters are never perfectly flat; in fact, the flatter they are, the more expensive. But: if you use a bandwidth of multiple MHz, and your signal of interest shifts within that by a couple 100 kHz, you can basically assume flatness.
Makes perfects sense to me.
Is the Q or Quadrature value something that varies withwhether or not the frequency is higher or lower than the center frequency set in to the device?
You should not consider I and Q to be independent things. I and Q are *two* physical analog signals, but IQ **together** is the baseband signal that represents the passband (==RF) signal that you want to observe. If there is a gain difference, we call that /IQ imbalance/, and it's detrimental to any phase-sensitive modulation; therefore, receivers are designed to minimize that effect. I and Q analog signal chains are always designed to be as identical as possible! In fact, the only difference is that the I signal is the RF signal mixed with a *cosine* of the RF center frequency (and then low-pass filtered), and the Q signal is the RF signal mixed with a *sine* of the same frequency ? the two oscillators used for mixing are 90? out-of-phase, which is why the first one is called *I*nphase, and the second *Q*uadrature (if you draw a constellation diagram, the Q axis is orthogonal to the I axis).
Ah! That is more or less what I expected. I knew there had to be sines and cosines in there since we are dealing with a cyclic pattern and essentially adding and subtracting vectors which produce positive, 0 and negative values depending upon the instantaneous values in the two readings.
I could imagine that if the Q value responds to changesin frequency that one could get the effect of a discriminator circuit.
No, sorry. As explained, I and Q are exactly the same, but for a 90? oscillator phase shift. That's how you convert a *real-valued passband* to a *complex baseband* signal (just to give you two terms to look out for).
I am glad to read these things because it is one thing to be totally mystified by something as opposed to at least slightly understanding what is going on.
I bought a couple of the rtl dongles and tried out thertl-fm program to receive local FM signals and it worked quite well.
Finally, what determines the pass-band? It did seem toget smaller if I tried a 12,000 HZ sample rate. I also was surprised at how accurate the frequency is.
So: The passband that you can observe is from -f_sample/2 to +f_sample/2 around the frequency you tune to. Filtering is adjusted to give you a perfect-as-feasible part of the spectrum that fits into that.
I did try values lower than 12 KHZ but rtl_fm was reporting with floating-point issues and not running so I don't know if that was because I was trying to do something akin to dividing by 0 or trying to get the square root of a negative number.
Other than the fact that I am at the low end of thelearning curve, I see all kinds of possibilities.
:) Don't worry, you seem to be doing fine so far. I don't really know from which background you're coming from, but if you're rather curious and want to learn about *why* we use SDR, and how that actually works, I'd recommend something like [1] (which also explains in detail what I and Q are). Beware: It's pretty math-y ! That's why I like SDR: It's really just doing math, but that math actually does something to a signal that converts an intangible RF wave to something very /practical/ (e.g. audible, if audio) and /understandable, rather than just observable/ (as math concepts). If you're not *that* curious (which I really couldn't blame you for), a simple explanation for I and Q is that if you simply mix something with a tone of its center frequency, than half of the signal (the upper sideband) ends up on low, positive frequencies, whereas the other half ends up on the negative frequencies, theoretically: mixing with a tone shifts by the tone's frequency, and if you mix with the center frequency, what was originally right and left of that center frequency in spectrum ends up around 0Hz. Since with "normal" real signals, you can't tell positive from negative frequencies (I can look at a cosine of frequency f or -f for as long as I want, cos(f t) == cos (-f t)), you need a way to tell positive from negative frequencies. The combination of the two mixing products of sine and cosine of the same frequency does that.
Again, another light bulb moment. Briefly, my math background is best described as basic. I needed to take college algebra, trig and 6 hours of what was called Technical Calculus when I was attempting to become a vocational teacher during the 1980's. As a computer experimenter and amateur radio operator who also happens to be blind, the math started out a little rough in high school and early college but I then began to get the hang of it and ended up doing reasonably well by the end of the calculus course. A word to the wise is to learn those trig identities well. They will make your life much easier.
To make a long story short, life took some other interesting turns and I worked for 25 years for Oklahoma State University's IT department in Network Operations, riding herd on unix systems and building all sorts of scripts and a few C programs for us to do our jobs better and more quickly. I retired in 2015, but it was mostly lots of fun, sort of the ultimate game.
Back to the real topic at hand. You and another person in a completely unrelated discussion group just described the phasing method for transmitting and receiving single sideband signals which has always mystified me but is starting to come in to focus. The common method for sending and receiving SSB signals is to have a very expensive filter as you mentioned and then set the injection center frequency for the signal right on either the upper edge of the filter so that only lower sideband gets through or on the lower edge so that only USB signals get through.
This works great but if you switch sidebands, the signal is now off frequency unless one adjusts a mixer frequency to compensate for the width of the rejection filter.
Since we have digital signals in SDR, the phasing method should work really well as the old way is done with discrete components. I would imagine that a phasing modulator/demodulator probably only works right at the one frequency it was designed for and starts to be less effective at other frequencies.
Anyway, many thanks for the good explanations and an apology for the rather long message.
Martin WB5AGZ