0

System

Above is a block diagram of a discrete-time system $T\{x[n]\} = y[n]$. Here, $h[n]$ is the impulse response of an arbitrary LTI system.

Firstly, is this overall system LTI? I don't think so because the downsampling operator is not time-invariant but I am not sure.

Secondly, what would be the purpose of such a system? If we are careful and we prevent aliasing then the signals in the two branches are essentially the same. Then $y[n] = (x[n] \ast h[n]) + (x[n] \ast h[n]) = 2(x[n] \ast h[n])$. So what would be the intended purpose of such a system?

Ahsan Yousaf
  • 1,533
  • 1
  • 3
  • 15
  • 2
    Hint for the first part: It is easier if you do the check in the Fourier Domain! –  May 28 '23 at 16:23
  • If there is no energy in the signal $x[n]$ at or above *half* Nyquist, then it'll be LTI, depending on how the upsampler is doing. I have no idea the purpose of this system. – robert bristow-johnson May 28 '23 at 17:51
  • @robertbristow-johnson Is this because there will be no aliasing with the rate changes if that condition is satisfied? – Ahsan Yousaf May 28 '23 at 18:02
  • Yes, there will be no aliasing when downsampling by a factor of 2 if there are no frequency components at or above $f_\mathrm{s}/4$. Then, even if it's delayed by a half sample (at the new low sample rate), no information is lost. The upsampler has to do it right (with sinc-based upsampling kernel). – robert bristow-johnson May 28 '23 at 18:38
  • I don't think things are that simple. Since the filters, if truly identical, are designed for a particular sample rate, but is being used for two different sample rates here. – Andy Walls May 29 '23 at 11:26
  • Also, the upsampler has no filter following it and is underspecified. Does it repeat the previous sample? Does it just insert 0 samples (which creates aliases in the new wider band)? – Andy Walls May 29 '23 at 11:29
  • 2
    Where is this system from? Do you have a reference? – Jdip May 29 '23 at 18:02
  • @Jdip It's from a past exam paper. – Ahsan Yousaf May 29 '23 at 20:49
  • //"If we are careful and we prevent aliasing then the signals in the two branches are essentially the same."// - - - - - No, they're not. The $h[n]$ operating in the bottom branch is operating at half the sample rate. Once the output is upsampled back to the original, it will be like the $h[n]$ in the bottom path is twice as long as the $h[n]$ of the path at the top. – robert bristow-johnson May 30 '23 at 19:01

1 Answers1

0

The system is equivalently LTI for shifts that are even in number of samples, or for inputs unaliased by the subsampling (zero spectrum over $[f_s/4, -f_s/4)$). It is always linear. These can be verified by working through Subsampling in time <=> Folding in Fourier, also through FFT upsampling. The $+(x * h)[n]$ part is always LTI, and sum of LTI is LTI.

The test in Python would look like:

out0 = op(np.roll(a + b, shift), d)
out1 = np.roll(op(a, d) + op(b, d), shift)
assert np.allclose(out0, out1)

where op(x, d) implements the system (no need for upper branch) with d as the subsampling factor, and roll is a circular shift. The test says, "delaying input delays output, and summing inputs sums outputs". Circularity in roll is made equivalent with linearity with sufficient zero-padding.

Purpose for signal processing, unclear. If $h$ is a high-pass with no frequencies outside $[f_s/4, -f_s/4)$, then it plants a copy of the highpassed signal onto low frequencies, while retaining the original low frequencies except lowpassed by the mirrored $\hat h$. If $\hat h$ has the opposite support (lowpass), then it doubles $(x * h)[n]$ if $x$ is unaliased, else it copies highs the same way but now the upper branch is empty in highs. For general $\hat h$, both lows and highs in the original $\hat x$ are equally affected for the subsampled branch, but only highs are duplicated in the end result. So it's a really shitty way of emphasizing high frequencies.

Purpose for deep neural networks, it resembles a skip connection in ResNets, where the idea is to constrain the flow of information to promote sparsity. However, there the two $h$ would differ. If they're same, it's useless as a nonlinearity, so the only non-triviality is in shifts - it'd be aiming for a very specific feature that I can't think of.

Also, the diagram is underspecified; it makes the most sense to also subsample $h[n]$ by 2. For LTI-ness, the conclusions either way don't change as they hold for any general $h$, and this lower compute branch is independent of the upper. The spectral analysis I've done earlier does change significantly, but I won't account for this other (I think esoteric) case, except by saying that now it's never doubling $(x * h)[n]$, nor do I see it adding purpose. Not subsampling $h$ by 2 introduces the independent problem of handling boundaries, as now $h$'s support is relatively doubled. It remains LTI for any integer "shift / sub_factor", and linear for all parameters. I also assumed the upsampling is sinc interpolation / DFT upsampling, else this answer could change entirely.

downsampling operator is not time-invariant

Subsampling isn't time-invariant, but upsampling the subsampling is, under the stated constraints. For the bandlimited case, it's faithfully LTI - for all others, it's "equivalently" so (the math coincides, though in interesting ways). This is explored more fully - with proofs and code validation - at Is downsampling LTI for bandlimited inputs?.

OverLordGoldDragon
  • 8,912
  • 5
  • 23
  • 74
  • Just a terminology note: I think you are using an uncommon definition of "time-invariant." The textbook (eg, Oppenheim & Schafer, Proakis & Manolakis, etc.) definition would be that if an input $x[n]$ to a system produces the output $y[n]$, the system is time-invariant if and only if the input $x[n - n_0]$ produces the output $y[n - n_0]$ for all $n_0$. Under this definition, downsampling and upsampling are both time varying. (Indeed, using a analogous definition of time-invariance for continuous time systems, sampling a continuous time signal is also time varying.) – Jason C May 29 '23 at 20:19
  • 1
    In sp4comm by Vetterli, 2014 he states that downsampling is a linear but timevarying operator. The comment by @JasonC also addresses this terminology problem. But clearly the overall system is LTI if aliasing does not occur. So how to clear this confusion? – Ahsan Yousaf May 29 '23 at 20:53
  • @JasonC Actually I confused things, didn't think it through - I meant that subsampling of a delay is a subsampling of a delay (i.e. $t - t_0$ in output still corresponds to $t - t_0$ in input), not a delay of a subsampling, yet we seek latter, and latter is indeed what my code tests. Former is relevant but not in obvious ways. Sorry, thanks for pointing this. – OverLordGoldDragon May 30 '23 at 15:41
  • @AhsonYousef Good question, best asked separately. I could shortly answer it here, but it's an interesting point that won't show up in search results, and there's much to say that becomes a tangent to the question as asked. I also realized the full LTI equivalence criterion, after executing the math I speak of in the intro (which I'm willing to show, along validation code, in a separate post). If you're up for it, the question should read something like, "Is downsampling LTI for bandlimited inputs?", and the body can optionally ask if there's criteria (besides bw) that yield LTI. – OverLordGoldDragon May 30 '23 at 15:49
  • @JasonC , there's some nuance. *If* the downsampler contained (or was preceded by) a brickwall LPF that wiped out everything above half-Nyquist and if the upsampler contained (or was followed by) another brickwall filter of the same specification, the system would be LTI. Even if $n_0=1$ or some other odd number (so that the samples of $x[n]$ getting tossed are the other half), it would simply delay the output by the same $n_0$. – robert bristow-johnson May 30 '23 at 18:32
  • @OverLordGoldDragon I'll make that post soon, thanks a lot! – Ahsan Yousaf May 31 '23 at 07:34