I have a difference equation for a Single Pole Infinite Impulse Response Filter, defined on a discrete time-series:
$y[n]-(1-\alpha)*y[n-1]=\alpha*x_n$
While the []s brackets refer to a position n within the series. I'm looking for a visual way to represent this in order to get how this equation behaves. I have tried wolfram-alpha, MalLab... Is anyone me a pointer how I can make MatLab (e.g.) show me the plot for this function? Use-case is a DC offset filter, that uses this SPIIR filter with $\alpha=0,0004$. So it's mostly DSP related.
Best, Marius
Let's do a quick rewrite into more 'mathematical' notation:
$$y_n = \alpha x_n + (1-\alpha) y_{n-1}$$
By repeated substitution you can see that this is equal to:
$$ \begin{align} y_n & = \alpha \left( x_n + (1-\alpha) x_{n-1} + (1-\alpha)^2 x_{n-2} + \cdots \right) \\ & = \alpha \sum_{k=0}^\infty (1-\alpha)^k x_{n-k} \end{align}$$
So $y$ is an infinite sum of past values of $x$ (which is why it's called an infinite impulse response filter). One way to visualize this is to look at the weights
$$w_k = \alpha(1-\alpha)^k$$
as a function of $k$, which you can achieve in Matlab by
another way is to generate some data
xand calculateyfrom it, and compare the two:Is this what you meant by 'visualize' the equation?