Digital filter performance with noncontinuous signal?

First of all, I'm new to DSP so excuse my simplified words. I'm testing the performance of a digital filter on a (partly) noncontinuous signal:

As you can see, the signal is not continuous at some points (like it is stopping and starting over again) When I apply the digital filter to it, I get this:

The filter shows ripples at the noncontinuous areas, then it starts to work again. Why does the filter show this ripple at the noncontinuous areas? How do I calculate it (to know the overshoot, etc.)?

• here it's a zoom in the ripples at the noncontinuous areas. s10.postimg.org/rve8373ah/image.png – David Raul Jun 23 '13 at 21:50
• What kind of filter do you apply? Low/high/band pass? – Deve Jun 24 '13 at 7:11
• @Deve ,High-pass filter. – David Raul Jun 24 '13 at 9:57
• @Deve ,I set the cutoff at frequencies which doesn’t exist in the signal to see how the filter acts with such case (step response & the ripple at noncontinuous points) – David Raul Jun 24 '13 at 11:03

1 Answer

It is not surprising that the filter output resembles the filter's step response at discontinuities of the input signal. It's like applying a (modulated) step at the input. Apparently the cut-off frequency of the high-pass filter is higher than the frequency of the sinusoid, so the output goes to zero after each discontinuity. However, at each point of a discontinuity, the input signal contains frequencies above the cut-off frequency of the high-pass filter and these frequencies are passed to the output.

• Thanks @matt-1 , how do we calculate it (know it in advance)? as the step response provide us the answer for this question :Is the overshoot you observe in a signal coming from the thing you are trying to measure, or from the filter you have used? I want to know the same at this discontinuities points. as you can see, the ripple at discontinuities points are different from filter step response. Thanks in advnace, – David Raul Jun 24 '13 at 13:46
• An exact analytic calculation is quite difficult. It might be possible to get away with some approximations however. Is the cut-off frequency of the high-pass filter always higher than the frequency of the sinusoid? – Matt L. Jun 24 '13 at 14:55
• yes, , I set it in this way to see how the filter acts with such case (step response in the beginning & the ripple at discontinuities points) If you please, just give me a hint about how we can reach exact analytic calculation and I'll try to search for it. – David Raul Jun 24 '13 at 15:04
• Well, the exact solution is just the convolution of the input signal with the filter's impulse response: $y_n=\sum_kh_kx_{n-k}$, where $x_n$ is the input signal and $h_n$ is the impulse response of the filter. – Matt L. Jun 24 '13 at 15:43