Consider a set of dense, but generally irregularly-spaced frequency response measurements of some real low-pass analog filter. Denote the maximum frequency for which a frequency response measurement is available as F_a_max.

I would like to create a digital filter model for this analog filter. The sample rate of this filter F_s needs to be upsampled with respect to the rate implied by the measurements, i.e., F_s > 2 * F_a_max. I have used Matlab's invfreqz function to obtain the transfer function of the digital filter from the frequency response measurements. In principle, I can associate an arbitrarily high sample rate with the frequency response measurements. However, I'm concerned about what the response of the digital filter will look like for frequencies greater than F_a_max. While I don't know the exact desired response for such high frequencies (since I don't have frequency measurements for such high frequencies), I don't want the response to go "crazy" in that high frequency band.

An alternative may be using invfreqs to obtain coefficients of an analog transfer function and then use, e.g., a bilinear transform at the desired sample rate to obtain a digital filter. However, the same concern exists.

Are there standard approaches to this problem? I have seem some recommend Lagrange interpolation of the invfreqz output where F_s is first set to 2*F_a_max, and then Lagrange interpolation would resample the response at the higher rate.


1 Answer 1


You mention $2F_{a_{max}}$, which makes me think that you're trying to invoke the Nyquist-Shannon sampling theorem. But that theorem doesn't deal with any "highest measured values". It deals with that process of getting a signal from the continuous-time domain (or some higher-rate sampled domain) to a sampled-time domain.

I think if you have an existing filter that you want to measure and duplicate, that your best bet would be to reverse-engineer the analog filter transfer function, and then use any of the numerous filter design methods to design a digital filter that replicates whatever part of the filter behavior you want to replicate.

Note that unless you sample really fast compared to your highest frequency of interest, you're going to have trouble (or not manage to) get both the phase and the amplitude response to match.

  • $\begingroup$ Yes. The idea of using invfreqs to get the analog filter's transfer function is consistent with your approach. Unfortunately, this routine crashes when I call it in Octave. Not sure if I'd have better luck with the matlab version. $\endgroup$
    – rhz
    Commented Mar 2, 2020 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.