# Tag Info

26

Citing Bellanger's classic Digital Processing of Signals – Theory and Practice, the point is not where your cut-off frequency is, but how much attenuation you need, how much ripple in the signal you want to preserve you can tolerate and, most importantly, how narrow your transition from pass- to stopband (transition width) needs to be. I assume you want a ...

18

Consider a discrete-time input signal of the form: $$x[n] = \cos(\omega_0 n) ~~~,~~~-\infty < n < \infty, ~~~~~ n\in \mathcal{Z}$$ where the radian frequency $\omega_0$ is set between 0 and $\pi$ radians per sample. Now, consider two simplest type of discrete-time (digital) LTI FIR filters which are defined through the fundamental arithmetic ...

17

For digital notch filters, I like to use the following form for a notch filter at DC ( $\omega$=0): $$H(z) = \frac{1+a}{2}\frac{(z-1)}{(z-a)}$$ where $a$ is a real positive number < 1. The closer $a$ is to 1, the tighter the notch (and the more digital precision needed to implement). This is of the form with a zero = 1, and a pole = $a$, where $a$ is ...

14

For a quick and very practical estimate, I like fred harris' rule-of-thumb: $$N_{taps} = \frac{Atten}{22*B_T}$$ where: Atten is the desired attenuation in dB, $B_T$ is the normalized transition band $B_T=\frac{F_{stop}- F_{pass}}{F_s}$, $F_{stop}$ and $F_{pass}$ are the stop band and pass band frequencies in Hz and $F_s$ is the sampling frequency in ...

9

In general you can't simply subtract a low-pass filtered version of a signal from the original one to obtain a high-pass filtered signal. The reason is as follows. What you're actually doing is implement a system with frequency response $$H(\omega)=1-H_{LP}(\omega)\tag{1}$$ where $H_{LP}(\omega)$ is the frequency response of the low-pass filter. Note that $... 8 For a filter consisting of a complex conjugate pair of poles, the$z$-domain transfer function is: $$H(z) = \frac{a}{\left(1-r(\cos{\theta}-i\sin{\theta})z^{-1}\right)\left(1-r(\cos{\theta}+i\sin{\theta})z^{-1}\right)}\\ = \frac{a}{1 - 2r\cos(\theta)z^{-1} + r^2z^{-2}},$$ where$a$is a constant by which the magnitude frequency response can be normalized,$...

8

If I understood you correctly, you want to compute the value of $\alpha$ that results in a specified 3dB cut-off frequency for an exponentially weighted moving average filter. If you square your last equation, you get $$\frac{\alpha^2}{1-2(1-\alpha)\cos(\omega_c)+(1-\alpha)^2}=\frac12\tag{1}$$ which can be rearranged into the following quadratic equation: ...

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

7

Adding to the accepted answer, a few additional references. I won't write the formulas which can be involved. Those formulae mostly yield rule-of-thumbs or approximations to start from. You can fiddle around these numbers for your actual design. One of the origin for Bellanger's design is: On computational complexity in digital filters, 1981, Proc. Eur. ...

7

Short answer: You can't. If an attacker can insert a signal that covers the whole bandwidth (e.g. a white signal, or at least one that has no spectral zeros) into the system (and he can do that over an arbitrarily long time, or add up observations), they will get an output, and can through the magic of correlation get the impulse response.

7

You can apply a so-called all-pass transformation to a discrete-time low-pass prototype filter in order to convert it to other standard filters (such as high-pass, band-pass, and band-stop). This is accomplished by transforming the complex variable $z$ in the transfer function of the prototype filter by a function $G(z)$ which satisfies $|G(e^{j\omega})|=1$, ...

6

Hmmmmmmmmm, interesting question. Since you want to use the second derivative as your criteria, it would seem that you would want to have the maximum second derivative absolutie value for as short of a duration as possible. This would suggest piecing together parabolas, matching the first derivatives at the joints. How to do this algorithmically will take ...

6

A first rationale is to be very short, as there was a time when computing on images was expensive. Then, a contour or an edge often present a fast variation in image intensities, that can be enhanced by derivatives. Sobel filters emulate such derivatives in one direction, and slightly average pixels in the complementary direction, to smooth small variations ...

5

it depends on how you map the analog filter to the digital filter and how the s-plane poles get mapped to the z-plane poles (ya know, the "bilinear transform" vs. "impulse invariant" vs. whatever else is out there). probably, if it were up to me, for the purpose of defining $Q$, i would map the poles as you would map $s$ to $z$ with $$z = e^{sT}$$ ...

5

You have probably used filtering a lot already. A moving average is a filter! Think of general filtering as performing a fancy moving average where instead of averaging every component in a window equally, you weight the components. If you just wanted to smooth the signal you could weight each value used in the average by a Gaussian (bell) curve for ...

5

To the useful answers that have been added so far, I would like to add, on the point of intuition, that filtering works because it is based on Wave theory and specifically, the interaction of waves. This provides a huge array of intuitive examples. But also, that there are basically two viewpoints. One is the abstract viewpoint, taken by modelling reality ...

5

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 they should be more like 0.9). But your numerator has its roots very near $z=1$, which corresponds to frequency 0 instead of the desired $\pi/4$ for implementing ...

5

You'd have to figure out the frequency response of the filter. Here are two methods. I prefer Method 2 because it's quick and dirty, and you don't really care about the exact gain values in the frequency response, just the general shape to figure out the type of the filter. Method 1: Brute Force/Computer Assisted import scipy.signal as sp import numpy as ...

5

In this answer I'll try to show you how to qualitatively evaluate a given pole-zero plot by just looking at it. Of course, this method has its limits, but for relatively simple pole-zero plots you can very quickly decide on the type of the corresponding filter. You should know that for stable filters, the frequency response equals the transfer function $H(z)... 5 The question is rather vague or inaccurate really; or I haven't understood it well. I would start with saying "there is no such a thing as a 'best' filter (for all use)". A filter is optimal only if it exploits a specific property of signal or noise generating better SNR over regular filter -but if you don't know about signal or noise specifically then ... 5 First, you'll probably have better luck posting this on dsp.stackexchange. That's a more specialized group that does stuff like this all the time. In terms of your problem, here's a couple of options. One is a machine learning approach. e.g. create a training set by taking a bunch of data and hand marking the points that are good versus bad (like you've ... 5 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 this. Second, it is a good idea to split your filter in second-order-sections (SOS) and cascade them , this usually fix most issues. https://www.dsprelated.com/... 5 It is the objective of the receiver to make the best estimate for each symbol as to what was transmitted. This is often done by ultimately determining a decision time in each sample (through timing recovery) on the waveform after it has been processed by the receiver (equalization and matched filtering) in which to sample the waveform and make a decision as ... 5 In general there is no straightforward analytical solution. As you know, you need to solve $$\left|H(e^{j\omega_c})\right|=\frac{1}{\sqrt{2}}\tag{1}$$ for$\omega_c$, where it is assumed that the maximum filter gain equals$1$. For Butterworth filters, the specified cut-off frequency always equals the$3\textrm{ dB}$frequency. This is not the case for other ... 5 A discrete-time first-order high pass filter with unity gain at Nyquist and a zero at DC is described by the following difference equation: $$y[n]=\frac{1+\alpha}{2}\big(x[n]-x[n-1]\big)+\alpha y[n-1],\qquad -1<\alpha<1\tag{1}$$ Its transfer function is given by $$H(z)=\frac{1+\alpha}{2}\frac{1-z^{-1}}{1-\alpha z^{-1}}\tag{2}$$ Evaluating the squared ... 5 Yes Virginia, There is a perfect digital filter. I assume the OP means by "perfect filter" what we would typically call an "ideal filter": which is a filter that passes a finite block of frequencies with no alteration and completely removes all other frequencies, which is referred to as a "brick wall filter". Otherwise if the OP ... 4 You calculating FFT only from two samples. You need to pad your impulse response with zeros to get a valid result. So in MATLAB that would be: N = 1024; % Number of points to evaluate at % Create the vector of angular frequencies at one more point. % Filter itself b=[1,-1]; [h_f, w_f] = freqz(b, 1); figure grid on hold on plot(w_f, abs(h_f), 'or') % MATLAB ... 4 As I've mentioned in a comment, the Parks McClellan algorithm is usually used to design frequency selective filters with a fixed maximum stopband error, which results in an equiripple behaviour in the stopband. Note that the algorithm can in principle approximate any desired frequency response shape. However, many implementations just allow for piecewise ... 4 The book doesn't say that the impulse response must be zero for an ideal channel. It says that an ideal channel has exactly one, and not more than one, non-zero component, i.e. the ideal channel's impulse response is an impulse, which means that the signal is only delayed but not distorted. 4 A low pass filter has a frequency response that satisfies $$|H(\omega)|\approx 0,\quad |\omega|>\omega_c\tag{1}$$ where$\omega_c\$ is the cut-off frequency. A complex low pass filter must also satisfy $$H(\omega)\neq H^*(-\omega)\tag{2}$$ which causes its impulse response to be complex-valued. So the frequency response of a complex low pass filter is ...

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