Background
I've been given the task of designing a filter. The problem is constrained in terms of filter order, and as such, the specs initially conceived for the filter seem challenging, and we think we might need to release them somewhat. For those interested, here is a question I posted regarding the design requirements.
I aim to quantify the performance of various filters, each making sacrifices regarding the original specs to make the best choice.
My Question
My question now is more general: How would I quantify the performance of a filter? Is there a standard way of doing this? Does it make sense to talk about the SNR of a filter?
My initial thoughts:
- The filter itself doesn't introduce noise but introduces distortion, both in terms of magnitude and possibly phase (for non-linear phase filters).
- I think it doesn't make sense to talk about the "SNR of a filter," as essentially, this doesn't capture the actual noise that can pass through the filter.
- I would assume that looking at the SINAD (signal to noise and distortion ratio) ratio at the filter output to compare between filters makes the most sense.
- However, even though my system is designed to operate at known noise levels, this analysis will depend significantly on the signal used. I wish not to assume a specific PSD aside from its bandwidth.
- Lastly, the suggested analysis ignores the distortion the first samples undergo due to the transient of the filter and considers only the steady state. Is there a way to include this in the analysis?
I would love to get either suggestions/references to standard approaches for quantifying filters or to hear suggestions regarding my current path.
Edit
Following the answer given, I'll add some details. I wish to design a digital LPF.
- The requirements regarding passband ripple, stopband rejection, and transition width imply a filter that is too long for our desire, at least when using standard design approaches such as least-squares, equiripple, or windowing designs. IIR designs weren't considered as of now.
- The filter is supposed to run over quite powerful hardware, so resources are less of a concern, but fixed-point numerical issues are.
- Phase non-linearity is a concern; thus, only linear phase FIRs were considered for now.
- The overall impulse response length of the filter is the main constraint limiting the frequency domain performance as I wish to minimize the transient.
With these in mind, I aim to quantify the performance of various designs in terms of distortion and noise rejection.
Initial Approach
My initial approach is to pass signals through the filter and estimate the noise and distortion as the difference w.r.t to the ideal output, i.e., given an input signal $s[n]$ and output $y[n]$, define the error $e[n]$:
$$ e[n] = y[n] - y_{ideal}[n], $$ Where:
$$ y_{ideal}[n] = \begin{cases} s[n] & s[n]\text{ contained in passband}\\ 0 & s[n]\text{ contained in stopband}\\ \end{cases} $$
I can then try to quantify a given design's quality as the average signal power ratio $\frac{P_s}{P_e}$, averaged over an ensemble of input signals.
Initial Approach Shortcomings
- The suggested analysis will be sensitive to the chosen signal $s[n]$. I can run a frequency sweep over the whole Nyquist range $[0,f_s/2]$.
- However, I wonder what I am missing by not using wideband signals. For sure, I am missing the phase distortion, which is why so far, non-linear phase filters weren't considered.
- The suggested analysis doesn't consider the distortion introduced by the transient (the signal is stationary, and transients are discarded). On a technical level, including the transient distortion into the error isn't hard, but it makes the task of choosing the ensemble of input signals even more challenging.
- The error signal $e[n]$ isn't defined in the transition band. Thus, my analysis will favor designs with a wider transition band on a technicality, i.e. if the spec includes a wider transition band (over which the design incurs no error), it will get a higher score while not necessarily being better behaved.
Any thoughts on how to improve my approach?