Reply by Steve Pope August 10, 20152015-08-10
sm0svx <107472@DSPRelated> wrote:

>I have a theory where the 3dB loss come from. Your method of modulation is >DSB-SC (Double Sideband Suppressed Carrier). By using an SSB demodulator, >like I suggested, to demodulate the signal, only one sideband is used and >so half of the transmitted power is thrown away. That may be the reason >for the 3dB loss.
>I believe the correct way would be to implement a DSB-SC demodulator which >is, from what I understand, a bit more complicated.
Why not use both a SSB transmitter and an SSB receiver? Or more complicatedly, a vestigal-sideband system. Steve
Reply by sm0svx August 10, 20152015-08-10
>> I-imag(hilbert(Q)) > >If I change my code as follows, result get worse by precicely 3dB (but >maybe because I got something wrong before):
I have a theory where the 3dB loss come from. Your method of modulation is DSB-SC (Double Sideband Suppressed Carrier). By using an SSB demodulator, like I suggested, to demodulate the signal, only one sideband is used and so half of the transmitted power is thrown away. That may be the reason for the 3dB loss. I believe the correct way would be to implement a DSB-SC demodulator which is, from what I understand, a bit more complicated. I have never done this but I think it involves finding the original phase of the signal, using a Costas loop for example. When phase-locked, the signal can be extracted from the I-branch and the Q-branch should be 0. That being said, if in your simulations you make sure that the phase noise has an average of 0, the system should behave as if it's phase locked. That would then imply that you can extract the original signal directly from the I-branch and that the Q-branch can be ignored. I think it was something like that you started out with... In a real-world implementation though, you could of course never assume that the DSB-SC signal is magically phase-locked so something like a Costas loop is needed to recover the phase. / Tobias
> >Thanks again! >Peter
--------------------------------------- Posted through http://www.DSPRelated.com
Reply by sm0svx August 7, 20152015-08-07
>>>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
Reply by Steve Pope August 6, 20152015-08-06
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
Reply by sm0svx August 6, 20152015-08-06
>>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
Reply by Tauno Voipio August 6, 20152015-08-06
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
Reply by Steve Pope August 5, 20152015-08-05
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
Reply by sm0svx August 5, 20152015-08-05
>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
Reply by Peter Mairhofer August 5, 20152015-08-05
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
Reply by Steve Pope August 5, 20152015-08-05
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