RF Measurement Devices

cancel
Showing results for 
Search instead for 
Did you mean: 

Complex Bandpass Filtering

Does LabView have any built-in filter VI's to implement a BPF on baseband demodulated complex IQ data?


For example...I have different information in a band >0Hz and <0Hz that I'd like to separate.  Do filters like this exist, or do I need to do more frequency translation to get my negative bands in the positive range in order to use the normal filter routines?

 

---

Brandon

0 Kudos
Message 1 of 6
(3,969 Views)

I don't have any experience doing this exact task, but I think this VI should work:

vi.lib\Analysis\3filter.llb\Equi-Ripple BandPass (CDB).vi

 

When you drop this VI from the palette, the default polymorphic VI takes real data.  Just wire in complex data to X and it will morph to the complex version.  Help indicates that the frequencies must observe the Nyquist criterion, saying 0 <= f < 0.5 * sample rate.  Of course this should be -0.5 * sample rate < f < 0.5 * sample rate for complex data.  I think this is a typo in the help.

 

If you run into a complex filtering VI that for some reason won't accept negative frequencies (which would be a bug), here's a quick work-around.  Swapping the real and imaginary parts of your data is quicker and simpler than frequency shifting.  This will make positive frequencies become negative, and negative positive.  So I/Q swap, filter positive, I/Q swap again should give you the negative frequency content.

 

There's also the digital filter design toolkit.  I suspect this is more than what you need for this task, but you may need it for more advanced filtering.

0 Kudos
Message 2 of 6
(3,944 Views)

Unfortunately, it doesn't seem to be that simple.  The filter VI's do not like negative numbers for cutoff values.  I don't think this is a bug....consider that the frequency response of a filter is symmetric around f=0...so defining a band at random doesn't make much sense.  i.e. - a LPF defined between 0 and +fc is also defined from 0 to -fc.  

 

The problem here is that I have asymmetric data.  The IQ swapping you mention, while cute, I don't think gets around the fact that I'd be filtering asymmetric data with a symmetric filter.


I think asymmetric filters are "a thing", but I don't know a lot about them.  Maybe an easier way to go about this is to just make my data symmetric around my carrier frequency so I can use "standard' symmetric filters at baseband!

0 Kudos
Message 3 of 6
(3,941 Views)

Ah, OK.  You are probably right.  I'm a little outside my area of expertise here.  Perhaps someone else on this forum will be able to help.

0 Kudos
Message 4 of 6
(3,930 Views)

Are you filtering in the time domain, or the frequency domain? As you have noted, the filters are designed for time domain, so they don't like to accept negative values.

 

See some more information here. The quote at the end seems particularly interesting

 

If you downconverted a signal with a carrier frequency of 1 MHz and amplitude modulation of 1 kHz, then what you started with had signal components from 999 kHz to 1001 kHz and the converted signal has a spectrum from -1 kHz to +1 kHz.  If you filter the time domain downconverted signal with a low pass filter with a cutoff frequency of 1.1 kHz, you would retain all of the information in the original modulated signal (assuming an ideal filter).  If you then upconvert the filtered signal back to 1 MHz, you would get the same signal you started with, less any broadband noise which the filter removed.
0 Kudos
Message 5 of 6
(3,917 Views)

For filtering a specific band in complex data not centered at zero Hz, I've found the easiest solution is to preform a frequency translation of the center of the band of interest down to zero Hz, separate the IQ complex waveform into two separate I and Q waveforms, and then use the DFD low pass filters to perform a "real" filter operation with the same filter on both the I and Q data streams, then recombine back to a complex data type. The low pass filter cut off will be 1/2 the bandwidth of the signal you are interested in.  

Jerry

0 Kudos
Message 6 of 6
(3,909 Views)