4
$\begingroup$

It would be greatly appreciated if the usage of the python package scipy's filter (e.g. butter) analog=True argument could be explained. I don't understand what is meant by this (any signal being processed by scipy in python on a computer is discrete and will always be digital?). I an pretty familiar with DSP but have little knowledge of analog signals.

This seems like a simple question, but I have scoured the docs and online forums and not found anything addressing this directly, apologies if I have missed something!

$\endgroup$

1 Answer 1

8
$\begingroup$

The function butter() doesn't do any signal processing. It is a routine to design a filter, either digital or analog. I.e., it computes the filter coefficients.

I use Matlab/Octave where you have basically the same function. The command

[b,a] = butter(2,1,'s');

designs an analog ('s') second-order filter with angular cut-off frequency $\omega_c=1$. The coefficients are b = 1 and a = [1,sqrt(2),1], i.e., the transfer function is

$$H(s)=\frac{1}{s^2+\sqrt{2}s+1}$$

$\endgroup$
2
  • 1
    $\begingroup$ And the butter function with the time domain set to some number of seconds, or possibly 'd', will design one in the sampled-time ($z$) domain. $\endgroup$
    – TimWescott
    Mar 9 at 20:47
  • $\begingroup$ This answer does not actually answer the question. It just explains what butter does and how to use it. What about the difference between analog and digital filters in python? $\endgroup$
    – Buzz
    Oct 17 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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