DSPRelated.com
Forums

I/Q modulation and phase noise sensitivity

Started by Peter Mairhofer July 27, 2015
On 8/3/15 6:36 PM, Peter Mairhofer wrote:
> On 2015-08-01 13:44, sm0svx wrote: >> Hi Peter, > > Thanks for your reply. > I don't want to give up the idea that I made some fundamental mistake in > my code ;-) > >>> Now I add I/Q modulation: "RF" signal is now calculated as: >>> >>> xrf = real(xbb)*cos(2*pi*fc*t) - imag(xbb)*sin(2*pi*fc*t) >>> >>> I only compare the I-component which is again obtained by: >>> >>> xrf*cos(2*pi*fc*t + phi(t)) >> >> After the modulation step, the information about your original baseband >> signal is in both I and Q so you need to calculate both. >> >> xrfI = real(xbb).*cos(2*pi*fc*t)-imag(xbb).*sin(2*pi*fc*t) >> xrfQ = real(xbb).*sin(2*pi*fc*t)+imag(xbb).*cos(2*pi*fc*t) > > This is the main part I do not understand. Why are there two separate I > and Q *RF* signals? > > I and Q only exist in baseband but the RF signal is real only ...
actually, i might suggest *IF* instead of *RF*. but *conceptually* we can think of the real RF signal as the sum of its positive-frequency components (the analytic signal, xrfI + j*xrfQ, where xrfQ is the Hilbert transform of xrfI) and its negative-freqency components (the complex conjugate of the analytic signal). you might have to toss in a factor of 1/2 to the sum. but you usually do not try to extract the I and the Q until you bump the RF down to an accessible (by DSP) IF signal.
> > xrfI corresponds to the actual RF signal, see > > https://en.wikipedia.org/wiki/Quadrature_amplitude_modulation#Transmitter > > What is xrfQ ? >
it *is* your original real signal. (or 1/2 of your real signal.) -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Hi Robert,

On 2015-08-04 21:15, robert bristow-johnson wrote:
> On 8/3/15 6:36 PM, Peter Mairhofer wrote: >> On 2015-08-01 13:44, sm0svx wrote: >>> Hi Peter, >> >> Thanks for your reply. >> I don't want to give up the idea that I made some fundamental mistake in >> my code ;-) >> >>>> Now I add I/Q modulation: "RF" signal is now calculated as: >>>> >>>> xrf = real(xbb)*cos(2*pi*fc*t) - imag(xbb)*sin(2*pi*fc*t) >>>> >>>> I only compare the I-component which is again obtained by: >>>> >>>> xrf*cos(2*pi*fc*t + phi(t)) >>> >>> After the modulation step, the information about your original baseband >>> signal is in both I and Q so you need to calculate both. >>> >>> xrfI = real(xbb).*cos(2*pi*fc*t)-imag(xbb).*sin(2*pi*fc*t) >>> xrfQ = real(xbb).*sin(2*pi*fc*t)+imag(xbb).*cos(2*pi*fc*t) >> >> This is the main part I do not understand. Why are there two separate I >> and Q *RF* signals? >> >> I and Q only exist in baseband but the RF signal is real only ... > > actually, i might suggest *IF* instead of *RF*.
But f_if = 0 for me, so I would directly downconvert RF to DC.
> but *conceptually* we > can think of the real RF signal as the sum of its positive-frequency > components (the analytic signal, xrfI + j*xrfQ, where xrfQ is the > Hilbert transform of xrfI) and its negative-freqency components (the > complex conjugate of the analytic signal). you might have to toss in a > factor of 1/2 to the sum.
I think I am getting confused ;-) I see you can conceptionally extend the *real-valued* RF signal into its analytic form but what's the benefit of it? Above all, in reality I only have the *real-valued* RF signal.
> but you usually do not try to extract the I > and the Q until you bump the RF down to an accessible (by DSP) IF signal.
As mentioned, I use a zero-IF architecture (as many nowadays). So is it true that I get my I and Q parts then the following way? x_bb_I = xrf*cos(2*pi*fc*t + phi(t)) x_bb_Q = -xrf*sin(2*pi*fc*t + phi(t)) I think this must be true, I can't be so fundamentally wrong. But then I do not understand why sm0svx suggests I = xrfI.*cos(2*pi*fc*t+phi)+xrfQ.*sin(2*pi*fc*t+phi) Q = -xrfI.*sin(2*pi*fc*t+phi)+xrfQ.*cos(2*pi*fc*t+phi) x_bb_I = I-imag(hilbert(Q)) where, above all I only have xref \in \mathbb{R} (NOT \mathbb{C})
>> xrfI corresponds to the actual RF signal, see >> >> https://en.wikipedia.org/wiki/Quadrature_amplitude_modulation#Transmitter >> >> What is xrfQ ? >> > > it *is* your original real signal. (or 1/2 of your real signal.)
real signal = real-valued signal? I only have ONE of those (e.g. the one from the antenna). So xrfI = xrfQ? Peter
Peter Mairhofer  <63832452@gmx.net> wrote:

>On 2015-08-04 21:15, robert bristow-johnson wrote:
>> but *conceptually* we >> can think of the real RF signal as the sum of its positive-frequency >> components (the analytic signal, xrfI + j*xrfQ, where xrfQ is the >> Hilbert transform of xrfI) and its negative-freqency components (the >> complex conjugate of the analytic signal). you might have to toss in a >> factor of 1/2 to the sum.
>I think I am getting confused ;-) I see you can conceptionally extend >the *real-valued* RF signal into its analytic form but what's the >benefit of it? Above all, in reality I only have the *real-valued* RF >signal.
>> but you usually do not try to extract the I >> and the Q until you bump the RF down to an accessible (by DSP) IF signal. > >As mentioned, I use a zero-IF architecture (as many nowadays). > >So is it true that I get my I and Q parts then the following way? > >x_bb_I = xrf*cos(2*pi*fc*t + phi(t)) >x_bb_Q = -xrf*sin(2*pi*fc*t + phi(t)) > >I think this must be true, I can't be so fundamentally wrong.
Well note that this multiplication places another image around 2*pi*fc, as well as one at baseband. The common (99.9%) approach is to apply a baseband LPF filter to the above signals, and after that filter, you have a pure baseband signal and can drop down to a lower sample rate. Steve
On 2015-08-05 12:41, Steve Pope wrote:
> Peter Mairhofer <63832452@gmx.net> wrote: > >> On 2015-08-04 21:15, robert bristow-johnson wrote: > >>> but *conceptually* we >>> can think of the real RF signal as the sum of its positive-frequency >>> components (the analytic signal, xrfI + j*xrfQ, where xrfQ is the >>> Hilbert transform of xrfI) and its negative-freqency components (the >>> complex conjugate of the analytic signal). you might have to toss in a >>> factor of 1/2 to the sum. > >> I think I am getting confused ;-) I see you can conceptionally extend >> the *real-valued* RF signal into its analytic form but what's the >> benefit of it? Above all, in reality I only have the *real-valued* RF >> signal. > >>> but you usually do not try to extract the I >>> and the Q until you bump the RF down to an accessible (by DSP) IF signal. >> >> As mentioned, I use a zero-IF architecture (as many nowadays). >> >> So is it true that I get my I and Q parts then the following way? >> >> x_bb_I = xrf*cos(2*pi*fc*t + phi(t)) >> x_bb_Q = -xrf*sin(2*pi*fc*t + phi(t)) >> >> I think this must be true, I can't be so fundamentally wrong. > > Well note that this multiplication places another image around 2*pi*fc, > as well as one at baseband. The common (99.9%) approach is to > apply a baseband LPF filter to the above signals, and after > that filter, you have a pure baseband signal and can drop down > to a lower sample rate.
Oh of course, I forgot to mention that I clearly have also a filter afterwards ... Peter
>I think I am getting confused ;-) I see you can conceptionally extend >the *real-valued* RF signal into its analytic form but what's the >benefit of it? Above all, in reality I only have the *real-valued* RF >signal.
The analytic signal is often much easier to manipulate (moving signals around in the frequency spectrum and demodulating/modulating) than a plain real-valued signal.
>As mentioned, I use a zero-IF architecture (as many nowadays). > >So is it true that I get my I and Q parts then the following way? > >x_bb_I = xrf*cos(2*pi*fc*t + phi(t)) >x_bb_Q = -xrf*sin(2*pi*fc*t + phi(t))
Yes! If your xrf is a pure real-valued signal, that is correct. You will then translate your xrf down by fc Hz. As someone else mentioned, this spectum will contain your desired signal around 0 Hz and also a signal at -2*fc Hz. The last one originates from the negative frequency part of xrf, since the negative frequency spectrum of a real-valued signal is always a mirror image of the positive frequency spectrum. Your low-pass filter should remove everything outside of the desired signals passband, including the -2*fc component.
>I think this must be true, I can't be so fundamentally wrong. But then I >do not understand why sm0svx suggests > >I = xrfI.*cos(2*pi*fc*t+phi)+xrfQ.*sin(2*pi*fc*t+phi) >Q = -xrfI.*sin(2*pi*fc*t+phi)+xrfQ.*cos(2*pi*fc*t+phi)
This is true if xrf is in complex represenation (analytic) where Q is non-zero, but if you have a real-valued signal to start with, there is no Q-part. I'm sorry that I confused you with my complex modulation. I was thinking in terms of a wideband transmitter which you "drive" by giving it an I/Q stream representing a wide passband. That passband could possibly contain multiple narrow band signals that you want to get on air. I then simply skipped the part where it's all converted to something that can actually be transmitted on air and went straight to how it would look when receiving the complex I/Q stream from the receiver (into some DSP software) :-)
>x_bb_I = I-imag(hilbert(Q))
That's actually 2*(I-imag(hilbert(Q)) now since you throw away half the signal (the -2*fc part) in the lowpass filter (and there is nothing wrong with that). It's just a scale factor. I don't know if that will affect your tests.
>where, above all I only have xref in mathbb{R} (NOT mathbb{C})
Don't understand this comment...
>>> xrfI corresponds to the actual RF signal, see >>> >>> >https://en.wikipedia.org/wiki/Quadrature_amplitude_modulation#Transmitter >>> >>> What is xrfQ ? >>> >> >> it *is* your original real signal. (or 1/2 of your real signal.) > >real signal = real-valued signal?
I guess real-valued is what I meant to say. English is not my native tongue. I prefer Swedish but most of the people in the world don't ;-)
>I only have ONE of those (e.g. the one from the antenna). So xrfI =
xrfQ? No. xrfQ=0 in a real-valued signal. / Tobias
> >Peter
--------------------------------------- Posted through http://www.DSPRelated.com
sm0svx <107472@DSPRelated> wrote:

>>I see you can conceptionally extend >>the *real-valued* RF signal into its analytic form but what's the >>benefit of it? Above all, in reality I only have the *real-valued* RF >>signal.
>The analytic signal is often much easier to manipulate (moving signals >around in the frequency spectrum and demodulating/modulating) than a plain >real-valued signal.
I actually have not run into this approach that often.
>>As mentioned, I use a zero-IF architecture (as many nowadays). >> >>So is it true that I get my I and Q parts then the following way? >> >>x_bb_I = xrf*cos(2*pi*fc*t + phi(t)) >>x_bb_Q = -xrf*sin(2*pi*fc*t + phi(t))
>Yes! If your xrf is a pure real-valued signal, that is correct. You will >then translate your xrf down by fc Hz. As someone else mentioned, this >spectum will contain your desired signal around 0 Hz and also a signal at >-2*fc Hz.
Right
>The last one originates from the negative frequency part of xrf, >since the negative frequency spectrum of a real-valued signal is always a >mirror image of the positive frequency spectrum.
This is one way of looking at it, but I think more straightforwardly, the image around 2*fc arises from the trig identity sin(x) * sin(x) = 1/2 - cos(2x)/2 in the above, replacing one of the two left-hand factors by a modulated signal and the other by a local oscillator, the constant term on the RHS becomes a baseband signal, and the right-hand term becomes an image around double the carrier frequency.
> Your low-pass filter should remove everything outside of the desired > signals passband, including the -2*fc component.
>I'm sorry that I confused you with my complex modulation. I was thinking >in terms of a wideband transmitter which you "drive" by giving it an I/Q >stream representing a wide passband. That passband could possibly contain >multiple narrow band signals that you want to get on air. I then simply >skipped the part where it's all converted to something that can actually >be transmitted on air and went straight to how it would look when >receiving the complex I/Q stream from the receiver (into some DSP >software) :-)
What you are describing is often called an SSB mixer, which ends up being the design choice in fewer than 10% of radio designs, IME. Steve
On 6.8.15 01:53, Steve Pope wrote:
> sm0svx <107472@DSPRelated> wrote: > >>> I see you can conceptionally extend >>> the *real-valued* RF signal into its analytic form but what's the >>> benefit of it? Above all, in reality I only have the *real-valued* RF >>> signal. > >> The analytic signal is often much easier to manipulate (moving signals >> around in the frequency spectrum and demodulating/modulating) than a plain >> real-valued signal. > > I actually have not run into this approach that often. > >>> As mentioned, I use a zero-IF architecture (as many nowadays). >>> >>> So is it true that I get my I and Q parts then the following way? >>> >>> x_bb_I = xrf*cos(2*pi*fc*t + phi(t)) >>> x_bb_Q = -xrf*sin(2*pi*fc*t + phi(t)) > >> Yes! If your xrf is a pure real-valued signal, that is correct. You will >> then translate your xrf down by fc Hz. As someone else mentioned, this >> spectum will contain your desired signal around 0 Hz and also a signal at >> -2*fc Hz. > > Right > >> The last one originates from the negative frequency part of xrf, >> since the negative frequency spectrum of a real-valued signal is always a >> mirror image of the positive frequency spectrum. > > This is one way of looking at it, but I think more straightforwardly, > the image around 2*fc arises from the trig identity > > sin(x) * sin(x) = 1/2 - cos(2x)/2 > > in the above, replacing one of the two left-hand factors by a modulated > signal and the other by a local oscillator, the constant term on the RHS > becomes a baseband signal, and the right-hand term becomes an image around > double the carrier frequency. > >> Your low-pass filter should remove everything outside of the desired >> signals passband, including the -2*fc component. > >> I'm sorry that I confused you with my complex modulation. I was thinking >> in terms of a wideband transmitter which you "drive" by giving it an I/Q >> stream representing a wide passband. That passband could possibly contain >> multiple narrow band signals that you want to get on air. I then simply >> skipped the part where it's all converted to something that can actually >> be transmitted on air and went straight to how it would look when >> receiving the complex I/Q stream from the receiver (into some DSP >> software) :-) > > What you are describing is often called an SSB mixer, which ends up being > the design choice in fewer than 10% of radio designs, IME. > > Steve
In those designs the IF is high enough so that the image on the other side of the local oscillator is attenuated by input filter before the mixer. With zero IF, the pre-mixing filter usually cannot be designed, so there will be problems if there is an unwanted signal on the image frequency range. The unwanted image can be suppressed with a complex mixing scheme. -- -TV
>>The last one originates from the negative frequency part of xrf, >>since the negative frequency spectrum of a real-valued signal is always
a
>>mirror image of the positive frequency spectrum. > >This is one way of looking at it, but I think more straightforwardly, >the image around 2*fc arises from the trig identity > > sin(x) * sin(x) = 1/2 - cos(2x)/2 > >in the above, replacing one of the two left-hand factors by a modulated >signal and the other by a local oscillator, the constant term on the RHS
>becomes a baseband signal, and the right-hand term becomes an image
around
>double the carrier frequency.
Yes, that trig entity is useful but I think it's more useful when working with pure real-valued signals since it clearly indicates what happens in a mixer. When working with I/Q-signals though, I think it is more illustrative to think in complex exponentials and complex numbers instead of considering I and Q separately. Due to our friend Euler we can say: exp(jw)=cos(w)+j*sin(w), w=2*pi*f This can be rewritten to: cos(w)=(exp(jw)+exp(-jw))/2 I think the above line is very illustrative since we directly can see that our real-valued cos actually consist of two complex exponentials, one with positive frequency and one with negative frequency. We can also see that the amplitude is cut in half for each part. If we now want to do a complex downconversion, we just multiply our analytic signal with a complex exponential, exp(-j*wc), wc=2*pi*fc. We then get: (exp(jw)*exp(-j*wc)+exp(-jw)*exp(-j*wc))/2= =(exp(j*(w-wc))+exp(-j*(w+wc)))/2 Now we can easily see that we get one part mixed down to 0 Hz (w-wc) and one part which is a negative frequency at -(w+wc). So the whole spectrum has been moved (or shifted) down. I think it is easier to think like that once feeling comfortable with complex numbers and complex exponentials. But one way of thinking does not rule the other way out. It is very good to understand them both!
>What you are describing is often called an SSB mixer, which ends up being
>the design choice in fewer than 10% of radio designs, IME.
Yes, it's an SSB demodulator. I thought it was the easiest way to get from analytic to real-valued signal in this case (for the phase noise tests) but it may not be the first choice for a final implementation. Steve, what would you consider to be the most common approach? I'm always eager to learn new stuff :-) As a side note I have to admit I have not been working a lot with this stuff, only in my ham radio project, SvxLink. I've also recently been reading up on the theory behind this so I have it pretty fresh in mind. I'm reading Richard Lyons book "Understanding Digital Signal Processing". I can highly recommend it. / Tobias
> >Steve
--------------------------------------- Posted through http://www.DSPRelated.com
sm0svx <107472@DSPRelated> wrote:

>>What you are describing is often called an SSB mixer, which ends up being >>the design choice in fewer than 10% of radio designs, IME.
>Yes, it's an SSB demodulator. I thought it was the easiest way to get from >analytic to real-valued signal in this case (for the phase noise tests) >but it may not be the first choice for a final implementation.
>Steve, what would you consider to be the most common approach?
I would say in descending order of popularity, the first mixer in a wireless (i.e. WiFi or Cellular or more specialized) receiver is: 1) Zero-IF 2) Basic superhet architecture: image at RF is dealt with by pre-filtering 3) SSB mixer: image at RF is suppressed (at least somewhat) by mixer
>As a side note I have to admit I have not been working a lot with this >stuff, only in my ham radio project, SvxLink. I've also recently been >reading up on the theory behind this so I have it pretty fresh in mind. >I'm reading Richard Lyons book "Understanding Digital Signal Processing". >I can highly recommend it.
Cool. Steve
>>>What you are describing is often called an SSB mixer, which ends up
being
>>>the design choice in fewer than 10% of radio designs, IME. > >>Yes, it's an SSB demodulator. I thought it was the easiest way to get
from
>>analytic to real-valued signal in this case (for the phase noise tests) >>but it may not be the first choice for a final implementation. > >>Steve, what would you consider to be the most common approach? > >I would say in descending order of popularity, the first mixer >in a wireless (i.e. WiFi or Cellular or more specialized) receiver is: > >1) Zero-IF >2) Basic superhet architecture: image at RF is dealt with by
pre-filtering
>3) SSB mixer: image at RF is suppressed (at least somewhat) by mixer
I think we are talking about two different things. The SSB demodulator I proposed was used to go from the digital analytic I/Q signal to a real-valued digital signal. In more words, the Zero-IF architecture is used to go from a real-valued analog RF signal to analog I/Q at "zero IF". The I and Q analog signals are then sampled by two A/D converters which give us I and Q in digital form. It was at that point I proposed to use a SSB demodulator to get the original real-valued signal back from I/Q-representation, since I thought that was what Peter wanted to do. Anyway, I'll let Peter ask the questions if he still has any. After all, it's his thread :-) / Tobias
>Steve
--------------------------------------- Posted through http://www.DSPRelated.com