# discrete-time (slew) rate limiting algorithm

Consider uniformly-spaced samples of smooth, bandlimited signal observed in noise and subject to some artifacts (small jumps). Physical restrictions impose a constraint on the maximum magnitude of the derivative of the noiseless, "artifactless" signal. In an effort to smooth the signal and remove artifacts, I could impose this constraint by simply limiting the size of the sample-to-sample change (e.g., matlab, but this seems like it will introduce other effects to compromise the smoothness of the signal.

The only other option I came across are nonlinear feedback loops (e.g., see this paper. I suppose that one could also impose derivative inequality constraints on, say, some local polynomial representation of the signal as well. Any other ideas, references, etc?

Thanks!

• can we model the artifacts as additive noise? – Marcus Müller Aug 23 '16 at 20:57
• Physical restrictions impose a constraint on the maximum magnitude of the derivative of the noiseless, "artifactless" signal. is redundant. You already said it's band-limited. – Marcus Müller Aug 23 '16 at 20:58
• The artifacts arise within a sensing mechanism in the form of jumps. I suppose that you could model this as an additive term that would be formed of some kind of staircase function. – rhz Aug 24 '16 at 17:00
• wait, like quantization noise? – Marcus Müller Aug 24 '16 at 17:04
• No. Sorry I wasn't clear enough. Quantization noise would be a direct function of the signal being quantized together with the quantization scheme. Imagine a series of monotonically increasing randomly spaced time instances (say from a Poisson process). At each time instant a step in amplitude is observed that is maintained until the next time instance. These steps are fairly rare and a significant amount of time could pass between steps. – rhz Aug 24 '16 at 17:09

Like the old German saying goes:

If you give a man a filter, everything looks like a signal that needs to be low-pass filtered

or so.

Slew rate and signal bandwidth are closely related. Simply low-pass filter your signal; usually, you'd do that with a linear filter, not an non-linear filter, and especially not a non-linear recursive one, because those are pretty hard to get stable.

By the way, if you look at FIR and IIR filters, you'll notice that we model these in z-Domain as polynomials, but by doing so, we can apply them to the signal in a linear way.

• Thanks for your response. Certainly (linear) low pass filtering will smooth out the jumps. To know whether the derivative constraint is being respected, I suppose I could calculate the peak sample-to-sample change in the step response of the filter. It may turn out that the amount of low pass filtering I'd need to do to limit the sample-to-sample change may be too aggressive (I may wind up eliminating desired signal components and/or introducing excessive delay). – rhz Aug 24 '16 at 17:05
• sample-to-sample change is actually you take the current sample, and subtract the previous, right? That would be a FIR filter with taps (depending on which direction you count them) [-1 1], which, by the way, is a high pass filter – Marcus Müller Aug 24 '16 at 17:06
• If you take a hpf's output and subtract that from it's group-delay-delayed input, you'd end up with a LPF – Marcus Müller Aug 24 '16 at 17:12
• Yes, but I would implement a low pass filter, calculate the low pass filter's step response (with the largest expected amplitude jump) and determine the largest sample-to-sample change to see if this change exceeds physical limits imposed by the actual signal of interest. You are right that [-1, 1] is high pass. I would use this only to analyze the desired filter's step response. – rhz Aug 24 '16 at 17:15
• FWIW, $[1, -1]$ as filter taps approximate a derivative operation on the signal being filtered. The approximation is best at DC and worst at the Nyquist frequency. – Andy Walls May 21 '17 at 14:15