I am trying to better understand the first-order low pass filter:
Summary:
Per wikipedia, a first order low pass filter yields the following in discrete time:
$$
\frac{Y(s)}{U(s)}= \frac{\omega_{c}}{s+\omega_{c}}
$$
yields
$$
y[k] = \left(\frac{\omega_c T_{s}}{1+\omega_{c} T_{s}}
\right) u[k]+\left(\frac{1}{1+\omega_c T_{s}}\right) y[k-1]
$$
or
$$
y[k] =\alpha \, u[k] \ + \ (1 - \alpha)y[k-1]
$$
where
$ \begin{array}{cclc} \omega_{c} &:& \text{Cutoff angular frequency of filter} & [\frac{rad}{s}] \\ T_{s} &:& \text{Sampling period} & [s] \\ \end{array} $
Question 1:
Even though this filter is in discrete time, does it still model an analog ($s$-plane) filter?
- If I wanted to use a discrete computing system to filter in real-time,
would I need to use the digital ($z$-plane) equivalent? - If so, what is the general process for performing this?
My best guess is:- Determine digital cutoff frequency $\omega_d$.
- Convert to analog cutoff frequency $\omega_a = \frac{2}{T} \cdot \mathrm{tan}(\omega_d \cdot \frac{T}{2})$.
- Determine transfer function for (first-order low-pass) analog filter
using analog cutoff frequency $\omega_a$. - Transform to transfer function for digital filter
using bilinear transform $z = \frac{2}{T} \cdot \frac{z-1}{z+1}$
Relation to exponential smoothing:
On the same page, exponential smoothing is referenced.
The exponential smoothing page describes an exponential weighted average as:
$$
y[k] =\alpha u[k]+\left(1 - \alpha\right)y[k-1]\quad\text{where}\quad\alpha = 1 - e^{-\omega_{c} \cdot T_{s}}$$
Question 2:
How is it possible to relate the first-order low-pass filter alpha
with the exponential smoothing alpha?