# DSP Puzzle: Advanced Signal Forensics - Complex Time Domain Signal

Signal Forensics is the art of detecting likely culprits from the time and frequency spectrum of signals. I made that up, but whatever you want to call it, this is an extremely useful skill, especially for reverse engineering waveforms and identifying likely culprits of hardware implementation issues.

That said, today's Signal Forensic challenge is to identify the most likely culprits for the waveforms plotted in "Exhibit A" and "Exhibit B" below.

What we start with (the known) is a Real Bandpass Signal that has been quantized (it really doesn't matter what frequency it is at or how many bits of quantization, but the following time and frequency domain plots illustrate the test waveform):

This is a two part challenge with an easier question, and then an advanced question. Even though the waveform itself was quantized and real, all subsequent operations were done to have a complex output and be at a much higher precision such that those numerical rounding effects would not be visible. The outputs are given by the transformation:

$$y[n] = g(x[n])$$

(And formally as RBJ points out, the relationship would be given as $$y[n]= g\{ x(\cdot), n\}$$ since one of the solutions is linear but time variant.)

where $$x[n]$$ is the real quantized input and $$y[n]$$ is a complex floating point output. $$g(\cdot)$$ is the mystery function and the answer to this puzzle. Importantly, $$g(\cdot)$$ is a linear function and all information within the passband waveform is efficiently preserved (without redundancy). The processing is not overly complicated and all done in floating point. There is a different $$g(\cdot)$$ used for Exhibit A and Exhibit B.

First the easier of the two, Exhibit A: Below is the real vs imaginary plot of the complex output. What is the general function $$g(\cdot)$$ in this case that could result in such a plot?

Now the trickier one (I assume), for the DSP Elite: Below is Exhibit B as the real vs imaginary plot of the complex output. What is the general function $$g(\cdot)$$ in this case that could result in such a plot, while meeting the criteria I introduced?

This is a “DSP Puzzle”, please preface your answer with spoiler notation by typing ythe following two characters first ">!"

• I thought $g(\cdot)$ was s'posed to be a time-invariant function of $x[n]$. Commented Jun 28 at 8:30
• @robertbristow-johnson I said it needed to be linear. You can be time-variant and still meet the requirements of linearity, right? (Using the test for linearity is superposition and homogeneity: $\{x_1(t)\} + g\{y_1(t)\} = g\{x_1(t) + y_1(t)\}$ and $y_1(t) = g\{x_1(t)\}$ and $\alpha y_1(t) = g\{\alpha x_1(t)\}$, so it's a "Linear Time-Variant System" in this case. Commented Jun 29 at 5:20
• Then, formally, it's $$y[n]= g\{ x[\cdot], n \}$$ Commented Jun 29 at 14:19

Exhibit A:

a simple mixer should do it $$y[n] = x[n]*e^{j\omega n}$$. The thing that threw me off here was that it's not LTI, but I believe its linear.

Not sure I'm missing something here, but Exhibit B seems trivial. The real part is quantized and hence its reasonable to assume that the real but is simply preserved. So any complex filter that leaves the real part alone and sufficiently mangles the imaginary part will do. I tried the transfer function $$H_B(z) = 1 + jA(z)z^{-1000}$$ where $$A(z)$$ is 3rd order allpass centered at the carrier frequency. $$z^{-1000}$$ is just a delay to further knock down any residual correlation.

I got another one for B!

Hilbert Transform to get the analytical signal. It's actually just a special case of my previous solution, it's a different time for "imaginary part mangler".

• This IS the answer I was looking for as it is a commonly used and well recognized function as opposed to the arbitrary and more general cases mentioned in your other answer (and I attempted to restrict it to this by saying all info was preserved efficiently; I’m not confident that does what I intend so perhaps there is a better restriction that succeeds in narrowing it to this without giving it away?)— well done! Please add the answer to part A which is more trivial and we can close this out as correct. Commented Jun 27 at 15:23
• I guess "commonly used" is in the eye of the beholder, this is commonly used in communication but certainly not in audio. In fact, in audio it's quite difficult to implement since a large chunk of the energy is concentrated at very low frequencies. My other solution just uses two very standard DSP blocks. Preserving the information here is trivial: $\Re [y[n]]$ will always recreate the original signal. Commented Jun 27 at 17:52
• I wasn't referring to this specific casee, but signal forensics in general as being able to recognize key properties from the waveforms. But can you add part A as well (I can't select two answers and know that one wasn't difficult, and you answered first and the tougher one, but want the right answer to answer all for future readers...) Commented Jun 27 at 21:55

I think answer to Exhibit A is: $$x[n]e^{j2\pi n/N}$$, where $$N$$ is the total number of samples.

• I think the use of the absolute value makes this non-linear. If you just remove this, that solution should be good! Commented Jun 27 at 17:47
• I've edited. Thanks. Commented Jun 27 at 20:03
• Also: how do you define $N$ ? Commented Jun 27 at 21:54
• I added the definition of N Commented Jun 28 at 20:29