Wednesday, May 31, 2017

matlab - Frequency shifting of a quadrature mixed signal


I've a quadrature mixed signal with 10 MHz as highest frequency available. I want to shift it to any frequency lesser than 10 MHz. I should get it by multiplying this signal by cosine of the required frequency. Right?



Answer




If you have a quadrature mixed signal, you have two outputs of the signal in 90 degree phase to each other. To complete a full complex frequency conversion (which would shift the frequency in one direction, as opposed to a real frequency conversion which would create two sidebands) you need to multiply one of the outputs by the cosine term of the required frequency shift and the other output by the sine of the required frequency shift. By swapping sine and cosine ports, you change the direction of the shift. The outputs after each multiplier are then summed in phase. See diagram and derivation using trig identities for the multiplication of sines and cosines below.


enter image description here


If you are comfortable with the idea of exponential frequencies (full complex frequency including positive and negative frequency etc) then I prefer the view point below to describe single sideband frequency translation. Comparing the two diagrams shows the value of converting "I" and "Q" signals as typically constructed in hardware to implement complex signals into one complex signal path for the purpose of analysis. Using cosines and sines instead of exp can be quite cumbersome especially as the complexity of the system increases.


enter image description here


For those less familiar with the notation, $Ke^{j\theta}$ is simply a complex value with magnitude K and angle $\theta$. Therefore $e^{j\omega t}$ is a signal whose magnitude is 1 and angle is increasing linearly with time at rate $\omega$; a spinning phasor counterclockwise on a complex IQ (polar) plot, representing a "positive" frequency. Similarly $e^{-j\omega t}$ spins clockwise and represents a "negative" frequency. With that, one should be well equipped to use the more compact and analytically simpler exponential notation.


Notice too how the two block diagrams that I included are related, with the second one taking the real of the product to make the outputs equivalent. To do frequency translation, we use complex conjugate multiplication (the conjugate assures we shift in the direction desired). Consider a full complex conjugate multiplication, as is done prior to the real operation:


$ e^{j\omega_ct} = I_1+jQ_1$ representing the carrier after the quadrature split


$ e^{-j\omega_st} = I_2-jQ_2$ representing the conjugate of the I and Q terms of your signal


$ e^{j\omega_ct}e^{-j\omega_st} = (I_1+jQ_1)(I_2-jQ_2) = (I_1I_2+Q_1Q_2)+j(I_2Q_1-I_1Q_2)$


The real portion is also called the dot product and the imaginary portion is called the cross product. Notice the dot product does match the implementation block diagram shown at the top of this answer.



Further details for the very interested to understand complex frequency translation:


The following additional figures and content were added to help answer the question on the subsequent down-conversion and to build a better understanding of the complex (positive and negative) frequency domain in describing frequency translation implementations.


First consider a generic quadrature mixed signal, it is at "baseband", meaning not modulated to a carrier for purpose of transmission, and centered about DC (0 Hz) with the positive and negative frequencies independent of each other. The way we implement such a signal in practice is with two real signals (we could choose the real signals to have one represent the real and the other the imaginary such as I and Q in I+jQ, or one represent the magnitude K and the other represent the phase $\theta$ such as $Ke^{j\theta}$. In any event, by observing the spectrum and noting that the positive and negative frequencies do not match, we know from that detail it is a complex signal and two real signal paths are required to represent this in implementation. For a real signal in contrast, the positive and negative frequencies would be conjugate symmetric, meaning identical in magnitude and opposite in phase.


Frequency spectrum of baseband quadrature modulated signal (this could be a single tone on one side, or multiple independent frequencies, point is the positive and negative frequencies are independent):


enter image description here


Now consider a carrier signal $cos(\omega_ct)$, this has an impulse in the frequency domain at the positive frequency $\omega_c$, and another at the negative frequency $-\omega_c$ (also shown as two complex frequencies using Euler's identity $2cos(\omega_ct) = e^{j.\omega_ct}+e^{-j\omega_ct}$):


enter image description here


If we split the carrier in quadrature (with a Hilbert transformer, or a 90° splitter, or just generate a sine and cosine component, but in the end have two tones with a 90° relationship to each other), then in implementation we have two real signals used to represent a single complex frequency $e^{j\omega_c}$ (you may start to see how it is so much easier doing all analysis with the e's and then do the implementation with the sines and cosines):


enter image description here


UPCONVERSION



To up-convert the baseband signal to the carrier frequency, we multiply the two signals in the time domain (which is convolution in the frequency domain; so for an impulse function such as our carrier it is a simple shift). First consider what would happen if we multiplied the baseband signal with the carrier $cos(\omega_ct)$ directly (eliminate the 90° splitter in my first figure, replacing $sin(\omega_ct)$ with $cos(\omega_ct)$). Notice the output would still be complex as the positive and negative frequencies are not the same- so we could not transmit this with a single antenna (2 real signals are required to represent a complex signal). If we proceeded to take the real portion, distortion of our signal would result as depicted in the figure, so we can't transmit that either.


Figure showing spectrum result with an INCORRECT upconversion approach:


enter image description here


This explains why we need to also take the Hilbert transform of the carrier (converting the cosine into sine and cosine components, and representing a complex version of the carrier that is a single spinning phasor $e^{j\omega_ct}$, or in the frequency domain a single impulse in the positive domain with no negative component) prior to multiplication. We take the real portion of the product and can then send an undistorted real waveform representing our baseband signal modulated up to the carrier frequency.


Figure showing spectrum result with a CORRECT upconversion approach:


enter image description here


DOWN-CONVERSION


With the details of the up-conversion process in mind, it will now be very easy to answer the question if a quadrature conversion of the received signal is required prior to multiplying by sine and cosine to recover the baseband signal. The answer is no, but there is an advantage to doing so in situations when an image frequency cannot be easily filtered.


Figure showing spectrum doing a downconversion with no Hilbert transform of the received signal. It is interesting to note if you swapped sine and cosine in the (real) multipliers, this would represent a single impulse in the positive frequency domain, shifting the negative frequency component of the received signal to baseband, causing the spectrum at baseband to be inverted:


enter image description here



Figure showing spectrum doing a downconversion with a Hilbert transform of the received signal prior to sine/cosine multiplication. Here you can see what would happen if you swapped an input to one of the (real) multipliers: The signal would be shifted to a higher frequency twice the carrier instead of to baseband.


enter image description here


Note I believe there would also be an SNR advantage up to 3dB in doing the receiver with a Hilbert transform prior to the multiplication. In the first case without the Hilbert transform, the signal energy is split and the upper portion filtered out while the noise is unchanged, while in the second case with the Hilbert transform all the signal energy is translated to baseband. I could be wrong here as I have not verified this point, so perhaps someone else can weigh in on that.


No comments:

Post a Comment

periodic trends - Comparing radii in lithium, beryllium, magnesium, aluminium and sodium ions

Apparently the of last four, $\ce{Mg^2+}$ is closest in radius to $\ce{Li+}$. Is this true, and if so, why would a whole larger shell ($\ce{...