27

When choosing one of these 4 types of linear phase filters there are mainly 3 things to consider: constraints on the zeros of $H(z)$ at $z=1$ and $z=-1$ integer/non-integer group delay phase shift (apart from the linear phase) For type I filters (odd number of taps, even symmetry) there are no constraints on the zeros at $z=1$ and $z=-1$, the phase shift ...


19

FIR filters contain as many poles as they have zeros. but all of the poles are located at the origin, $z=0$. because all of the poles are located inside the unit circle, the FIR filter is ostensibly stable. this is probably not the FIR filter the OP is thinking about, but there is a class of FIR filters called Truncated IIR filters (TIIR) which may have a ...


14

"Can you mathematically show that FIR filters have poles, because I'm not seeing it." – Jim Clay can we assume this FIR is causal? filter order is $N$. number of taps is $N+1$ the Finite Impulse Response: $ \quad h[n] = 0 \quad \forall \quad n>N, \ n<0$ transfer function of the FIR: $$ \begin{align} H(z) & = \sum_{n=-\infty}^{+\infty} h[n] ...


10

If linear phase is a requirement, that will probably steer you toward an FIR implementation. It is possible to build IIR filters that have approximate linear phase, but it is easy to design a linear-phase FIR. If you're concerned about latency, forward-backward filtering as in filtfilt isn't really a good option. In general, it's really meant to be used an ...


10

You are correct. FFT based processing adds inherent latency to your system. However there are ways to tweak this. Let's assume you have an FIR filter of length "N". This can be implement FFT-based using the standard overlap add or overlap save method, where the FFT length would be 2*N. Overall system latency will also be roughly 2*N: you need to accumulate ...


8

FIR filters contain only zeros and no poles. If a filter contains poles, it is IIR. IIR filters are indeed afflicted with stability issues and must be handled with care. EDIT: After some further thought and some scribbling and google-ing, I think that I have an answer to this question of FIR poles that hopefully will be satisfactory to interested parties....


6

If the Z-transform of the feedforward section is divisible by the Z-transform of the feedback section, the filter is FIR. Consider your example: $y[n] = y[n-1] + x[n] - x[n-3]$. The Z-transform is $\mathrm Y(z)- z^{-1}\mathrm Y(z) = \mathrm X(z) - z^{-3}\mathrm X(z)$, and the Z-transform of the response is $\mathrm H(z) = \mathrm Y(z)/\mathrm X(z) = (1 - z^...


5

Since there already are two very nice answers, I will give some very basic examples from which the properties given in the other answers can be sanity checked against. Zero locations and phase responses are directly available. symmetrical, M=odd $H(z) = 1\pm2z^{-1}+z^{-2} = (1\pm z^{-1})^2 \\ H(e^{j\omega}) = (1\pm e^{-j\omega})^2 = (e^{-j\omega/2}(e^{j\...


5

The "spikes" (they are quite small in magnitude, but large compared to the nearby filter taps) at the beginning and end are part of how the equiripple property is achieved. In his book "Multirate Signal Processing for Communication Systems" (a book that I recommend quite highly), fredric harris indicates that it is sometimes advantageous to eliminate the ...


5

A convenient version can be found in Python's scipy.signal.remez. Nice if using numpy/scipy.


5

The filters with anti-symmetrical impulse response all have a zero at $z=1$ (i.e. frequency 0). So if you need to implement a high-pass filter or derivative-like filter (or even band-pass), then you must go for types 3 and 4. Similarly, if your filter is a low-pass type, then types 1 and 2 apply. So, this depends on the type of filter you need to design, ...


5

If a filter is FIR then the impulse response is finite and goes to zero and stays there. This is like the second filter in your post. If it is IIR the impule response extends towards infinity like the first image in your post


5

To be precise the group delay of a linear phase FIR filter is $(N-1)/2$ samples, where $N$ is the filter length (i.e. the number of taps). The group delay is constant for all frequencies, because the filter has a linear phase, i.e. its impulse response is symmetrical (or asymmetric). A linear phase means that all frequency components of the input signal ...


5

Complex channel coefficient is just a way to represent the independent real coefficients. You just need to generate h = [h_0, h_1, h_2] = [hR_0, hR_1, hR_2] + 1i * [hI_0, hI_1, hI_2]. The independence/correlation between coefficients depend on your model. And if I were not wrong, the number of element of h is the order of your MA model. The idea behind ...


4

There is no direct way of converting filter coefficients between two sample rates while maintaining the exact transfer function (at least where it's properly defined). Re-sampling the impulse response can be done but will often result in extra latency, a longer filter, and some change in the frequency response. In this case, however, you can derive the ...


4

Actually it seems MATLAB implementation of the filter() function is pretty straight forward and not fast. For a fast implementation, have a look at FilterM by Jan Simon. Update In the latest releases of MATLAB (From R2016b and above) the performance of the filter() function has improved. The metdhos to accelerate those operations are usually based on: ...


4

You have to clearly define what you mean by an "analog FIR filter". "No poles" is not correct because (discrete-time) FIR filters do have poles; they are just all at the origin of the $z$-plane (for causal FIR filters). Note that filters without poles do not exist. Take as an example the discrete-time transfer function $$H(z)=1-az^{-1}\tag{1}$$ with a zero ...


4

my experience in audio is that for IIR filters, there is usually a cascaded Second-order Section (SOS) for every little feature (a bump or an edge in the frequency response deliberately placed there by the user). often just a single second-order IIR is used for many little jobs where some frequency is given a little boost or cut. we call those IIR filters ...


3

As you've indicated there may be some mismatching in the filter bands resulting in undesirable results. If one of the filters is heavily attenuating the frequencies of the other filter, there's little you can do to reconcile this by just cascading the filters together. Given you'd like to maintain the response of both filters independent of the other, you ...


3

In mathematical terms, time discrete systems are are most often expressed in terms of difference equations. A delay is simply $y[n]=x[n-1]$ so the difference equation for your FIR filter would be $$y[n]=\sum_{i=0}^{M}b_{i}\cdot x[n-i]$$. See https://ccrma.stanford.edu/~jos/filters/ for a good primer


3

A (two-dimensional) finite-impulse-response filter has an impulse response $g(x,y)$ that is nonzero only for $(x,y)$ in a region of finite area (continuous parameters) of for a finite number of values of $x$ and $y$ (discrete parameter). For example, $g(x,y)$ might be nonzero only for points inside a circle of radius $r$. Specifically, consider $$g(x,y) = ...


3

First, two cascaded 24th-order (25-tap) filter will yield a 48th-order filter which is not identical to a 49th-order (50 tap). However, as I assume that this isn't really the answer you are looking for, but rather the difference between multi-stage and single stage. Assuming infinite precision arithmetic they are the same. In practice, multi-stage filters ...


3

Because every signal can be decomposed into a linear series of scaled impulses that are shifted in time. Thus applying a linear time-invariant system on each impulse in the series and then summing the results again will give the same result as applying it on the whole signal. Therefore, one only needs to know how the system responds to an impulse to be able ...


3

This is more like an extended comment to chart the possible answers. Hilbert transform is a frequency domain 90-degree phase shift of the signal. It has an antisymmetrical impulse response around time = 0. You specify that the approximation shall be causal (EDIT: this requirement has since been removed), so I think you need to reference the phase shift to ...


3

You're right: the required filter order is approximately inversely proportional to the desired transition bandwidth $\Delta\omega$, regardless of the cut-off frequency. This is reflected in the empirical formulas for estimating the required filter orders for the Kaiser window design method as well as for the Parks McClellan equiripple design of low pass ...


3

In order to accomplish a particular specified filtering task, the FIR filter order will almost certainly be much higher than the IIR filter order. For instance a low-pass filter that requires a particular "sharpness" in cutoff, the transition region between the passband (at low frequencies) and the stopband (at high frequencies). What a 4th-order IIR ...


3

Rather than spending an efford on the link-exploration, I would instead state here the simplest and the most basic description of the impulse response and step response of causal LTI systems within the particularity of a continuous time leaky integrator. I assume that you know about linear time invariant (LTI) systems and basic differential equations. A (...


3

General We assume 2 modes of filters: LPF or HPF. Classifying Filter Type Usually, if it is a well planned LPF and well Planned HPF a simple test will do. Calculate the sum of all coefficients. The sum of the coefficients is the first element of the DFT of the signal. It means it is the DC gain and well behaved LPF has gain of 1 and well behaved HPF have ...


2

Here is another source for the Parks McClellan algorithm in C. This code is different from the SciPy code mentioned above in that it has 61 of the original 69 goto statements removed (the SciPy code still has about 37 goto's). It also fixes the code in 3 places where divide by zero can occur and it has some additional code that range checks the band edge ...


2

Real filters for real-time applications approximate the ideal filter by truncating and windowing the infinite impulse response to make a finite impulse response; applying that filter requires delaying the signal for a moderate period of time, allowing the computation to "see" a little bit into the future. This delay is manifested as phase shift. You can ...


Only top voted, non community-wiki answers of a minimum length are eligible