DSPRelated.com
Forums

Real to Complex conversion

Started by sachinwannabe 5 years ago8 replieslatest reply 5 years ago4452 views

Hi,

A very basic question related to real to complex conversion. Let's say I have a ADC sampling at 1Gsps - real samples only. In the digital domain (FPGA), I want to convert these samples to i/q - WITHOUT any mixing. I know that in i/q domain I will only need 500Msps rate.

I can think of two practical ways:


a) using the quadrature mixing method with a very very small frequency (smallest resolution the NCO phase word), and live with the slightly off-center signal. Then have a half-band filter following by down-sample by 2.

b) Use the hilbert transform to compute the imaginary paert and then DOWNSAMPLE by 2.y 

Are both valid? I suspect mathematically they might even be the same.

Wanted to run my thinking by the experts.

Thanks

[ - ]
Reply by SlartibartfastDecember 15, 2018

The simplest, and most accurate, method would be to just create the imaginary components for each collected sample and set them all to zero.   Then do whatever processing you need.

That said, the two methods you describe will work as well, they just add a lot of unnecessary processing.

[ - ]
Reply by sachinwannabeDecember 15, 2018

Conceptually doesn't seem right (not saying it isn't). I know 1Gsps real data can be represented as 500Msps complex data - but that makes intuitive sense since its still the same amount of information. So if I am just adding 0s to the imaginary part of the real-sampled data, I am not effectively adding any new information. Also, it makes the whole Hilbert analytic conversion redundant - which I know it isn't. So I am missing something and I suspect it lies in the "do whatever processing you need" detail of the explanation above.

[ - ]
Reply by SlartibartfastDecember 15, 2018

If the signal was properly sampled as a real signal, then the imaginary components are conceptually there, they're just zero-valued.   If you want the simplest method to convert a complete real-valued signal to complex-valued, just add the zero-valued complex components.   You have exactly the same signal, as you should, but it is now properly complex-valued.   If you want to mix it to a different frequency or decimate it by two, you can.

Consider that the only difference in the results of mixing either the real-valued signal or the complex-valued signal with zero-valued imaginary components with a slight-offset frequency, as you suggest above, is the formal multiplication of the zero-valued imaginary components.   The output results will be exactly the same in either case.   You can try this as an experiment if you want to prove it to yourself.

If you want the output decimated by two at the same time, you still have to consider filtering and aliasing.   If you want to mix the signal to baseband and remove the redundant half of the spectrum (and decimate by 2), you can do that, too.   Then the imaginary components won't be zero any more.




[ - ]
Reply by kazDecember 15, 2018

Your thoughts are not clear here. You may be getting confused with odd/even split of signal stream to two parallel halves at half clock rate (same sample rate).

Regarding real to complex conversion. You are not supposed to do that unless it is part of some mixing process. 

Imagine you have a cosine wave @ +/- 10MHz.

This signal is @+/-10MHz. by converting it to complex pair i.e. add sine wave alongside then the pair is at say +10MHz. If that is what you want then fair enough but you cannot go half sample rate because that makes it +20MHz (or +5MHz depending on how you implement it)

[ - ]
Reply by neiroberDecember 15, 2018

Here is my post that uses a Hilbert xfrmr:

https://www.dsprelated.com/showarticle/1147.php

[ - ]
Reply by Tim WescottDecember 15, 2018

In the case of (a), you are (probably) ignoring the fact that the real signal has a spectrum that's symmetric around f = 0.  So when you down-sample by 2 that spectrum will get pasted someplace where you don't want it.

[ - ]
Reply by fred_harrisDecember 15, 2018

Hilb_xfrm_options.m

The real to complex transformation of the time series can also be performed by the weaver modulator... Heterodyne the quarter sample rate to DC, the cosine and sine of the heterodyne are trivial, the cos sequence is {1 0 -1 0 ...} and the sine sequence is {0 -1 0 +1 ....} hence trivial operations. The DC term is now at the half sample rate. You can then pass the heterodyned sequence through a linear phase half band filter... you can perform 2-to-1 down sampling while doing this.  To finish the Weaver modulator you translate dc back to zero frequency, again a trivial operation {+1 -1} for the second heterodyne at the half sample rate. This is totally equivalent to the Hilbert transform filter which is a linear phase half band filter heterodyned up to the quarter sample rate. The filtered signal only passes the positive frequency axis.... 

The problem with all the equivalent options is the aliasing of the spectrum in the vicinity of DC. This is due to the transition BW of the Low pass filter or the Hilbert transform filter. If there is significant energy in the signal near DC you should probably not perform the 2-to-1 down sample. See attached example below and the one above

hilbert_transform_filter.m    

[ - ]
Reply by Rick LyonsDecember 15, 2018

Hello sachinwannabe.

perhaps the information at the following web page will be of some value to you:


https://www.dsprelated.com/showarticle/153.php