Suppose I have an FIR denoted
h that represents the impulse response of a system. Using MATLAB syntax (for convenience and brevity),
- What does
If the answer is the system's magnitude response, then please proceed to the next question. If not, please correct me.
- 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.
- If I upsample
hby, 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.
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.