New answers tagged

1

The value of $2\pi$ radians corresponds to the sampling frequency. So the normalized frequency in radians is given by $$\omega=\frac{2\pi f}{f_s}\tag{1}$$ where $f$ is the actual frequency in Hertz, and $f_s$ is the sampling frequency in Hertz.


0

The half-band lowpass filter, has the following impulse response : $$ h[n] = \frac{\sin(\frac{\pi}{2} n) }{ \pi n} $$ And for $x[n] = \delta[n]$ , $w[n] = h[n]$. Then the output $y[n]$ will be : $$y[n] = w[n] \big( 1 + (-1)^n \big) $$ which can be simplified by expanding the parenthesis as: $$ \begin{align} y[n] &= \frac{\sin(\frac{\pi}{2} n) }{ \...


0

filter is cascaded with another filter we have to perform convolution so we have to perform convolution between signal with time reversed version of itself so it is nothing but auto-correlation. so phase is zero so we do not need any calculation


0

If you can use a higher precision instrument to measure the signal, then, if the signal maintains it's characteristics, you can build a system's model and use a Kalman filter for the "not so good" input channel.


1

Looks like a simple sign error in the denominator. If you use a = [1 -1.866685 .91058], you get something that looks notch-like at around 380 Hz. The Form is Direct Form II This is numerically the worst. Shouldn't matter here, but it's good practice to either stick with Direct Form I or Transposed Form II.


0

I agree that your filter does not look like a notch at the moment. But the biggest issue is that it's unstable. I recommend you check this thread on how to design an IIR notch filter Analytically designing a notch-filter for specified frequency 50 Hz


0

HINT: See what happens in the frequency domain. Convolution corresponds to multiplication. You just have to figure out the Fourier transform of $h[-n]$, expressed in terms of the Fourier transform of $h[n]$. Multiplying the two functions results in the Fourier transform of the convolution of $h[n]$ with $h[-n]$. The result has a special property which makes ...


0

I've simulated your system, and since it's a four-stage phaser you do get two notches and one peak in between, if you don't count the more or less pronounced peaks at DC and at Nyquist. The frequency response of your system is $$G(e^{j\omega})=\frac{1+(1-f)H^2(e^{j\omega})}{1-fH^2(e^{j\omega})}\tag{1}$$ where $f$ is the feedback value, and $H(e^{j\omega})$...


0

This is a form the recursive averaging filter: say $v_k = \frac{1}{N}\sum_{n=k-N+1}^{k} y_n$ is the average at $k$ over the $N$ passed frames (the notation applies to every pixel). Then: $$v_{k+1} = \frac{1}{N}\sum_{n=k-N}^{k+1} y_n = \frac{1}{N}(y_{k+1}-y_{k-N+1})+v_{k}$$ so you can bufferize the pixel ($y_{k-N+1}$) that leaves the $N$-length frame only. ...


0

Don't fully understand the question; your formula already describes your solution: Take the first frame into your framebuffer For every pixel of the second frame, add it to pixel at the same position in the frame buffer. Repeat 2. for the rest of your frames. Multiply every pixel of the resulting frame by $\frac1N$. Done! (Note: depending on the data ...


1

Note that the cosine has a positive and a negative frequency component. Consequently, in the range $[0,f_s/2]$ you get a component at $-50\textrm{ Hz}+75\textrm{ Hz}=25\textrm{ Hz}$.


2

The way that you currently split the FIR from the IIR part results in an FIR filter that exactly matches the first $N$ samples of the impulse response of the original cascade. Consequently, the parallel IIR filter must have $N$ initial zeros in its impulse response, otherwise it would mess with that first part of the original response which is already taken ...


0

If I follow the OP’s description properly, the description is what would be a comb filter, given the all-pass filters operate as delay lines (over a certain frequency range of operation). The sum of a signal with a delayed copy of the signal would be a "comb" response, that would cyclically go between constructively summing and cancelling since the phase ...


6

The frequency response of a real-valued discrete-time system with linear phase has the form $$H(e^{j\omega})=A(\omega)e^{-j\omega\tau},\qquad\omega\in [-\pi,\pi]\tag{1}$$ where $A(\omega)$ is either a real-valued even function or a purely imaginary odd function, and $\tau$ is some real-valued parameter (the delay). If $A(\omega)$ is purely imaginary, then ...


1

First of all, your filter coefficients are given by b = g * [1, b1, b2] a = [1,a1,a2] And second, I believe that it is the phase delay that you're interested in, not the group delay. The phase delay at frequency $\omega_0>0$ is given by $$\tau_p(\omega_0)=-\frac{\phi(\omega_0)}{\omega_0}\tag{1}$$ where $\phi(\omega)$ is the (unwrapped) phase of the ...


1

Pick two different frequencies slightly above and below your target frequency. The choice depends on what numerical precision you have available and what your sample rate is. Calculate the z-transform at both frequencies Calculate the phase at both points, make sure to check for "phase wrapping" Subtract the phases and divide by the frequency difference ...


0

Am I understanding this correctly, and if so, will that give me what I need? Yes you are understanding everything correctly. If your "need" is a filter that will match the magnitude response then all choices should work. If you are interested in a very quick and move-on solution, then proceed with Frequency Sampling with a very large number of taps and ...


1

To add, the reason it is called the order specifically is because it is the order of the polynomial as given by the transfer function of the filter- which for an FIR filter is just the coefficients with increasing powers of $z^{-1}$: $$H(z) = \sum_{n=0}^{N-1}h_n z^{-n}$$ For example a three "tap" FIR filter with coefficients [0.5 1.5 0.5] is 2nd order with ...


1

As @RBJ commented the first one is a Gaussian filter. The Fourier Transform of a Gaussian is a Gaussian so this one can be easily created by sampling the impulse response given by the inverse Fourier Transform. For case (1), an FIR filter with a magnitude response given by: $$|H(f)| = e^{-cf^2}\tag{1}\label{1}$$ Given the Fourier Transform of a Gaussian: ...


1

The order is classically the maximum delay (in samples) that is used to produce each output (Filter order by JOS). For FIR filters, the length is "one plus order": $$y[n] = x[n]-x[n-1]+x[n-2]$$ would be 3-tap and order 2. If the filter is IIR, it would have "more coefficients" than "one plus order". I am not sure one can say "taps" for IIR filter. This ...


2

You don't. An ideal low pass FIR filter has infinite length so the requirements of "ideal low pass" and "64 taps" are mutually exclusive. You can approximate an ideal filter, but the best way to do this depends on the specific requirement and trade-offs of your application. This being said, Richard's answer is a really good starting point :-)


1

b = fir1(63, 0.25) figure(1) freqz(b,1,256)


0

If you have a closed-form expression for the weighting function, you can use it directly. Here, the weight is linear, so you can replace coef_vec by xand be ok. fun = @(x)x.*exp(-x.^2).*log(x).^2; q = integral(fun,1,10); If not, an option is to define coef_vec on a larger interval, interpolate it with a suitable closed-form interpolating function, and use ...


0

A definite integral is a convolution with idial all '1' filter(by the theory) No. Where does that theory come from ? If you want to approximate a definite integral with a discrete sequence, you can simply sum up the samples in the integration interval and scale the sum by the sampling interval. The output of a convolution of two functions is another ...


1

I can answer for adaptive filter containing feedback path alone as I have implemented it recently (both Blind DFE and with Reference Symbols), but it should work for DFE containing feed-forward path as well. In Blind DFE while computing the error, $e[n] = x[n] - \hat{x}[n]$, where $x[n]$ is the equalizer output, $\hat{x}[n]$ is the corresponding Hard ...


0

You have to define the order based on your application, usually for speech you'll use and order of 10, this definws the order of your all pole filter and it's related with the amount of formants tha you will see in the impulse response of the filter. https://www.dsprelated.com/showthread/speechcoding/965-1.php


0

A Butterworth filter is a filter of the form proposed by Stephen Butterworth, in “On the Theory of Filter Amplifiers”, 1930. The goal is a maximally flat response—the steepest cutoff that maintains a completely flat passband—for a given order. Such filters inherently have poles. Translating to the discrete domain with the bilinear transform yields zeros as ...


2

Example: % Octave packages ------------------------------- pkg load signal GdB = 6.0; % gain in dB gain = 10^(GdB/20); % convert a = 1; b = gain; CB = tf(b, a, 1); figure(1); bode(CB,'b'); grid on; If you need to use biquad type filter then just set those other coefficients to 0. Example: b 0 0 1 0 0 (IIRC, MiniDSP had some other ordering ...?).


4

I will assume that your IIR filter is an order-2 biquad. But the reasoning remains the same if the implementation is different. Original filter : $H(z) = \frac{b_0+b_1\cdot z^{-1}+b\cdot z^{-2}}{1 + a_1\cdot z^{-1} + a_2\cdot z^{-2}}$ If you want to boost your signal by G $H_G(z) = G\frac{b_0+b_1\cdot z^{-1}+b_2\cdot z^{-2}}{1 + a_1\cdot z^{-1} + a_2\...


0

If you use minimum phase filter to correct the magnitude of a minimum phase system, you get phase correction «for free». IIR filters are lower computation and memory cost. IIR filters lends themselves to parameters and time variant behaviour that suits some applications.


2

Here's a true story that happened in the company I worked before. We designed ultrasound analysis products for non-destructive measurements. One analysis technique is called "time-of-flight diffraction" or TOFD. In this application, the user must analyze the ringing (or "echos" see the picture attached) to estimate the position of a potential defect in a ...


4

Two examples: Audio: The human ear isn't very sensitive to nonlinear phase (probably because the world filters sound with nonlinear phase filters). It is, however, sensitive to percussive sounds that "pre-ring"*; i.e., that start making sound before the main "bang". So for high-fi audio, one often wants to use minimum phase filters (which tend to have ...


2

Exact linear phase can only be implemented with finite impulse response (FIR) filters. These filters need more computations and memory compared to infinite impulse response (IIR) filters with a comparable magnitude response. Also, if high filter orders are necessary to meet the specifications, the resulting delay of a linear phase FIR filter becomes large (...


1

Take a morlet wavelet and run it over the entire signal. The frequency in the morlet wavelet can be set close to the frequency of these transitory regions. Even if not close to frequency of transition regions but still "matching more with the frequency of oscillatory regions than the flat regions would work, because we would be thresholding below. The width ...


0

Maybe you can consider utilizing a bnadpass filter. The lower cut-off frequency aims to generate a de-trend output signal. The higher cut-off frequency aims to filter out the ripple after each right red star in a cycle. Zero phase delay technique like 'Filtfilt' can be utilized to guarantee there is no phase/delay distortion. And then a basic peaks ...


0

Another perspective if the thresholding based on mean and variance (nice answer that) doesn't work. You could also try the Short Time Fourier Transform to identify the start and end of each oscillations. Its basically dividing your whole data into overlapping chunks and taking DFT of each chunk. The DFT of each chunk at time $m$ is $$ X[k,m]=\sum_{n=m}^{n=m+...


1

By looking at that graph, it seems that simple math (or rather statistics) can be used to solve this problem. I'd divide (segment) your data into equal time frames and then compute the mean and possibly variance (or standard deviation) for each time frame. The idea here is that the parts you're interested in will have a greater mean (and a greater variance) ...


Top 50 recent answers are included