# Tag Info

14

Consider a discrete-time input signal of the form: $$x[n] = \cos(\omega_0 n)$$ 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 operations of addition and subtraction of their input samples and ...

10

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

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

7

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

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.

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

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

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

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

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

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

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

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

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

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

You are almost right: digital filters do deal with samples, but a sample can be any numerical representation of a given signal value at a given instant (so in general, they may accept zeros or ones). Moreover, a sample is usually represented by a binary word (e.g. 0001), so a digital filter actually deals with 0s and 1s.

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

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

4

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)... 4 I don't have a concrete proof for this one. However, I can tell you this... Consider a perfect low pass filter. The time domain representation is a sinc. And for any system to have a sharp transition band, a base signal has to be multiplied with a rectangular waveform in the frequency domain. Which implies that, the time domain signal of the same has to be ... 4 Try digitizing a 17GHz signal.. You will quickly find it difficult to procure a fast enough adc that does not cost a fortune and you will also need memory bandwidth of tens of Gb/s (depending on adc bit count) not to mention the processing power to process such amount of data in realtime. Analog circuits do not suffer from data storage problems and realtime ... 4 Example. For a channel that can be modeled by LTI system, we send an impulse-like signal and receive channel impulse reponse$h(\tau)$where$\tau$is delay. Frequency-flat channel means$h(\tau) \sim \delta(0)$or for discrete-time version,$h[n] \sim \delta_0$. Frequency-selective channel means$h(\tau) \neq \delta(0)$or for$\tau > 0,h(\tau) \neq 0$.... 4 if this is a first-order HPF DC blocking filter, this is the recommendation i have for it in fixed-point, and i think it would be a good idea in floating point, too. while (n<something) { y[n] = x[n] - w[n]*( 2^(1-N) ); w[n+1] = w[n] + y[n]*( (2^(N-1))*(1-p) ); n = n+1; } where p is the pole (in the z-plane and inside the unit circle) ... 4 The problem is the definition of the initial condition of the function filter(). Note that according to the mathworks reference page, filter is implemented using a direct-form II transposed structure. If you look at the corresponding diagram, you see that the filter states (called$w_k(m)\$ in the figure) are defined after multiplication with the respective ...

4

More taps. You don't have anywhere near enough taps for a filter that steep. Start large with 8192 or so cut to desired accuracy, if needed Due to the low number of tabs you are seeing the effect of "circular" hilbert transform. See for example: http://andrewduncan.net/air/ How do you know you have zeros outside the unit circle? Calculating the roots of a ...

4

in my opinion your question seems based on a combination of thoughtful reflection and possibly, pre Alzheimer’s cognitive biases. ;) There was an article in the WSJ not too long ago , I’m outside the paywall so I can’t provide a link, that looked at IBM’s efforts using Watson at major Cancer research centers. The conclusion was that Watson wasn’t ...

3

Your question is sensible. Assuming you're talking about tapped-delay line FIR filters, studying complex-valued FIR filters will teach you a lot about both real- and complex-valued FIR filters. Stating Matt L.'s correct Eq. (2) in words, the freq response of a complex-valued FIR filter is not conjugate-symmetric. This means the filter's magnitude response ...

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