# Tag Info

2

Actually we are also facing the same problem, instead of (Z,P,k), even if you use (A,B,C,D), as soon as sos will come in syntax with g, your magnitude response will scaled by the attenuation factor. If you are concerned only with plotting magnitude response you can plot as freqz(sos) you will get exact magnitude response without scaling.

0

Cuts can simply be derived from boosts like so: p2 = 1 / p1 This is intuitive as this is how you would invert a bandshelf. However, I'm not sure it leads to an elegant equation as inverting the sum of filters and recovering a rational filter expression might be messy, so there's potential a better way.

-1

I can't run your code since one function is missing. In general, parallel EQs are a not a great idea. Since you add the responses, the exact phase responses of either boost or cut need to be carefully controlled, otherwise you see cancellation (as you probably do here). It's much easier to parametric EQs in series instead. If the gain is 0, there is no ...

0

The simplest solution is probably window design method FIR filter. Even though literature mostly only tells about designing lowpass filter, window design method is actually capable of creating any arbitrary frequency response FIR filter. Here is a reference Arbitray Frequency Response.

0

I might consider doing a complex modulation of the frequency you want to notch down (or up) to 0 Hz. Then run your favorite deep DC blocker (plus phase adjustment if needed). Then complex remodulate the result back to the original unshifted spectrum. DC block: For non real-time, just subtract the entire signal’s average. Or a long (weighted?) moving ...

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, ...

1

If you need to discriminate between 60 and 65 Hz signals, the fact that you're sampling at 25 kHz means that you're basically doing real time signal processing: the Nyquist Frequency is far above the frequencies of interest. Thus, from classical Fourier theory, you're going to need on the order of 1.0/5 Hz = 0.2 seconds of data, no matter how you process it....

1

Beware of the differences between Matlab's firpm and Scipy.signal's remez. For example, these two statements are equivalent: % Matlab firpm(10,[.2 .8],[1 1],'Hilbert') # Python from scipy.signal import remez remez(11, [0.1, 0.4], [1], type='hilbert')

0

In Matlab when designing standard IIR frequency selective filters (Chebyshev, Butterworth, Cauer), the resulting filter order of band pass and band stop filters is always twice the specified order (i.e., $2n$ instead of $n$), because they are obtained by transforming low pass filters of order $n$. The reason why your maximum gain is not unity has to do ...

1

The help file for the cheby2 function states that If Wn is a two-element vector, Wn = [W1 W2], CHEBY2 returns an order 2N bandpass filter with passband W1 < W < W2. Since you design a bandpass filter, your order will be $2N$ instead of $N$, and the reason for this could possibly be using two filters; like a high-low combination to create your ...

0

The Python function scipy.signal.filtfilt increases the order of the filter by a factor of 2 because you are doing forward-backward filtering. Traditional filtering techniques employ forward filtering, which generates a phase. To negate the phase, backward filtering is applied to the output of the forward filter. For example, if your original filter (...

1

The sharper the filter is in the frequency domain, the longer the impulse response will be. This typically leads to "time blur" or "ringing" in the time domain. In addition, a zero phase filter is non-causal, so you get "pre-ringing" and any sharp onsets or transients in the time domain get degraded. The long impulse response also leads to a long "...

1

The filter order equals the number of taps minus $1$. The filter order is the order of the polynomial corresponding to the filter's transfer function. E.g., $$H(z)=h[0]+h[1]z^{-1}+h[2]z^{-2}\tag{1}$$ has $3$ coefficients (taps) but it is a second order polynomial (in $z^{-1}$), so the filter order equals $2$ (i.e., it has $2$ zeros and $2$ poles). For ...

0

npt is the number of frequency points that are used to define the desired frequency response. It's the length of the inverse FFT that is applied to the frequency domain data. It defaults to $512$ points, but if you want to design very long filters (with many taps) then you should choose a larger number. lap defines the width of the transition band, if there ...

Top 50 recent answers are included