14 votes
Accepted

Which order to perform downsampling and filtering?

You need to filter first and then downsample. Otherwise, you will run into aliasing problems. I.e. frequencies that are above 30 Hz will create images within your frequencies of interest. You can ...
Maximilian Matthé's user avatar
9 votes
Accepted

Is there an adjective describing a filter with kernel that has zero mean?

"Zero-Mean" is the word that's commonly used to describe signals and signals with a zero average. "This is a zero-mean filter." If you really mean a filter that is specifically ...
Marcus Müller's user avatar
8 votes

Frequency Domain Filtering

This is just "faking" the magnitude response of an IIR filter. The output's magnitude spectrum looks just like it has been filtered by the IIR filter with the given frequency response. Although it may ...
msm's user avatar
  • 4,285
8 votes
Accepted

SOS-matrices' order does not correspond to given parameter when designing bandpass with scipy.signal.butter

Your expectations are reasonable. However, the definition of order in the design routine is confusing. It's the same in Matlab/Octave. For lowpass or highpass ...
Matt L.'s user avatar
  • 90k
7 votes

Filter odd or even harmonics with notch or inverse notch filter

What you are looking for are what we, in the audio space, call comb filters. Comb filters may or may not have a feedback path, just like FIR and IIR filters. In fact, there is a generalized theory ...
robert bristow-johnson's user avatar
6 votes
Accepted

Frequency Domain Filtering

This sort of filtering is done all the time, but it doesn't have the effect you think it should. Suppose you have an IIR filter with an impulse response of $h[n]$ which is represented in the $z$ ...
Peter K.'s user avatar
  • 25.7k
6 votes

FIR filter Gain of 0dB at Passband Frequency

FIR coefficients are $h[n]$, the same as the impulse response. there are $N$ non-zero taps. $$ h[n] = 0 \qquad \text{for } n<0, n \ge N $$ frequency response is $$\begin{align} H(e^{j \omega}) &...
robert bristow-johnson's user avatar
6 votes

Numerically Stable IIR filter

First of all, what is the order of your IIR filter? The highest order I have ever used was an order-10 IIR filter for a control loop application. I feel like it is unlikely that you need more that ...
Ben's user avatar
  • 3,777
6 votes

Why must the order of a Band-Pass and Notch filter always be even?

In principle there is no reason why the filter order of a general bandpass or bandstop filter must be even. Such a restriction is a consequence of a specific design procedure. In classic IIR filter ...
Matt L.'s user avatar
  • 90k
6 votes

Filter odd or even harmonics with notch or inverse notch filter

If the OP is actually interested in selecting only one individual frequency from the even or odd harmonics, then a moving average filter (MAF) would be ideal since this can provide a null at every ...
Dan Boschen's user avatar
  • 51.3k
5 votes
Accepted

Problems with implementation of a band-stop filter on an MCU (dsPIC) using fixed-point arithmetic

The denominator (recursive coefficients Ai) look OK: the poles of your system are at 45 degree angles ($\pi/4$), with magnitude 0.68 (which is not very aggressive for a notch filter; in my opinion ...
Juancho's user avatar
  • 5,016
5 votes
Accepted

Bandpass filters with python for low frequencies

I would bet this is just numerical error in the transfer function. Try using butter_sos = butter(..., output='sos') instead of ...
endolith's user avatar
  • 15.8k
5 votes
Accepted

Design narrow bandpass filter for signal with high sampling rate

So, first, to put things into perspective: 4kHz is not a high sampling rate these days (add 5 orders of magnitudes, and things become hard). Your 15 kHz passband doesn't say anything about the ...
Marcus Müller's user avatar
5 votes
Accepted

How to filter out everything but a single frequency in the time domain?

Depending on the exact characteristics of the signal and implementation requirements (if any) I can think of a number of approaches to extract content at a "single" frequency. The most common: Apply ...
user883521's user avatar
5 votes

Matlab `filtfilt` provides excessive transient

It must have to do with the initial conditions used by the function filtfilt.m. The idea is to match initial conditions in a way such that startup and end ...
Matt L.'s user avatar
  • 90k
5 votes
Accepted

Derivation of the lowpass to bandpass transformation

You're right that the multiplication of a low pass and a high pass filter results in a band pass filter, as long as the cut-off frequency of the low pass is higher than the cut-off frequency of the ...
Matt L.'s user avatar
  • 90k
5 votes
Accepted

Passband filter with 0.3 to 0.9 Hz passband on signal filtered at 100 Hz

The steeper something is in the frequency domain the more spread out it will be in the time domain. roughly speaking if you want a transition band of 0.1Hz width with a sample rate of 100Hz you'll ...
Hilmar's user avatar
  • 44.7k
5 votes
Accepted

Confusion on when a filter is considered band-pass

I'd expect the plot of the Amplitude Response to cross -3dB twice When you're designing filters, you're more concerned with the relative response than with absolute -- so if the peak gain of a filter ...
TimWescott's user avatar
  • 12.7k
4 votes
Accepted

Bandpass filter to get EEG frequency bands?

As the frequency bands are simple frequency ranges, I wonder if I can use several bandpass filters to get them (instead of using WPT / FFT)? Sure! That's how it's usually done! Is there any ...
Marcus Müller's user avatar
4 votes

Which order to perform downsampling and filtering?

Since I can't comment on this particular site I'd say this, consider the following before you do what you're trying to do. Due to the Nyquist law you want your sampling frequency to be that of the ...
eco's user avatar
  • 141
4 votes
Accepted

Does a linear phase FIR filter shifted in frequency preserve linear phase?

The generalized linear phase FIR filter has the following frequency response: $$H(\omega) = A(\omega)~e^{j (\alpha \omega + \beta)}$$ for some constant $\alpha$ and $\beta$ and $A(\omega)$ being real....
Fat32's user avatar
  • 28.2k
4 votes
Accepted

Passband vs Baseband Bandwidth

You can unify the definitions for baseband and passband bandwidths by saying that bandwidth is only measured at positive frequencies. So for low pass signals, the lower frequency is zero and the upper ...
Matt L.'s user avatar
  • 90k
4 votes
Accepted

Quadrature component - condition on equivalent lowpass signal

Your idea with the Hilbert transform doesn't work. The only signal (apart from $x(t)=0$) for which the Hilbert transform is zero, is a constant signal. A band pass signal $x(t)$ can be written in ...
Matt L.'s user avatar
  • 90k
4 votes
Accepted

Low pass equivalent of bandpass white noise

Note that for the complex noise envelope $z(t)=x(t)+jy(t)$, the autocorrelation $R_z(\tau)$ is defined by (cf. Eq. $(4.1.47)$ in Proakis) $$R_z(\tau)=\frac12E\big\{z^*(t)z(t+\tau))\big\}=\frac12\big[...
Matt L.'s user avatar
  • 90k
4 votes
Accepted

IIR filter relationship between number of poles, order and second order sections

The filter order equals the number of poles, that's a fact. How people call and use parameters in software is a totally different question. Many routines that design standard IIR filters use frequency ...
Matt L.'s user avatar
  • 90k
4 votes
Accepted

What is the relationship among digital filter cutoff frequency, signal frequency and filter settling time?

With "Settling Time" we can consider the overall time delay of the filter, and the rise/fall time of a transient change going through the filter. The rise/fall time will inversely related to ...
Dan Boschen's user avatar
  • 51.3k
4 votes
Accepted

Bandpass Stationary Stochastic Process

I've been a bit hesitant about adding another answer to the existing ones, but since no answer has been accepted yet, and since from Dan's own answer it seems to me that there might still be a few ...
Matt L.'s user avatar
  • 90k
4 votes
Accepted

Given two low-pass digital IIR filters, find bandpass coefficients

It's true that only impulse responses of linear phase (FIR) filters can be added or subtracted (if the delays are aligned) such that the resulting filter's magnitude response equals the sum or ...
Matt L.'s user avatar
  • 90k
3 votes
Accepted

Bandpass general equation to difference equation

The transfer function of a continuous-time second-order band-pass filter is given by $$H(s)=\frac{\frac{\omega_0}{Q}s}{s^2+\frac{\omega_0}{Q}s+\omega_0^2}\tag{1}$$ where $\omega_0$ is the center ...
Matt L.'s user avatar
  • 90k
3 votes
Accepted

How can I construct a Band-pass filter from a low and a high-pass filter?

Yes you are correct. You apply them if series in they are linear. One simple band-pass filter you could use is called the difference of Gaussian (DoG) The procedure is: Create a Gaussian filter ...
geometrikal's user avatar
  • 3,616

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