On Thursday, January 13, 2011 8:44:24 AM UTC-5, j26 wrote:
> I am trying to use a filter to smooth time-series data. ...
> I have recently started experimenting with the butter and cheby2 filter
> design functions in Octave.
Those are IIR filters.
> I have a filter that smooths the input data
> well (low-order / low cutoff frequency), but sometimes when the input
> changes abruptly, the output cannot keep up (I know I could raise the order
> of the filter / raise cutoff frequency to improve response, but that
> sacrifices smoothness).
Partly right. A hither filter order can sharpen the cutoff, but how does that improve response. What does "improve" mean to you? (It may not mean the same things to me.)
> How do I apply feedback to my filter such that the
> output follows the input closer when there are large changes in input?
Any filter that smooths its input by slowing the output suppresses rapid changes. An IIR filter inherently uses feedback. That's why one needs to be concerned about its stability. Become acquainted with the step responses of different kinds and orders of filters that might be of interest and choose whatever best suits your purposes.
> I basically want to take my filter and add on a factor equal to the
> difference between the input and output. I remember that there was a
> function called feedback for the continuous time case, but don't recall how
> to apply feedback to a discrete time filter.
The output will be delayed with respect to the input. the delays of Butterworth and Chebychev filters depend on, among other things. frequency. The delays of symmetrical FIR filters are independent of frequency. Still, I don't hold out much hope for the proposed method. What is the point of recreating the unfiltered signal?
P.S. Strictly. factors are multiplicative, not additive.