Most likely a very simple question, but I haven't been able to find a good answer.

When working with analytical signals in general, and software defined radio in particular, a common operation is to take the sum real(z) + imag(z). Is there a technical term for this sum?

  • 2
    $\begingroup$ Must admit haven't seen that used very often! $\endgroup$ – Marcus Müller Dec 21 '18 at 12:31
  • $\begingroup$ Google "weaver modulator" for one example... $\endgroup$ – Albin Stigo Dec 21 '18 at 12:33
  • $\begingroup$ ah, to generate single side band, makes sense. $\endgroup$ – Marcus Müller Dec 21 '18 at 12:43
  • $\begingroup$ Exactly, but what is a good name for it? Trying to come up with a name for a libvolk kernel. $\endgroup$ – Albin Stigo Dec 21 '18 at 13:14
  • $\begingroup$ If this is for a VOLK kernel name: the complex numbers for these are just real and imaginary part one after another, so your operation is effectively volk_32f_sum_pair_32f, I'd say :) $\endgroup$ – Marcus Müller Dec 21 '18 at 14:24

There's no specific term, as far as I know, but it's a very common operation with quadrature mixing. It's the result of taking the real part of an analytic signal.

You have a complex baseband signal $x(t)$, you modulate it with a complex carrier resulting in an analytic band pass signal, and then you take the real part to obtain the real-valued band pass signal that can be transmitted over a channel:

$$\begin{align}x(t)&=x_R(t)+j\cdot x_I(t)&\textrm{complex baseband signal}\\ y(t)&=x(t)e^{j\omega_ct}&\textrm{analytic band pass signal}\\ s(t)&=\textrm{Re}\{y(t)\}&\textrm{real-valued band pass signal}\\&=x_R(t)\cos(\omega_ct)-x_I(t)\sin(\omega_ct)\end{align}$$

  • $\begingroup$ Thanks Matt! Well this is what I'm doing... Just pondering what to name a SIMD optimized function I'm writing. $\endgroup$ – Albin Stigo Dec 21 '18 at 16:39
  • $\begingroup$ @AlbinStigo: Does the function just add real and imaginary parts, or does it also do the modulation? $\endgroup$ – Matt L. Dec 21 '18 at 16:44
  • $\begingroup$ result = real(z) + imag(z). For example f(2+5i)=7. $\endgroup$ – Albin Stigo Dec 21 '18 at 17:34
  • $\begingroup$ But $s(t)$ is neither the sum of the real and imaginary parts of $x(t)$ nor the sum of the real and imaginary parts of $e^{j\omega_ct}$ which sum would be $\cos \omega_ct + \sin\omega_ct$, The $s(t)$ you show is actually the dot product of $[x_r(t), x_i(t)]$ and $[\cos\omega_ct, -\sin\omega_ct]$. $\endgroup$ – Dilip Sarwate Dec 22 '18 at 5:21
  • $\begingroup$ @DilipSarwate: That's true, of course. But what appears to be the case is that the OP generates a complex signal $x_R(t)\cos(\omega_ct)-jx_I(t)\sin(\omega_ct)$, which, when adding its real and imaginary parts, results in the desired real-valued band pass signal. $\endgroup$ – Matt L. Dec 22 '18 at 13:18

This can be implemented, without needing to access the real and imaginary parts of $z$ individually, by writing

$$\operatorname{Re}(z) + \operatorname{Im}(z) = \frac{(1 + i)(z^* - iz)}{2},$$

where $i$ is the imaginary unit and $z^*$ is complex conjugation.

Factoring out a complex constant, $\xi = 1/2 + i/2$, turns this into a slightly tidier expression,

$$\operatorname{Re}(z) + \operatorname{Im}(z) = \xi(z^* - iz).$$

These expression can be derived by applying the trigonometric identities

$$\cos(x) = \operatorname{Re}(e^{ix}) = \frac{{e^{ix} + e^{-ix}}}{2}$$ $$\sin(x) = \operatorname{Im}(e^{ix}) = \frac{{e^{ix} - e^{-ix}}}{2i}.$$

Perhaps this will give you some inspiration for choosing a good function name.


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.