It seems that no matter how long I teach signal processing, I always learn something new. Last week I thought of an interesting experiment regarding convolution and I was pretty surprised by the results. Consider a first order low pass filter with system response H(s) = wc / (s+wc) [where wc is the cutoff frequency in rads/sec]. The impulse response of this system is h(t) = wc*exp(-wc * t), and the corresponding differential equation is y' + wc*y = wc*x.
Suppose we are interested in using a computer to determine the system output y(t) in response to an input x(t). I reasoned that there are two ways of solving this problem. The first is to apply convolution: x(t) [conv] h(t). The second is to use numerical approximation such as Forward Euler to solve the differential equation. In this case, FE could be used to arrive at y[i] = y[i-1](1-wc*dt) + x[i-1](wc*dt), where "dt" is the timestep.
My big "aha" was the realization that there are two competing methods for numerically solving y(t), and in theory they should both give the same answer. However it seems reasonable that one method should be more "efficient" than the other in that it would work better with a larger value of dt (generally speaking you want to use the largest dt you can get away with to reduce your simulation time).
So I decided to test the two methods against each other. My results for simulating a first order step response are shown here:
So then I decided to repeat this experiment with a second order low underdamped low pass filter. Amazingly, the results were reversed!
So I thought all this was really interesting! Based on my observations, I hypothesize that (a) for an overdamped 2nd order system, the Euler method would be more accurate than convolution, and (b) for anything higher than a 2nd order system, the convolution method would be more accurate. I've run out of time to test either of these but let me know if you'd like to give it a try. I'd be happy to post your solutions!