3
$\begingroup$

I want to sample a signal whose derivative I know to be bounded by physical constraints. The sampling is disturbed by gaussian noise, hence I need to filter the sample with a lowpass filter.

Since I know precisely the bound on the derivative magnitude, I was wondering if there is a way to translate this bound in a frequency bound, in order to determine the cutoff-frequency of the filter.

My intuitive idea is that the low frequencies make up the "smooth" part of the sample (i.e. the part with a derivative that is compatible with the bound, the signal), while the higher frequencies are responsible for the sudden changes in the sample (i.e. the part with a slope that exceeds the bound, the noise); so, I think there should be a relation between the derivative and the frequency components of the sample. I'm looking for something that formalizes this concept. Thanks!

$\endgroup$

1 Answer 1

4
$\begingroup$

A lot depends on how you want to formalize your question. Here is one possible approach. Let's say that the signal can be any function on $\mathbb Z$ with the derivative bounded by $1$ and the noise has the standard deviation $\sigma$ and its values at different samples are independent. You apply a linear filter and you want to minimize the expectation of the $L^2$ norm of the error over a long period of time in the worst case scenario. What should this filter be?

Taking the Fourier transform of everything, as usual, we see that the question reduces to finding a function $\varphi$ on the circle with unit measure that minimizes $\sigma^2\int|\varphi|^2+\sup_{a}\frac 1N\int{|1-\varphi|^2\left|\sum_{k=1}^N a_k z^k\right|^2}$ where $a_k$ is an arbitrary sequence of real numbers with $|a_{k+1}-a_k|\le 1$ and $a_0=a_{N+1}=0$ ($N$ is the duration of the signal). Note that any such sum is just $\frac{1}{1-z}\sum_{k=0}^N b_kz^k$ where $|b_k|\le 1$ and $\sum_k b_k=0$. This brings us to the problem of finding the supremum of $\frac 1N\int\psi^2\left|\sum_{k=1}^N b_k z^k\right|^2$ for a given $\psi=\frac{1-\varphi}{|1-z|}$.

This supremum is, of course, not greater than $\sup\psi^2$, but it is also not much less than that since if we allow complex coefficients instead of real ones, we can approximate the delta-measure at any point we want. Thus, if we do not care too much about factors like $2$, we can restate our problem as follows:

Minimize $\sigma^2\int(1-M|1-z|)_+^2+M^2$. If we pass to the continuous case of the line (which makes a decent approximation if you sample frequently enough, so in this normalization $\sigma\gg 1$) and assume that our Fourier transform is given by $\widehat f(\omega)=\int f(t)e^{-2\pi i \omega t}$ (so that the $L^2$ norm is preserved, which corresponds to $z=e^{2\pi i \omega}$), we see that we are to minimize $\sigma^2\int(1-2\pi M|\omega|)_+^2+M^2=\frac{\sigma^2}{3\pi M}+M^2$, which results in the minimum at $M=\sqrt[3]{\frac{\sigma^2}{6\pi}}$. Thus, from this point of view, the optimal filter should pass $e^{2\pi i\omega t}$ for $|\omega|\le \omega_0=\sqrt[3]{\frac{3}{4\pi^2\sigma^2}}$ with linear decline in amplification from frequency $0$ (amplification $1$) to frequences $\pm\omega_0$ (amplification $0$).

Now about scaling. Suppose that you sample at time intervals $\tau$, your time derivative is bounded by $D$ and the noise standard deviation at each sample is $\Sigma$. Then $\sigma=\frac{\Sigma}{D\tau}$ and the final answer should become $\Omega_0=\omega_0/\tau=\sqrt[3]{\frac{3 D^2}{4\pi^2 \Sigma^2\tau}}$.

Note once more that it is the worst case scenario optimization under the only restriction concerning the derivative with the objective to minimize the average square error. If you have more restrictions on your signal (say, some amplitude bound in addition to the derivative bound), or wish to optimize for a "typical signal" (which has then to be defined) and do not care much about outliers, or prefer a different objective, the answer may change. Also I believe that my logic is correct but I'm notoriously bad in algebra after midnight, so check the numbers involved before applying the final answer.

$\endgroup$
5
  • $\begingroup$ Thank you for your answer! I have two questions: - I can't figure out how you came to the first expression of the minimum problem (the one with |\varphi|^2..); - I don't understand the relation between the noise standard deviation of the sample \Sigma and the general noise standard deviation\sigma: \sigma = \frac{\Sigma}{D \tau}; Thanks! $\endgroup$
    – LucioPhys
    Commented Aug 22, 2020 at 21:30
  • 1
    $\begingroup$ @LucioPhys 1) If you have pure Gaussian noise at each sampling with variance $\sigma^2$ and use the filter corresponding to the function $\varphi$ on the circle, you'll get the Gaussian noise with the variance $\sigma^2\int|\varphi|^2$ at each sample (it will now no longer be independent at different samples but it will still be independent of the signal, so we can just add the squares to get the mean square error). $\endgroup$
    – fedja
    Commented Aug 23, 2020 at 0:46
  • 1
    $\begingroup$ @LucioPhys 2) I normalized to sampling time interval $1$ and the derivative $1$ in the main part. If you sample more frequently, the allowed change of the signal between samples diminishes proportionally to the sampling time interval (if the derivative is $1$ unit/second and you sample $10$ times per second, the allowed change between samples becomes $1/10$ unit, so you should scale everything accordingly. The same with the size of the derivative. My $\sigma$ is just the ratio of the observed noise level at a sample to the allowed change in signal between two consecutive samples. $\endgroup$
    – fedja
    Commented Aug 23, 2020 at 2:11
  • 1
    $\begingroup$ @LucioPhys I should also say that I assume that you are doing purely digital processing, i.e., you have a device that produces some number every $\tau$ seconds and you can only process this sequence of numbers (by doing FFT to get to the frequency side, multiplying there and doing inverse FFT to get the filtered signal). If you have a real physical device producing electric signal with noise and want to put an actual low pass filter between it and the measuring device, then the story gets a bit different: the idea is the same, but the meaning of the parameters and the formula will change. $\endgroup$
    – fedja
    Commented Aug 23, 2020 at 2:17
  • $\begingroup$ Perfect, now it's clear! Thank you!! $\endgroup$
    – LucioPhys
    Commented Aug 23, 2020 at 10:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .