Mix Complex Filter (FIR menu)

Mixing is an easy way to generate a Complex filter consisting of a pair of Real filters, called " Inphase" and " Quadrature" , which are in quadrature. " In quadrature" means that the two filters have identical magnitude responses but have phase responses which are 90 degrees apart.

For cases where your DSP system needs to generate a Complex signal from a Real signal while simultaneously bandpass filtering it, a Complex filter can be used to " kill two birds with one stone" . Because of its implementation simplicity this approach is frequently preferred to the famed Hilbert transformer as a method of generating quadrature components.

The Mix Complex Filter dialog lets you mix an existing Inphase or Complex filter with a Complex sine of a given frequency and initial phase. The mixing frequency can be specified as follows:

  • Frequency: The mixing frequency is just specified in units of the sampling frequency.
  • Fs divided by: The mixing frequency is the sampling frequency (Fs) divided by the specified factor.
  • Fs multiplied by: The mixing frequency is the sampling frequency (Fs) multiplied by the specified factor.

The default for all three frequency specifications is one-quarter of the sampling frequency (see below.)

The second part of the dialog allows you to set the initial phase of the mixing frequency. You may choose:

  • Set automatically for linear phase : If the original filter was linear-phase, this selection results in a linear-phase Complex filter. The Real filter will be symmetrical about the center, and the Imaginary filter will be anti-symmetrical about the center.
  • Degrees : You can specify the initial phase of the mix in degrees.

Mixing results in a Complex filter whose frequency response is the same as the original but shifted by the specified mixing frequency. Note that if the filter was originally a lowpass (therefore having a center frequency of zero) the resulting Complex filter will be a bandpass with twice the lowpass bandwidth, whose center frequency is the same as the mixing frequency. If there was no Quadrature filter before mixing, the mix algorithm assuming zeroes for the input Imaginary filter coefficients. So whether the input to the mix was an Real or a Complex filter, the output of a mix is always a Complex (Inphase and Quadrature) filter.

Here's an important trick of the trade: note that mixing by Fs/4 is a special case because half of the samples in the mixing signal have values of zero. Therefore, mixing a Real (Inphase only) filter with Fs/4 will result in Inphase and Quadrature filters, half of whose coefficients are zero. Since there is no need to actually calculate the " zero taps" of the filter, mixing by Fs/4 allows you to implement a Complex bandpass filter with the same number of calculations as the prototype lowpass!

ScopeFIR 5 Help