# Filtering/Analyzing Complex Data stream

I receive complex I and Q data from an USRP. I want to do a Hamming window LP filter on the data. However, I don't get the grasp of how I use the complex data. It is unusual because most of the time you sample in time domain and for that situation I get that you need to do a convolution with the coefficient of your filter. Should I convert the complex data in time data? or should I do a multiplication in the frequency domain?

The second part of my question concern the analyze of that complex data stream. If I want to see the frequency content of my signal, can i just take the real part and imag part of the signal to get my FFT or do I need to do a FFT over the real and imag part or the norm?

• You can filter a sequence of complex digital samples using the very same difference equations you would with real-valued samples. Just because they are complex does not necessarily mean they represent frequency domain values. What they mean depends on how they were obtained. Were the samples obtained via mixing with sine and cosine carriers? – Bobby Moretti May 19 '16 at 19:51

The actual "data" in the IQ stream from the USRP would depend on what frequency and signal you were looking at when the IQ stream was captured and presumably saved to your laptop. This picture shows that you can filter the I and Q completely separately - so rather than thinking of them as complex values think of them of as two streams of real numbers.

If your goal is specifically to filter them using a hamming window (which is typically a frequency domain concept) then taking the FFT of the data is appropriate.

When first introduced to frequency domain transforms the example are almost always real-valued signals. However, it is very appropriate (and even more useful) to take FFTs of complex valued signals. In this case - leaving them as "complex" symbols and using an FFT library to take the FFT would be helpful. MATLAB, SciPy for Python, and Octave all have FFT implementations and several of them are based around the FFTW library.

To "filter" your IQ samples with the hamming window you'll probably want to multiply the FFT of the IQ point-by-point with the Hamming Window. In MATLAB this would look something like fft(IQData).*HammingWindow - where hamming window is a purely real vector and the FFT(iq) is a complex stream.

Your final question regarding finding the frequency content is probably best visualized by taking the magnitude/norm/abs of the IQ samples. Taking sqrt(I^2+Q^2) will take the two complex numbers and turn them into a single real value that can be plotted vs. frequency. If you want to know how to scale your x-axis of this plot (assuming y-axis is the sqrt(I^2+Q^2)) then this link should be helpful (and short answer is matlab's fftshift() function helps).

http://www.bitweenie.com/listings/fft-frequency-axis/

-Arch-