In terms of continuous-time response, this difference equation does infact describe a comb filter with peaks at multiples of the sampling rate, but in terms of a sampled signal, all these peaks alias on top of each other and when we look at the response in the interval [0,fs/2] only (anything higher up is supposed to be filtered out by an anti-imaging filter during analog reconstruction), we have effectively a low-pass filter.Can one predict the frequency response of filters from difference equations?
I haven't quite understood how one could tell that y(n)=x(n)+x(n-1) is a low-pass filter, because it looks like a comb filter and it has no concept of frequency.
This is the nature of every digital filter: in essense the response is always periodic as you go round and round across the unit circle of the z-transform (ie. the discrete time Fourier transform).
Now, the question of "can one predict the frequency response" is basically a question of can one evaluate the z-transform. https://en.wikipedia.org/wiki/State-spa ... r_function gives a general method for doing this for arbitrary topologies in a systematic way: write in state-space form then compute C(zI-A)^-1B+D). The Wikipedia page works with Laplace transforms in continuous time, but it works exactly the same with digital state-space representations just substituting z for s.
Can you predict the response just by looking at the time-domain equations? Perhaps with some intuition you can guess it approximately, but strictly speaking frequencies don't exist in time-domain, they exist in frequency domain so you got to transform. Yet since we can work out the Laplace/z-transforms for arbitrary systems of difference equations with ease (well, at least with the help of a compute algebra system... but Maxima at least is free and does the job just fine), we can parameterize those systems, design the desired transfer function in frequency domain and then solve the coefficients back into the time-domain system. Provided the time-domain system is general enough to realize the desired response, this is mostly just an exercise in linear algebra.
Statistics: Posted by mystran — Sun Feb 04, 2024 1:46 pm