Filters ======= In the signal processing jargon a filter is system that takes an input signal and produces an output signal. In this chapter we restrict ourselves to LTI filters [#filter]_. In this section we first look at filters for discrete time signals: the **digital filters**. This in contrast to **analog filters** that work on continuous time signals. Most filters nowadays are implemented digitally and work on discrete time signals with a notable exception of filters for audio signals and very high frequency radio signals. .. todo:: Rewrite of Filters chapter. Start with the basic types of filters. Also include the block diagram description (bi-quad) .. toctree:: :hidden: digital_filters analog_filters exercises .. In the course of 2016-2017 we have discussed: - The Laplace Transform as a generalization of the Fourier domain. The Laplace transform takes a signal $x(t)$ and represents it as function $X(s)$ in the complex $s$-domain where $X(j\omega)$ is the Fourier transform of $x(t)$. - The characterization of analog filters is most often done in the $s$-domain. In this chapter we will look at several filter prototypes characterized in the $s$-domain. - Starting from a prototype for a low-pass filter we can transform the filter to act as a high-pass filter, or as a band-pass or a band-reject (notch) filter. Other types of filters are the shelf-filters. - Then we take an analog filter and transform it to a digital filter. This is done by mapping the $s$-domain onto the $z$-domain where the imaginary axis in the $s$-plane (where the Fourier transform is) onto the unit circle in the $z$-domain (where the DT Fourier transform is). - Furthermore we show examples throughout this chapter where we will use the Scipy Signal processing package. We also show the principle of using a digital filter on a long stream of data in which the data is to be processed in chunks (say 1024 samples) at a time. A lot of the above is available now in a :download:`IPython notebook`. This chapter will be written in these Sphinx lecture notes in due time. .. toctree:: filters_zdomain .. idealfilters transformingfilters analogfilters dicretizingfilters discreteIIRfilters .. rubric:: Footnotes .. [#filter] The notion of a filter is not uniquely defined in mathematics. Some applied branches of mathematics define a filter as an idempotent transformation on data. Idempotency is the mathematical notion that expresses that a filter after being applied once does not change the input anymore upon subsequent use. Think of a coffee filter for instance.