Author Topic: I+Q signals... does the Q actually exist?  (Read 4392 times)

0 Members and 1 Guest are viewing this topic.

Offline hamster_nzTopic starter

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
I+Q signals... does the Q actually exist?
« on: March 06, 2017, 11:51:57 pm »
I'm starting working with I+Q signals and SDR.

When I digitize the a signal, I get a stream of scalar I values. Do they actually have an unambiguous Q value associated with them?

Or to put it another way, if you attempted to isolate the 'Q' component on the RF energy by cancelling out the I component, does the remaining Q component have zero power?

Is assigning an associated a 'Q' value (usually by multiplying with I+Q values from an NCO) a mathematical magic wand or is there something I am missing at a physical level?

I've waved the wand a few times and it works, but don't believe in magic :-)
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11248
  • Country: us
    • Personal site
Re: I+Q signals... does the Q actually exist?
« Reply #1 on: March 07, 2017, 12:02:07 am »
I and Q are totally independent. How exactly do you "cancel" the I component?

I and Q on the receiver allow you to get full received signal, which otherwise may be lost due to destructive interference of the received signal and LO. I guess destructive interference is not the right term here. It is hard to explain without actual math equations.

And it is impossible to restore the Q from just the I. The information is lost at that point.

In a full quadrature receiver, you can adjust LO frequency in a way that all power is contained in one of the components and the other is zero. This is what Costas loop and other such things are doing as part of their primary goal (compensation of a doppler shift).
« Last Edit: March 07, 2017, 12:07:40 am by ataradov »
Alex
 

Offline hamster_nzTopic starter

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: I+Q signals... does the Q actually exist?
« Reply #2 on: March 07, 2017, 12:15:25 am »
I and Q are totally independent. How exactly do you "cancel" the I component?
Just as a though experiment, if you had something that nulled out the I component in a signal (by inverting it and summing it back to the original, like active noise cancelling).

Do sound waves have a Q component? Maybe they don't and that is where I am tripping myself up (by thinking RF is like sound). However I guess they must have, as you can do QPAM with audio signals...

So I and Q are orthogonal to each other, and the ability to separate them out requires you to use an identical frame of reference (e.g. using the same carrier phase and frequency) -just like how the X,Y,Z axis are orthogonal when describing 3D shapes...
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11248
  • Country: us
    • Personal site
Re: I+Q signals... does the Q actually exist?
« Reply #3 on: March 07, 2017, 12:18:02 am »
There is no I and Q in a signal sent over the air, it is just a signal in time domain.

I+Q appear inside the receiver. Mixer multiplies incoming signal by sin(LO). But if you follow the math of multiplying the incoming signal sin(LO + delta) by sin(LO), you will see that you get two components one at (2*LO + delta) and another one at (delta). The first one is filtered out, you are interested in the second one, but for certain delta's you will get 0 output.

The magic happens if you also multiply by cos(LO). Then delta that results in 0 output for the first multiplication, will result  in a full signal for the second one.

And that's exactly what receivers do - they tweak LO so that one of the components is 0, so that you know that your full useful signal is in the other component. This is true for BPSK signals only. If you have more complex constellations, then you are not looking for 0, but for stability of the constellation, but principle remains the same.
« Last Edit: March 07, 2017, 12:26:23 am by ataradov »
Alex
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11248
  • Country: us
    • Personal site
Re: I+Q signals... does the Q actually exist?
« Reply #4 on: March 07, 2017, 01:06:08 am »
So here is some math. When I write (Flo + delta), I really mean 2*Pi*(Flo + delta)*t, it is just easier to type this way. Flo - frequency of the local oscillator. Here we assume that we want the baseband signal to be at 0. This is not the case in most practical designs, but for demonstration it is easier this way.

Input signal (assuming just CW, math works out the same way for other signals):  IN = sin(Flo + delta). delta accounts for shift between LOs on both sides and for Doppler shifts.

So to get quadrature signals you do this:
1. I = sin(Flo + delta) * sin(Flo) = 1/2 * (cos(delta) - cos(2*Flo + delta))
2. Q = sin(Flo + delta) * cos(Flo) = 1/2 * (sin(delta) + sin(2*Flo + delta))

cos(2*Flo + delta) and sin(2*Flo + delta) are filtered by low pass filters, so you end up with 2 quadrature signals, with total power spread over them and regardless of what the delta is, you will always have the signal in one of the quadratures.
Alex
 

Offline radiogeek381

  • Regular Contributor
  • *
  • Posts: 125
  • Country: us
    • SoDaRadio
Re: I+Q signals... does the Q actually exist?
« Reply #5 on: March 07, 2017, 01:22:39 am »
I love questions like this!  They force us to dig back to the start to understand stuff that we probably take for granted.

The best treatment I've read of this question is in "Understanding Digital Signal Processing" by Richard G. Lyons.  In the third edition, the discussion starts on page 339.  If you read only one book this week, that's a good choice. 

I cannot hold a candle to Lyons, but I'll add my two cents anyway.

The Q exists as much as the I exists.... They're both projections of a real signal f(t) onto a two dimensional plane where one dimension is set by f(t) * cos(w*t) and the other is determined by f(t) * sin(w*t).    This may not be very satisfying, but it follows from the math.   The object is to find two representations (projections) of the actual real valued signal that will allow us to do some interesting things.   

To see what this really means, remember Fourier.  His point was that, subject to some restrictions, a periodic function f(t) with period T can be represented as an infinite sum of ancos(nt) + bnsin(nt)  for n = 0 to infinity. That is, a periodic function is made up of one or more sine and cosine functions all adding together to make their contribution.

Now that makes for an interesting way of looking at I and Q.   Consider the case where

           I(t) = f(t) * cos(wt) = sum(n = 0 to inf) (ancos(nt) + bnsin(nt))  * cos(wt)
 
Now, to make things simple, let's consider just one of those <n> terms, the same argument will hold true for all of them

          In(t) = (ancos(nt) + bnsin(nt)) * cos(wt)
                                     = 1/2 * (an(cos((n+w)t) + cos((n-w)t)) + bn(sin((n+w)t) + sin((n-w)t)))

 But if we multiply by sin(wt) instead, we get
         Qn(t) = 1/2 * (an(sin((n+w)t) - sin((n-w)t)) + bn((-cos((n+w)t) + cos((n-w)t)))

See what just happened?   Each frequency component in the Q signal is 90 degrees shifted in phase from the corresponding component in the I signal.  (hence the terms "in-phase" and "quadrature")   Note the goofiness in signs so that the frequencies with a +w component have a phase shift in one direction, while the frequencies with a -w component have a shift in the opposite direction.

So, you can imagine, for instance, that we might be able to make hay by rotating the Q component one more 90 degree shift and adding it to or subtracting it from the original I component -- this will cancel the +w components or the -w components - eliminating one of the two images.

Note since the object is to get two signals I and Q such that Q(t) = phase_shift(90, I(t)) for all frequencies, we don't have to do this by multiplying by a sin and cos oscillator.  We can also get the Q signal with a Hilbert transform.   This is a filter whose amplitude response is constant, but whose phase shift is +90 for all positive frequencies and -90 for all negative frequencies. 

(And before we get to the heart of darkness over "negative" frequencies, note that sin(-wt) = -sin(wt) so if it makes you feel any better, negative frequencies are a convenient analytical tool.  See Lyons, section 8.4 for an entertaining treatment of the subject.)

Like I said, Lyons does a great job on this one.  His chapter (and the whole book) is a must read for anyone looking to really understand this stuff. 
 

Offline rfeecs

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: us
Re: I+Q signals... does the Q actually exist?
« Reply #6 on: March 07, 2017, 01:43:54 am »
There is no I and Q in a signal sent over the air, it is just a signal in time domain.

This is the heart of the matter.  The physical signal doesn't contain energy in the I and the Q.

You create the I and Q signals by mixing or sampling.  You are introducing a new frequency with the LO or sampling clock.  You are adding more information.  Now you can use the convenient form of I and Q to tell the instantaneous phase or amplitude as well as distinguish between positive and negative frequency.

So yes, it is mathematical magic.
 

Offline aandrew

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: ca
Re: I+Q signals... does the Q actually exist?
« Reply #7 on: March 07, 2017, 01:46:11 am »
I found this site to be very handy at helping me visualize what is going on:

http://whiteboard.ping.se/SDR/IQ
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21674
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: I+Q signals... does the Q actually exist?
« Reply #8 on: March 07, 2017, 01:58:24 am »
Your signal is two-dimensional.  Voltage versus time (pure time domain); voltage versus phase (Hilbert transform); voltage versus frequency (pure frequency domain, continuous Fourier transform); voltage versus voltage (I and Q, periodic Fourier transform); no matter how you express it, these are all equivalent to the real signal.

Some transforms are easier to deal with than others.  Treating a narrowband system as a fixed (center) frequency with sidebands, is equivalent to using the periodic transform, and you get I and Q channels.  Hence, the most common digital radio mode: QAM.

The transform used, shapes the methods (and their complexity) used to solve issues of noise and frequency response.  QAM deals well with wide-frequency distortions (such as connector and cable discontinuities, or short-distance reflections).  But it deals poorly with longer distance multipath (and reflections from poorly terminated cables, long stubs and such).  Specifically, the crossover between 'good' and 'bad' delays is around the baud rate.  Mitigation involves an adaptive filter that corrects the delays: a complex bit of DSP!

A Hilbert domain system might deal well with modest reflections of any delay.  FM discrimination is an excellent example: insensitive to AM errors (like dips in frequency response), and as long as the interference isn't dominant, the signal comes through largely unscathed.

A frequency domain system has myriad channels to choose from, and can reduce the bitrate on, or simply ignore altogether, the channels that are duds (poor SNR due to frequency notching).  DSL and DOCSIS I think are examples of this.  (What you do with the channels is free; QAM is a typical choice!)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline radiogeek381

  • Regular Contributor
  • *
  • Posts: 125
  • Country: us
    • SoDaRadio
Re: I+Q signals... does the Q actually exist?
« Reply #9 on: March 07, 2017, 02:01:47 am »
I found this site to be very handy at helping me visualize what is going on:

http://whiteboard.ping.se/SDR/IQ

Yes.  This site is quite good. 

And it makes the case that this isn't a mathematical pet trick -- it is a way of projecting a one dimensional real valued signal into two dimensions. The combination of the two dimensions is useful because it allows us to talk about the instantaneous phase and amplitude of a signal at one point in time without having to look at its history or future.  An earlier poster pointed out that we added information to the system to get this view, and he's right.  Another way of looking at it is to notice that beating the real valued signal f(t) against a sinusoid S(t) asks the question "How is each frequency component of f(t) related to S(t) in phase and frequency?"  By beating the signal against a second sinusoid (C(t) = cos(wt))  we ask a second question relating f(t) and C(t).  Having the answer to those two questions tells us everything we can know about f(t).  It allows us to uniquely reconstruct f(t) and allows us to apply all kinds of interesting transformations to f(t).

But the website says it all with pictures too.   Nicely done.
 
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21674
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: I+Q signals... does the Q actually exist?
« Reply #10 on: March 07, 2017, 02:22:44 am »
And it makes the case that this isn't a mathematical pet trick -- it is a way of projecting a one dimensional real valued signal into two dimensions. The combination of the two dimensions is useful because it allows us to talk about the instantaneous phase and amplitude of a signal at one point in time without having to look at its history or future.

And for that matter, even if we wanted to ask, what is: g(t) = f(t) / sin(w*t), we can only ask that question for bounded ranges at a time.  As sin goes to zero, the value of this expression quickly blows up, and becomes indeterminate at the zeros (w*t = n*pi).

So, mathematically speaking, we cannot construct a real-valued signal g(t) such that, when multiplied by (i.e., mixed with) sin(w*t), we reconstruct the original signal.  It must always be missing those pinholes.

For practical purposes, we can gloss over the pinholes anyway; they have exactly zero time duration, after all.  But we still can't deal with the dynamic range of g(t).  In effect, we must remove, not just infinitesimal points, but all points where |g(t)| > MAXVAL.  (MAXVAL being, for example, an ADC's input range, or an analog amplifier's supply rails.)  And, to have those stretches be short enough that we aren't losing too much information about f(t) in the process, we need a large factor of dynamic range (as in, several times 20dB) more than we need to hold onto f(t) alone.

So, the math says there's a problem, and in reality, we can ignore that problem, but the fact remains, the math is warning us that we're setting up for a dumb.

As it happens, there is a very simple resolution to this, which yields a perfectly bounded output (i.e., the bounds are as small as possible), costs no dynamic range, does not require patching holes, and is also a unique representation of the signal.  Instead of dividing by sin(w*t), we multiply: g(t) = f(t) * sin(w*t), and h(t) = f(t) * cos(w*t).  The two functions, g(t) and h(t), are the I and Q channels.

The math is telling is us that, although we can get most points of f(t) out of the first process, and while we technically don't care about the remaining points (the function is countably whole), the fact remains that we have just not enough information to reconstruct the output, because the output necessarily goes to zero every time sin(w*t) goes to zero.  There's simply no degree of freedom at those zeroes.  So, we must produce a companion function that fills in those holes.

The selection of multiplication, is motivated by its simplicity: we can build analog multipliers, relatively easily.  We also know that multiplying sine functions gets us the sum and difference frequencies, so we can build a superhetrodyne radio this way.  (And for this reason, we can prove that, even though g(t) and h(t) are products themselves, the sines go away when multiplied again: we can reconstruct f(t), uniquely, without using something as ill-conditioned as division -- only multiplication is needed!)

If we choose more complicated operators, like convolution, instead of multiplication, then we can obtain different results.  This is equivalent to the choice of transform I spoke about above. :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline KE5FX

  • Super Contributor
  • ***
  • Posts: 1890
  • Country: us
    • KE5FX.COM
Re: I+Q signals... does the Q actually exist?
« Reply #11 on: March 07, 2017, 02:41:17 am »
All real signals can be represented with rotating vectors in phase/amplitude space.  At any given moment, a signal at a given frequency will have a phase that ranges from 0 to 360 degrees.

That is also the description of a circle, or at least an ellipse.

That's about all there is to it.  In Cartesian space, real numbers are sufficient to describe translation, but complex numbers are needed to describe rotation.  The signal's phase progression represents a rotation, so that's why you use in-phase (cosine) and quadrature (sine) terms to describe it.
 

Offline w2aew

  • Super Contributor
  • ***
  • Posts: 1780
  • Country: us
  • I usTa cuDnt speL enjinere, noW I aR wuN
    • My YouTube Channel
Re: I+Q signals... does the Q actually exist?
« Reply #12 on: March 07, 2017, 04:00:32 pm »
I wrote a blog post on the basics of I and Q signals:
http://www.tek.com/blog/what%E2%80%99s-your-iq-%E2%80%93-about-quadrature-signals%E2%80%A6

If you prefer video, here's a video I did on the basics of I & Q signals:


YouTube channel: https://www.youtube.com/w2aew
FAE for Tektronix
Technical Coordinator for the ARRL Northern NJ Section
 

Offline Doc Daneeka

  • Contributor
  • Posts: 36
  • Country: it
Re: I+Q signals... does the Q actually exist?
« Reply #13 on: March 07, 2017, 06:26:37 pm »
I and Q are just a convienient way to represent a sinusoid: cos(wt+a) can be written as I×cos(wt)+Q×sin(wt) where I = cos(a) and Q =-sin(a). All it is doing is breaking your signal into two components - the sum of these is your signal. I and Q are the amplitudes of these components.

Sometimes people prefer to represent it instead with complex numbers: basically this works because the algebra of complex numbers works exactly the same as the 'algebra' of sines and cosines (there are other ways to explain it but that feels the simplest to me)

Another (exactly equivalent) way is to think about phasors: a single sinuosoid has some amplidute and phase: we can draw this as a phasor i.e polar coordinates, or the sum of two other phasors with 90 phase difference (length I and Q)- rectangular coordinates.

When you demodulate a signal into I and Q components, you are just finding the amplitudes that if you were to add a cosine of amplitude I to a sine of amplitude Q, you'd get back your original signal.
 
The following users thanked this post: hamster_nz

Offline w2aew

  • Super Contributor
  • ***
  • Posts: 1780
  • Country: us
  • I usTa cuDnt speL enjinere, noW I aR wuN
    • My YouTube Channel
Re: I+Q signals... does the Q actually exist?
« Reply #14 on: March 07, 2017, 08:06:47 pm »
I and Q are just a convienient way to represent a sinusoid: cos(wt+a) can be written as I×cos(wt)+Q×sin(wt) where I = cos(a) and Q =-sin(a). All it is doing is breaking your signal into two components - the sum of these is your signal. I and Q are the amplitudes of these components.

Sometimes people prefer to represent it instead with complex numbers: basically this works because the algebra of complex numbers works exactly the same as the 'algebra' of sines and cosines (there are other ways to explain it but that feels the simplest to me)

Another (exactly equivalent) way is to think about phasors: a single sinuosoid has some amplidute and phase: we can draw this as a phasor i.e polar coordinates, or the sum of two other phasors with 90 phase difference (length I and Q)- rectangular coordinates.

When you demodulate a signal into I and Q components, you are just finding the amplitudes that if you were to add a cosine of amplitude I to a sine of amplitude Q, you'd get back your original signal.

The real value of it is that the I and Q components give you the amplitude and phase of your signal at any instant in time.  Thus, the I and Q values *.vs* time will give you the amplitude and phase variations of your signal vs. time (i.e. the modulation) - so it is a convenient and efficient way of representing the time domain characteristics of a given signal or set of signals within a given bandwidth.
YouTube channel: https://www.youtube.com/w2aew
FAE for Tektronix
Technical Coordinator for the ARRL Northern NJ Section
 
The following users thanked this post: hamster_nz

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 7948
  • Country: us
  • Retired, now restoring antique test equipment
Re: I+Q signals... does the Q actually exist?
« Reply #15 on: March 07, 2017, 08:15:10 pm »
Note that I(t) and Q(t) exist with respect to a reference sinusoidal signal (call it the carrier).  I find this to be a more "physical" concept than "real" and "imaginary" components.
If the total signal is not coherent to that reference, then the two component signals will vary in time.  Mathematically, I (the "in-phase" component) and Q (the "quadrature" component) are linearly independent, which has important consequences.  For example, if the original signal is totally noise, then the mean-squared total voltage is the quadrature sum of the two components:
V2 = I2 + Q2, since there is no covariance between the two components.
« Last Edit: March 07, 2017, 08:44:58 pm by TimFox »
 
The following users thanked this post: hamster_nz

Offline hamster_nzTopic starter

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: I+Q signals... does the Q actually exist?
« Reply #16 on: March 07, 2017, 11:16:59 pm »
I found this site to be very handy at helping me visualize what is going on:

http://whiteboard.ping.se/SDR/IQ

This site had the hint I was looking for, making everything clear.

Quote
RF Down Converting to I/Q Data
There is one fundamental difference between a baseband and modulated RF signal. The modulated signal rides on a carrier of a given frequency, but the base band signal got no fixed frequency at all. Because of this, we have the possibility to encode the two-dimensional I/Q signal onto the one-dimensional RF signal without losing anything. Magic!

Signals I am used to (baseband) have ambiguous/no Q component (as the frame of reference is a 0Hz signal, which has a zero Q component) and neither does a raw RF signal. With a modulated signal, multiplying with a I+Q signal from your local reference gives you a set of I+Q components.

So, I think my answer is ...

RF has no intrinsic Q component. It is a pure scalar value. However... when when projected (multiplied) by an I+Q reference signal, the Q component appears. It is just different representation of the same signal, and contains all the same information as the original signal, but just from a different frame of reference.

The "magic" is that the I and Q outputs each hold half the information of the original signal - a channel that has a bandwidth of +/- 5kHz from a carrier can at most give 5kHz of I bandwidth and 5kHz of Q bandwidth.

Which I+Q signals you get is subjective, depending on the frequency and phase of the reference signal you are using - For example, With a QPAM signal when you get it right phase and frequency you will get a nice stable QPAM constellation from the I+Q values. If your reference phase is off it will be rotated, if your selected frequency is off the constellation will rotate over time as the phase drifts. And finally, if the frequency is too far off, the constellation pattern will fall to bits.

I hope I've got it. I'll ponder on it some more...
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf