5
$\begingroup$

I have a complex signal generated by an impedance analyzer.

  • What is the best approach for designing a low pass FIR filter for this?
  • Is a real filter applied separately to the real and imaginary streams optimal for this or do I need a specialized algorithm for complex filter design?
$\endgroup$
  • $\begingroup$ As Matt L said "it depends on what you want to achieve", so with that in mind, it might help to explain exactly that. $\endgroup$ – user5108_Dan Aug 29 '16 at 0:27
  • $\begingroup$ Must not have asked the question clearly. I know how to apply the filter as in Equation 1. But how do I design an optimum filter for a complex signal? For example, if want to filter a real signal I can use the Parks-McClellan algorithm, to get a real N-tap FIR filter. What do I use to get a complex filter design to filter a complex signal. $\endgroup$ – Max Yaffe Aug 29 '16 at 22:04
5
$\begingroup$

In fact you have two signals, and it depends on what you want to achieve, but usually you would just filter both signals (the real and the imaginary part) with the same (real-valued) low pass filter. So you either need two (identical) low pass filters, or you filter both signals sequentially with the same filter.

In the general case, filtering a complex signal $x(t)=x_R(t)+jx_I(t)$ with a complex impulse response $h(t)=h_R(t)+jh_I(t)$ requires four real-valued filtering operations (just like complex multiplication requires four real-valued multiplications):

$$\begin{align}y(t)&=(x\star h)(t)\\&=(x_R\star h_R)(t)-(x_I\star h_I)(t)+j\left\{(x_R\star h_I)(t)+(x_I\star h_R)(t)\right\}\end{align}\tag{1}\\$$

In your case $h_I(t)$ is zero, so you're left with just two filtering operations.


One final remark on complex convolution: actually, one can get away with only 3 real-valued convolutions (just like complex multiplication really needs only 3 multiplications if you're smart):

$$\begin{align}y_1(t)&=(x_R\star h_R)(t)\\ y_2(t)&=(x_I\star h_I)(t)\\ y_3(t)&=((x_R+x_I)\star (h_R+h_I))(t)\\ y(t)&=y_1(t)-y_2(t)+j\left\{y_3(t)-y_1(t)-y_2(t)\right\}\end{align}\tag{2}\\$$

$\endgroup$
  • $\begingroup$ This seems to overly complicate things. Why not just design a real-valued low pass filter and just filter the complex signal with that? I understand that may not be what the OP wants, but you seem to have obfuscated the straightforward answer in pursuit of completeness. $\endgroup$ – Peter K. Aug 29 '16 at 1:15
  • 2
    $\begingroup$ @PeterK., I'm not sure I see your point here, because in the first paragraph of my answer I explain exactly what you suggest (take a real-valued filter and filter real and imaginary part with it). For the sake of completeness (because it's not entirely clear to me what the OP wants), I added some general info and fun-facts about complex filtering (i.e., using a complex signal and a complex impulse response), but I hoped that it would be clear that the OP should first just try what I suggested in the first paragraph. Anyway, I'll edit my answer to clear things up a bit. $\endgroup$ – Matt L. Aug 29 '16 at 6:24
  • $\begingroup$ The issue was you wrote the complex filtering complex out in full, but didn't start with the equation for real filtering complex. I found it confusing. $\endgroup$ – Peter K. Aug 29 '16 at 10:38
  • $\begingroup$ Must not have asked the question clearly. I know how to apply the filter as in Equation 1. But how do I design an optimum filter for a complex signal? For example, if want to filter a real signal I can use the Parks-McClellan algorithm, to get a real N-tap FIR filter. What do I use to get a complex filter design to filter a complex signal. As far as Eqn 2, I'm not that clever. I want something I can read a few weeks later. $\endgroup$ – Max Yaffe Aug 29 '16 at 22:02
  • $\begingroup$ @MaxYaffe: The design isn't affected at all if you just want to filter a complex signal with a real-valued filter. You design the (real-valued) filter as you would normally, and then you apply it to the real part as well as to the imaginary part of the input signal. $\endgroup$ – Matt L. Aug 30 '16 at 17:34
0
$\begingroup$

The term 'complex' is in the realm of mathematics. It's hypothetical. Complex 'data' is treated as information. So when we transmit this mathematical (hypothetical) data in the real world, we need a system that gets that math data across - in some way. So, if the impedance analyser is generating a 'complex' signal, then this signal could be a real-valued signal, except it might involve the sum of TWO sinusoidal signals, each sinusoid having identical frequency and phase difference between these sinusoids being 90 degrees. In this way, the actual signal is real-valued.

If the appropriate mathematical and hardware processing trickery is applied at the receiving side, then it becomes possible to grab (recover) the 'real' and 'imaginary' components from the summed-sinusoid (composite) waveform.

Depending on what sort of processing you want to do (ie. just process samples of the composite waveform only and have no further need for real/imaginary components, or process individually real and imaginary components) will determine whether 1 filter is enough, or whether 2 filters are needed.

$\endgroup$
-1
$\begingroup$

Paraphrasing Matt L.'s answers in the comments:

Matt: "[Design is] different if you want to design a complex filter, i.e. a filter with a complex-valued impulse response. But this is only necessary if for some reason you want a non-symmetrical frequency response."

Matt: "[Otherwise] You design the (real-valued) filter as you would normally, and then you apply it to the real part as well as to the imaginary part of the input signal."

Me: Since I don't want to filter the negative frequencies differently than the positive ones, I'll just create the appropriate real filter and then apply it to the separate real and imaginary data streams. I don't need to worry about the cross terms in eqn. 1 because Hi = 0 by definition.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.