7
$\begingroup$

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:
    1. Determine digital cutoff frequency $\omega_d$.
    2. Convert to analog cutoff frequency $\omega_a = \frac{2}{T} \cdot \mathrm{tan}(\omega_d \cdot \frac{T}{2})$.
    3. Determine transfer function for (first-order low-pass) analog filter
      using analog cutoff frequency $\omega_a$.
    4. 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?

$\endgroup$
  • $\begingroup$ appears to me that the two $\alpha$'s are exactly the same. $\endgroup$ – robert bristow-johnson Aug 11 '17 at 17:29
  • $\begingroup$ @robertbristow-johnson Can you demonstrate that $\frac{1}{1+x} = 1 - e^{-x}$? $\endgroup$ – kando Aug 11 '17 at 17:31
  • $\begingroup$ @Fat32 : Can you provide some examples? I was not able to find basic-level descriptions to the former, or anything involving $e$ with respect to exponential smoothing. $\endgroup$ – kando Aug 11 '17 at 17:32
  • $\begingroup$ oh I'm extremely sorry I mean bilinear transform of course... Search with bilinear transform filter design please... $\endgroup$ – Fat32 Aug 11 '17 at 17:53
  • $\begingroup$ @Fat32 : Haha, no worries - I actually noticed that, but feared that you meant what you said ; j (I'm still not having much luck in either case, but have seen some stellar answers that you've made. Nice job, Mr. ~6K!) $\endgroup$ – kando Aug 11 '17 at 17:55
0
$\begingroup$

To answer your first question, yes, you will need to convert the signal into Z-plane. Bi-linear transformation is one way to achieve the desired result. You can even try Impulse Invariant Transform to convert the analog filter to a digital one.

$\endgroup$
0
$\begingroup$

The filter in the digital domain of course has a correspondence in the analog domain. However, the analog domain behavior differs from the analog filter corresponding via bilinear transform due to frequency warping: attenuation goes to $-\infty$ as the signal approaches the Nyquist frequency rather than as the signal approaches infinite frequencies.

$\endgroup$
0
$\begingroup$

In answer to the first question, no you do not necessarily need to convert the signal into the z domain, but that probably is the most common thing to do. One alternative is to compute the discretized frequency response of the filter and multiply the DFT (FFT) of the input signal with it, then take the inverse DFT (FFT). I often do this in my audio plugins for filters that are order higher than two to ensure stability, especially when filter parameters change.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.