1
$\begingroup$

Suppose I have an FIR denoted h that represents the impulse response of a system. Using MATLAB syntax (for convenience and brevity),

  1. What does abs(fft(h)) represent?

If the answer is the system's magnitude response, then please proceed to the next question. If not, please correct me.

  1. Is it correct to say that the value of the magnitude response of a system at a given frequency represents the gain applied to an input sine tone at that frequency?

If yes, then please proceed to the next question. If not, please correct me.

  1. If I upsample h by, say, a factor of 2, then the values of abs(fft(h)) are doubled compared to the same computation done at the original sampling rate, at least up to the Nyquist frequency of the original rate. This seems to contradict the answer to question 2, because even though the impulse response has twice the number of samples, it represents the same system and therefore, if abs(fft(h)) represents the magnitude response (with magnitude response defined as mentioned above), then there shouldn't be a discrepancy.

These questions should reveal gaps in my knowledge regarding the meaning of a system's magnitude response, and normalization when computing a DFT (see the answers to this related question). I'd appreciate some clarity on these points. Thanks!

Update 1: Below is a figure showing an example.

Example system IR with magnitude response and filtered signals

The chosen example FIR is a low-pass filter. Blue is the original sampling rate (1024 samples/second). Red is upsampled by a factor of 2. The system magnitude response is a result of doing abs(fft(.)) to each of the IRs shown on the top left. The two plots below (bottom left should actually read "spectrum" and not "response") shows what the system does to an input, unit amplitude sinusoid of frequency 50 Hz.

Update 2: The confusion has been resolved in the comments section of the accepted answer. The source of confusion was the assumption that upsampling a discrete-time impulse response (as shown above) is exactly the same as sampling an analog IR at the higher sampling rate. This is not the case.

$\endgroup$
  • $\begingroup$ I am at number 3 now. If you upsample $h$ by a factor of 2, the spectrum is not doubled. It condenses the spectrum by a factor of 2. $\endgroup$ – msm Apr 13 '17 at 5:04
  • $\begingroup$ but @msm, if it's the most common normalization of the FFT/DFT, then the height of the spectrum will be doubled. $\endgroup$ – robert bristow-johnson Apr 13 '17 at 5:05
  • $\begingroup$ @msm I was referring to the height of the spectrum as robert bristow-johnson specifies $\endgroup$ – Rahul Apr 13 '17 at 5:11
  • $\begingroup$ I think you are mixing two different things up here. No doubling occurs. I will provide an answer if I find the time... $\endgroup$ – msm Apr 13 '17 at 5:24
  • $\begingroup$ @msm I have added an example if it helps. $\endgroup$ – Rahul Apr 13 '17 at 5:51
0
$\begingroup$

There is no contradiction here. The first two points in your question are correct. In the third one the mistake lies in the assumption that "it represents the same system". It doesn't. You've shown yourself that the response to a sinusoid is different for the two systems; the output of the interpolated system is larger than the other one, which corresponds to the larger value of the magnitude response.

As a simple test, note that the value of the frequency response at $\omega=0$ is given by the sum of all samples (assuming a signal of length $N$):

$$X(0)=\sum_{n=0}^{N-1}x[n]\tag{1}$$

Clearly, this sum is different for the original signal and for the interpolated signal. Note, however, that for upsampling and interpolation by a factor of two, the difference is not necessarily a factor of two. The exact factor depends on the signal and on the type of interpolation.

$\endgroup$
  • $\begingroup$ I guess a little more clarification regarding why it doesn't represent the same system would be helpful (not from a mathematical point-of-view, which I understand). For example, if we think of the above as capturing the impulse response of a real system at two different sampling rates (one twice the other) - therefore measuring the IR of the same system - and I wanted to know what gain the actual system applies to a sinusoid, how would I go about computing that given abs(fft(.)) gives two different answers? $\endgroup$ – Rahul Apr 13 '17 at 7:19
  • $\begingroup$ In other words, I'm effectively thinking of this in terms of sampling an analog IR signal at two different rates. This system is going to do only one thing to a sinusoid of unit amplitude, irrespective of the sampling rate I use to represent it's IR digitally. Essentially, how do I figure that out (i.e. how do these two sets of gain values I've computed relate to the "real" world)? I'm feel I'm missing something terribly obvious (perhaps something to do with defining a reference of some sort) but it's just missing me right now. $\endgroup$ – Rahul Apr 13 '17 at 7:47
  • 2
    $\begingroup$ @Rahul: It doesn't represent the same discrete-time system. If you use the discrete-time system to represent a continuous-time system, then you have to normalize by the sampling interval $T$: $$\int_{-\infty}^{\infty}h(t)dt\approx T\sum_nh(nT)$$ $\endgroup$ – Matt L. Apr 13 '17 at 7:48
  • $\begingroup$ I assumed upsampling gives the exact same result as re-measuring the analog IR at a higher sampling rate. Of course, that doesn't happen. Capturing the IR of a system at a higher sampling rate results in a smaller peak-to-peak amplitude. $\endgroup$ – Rahul Apr 13 '17 at 18:35

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.