Assume I have a (single real float channel) biquad IIR filter implemented in C, and some coefficients for a bandpass filter (right out of RBJ's cookbook).

If I convert the input, output, data path, and internal arithmetic of this IIR filter to use complex data types and multiplies, can I use the resulting code to filter a complex (IQ) data stream? If so, how might I modify the biquad IIR coefficients to filter just the negative frequency versus the positive frequency band in a complex (IQ) data stream?

  • $\begingroup$ It's probably more sensible to design directly with your requirements in mind. But you can remove poles and zeros corresponding to negative or positive frequencies, but I don't know if that is what you mean with "filter just the positive/negative frequencies". Maybe you can clarify your question in that matter. $\endgroup$ – Jazzmaniac Feb 13 '14 at 23:56
  • $\begingroup$ I have an IQ data stream that is the output of a quadrature demodulator. I would like to isolate (band-pass filter) a signal band slightly below the frequency of the LO of the IQ demodulator (a negative frequency offset from the LO). I do not want to change the LO frequency. Can I use a complex implementation of an IIR biquad on the IQ output to do this? If so, how? $\endgroup$ – hotpaw2 Feb 14 '14 at 1:15
  • $\begingroup$ For designing a complex bandpass you best start with a real low pass and shift the passband using complex modulation. There are two ways of doing that. The most obvious one is first shifting the input signal so that the center of the band is moved to DC. Then apply the real-coefficient low pass. Afterwards shift the signal back to where it was before. All shifts are just multiplications with $\exp(i\omega t)$ for the right choice of $\omega$. This is computationally not optimal, but easy to implement. The more advanced method changes the filter itself. $\endgroup$ – Jazzmaniac Feb 14 '14 at 8:24
  • $\begingroup$ @Jazzmaniac: Thanks, but I'm not looking for your "best start". I'm looking for an IIR filter that does not require changing or adding a LO frequency shift. $\endgroup$ – hotpaw2 Feb 14 '14 at 14:12
  • 1
    $\begingroup$ it's not sensible to start with a real bandpass and turn that into a complex bandpass, because you will lose half the order and the design criteria are undermined. Instead, start with a lowpass filter, then replace $z$ with $z*exp(-i\omega_0)$ in the z-domain transfer function fraction and bring it back to the canonical form again and read off the filter coefficients. That gives you a bandpass filter around $omega_0$ with the bandwidth of the original lowpass filter cutoff. $\endgroup$ – Jazzmaniac Feb 14 '14 at 18:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.