3 added 1788 characters in body
source | link

As you increase the order of a 'conventional' low pass filter , like a Butterworth response for instance, keeping other things equal, you do increase the phase shift at any frequency.

What are you trying to achieve by filtering your signal? You say you are trying to remove the steps. 'Remove the steps' describes the general effect of a lowpass filter. Unfortunately, it still doesn't provide a specification.

If you can't answer that in termsThere are several parameters that allow you to designdescribe a more suitablelowpass filter.

The first is bandwidth, then perhaps you could play with some other typesthe inverse of filter to see whetherwhich is the results are more to your taste'length' of the impulse response for some definition of length. A high order filtersmall bandwidth has a long impulse response, which will give you rapid'smear out' the original signal.

The second is order, or steepness of rolloff intoin the stopband, but that's not. Communication filters that must reject adjacent signals often necessary for filtering time series datahave a high order. Data smoothing filters often have a low order.

TryThe third, or should it be the zeroth, is the type of filter. Causal or acausal, Butterworth, Cheby, Gaussian, Elliptic or Bessel, FIR or IIR.

Sometimes, filters are designed by choosing a lowspecification in terms of the above, and implementing it. Often though, especially with data smoothing, you don't know quite what you want, and need to see it to know whether it's right.

You seem to be troubled by the increasing delay as you increase the filter order. This makes me suspect that what you want is a filter, but with a smaller bandwidth.
Tryflat group delay, this is, a Bessel designedcentred response.

The very simplest of these is the so-called box-car filter. The output at point n is the average of all samples between points n-m and n+m, rather than Butterworthwhere m is an integer parameter you can tune for smoothness.
Try Small m is little smoothing but features not smeared much, big m is much smoothing with features smeared out greatly. This is easy to implement in Excel for instance, if you know how to 'fill down' cells. This is not a symmetrical FIR filtercomputationally efficient way of rectangulardoing it, but that rarely matters at this stage of the design process. Obviously the programming is trivial in your language of choice.

The next simplest is the triangular filter, orwhich you can implement as a second iteration of the box-car. You could iterate more times, if you wanted, though I doubt you will find that's necessary. The filter response approaches Gaussian shape (plentyas the number of parametersiterations approaches infinity BTW.

If you want to experiment with there)see the effect of a centred filter, and don't want to re-write whatever you have done too much, you could run your existing filter, reverse the output time series, and run it again. Such a filter is always symmetrical. Neat trick, huh?

As you increase the order of a filter, keeping other things equal, you do increase the phase shift at any frequency.

What are you trying to achieve by filtering your signal?

If you can't answer that in terms that allow you to design a more suitable filter, then perhaps you could play with some other types of filter to see whether the results are more to your taste. A high order filter will give you rapid rolloff into the stopband, but that's not often necessary for filtering time series data.

Try a low order filter, but with a smaller bandwidth.
Try a Bessel designed filter, rather than Butterworth.
Try a symmetrical FIR filter of rectangular, triangular, or Gaussian shape (plenty of parameters to experiment with there).

As you increase the order of a 'conventional' low pass filter , like a Butterworth response for instance, keeping other things equal, you do increase the phase shift at any frequency.

You say you are trying to remove the steps. 'Remove the steps' describes the general effect of a lowpass filter. Unfortunately, it still doesn't provide a specification.

There are several parameters that describe a lowpass filter.

The first is bandwidth, the inverse of which is the 'length' of the impulse response for some definition of length. A small bandwidth has a long impulse response, which will 'smear out' the original signal.

The second is order, or steepness of rolloff in the stopband. Communication filters that must reject adjacent signals often have a high order. Data smoothing filters often have a low order.

The third, or should it be the zeroth, is the type of filter. Causal or acausal, Butterworth, Cheby, Gaussian, Elliptic or Bessel, FIR or IIR.

Sometimes, filters are designed by choosing a specification in terms of the above, and implementing it. Often though, especially with data smoothing, you don't know quite what you want, and need to see it to know whether it's right.

You seem to be troubled by the increasing delay as you increase the filter order. This makes me suspect that what you want is a filter with a flat group delay, this is, a centred response.

The very simplest of these is the so-called box-car filter. The output at point n is the average of all samples between points n-m and n+m, where m is an integer parameter you can tune for smoothness. Small m is little smoothing but features not smeared much, big m is much smoothing with features smeared out greatly. This is easy to implement in Excel for instance, if you know how to 'fill down' cells. This is not a computationally efficient way of doing it, but that rarely matters at this stage of the design process. Obviously the programming is trivial in your language of choice.

The next simplest is the triangular filter, which you can implement as a second iteration of the box-car. You could iterate more times, if you wanted, though I doubt you will find that's necessary. The filter response approaches Gaussian as the number of iterations approaches infinity BTW.

If you want to see the effect of a centred filter, and don't want to re-write whatever you have done too much, you could run your existing filter, reverse the output time series, and run it again. Such a filter is always symmetrical. Neat trick, huh?

2 added 3 characters in body
source | link

As you increase the order of a filter, keeping other things equal, you do increase the phase shift at any frequency.

What are you trying to achieve by filtering your signal? What are you trying to achieve by filtering your signal?

If you can't answer that in terms that allow you to design a more suitable filter, then perhaps you could play with some other types of filter to see whether the results are more to your taste. A high order filter will give you rapid rolloff into the stopband, but that's not often necessary for filtering time series data.

Try a low order filter, but with a smaller bandwidth.
Try a Bessel designed filter, rather than Butterworth.
Try a symmetrical FIR filter of rectangular, triangular, or Gaussian shape (plenty of parameters to experiment with there).

As you increase the order of a filter, keeping other things equal, you do increase the phase shift at any frequency.

What are you trying to achieve by filtering your signal?

If you can't answer that in terms that allow you to design a more suitable filter, then perhaps you could play with some other types of filter to see whether the results are more to your taste. A high order filter will give you rapid rolloff into the stopband, but that's not often necessary for filtering time series data.

Try a low order filter, but with a smaller bandwidth.
Try a Bessel designed filter, rather than Butterworth.
Try a symmetrical FIR filter of rectangular, triangular, or Gaussian shape (plenty of parameters to experiment with there).

As you increase the order of a filter, keeping other things equal, you do increase the phase shift at any frequency.

What are you trying to achieve by filtering your signal?

If you can't answer that in terms that allow you to design a more suitable filter, then perhaps you could play with some other types of filter to see whether the results are more to your taste. A high order filter will give you rapid rolloff into the stopband, but that's not often necessary for filtering time series data.

Try a low order filter, but with a smaller bandwidth.
Try a Bessel designed filter, rather than Butterworth.
Try a symmetrical FIR filter of rectangular, triangular, or Gaussian shape (plenty of parameters to experiment with there).

1
source | link

As you increase the order of a filter, keeping other things equal, you do increase the phase shift at any frequency.

What are you trying to achieve by filtering your signal?

If you can't answer that in terms that allow you to design a more suitable filter, then perhaps you could play with some other types of filter to see whether the results are more to your taste. A high order filter will give you rapid rolloff into the stopband, but that's not often necessary for filtering time series data.

Try a low order filter, but with a smaller bandwidth.
Try a Bessel designed filter, rather than Butterworth.
Try a symmetrical FIR filter of rectangular, triangular, or Gaussian shape (plenty of parameters to experiment with there).