8

The two solutions in a floating point implementation are assumed to be identical, with the two BiQuads being a factored version of the standard difference equation. The BiQuad is the better way to go for fixed point as you isolate two 2nd order systems and in doing so will be easier to keep stable under variations due to the quantization involved. For more ...


8

One cause is that higher order Butterworth filters have poles closer to the unit circle. This nearby infinite gain point increases the likelihood of numerical instabilities. (e.g. rounding/arithmetic/quantization noise may move a pole to the “wrong” side of the unit circle.) Where the numerical noise will blow up depends on your executable code’s exact ...


8

Yes, Butterworth are IIR. The decay from an impulse technically lasts forever. Yes, all [implementable] IIR are causal. Yes, because of #1 and #2. Don't use signal.filtfilt. Use signal.lfilter. filtfilt does the same thing as lfilter, except twice, in opposite directions, which changes a causal filter into a zero-phase filter. However, as the ...


8

I'm convinced that depending on the problem we're trying to solve, we can and should use both approaches: the transformation of classic analog filter designs, and the direct design in the digital domain using optimization methods. Note that the properties of the classic designs are very restricted: piecewise constant desired magnitude responses, minimum-...


6

Throughout the answer I will use the mathematical notations, that is, the mathematica equivalent of expressing the magnitude response of a filter in frequency domain. For this, $x$ will be used instead of $j\omega$, to better reflect @Olli's question about finding a mathematical parametric curve to approximate filters. Since this is not filter design, the ...


6

and simulation where "copying the analog" would result in the better solution. That' missing the point a bit. It's not that one cares much about matching or copying the "analog" but that digital IIR filters have some very nice and useful properties. For example in audio, IIR filter are very common place and I use Butterworths on a daily ...


5

How to Massively Reduce the Resource Requirements in FIR Filter Approach The two answers provided by Matt and Hilmar are both excellent and provide great insight in answering the question. I am favoring Hilmar's answer as correct given that it both touches on and demonstrates the salient points quite well, although I am not yet convinced in the efficiency ...


4

The answer to your question can mainly be found in the Matlab documentation. The butter function can design filters either in the analog domain as well as in the discrete domain. In order to make an analog filter, you can do so by giving the string 's' as a third parameters. The transfer function can be defined by the zeros/poles/gain or by numerator/...


4

You need to specify your filter design specifications parameters consistently for either an analog or a digital filter. With your posted code, the butterord computes the required order for a digital filter with cutoff frequencies near 1 (which would make sense as Nyquist-normalized cutoff frequencies, but not so much in Hz), then uses those directly to ...


4

The poles of low pass and high pass Butterworth filters are indeed the same if both filters have the same cut-off frequency. The difference between the two lies in the numerator. A low pass filter has a constant in the numerator, whereas a high pass filter has a constant times $s^N$, where $N$ is the filter order. The poles of a normalized Butterworth low ...


4

Limited numerical precision. The higher the sample rate, the closer the poles move to the unit circle, the closer to the unit circle, the less stable the filter is. There are different implementation methods that are better than others: design as poles, and zeros and not as transfer function, use cascaded second order sections, use correct section ordering, ...


4

Seeing that the paper cites the author of the paper as inventor of the "SuperSmoother" filter, and this filter was (supposedly) good for this specific use case, there's no indication this filter is based on anything but the author's inventive force (his fantasy). He does mention it's a "converted analog filter made from capacitors and ...


3

If you want to increase the "selectivity" of your filter, I recommend to use a Papoulis-Legendre filter instead of Butterworth. It is the behaviour which present the sharpest slope at cut-off.


3

Increasing the number of degrees of freedom with the order allows more flexibility in the overall design, to fulfill as much a possible wished properties: ripples in the pass-, stop-band, accomodate the need for fixed-length coefficients. The most notable is perhaps the sharpness of the transition between preserved and attenuated frequencies. It is useful ...


3

When a filter is used, we usually design a specific sort of filter: low pass, high pass, or bandpass. That design assumes an ideal filter that has unity gain in the passband and zero gain in the stop band. Low order filters to not approximate that "brickwall" very well. Higher order filters do better. See this page, which has this diagram showing the ...


3

The effect you observed is mainly due to spectral leakage. It is a property of the DFT and it is only indirectly related to the Butterworth filter. Note that there are an integer number of periods of both sinusoidal components of y inside the DFT window. That's why you see two nice peaks in the frequency domain without any leakage. If you truncate y only by ...


3

The filter structure is a digital leapfrog and the structure looks like this picture (note: the picture is a different order than the code): These filters are discussed at some length on wikipedia and wikibooks.


3

I think your question comes from several misunderstandings. The fact that the phase lag of a system becomes more negative for large frequencies does not mean that there's more distortion of larger frequencies. Neither does it mean that high frequency signal components experience more delay when passing through the filter. Imagine an ideal system that simply ...


3

Using MATLAB/Octave as the tool, the following approach lets you plot the magnitude & phase samples of the DTFT of the cascade of the two discrete-time LTI filters using their LCCDE coefficient vectors $b[k]$, and $a[k]$, assuming they have LCCDE representations.. Since the cascade LTI system is described as: $$h[n] = h_1[n] \star h_2[n]$$ and ...


3

I found a way to fix the issue by changing the calculations, so it seems like I had the wrong Nyquist frequency and therefore the wrong cutoff frequency. I hadn't realised that the Nyquist frequency in this case didn't need to apply to the highest frequency present in the sound, but rather to the sampling frequency used to generate the sound (it sounds silly ...


3

The denominator of the transfer function of an analog Butterworth filter is a (non-normalized) Butterworth polynomial. Also the numerator is just a constant (i.e. the coefficients of higher order are 0). You are designing a discrete filter here, so this does no longer apply. Your numerator has three non-zero coefficients, and the denominator is not a ...


3

You've mentioned Butterworth filters for doing the wavelet analysis using bior6.8. If you want to perform the Discrete Wavelet Transform using some specific wavelet, then you must use its Perfect Reconstruction Filter Bank. Each wavelet function has its associated set of filter values for decomposition and reconstruction - they are calculated from the Mother ...


3

A plot of the normalized impulse responses, for the n = 2 through 10 Butterworth low pass filters, are given by H.J. Blinchikoff, A.I. Zverev, "Filtering in the Time and Frequency Domains", Wiley-Interscience, John Wiley & Sons, NY, ©1976, p. 113. This is shown below. They do not give the h(t) expressions in the book, at least where I have looked thus ...


3

There's no need to use numerical methods here. The most straightforward way to compute the output is to see that the filter's impulse response is given by $$h(t)=\sum_{k=1}^Nr_ke^{s_kt}u(t)=\sum_{k=1}^Nh_k(t)\tag{1}$$ where $N$ is the filter order, $u(t)$ is the unit step function, and $r_k$ are the coefficients of the partial fraction expansion of $H(s)$: ...


3

The A/D can be placed as a single real A/D before the multipliers, OR as shown in the diagram as two A/Ds one after each multiplier to sample the I and Q channels. In either case, an analog filter is required before any A/D conversion as an anti-alias filter. This can be a bandpass filter or a low-pass filter, depending on which image in the analog domain's ...


3

It has to do with the Bilinear Transform, as Hilmar already stated. The theoretical function is defined for the analog domain, so inherently there will be differences when you convert the response to the digital domain. However, you can still generate the "analog" frequency response and yield the expected result. I took your code and added/modified ...


3

c) My code is wrong That one. You have your difference equations backwards. It should be $$y[n] = x[n] + 2x[n-1] + x[n-2] - a_1y[n-1] - a_2y[n-2]$$ You have your "a" and "b" coefficient swapped. You can probably do it this way, but it feels needlessly complicated. IMO it's easier to Start with the poles of an analog prototype filter. ...


3

My code is wrong Even without assuming that the code's behavior is wrong, for long-term maintainability it has its problems. You'd do much better to structure your code such that you have a data type defined that describes a 2nd-order filter (in C or C++ it would be a struct or class), and a data type that describes a filter's state (in C or C++ it could be ...


2

The problem is not in the filtering process but already at the design stage. Your specifications are very difficult to realize because your desired band is at very low frequencies. With these specs, the butter routine returns an unstable filter (i.e., with two pole pairs outside the unit circle of the complex plane). One thing you could try is reduce the ...


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