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


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

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


2

Converting the analog filter $H_a(s)$ into a digital filter $H_d(z)$ using the bilinear transform where T is the sampling period: $\Large H_d(z) = H_a(s)\bigg|_{s=\frac{2}{T}\frac{z-1}{z+1}}$ Example: Given a first order Butterworth filter $H_a(s) = \frac{1}{1+RCs}$ $H_d(z) = H_a\bigg( \frac{2}{T} \frac{z-1}{z+1} \bigg)$ $H_d(z) = \frac{1}{1+RC\Big(\...


2

As the comments say: it really depends on your signals. If the energy in the "don't care" region is significantly larger than the energy at the frequency of interest, it's helpful to pre-filter it first. Otherwise you may see "spectral leakage" of the high energy components into your target area. On the downside: the pre-filter will affect the group delay ...


2

an $n$th-order Butterworth filter in the $s$-domain has a magnitude function that is two straight lines connected with a soft corner at $\omega_0$ and -3 dB. the straight line at the left is a flat 0 dB but the line on the right (assuming you're looking at log frequency and dB) has a slope of $-20n$ dB/decade drop. That is the same as $-6n$ dB/octave drop, ...


1

If you want to have a "numerical grasp" and you're not afraid of getting a little bit dirty, you can check the numbers with LTspice. I don't know how well you know to work with it, so I'll just explain it, feel free to ignore all the redundant info. Here you can download the archive, out of which you only need Filter.asy and filter.sub. Create a new ...


1

First you need to find (calculate or look up) the transfer function of that circuit. It has the form $$H(s)=\frac{a}{s^2+bs+c}\tag{1}$$ where the constants $a$, $b$, and $c$ depend on the values of the resistors and capacitors. The $3$ dB cut-off frequency $\omega_c$ can be found by solving $$\big|H(j\omega_c)\big|^2=\frac12\big|H(0)\big|^2=\frac12\left(\...


1

The trigonometric functions enter the calculation because of the use the bilinear transform for transforming an analog filter to a discrete-time filter. The bilinear transform warps the frequencies of the analog filter, that's why we have to pre-warp the frequencies of the analog filter in order to obtain the desired cut-off frequencies of the discrete-time ...


1

Limited numerical precision makes your filter unstable. In this case you can fix it by implementing the filter in second order sections using the zeros and the poles of the filter.


1

it looks like you are designing a parallel highpass and lowpass filter. i don't think that's the best way to do it. instead, take your butterworth LPF prototype $$\Big|H(j\Omega)\Big|^2 = \frac{1}{1+\Omega^{2N}}$$ and make this substitution for normalized $\Omega$: $$ j\Omega = s \leftarrow \frac{Q}{\frac{s}{\Omega_0} + \frac{\Omega_0}{s}} $$ $Q$ is ...


1

Congratulations, you've found an error on the wikipedia page on Butterworth filters. The squared magnitude of the frequency response of an $n^{th}$-order Butterworth low pass filter is $$|H(j\omega)|^2=\frac{1}{1+\left(\frac{\omega}{\omega_c}\right)^{2n}}\tag{1}$$ There should be no imaginary unit $j$ in that formula.


1

A high pass filter (ideally) only lets through the higher frequencies. The low frequencies are what determine the local average of the signal. A high pass filter will remove those and set the local average to $0$.


1

The correct answer to this question has been provided by: Stanley Pawlukiewicz but has since been removed. Your filter attenuates the high frequencies of the total timeseries, signal and noise. Your results are expected. You really can’t perfectly remove just the noise. When the noise and signal overlap in time and frequency, you have to ...


1

I think you consider that pulse in the spectrum as the noise. Then you should remove it by a lowpass filter of cutoff frequency $$ f_c = 5 ~\text{kHz.}$$ Slightly less than this should be used for guarding against the transition width of the lowpass filter. So you better select something like $4.8$ kHz for the lowpass filter cutoff frequency. Note that ...


1

What you see as a spike at the beginning of the filter output is the impulse response of the bandpass filter itself. This would happen as a transient effect and it will be more pronounced if the filtered signal is sinusoidal + dc in nature. If it were a pure zero mean noise than the spike would be somewhat obscured. You can either use a group delay shift ...


1

filtfilt() is a technique to achieve zero-phase filtering by applying the same filter twice to the data; with the output of the first stage reversed and filtered again in the second stage. Zero phase filtering is a desired property in image processing. NaN means "not a number" and indicates those indeterminate conditions like $0/0$, $\infty/\infty$, $\infty ...


1

Different methods exist for estimating PSDs. They can be broadly classified as parametric or non-parametric methods. Indeed you should learn which method they used to obtain the associated PSD. An FFT based PSD estimation is a non-parametric method such as Periodogram and its variants. This method will produce random looking non-smooth output result which ...


1

In general, what you are seeing is normal. Butterworth filters are designed in the analog domain where the frequency axis is unlimited. When discretizing the the freqyency axis stops at Nyquist. Both Matlab and Python use the bilinear transform to map analog frequency to the digital frequency. That means that the infinite analog frequency maps to the ...


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