2
$\begingroup$

I'm fairly new to digital signal processing. I've been trying with limited success to apply a time-varying bandpass filter to a signal (question at stackoverflow). Instead I thought I'd try a different approach. Say I have a function which approximates the data I'm trying to filter from my signal. Is there a technique -- perhaps some sort of optimisation -- that can take this estimation as a "template" for a filter design, rather than specifying strict filter parameters, as when one designs a Butterworth filter, for example.

$\endgroup$
2
  • $\begingroup$ I'd have a look at adaptive filtering techniques. $\endgroup$
    – Naresh
    Aug 14, 2013 at 9:49
  • $\begingroup$ @Naresh Please see my discussion below - could you comment on this at all? $\endgroup$
    – allhands
    Aug 14, 2013 at 10:45

1 Answer 1

1
$\begingroup$

Say I have a function which approximates the data I'm trying to filter from my signal. Is there a technique -- perhaps some sort of optimisation --

Let us say that you have a model of your data, in the form of a polynomial fit of certain order. In this case you will have co-efficients that produce a polynomial that best fits your data in the Least Squares Sense. Thus, you would have already solved the LSE problem via optimization routines, which would yield the co-efficients $p_i$. for a $m$ degree polynomial.

$$ y[n] = p_0x^0[n] + p_1x[n] + p_2x^2[n] ... p_mx^m[n] $$

that can take this estimation as a "template" for a filter design, rather than specifying strict filter parameters, as when one designs a Butterworth filter, for example.

Technically yes, you can do this. Once you have your polynomial co-efficients, you can generate a polynomial at sample spacing commensurate with your sampling rate, and perform a DFT on it and inspect the absolute magnitude of your result, in order to get a frequency domain representation of your 'template'. This is certainly do-able.

In fact, this is precisely the theory behind matched filters. Matched filters work optimally (in AWGN) because they take into account frequency bins where your signal resides, and ignore other bins with noise only. This is how they maximize SNR when performing active detection of (obviously known) signals. (This is also closely related to the technique of Empirical filtering in the frequency domain).

I say the above is doable, however the wisdom of doing it would depend heavily on your application, which your question does not really delve into.

EDIT: Based on the new information you have provided in your comments:

First off, note that the Hilbert Spectrum (instantaneous frequency) is not defined for signals with more than one complex exponential.

Secondly, the way you have described it, you may be over-thinking this. You want to perform a narrow-band filtering operation on a frequency-varying signal over time. One basic solution for this is to simply use an Adaptive Filter, whereby the weights of your (adaptive) filter are constantly updated so as to minimize the error between your estimate and the empirical data.

One implementation of an LSE Adaptive filter will seek to minimize the cost function, defined by:

$$ C[n] = \Big[y[n] - \mathbf{h}^T[n]\mathbf{x}[n]\Big]^2 $$

Where $\mathbf{h}^T[n]$ is the $M$ length adaptive weight vector at instant $n$, $\mathbf{x}[n]$ is the $M$ length data vector taken as column vectors of the Toeplitz data matrix $\mathbf{X}$, and $y[n]$ is the desired signal at instant $n$. A filter structure such as this will 'track' your signal as it changes frequencies.

$\endgroup$
6
  • $\begingroup$ Perhaps a bit more background on my application would be useful. I want a good time-frequency representation of a monocomponent audio signal using Hilbert spectral analysis. My problem is that I have a fairly poor SNR, so to filter my audio signal I need a narrow bandwidth. But my frequency data is non-stationary, and using fixed parameters for a bandpass filter introduces noise to the signal. One idea I had was to try and use a time-varying bandpass filter, although I haven't been able to successfully do so... $\endgroup$
    – allhands
    Aug 9, 2013 at 16:47
  • $\begingroup$ ..continued. Another idea was to use an estimate of my signal (perhaps obtained through something like a polynomial fit to some fixed points) to extract the actual instantaneous frequency from my data. Simply getting a DFT of the template is not really enough, since I require the preservation of time information. STFTs are also not really useful for me, since they are limited in either time/frequency resolution. $\endgroup$
    – allhands
    Aug 9, 2013 at 16:49
  • $\begingroup$ @allhands Please see my edits. $\endgroup$ Aug 9, 2013 at 17:42
  • $\begingroup$ Thanks for your very detailed comments. I'm wondering if you could supply more information on adaptive filtering and its implementation (specifically, I'm working in Python). The problem I see is that my filter function is only a coarse-grained estimate of the "true" signal - in reality the "true" signal has modulations in frequency that are much more rapid than the estimated function shows. My question is would an adaptive filter be able to track these modulations, using the "estimate" signal to minimize the cost function? $\endgroup$
    – allhands
    Aug 14, 2013 at 10:44
  • $\begingroup$ The only limitation of an adaptive filter in my opinion is the computational cost/tracking parameter. $\endgroup$
    – Naresh
    Aug 14, 2013 at 12:08

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.