category
stringclasses
107 values
title
stringlengths
15
179
question_link
stringlengths
59
147
question_body
stringlengths
53
33.8k
answer_html
stringlengths
0
28.8k
__index_level_0__
int64
0
1.58k
digital filter
Digital filter coefficients from low-pass to high-pass
https://dsp.stackexchange.com/questions/69493/digital-filter-coefficients-from-low-pass-to-high-pass
<p>Given I have coefficients a0, a1, a2, b1, and b2, defining the difference equation for a digital filter as:</p> <p><code>y[n] = a0 * x[n] + a1 * x[n - 1] + a2 * x[n - 2] - b1 * y[n - 1] - b2 * y[n - 2]</code></p> <p>Which defines a low-pass filter with particular cutoff frequency, how can I obtain the coefficients A...
<p>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 <span class="math-container">$z$</span> in the transfer function of ...
734
digital filter
digital low pass Butterworth filter
https://dsp.stackexchange.com/questions/23137/digital-low-pass-butterworth-filter
<p>A digital low pass Butterworth filter that has been designed using Bi-linear transformation has been a pole at $z=0.6$. It is also known that the filter's attenuate (at digital frequency) $\omega = 1.2$ is about $44$ dB. Find the filter order. Give at least one other pole of the digital filter (in Z domain).</p> <p...
<p>I'll try to give you some hints to get you started. First of all, you should know that the bilinear transform is given by</p> <p>$$s=k\frac{z-1}{z+1}\tag{1}$$</p> <p>If the analog prototype filter is normalized such that its cut-off frequency is $\Omega_c=1$, then the constant $k$ in (1) is given by</p> <p>$$k=\f...
735
digital filter
Design of digital filter with desired phase response
https://dsp.stackexchange.com/questions/76933/design-of-digital-filter-with-desired-phase-response
<p>I want to design a digital filter with the following phase response in MATLAB. i.e. at 1kHz, the phase response should be 9 degrees, at 2khz phase response should be 18 degrees ,at 3kHz phase response should be 27 degrees, at 4kHz phase response should be 36 degrees and so on upto 8kHz.How to design such filters hav...
<p>What you describe is a linear phase. Assuming that your sample rate is 48 kHz, you can implement this simply with a delay of -1.2 samples.</p> <p>The tricky parts here are that the delay is negative, i.e. the filter is non causal and that the delay is fractional (and not an integer number of samples).</p> <p>This ca...
736
digital filter
LPF in the stage of IQ demodulator is it a analgor filter or digital filter?
https://dsp.stackexchange.com/questions/74501/lpf-in-the-stage-of-iq-demodulator-is-it-a-analgor-filter-or-digital-filter
<p>I recently designed the LPF of the IQ demodulator using the Butterworth LPF refering to <a href="https://dspillustrations.com/pages/posts/misc/baseband-up-and-downconversion-and-iq-modulation.html" rel="nofollow noreferrer">https://dspillustrations.com/pages/posts/misc/baseband-up-and-downconversion-and-iq-modulatio...
<p>The A/D can be placed as a single real A/D before the multipliers, OR as shown in the diagram as two A/Ds one after each multiplier to sample the I and Q channels. In either case, an analog filter is required before any A/D conversion as an anti-alias filter. This can be a bandpass filter or a low-pass filter, depen...
737
digital filter
What do the filter coefficients in a digital filter represent?
https://dsp.stackexchange.com/questions/1243/what-do-the-filter-coefficients-in-a-digital-filter-represent
<p>I designed a digital filter using fdatool of matlab and obtained the filter coefficients from the tool.</p> <p>The problem is that i designed a 4th order filter. This gave me 5 filter values </p> <pre><code>h[] = {0.1930,0.2035,0.2071,0.2035,0.1930} x[k] = Discrete time input signal </code></pre> <p>Now on using ...
<p>We can try a very short introduction:</p> <ol> <li>Every filter represents a Linear Time Invariant System (LTI)</li> <li>Every Linear Time Invariant System can be completely described by it's transfer function or it's impulse response. The two can be converted into each other by the Fourier Transform</li> <li>Filte...
738
digital filter
Noise Shape Digital Filter
https://dsp.stackexchange.com/questions/53226/noise-shape-digital-filter
<p>My objective is to build a noise shape filter from a given transfer function (in one case) and from a given PSD (for another case). Checking my precedent questions you can see that this argument is keeping me busy by long time. You can check <a href="https://dsp.stackexchange.com/questions/52657/noise-shape-filter-t...
739
digital filter
Design of digital filters with negative group delay
https://dsp.stackexchange.com/questions/90236/design-of-digital-filters-with-negative-group-delay
<p>I am currently working on digital filters that can predict my input signal(assume that input signal is bandlimited). In other words, I want my filter to have a flat magnitude response in bandwidth of interest (let's say, <span class="math-container">$0$</span> to <span class="math-container">$\pi/4$</span>), as well...
<p>Here is another version.</p> <p>This is a tricky problem. Allpass filters clearly don't work here since the have a strictly monotonic decreasing phase, so the group delay is always positive. That means the best we can do is optimize over a limited frequency area.</p> <p>A better choice are probably minimum phase fil...
740
digital filter
Where to get Fettweis (1971) &quot;Digital filter structures related to classical filter networks&quot; paper?
https://dsp.stackexchange.com/questions/95993/where-to-get-fettweis-1971-digital-filter-structures-related-to-classical-fil
<p>I have been researching Wave Digital Filters and looking for one of the foundational papers by Alfred Fettweis (1971)</p> <p>A. Fettweis &quot;Digital filter structures related to classical filter networks&quot;, Archiv für Elektronik und Übertragungstechnik, 25, 79-89 (1971)</p> <p>This is self-referenced in some ...
<p>After some further research I managed to find a reprint of the paper on Internet Archive.</p> <p><a href="https://archive.org/details/selectedpapersin0000unse_k6m6/" rel="nofollow noreferrer">IEEE Acoustics, Speech, and Signal Processing Society. Digital Signal Processing Committee; Selected papers in digital signal...
741
digital filter
How to test digital filters?
https://dsp.stackexchange.com/questions/24819/how-to-test-digital-filters
<p>First the question(s):</p> <blockquote> <p>How should I write unit tests for a digital filter (band-pass/band-stop) in software? What should I be testing? Is there any sort of <em>canonical test suite</em> for filtering?</p> <p>How to select test inputs, generate expected outputs, and define &quot;conformance&quot; ...
<p>Some thoughts on it at least.</p> <p>First, if you can shown linearity and time-invariance and you know that the filter has the correct impulse response you are home. Given that the filter is stable. So in this case there is no need to run different other input signals and the frequency response is given based on t...
742
digital filter
Why analog anti aliasing filter is used before analog to digital converter when there is already a digital filter after ADC?
https://dsp.stackexchange.com/questions/35562/why-analog-anti-aliasing-filter-is-used-before-analog-to-digital-converter-when
<p>Normal data acquisition consist of:</p> <ol> <li>Analog anti aliasing filter( Sampling frequency : $5\textrm{ kHz}$) </li> <li>ADC - Digital Filter - (Sampling : 200K samples /sec)</li> <li>Digital low pass filters Filters</li> <li>DAC</li> </ol> <p>Questions:</p> <ol> <li><p>My question is why analog anti-alias...
<p>Question 1: The anti-aliasing filter before the ADC is exactly for the purpose of rejecting high frequencies, that will become lower frequencies (i.e. aliasing) after the ADC. The digital lowpass after the ADC cannot help here, as the aliasing has already happened. Consider this example:</p> <ul> <li>Your ADC has a...
743
digital filter
Digital low pass filter vs Kalman filter
https://dsp.stackexchange.com/questions/25518/digital-low-pass-filter-vs-kalman-filter
<p>I have experience with the design of FIR, IIR digital filters. I also know about the Kalman filter, but I am not skilled at using them. Consider the case of a low frequency signal from discrete samples and the signal is corrupted by high frequency noise. It seems a digital low pass filter and a Kalman filter are two...
744
digital filter
Digital filter response at frequencies higher than the Nyquist frequency
https://dsp.stackexchange.com/questions/93973/digital-filter-response-at-frequencies-higher-than-the-nyquist-frequency
<p>In one system there is a maximum sampling limit of 500 Hz. And in the analog signal, there are waves with a frequency in the range up to 1600 Hz. With 500 Hz sampling, is it possible to remove frequencies higher than 200 Hz using a digital filter so that the aliasing does not occur? Or is an analog low-pass filter n...
<p>The aliasing occurs when the analog signal is sampled. Therefore, you need to make sure that the analog signal does not contain frequencies higher than Nyquist <strong>before</strong> sampling. In your case, the Nyquist frequency is <span class="math-container">$250 \, \texttt{Hz}$</span>.</p> <p>So you <strong>need...
745
digital filter
Digital filter simulating hydroacoustic signal distortion
https://dsp.stackexchange.com/questions/47454/digital-filter-simulating-hydroacoustic-signal-distortion
<p><strong>Preambule:</strong><br> I'm designing a sound model for my small submarine game. Model is running on the server, and I want to present the client with a mono-channel wav-stream from his hydrophone (20kHz discretization should suffice, I target 20Hz-10kHz band). I want that signal to be relatively-realistic. ...
<p>I wouldn’t bother much with the precise shape of the filter because any real passive sonar will boost the higher frequencies at the receiver and any realistic source levels are going to around 70 years old and most likely a double screw, and aspect dependent. Cavitation is depth dependent. A single pole low pass fil...
746
digital filter
What methods can be used to remove ringing artifacts in the output of a digital filter?
https://dsp.stackexchange.com/questions/2182/what-methods-can-be-used-to-remove-ringing-artifacts-in-the-output-of-a-digital
<p>I'm using digital filters to apply spectral mangling-type special effects to audio.</p> <p>When using a digital filter (vsts/standalone DSP programs/outboard digital filter, etc.), especially when using narrow transition bands/brickwall filters, are there any effective ways to remove ringing artifacts introduced by...
<p>Sticking with linear systems, removing the ringing is nearly the same as adding back some of the spectral content that your really steep transition filters removed. Why use some crazy scheme to add back the stuff in the "softer" transitions that your hard-edged filters cut out? Just use a more reasonable total fil...
747
digital filter
Algorithm for implementing an IIR digital filter, Chebyshev type I low pass
https://dsp.stackexchange.com/questions/13204/algorithm-for-implementing-an-iir-digital-filter-chebyshev-type-i-low-pass
<p>I am trying to implement a Chebyshev type I low-pass IIR digital filter in C. I have got the SOS Matrix and scale values from Matlab. </p> <p>What is the direct equation or algorithm to implement such a filter?</p>
<p>okay, this is, or can be, stuff straight outa a textbook. by "SOS", you mean "2nd-order sections"? i usually call those "biquads". maybe that's not the best term for it in the s-plane. i dunno.</p> <p>anyway, defending on your passband ripple, you should have the resonant frequency and Q for each LPF biquad. you...
748
digital filter
digital IIR filter delay and oversampling
https://dsp.stackexchange.com/questions/51498/digital-iir-filter-delay-and-oversampling
<p>Can oversampling decrease the delay of digital IIR filter? Imagine there is some digital signal going into processor that applies low pass filter.Lets say its 1 KHz sample rate and the filter is second order gaussian lowpass with -3db point at 100 Hz.</p> <p>The putput of this digital filter will be delayed,this de...
<p>Note that a given digital filter impulse response $h[n]$ will have a corresponding equivalent analog frequency response $H(e^{j\omega})$ through the <strong>sampling relations</strong>; hence with the given sampling rate Fs.</p> <p>This means that if you change the sampling rate of the input of this filter, then th...
749
digital filter
Help implementing digital filter from tansfer function
https://dsp.stackexchange.com/questions/70912/help-implementing-digital-filter-from-tansfer-function
<p>I'm trying to implement a digital filter, which is given by the following transfer function:</p> <p><span class="math-container">$$ 1+2V K \frac{K+c_m+2Kz^{-1}+(K-c_m)z^{-2}}{1+2Kc_m+K^2+(2K^2-2)z^{-1}+(1-2Kc_m+K^2)z^{-2}} $$</span> <span class="math-container">$$ +V^2K^2\frac{1+2z^{-1}+z^{-2}}{1+2Kc_m+K^2+(2K^2-2)...
<p>You seem to do a few things wrong</p> <ol> <li>Start with just transcribing each fraction, ignore the factors in front of the fraction and &quot;1&quot; in front</li> <li>Make sure you sort by powers of <span class="math-container">$z$</span></li> <li>Normalize all coefficients to <span class="math-container">$a_0$<...
750
digital filter
Adaptive Digital Filter Block Diagram Question
https://dsp.stackexchange.com/questions/22325/adaptive-digital-filter-block-diagram-question
<p>I'm currently attempting to study up on adaptive digital filters. My book presents the diagram I've included below and I'm having trouble understanding conceptually what it's indicating. The problem deals with noise cancelation. The idea is that someone is driving and makes a phone call. The <em>x(k)</em> is their v...
<p>Judging from the figure, the situation is slightly different from your explanation in the question. The noise $v(k)$ is the actual noise in the signal, not the noise picked up by the reference microphone. So the noisy signal is $d(k)=x(k)+v(k)$. If you knew $v(k)$ you could simply subtract it from $x(k)$ without the...
751
digital filter
Calculation frequency response of digital filter with known structure
https://dsp.stackexchange.com/questions/21806/calculation-frequency-response-of-digital-filter-with-known-structure
<p><strong>Short question</strong><br> What are main stages (steps) of calculation <a href="http://en.wikipedia.org/wiki/Frequency_response" rel="nofollow noreferrer">frequency response</a> of digital filter by their structure?</p> <p><strong>Detailed question</strong><br> Let suppose that there is discrete FIR filte...
<p>For the given system you can write down the input-output relation as</p> <p>$$y[k]=\frac14\left(x[k]+2x[k-1]+x[k-2]\right)\tag{1}$$</p> <p>because $T$ (or $z^{-1}$) denotes a delay element, which delays its input by one sample interval. The $\mathcal{Z}$-transform of (1) is (assuming zero initial conditions)</p> ...
752
digital filter
Digital filters with more zeros than poles
https://dsp.stackexchange.com/questions/14739/digital-filters-with-more-zeros-than-poles
<p>I am having trouble wrapping my head around digital filters with different orders of numerator and denominator. Let me know if any of these points is wrong:</p> <ol> <li>All (digital or analog) transfer functions have the same number of poles and zeros, <em>if</em> you include the ones at infinity. So $H(s) = 1/s...
<p>If you consider the transfer function of a causal IIR filter</p> <p>$$H(z)=\frac{B(z)}{A(z)}=\frac{\sum_{m=0}^M b_mz^{-m}}{\sum_{n=0}^N a_nz^{-n}},\quad a_0=1$$</p> <p>then you always get the same number of poles and zeros, regardless of the choice of $M$ and $N$ (as already pointed out by Robert). However, what i...
753
digital filter
what&#39;s the pass band ripple and stop band attenuation of a digital filter?
https://dsp.stackexchange.com/questions/38564/whats-the-pass-band-ripple-and-stop-band-attenuation-of-a-digital-filter
<p>Hi i'm a beginner in signal processing i want to know what'sthe pass band ripple and stop band attenuation of a digital filter ? Thanks.</p>
<p>I hope the plot below helps answer your question. Typically I have seen the &quot;passband ripple&quot; and &quot;stopband attenuation&quot; expressed in dB as shown in the picture translating the magnitude of the ripples to dB using <span class="math-container">$20log_{10}$</span> as shown. So the passband ripple ...
754
digital filter
Truncating the output of a digital filter. Which part to discard?
https://dsp.stackexchange.com/questions/89904/truncating-the-output-of-a-digital-filter-which-part-to-discard
<p>Suppose I have a signal <span class="math-container">$\mathbf{x}\in \mathbb{C}^{N}$</span> and a digital filter with impulse response <span class="math-container">$\mathbf{h}\in\mathbb{C}^L$</span>, where <span class="math-container">$L&lt;N$</span>. If we pass the signal through the filter, the output will be <span...
<p>Truncation will also will always result in an error. Which truncation schemes is best depends on the specific filter, your signal and what classes of error your application is more or less sensitive to.</p> <p>As a rough rule of thumb for a minimum phase filter you most likely want to truncate the end, for a linear ...
755
digital filter
Digital filter design basic principles (IIR/FIR)
https://dsp.stackexchange.com/questions/9541/digital-filter-design-basic-principles-iir-fir
<p>Although I have a solid experience in designing audio engines and such, I am fairly new to the realm of Digital Filter Design, particularly IIR and FIR filters. In other words, I'm trying to learn as much as I can on how to design filters and derive their difference equations. I'm starting from the basics, so please...
<p>Digital filter design is a very large and mature topic and - as you've mentioned in your question - there is a lot of material available. What I want to try here is to get you started and to make the existing material more accessible. Instead of digital filters I should actually be talking about discrete-time filter...
756
digital filter
How to predict the cramped frequency of a digital filter based on an analogue frequency?
https://dsp.stackexchange.com/questions/22071/how-to-predict-the-cramped-frequency-of-a-digital-filter-based-on-an-analogue-fr
<p>I have a second order analogue high pass transfer function (unity gain at infinity). It's magnitude response hits the -20 decibel line at a frequency of 5706 Hz (the corner frequency is 18000 and sample rate is 44100). When I convert this analogue filter to a digital IIR via the BLT method, the digital filter's magn...
<p>I've come up with a solution.</p> <p>Let $ f_a = $ analogue frequency, $ f_d $ = digital frequency, $ f_s = $ sampling rate and $ f_c = $ corner frequency with $ \omega_c = \frac{\pi f_c}{f_s} $ and $ \omega_a = \frac{\pi f_a}{f_s} $ then:</p> <p>$$ c = \frac{\omega_c}{\tan(\omega_c)} $$</p> <p>$$ \omega_d = \arc...
757
digital filter
How to design a digital Butterworth bandpass filter?
https://dsp.stackexchange.com/questions/79394/how-to-design-a-digital-butterworth-bandpass-filter
<p>I am looking into designing a Bandpass Butterworth filter in python, but, I was not sure I am designing my filter correctly. What I have are the following:</p> <ul> <li>High cutoff frequency = 200Hz</li> <li>Low cutoff frequency = 10Hz</li> <li>Sampling frequency = 1000Hz</li> <li>for my data, I used Filter order = ...
<p>In python the direct command is scipy.signal.butter. This will return the filter coefficients (numerator and denominator) based on an array of critical frequencies as described here:</p> <p><a href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.butter.html" rel="nofollow noreferrer">https://docs...
758
digital filter
Wave Digital Filter Diode Equation?
https://dsp.stackexchange.com/questions/73135/wave-digital-filter-diode-equation
<p>I'm trying to understand how diode circuits are implemented in wave digital filters, particularly for clippers. The research papers and other sources I've looked at use the equation</p> <p><span class="math-container">$$I(V) = 2I_s \sinh\left(\frac{V}{V_t}\right)$$</span></p> <p>for two reverse-polarity diodes in pa...
759
digital filter
Digital filter not removing noise at specific frequency Matlab
https://dsp.stackexchange.com/questions/36041/digital-filter-not-removing-noise-at-specific-frequency-matlab
<p>Doing some work at the minute on digital filters in matlab, I have a file with artifical noise added (sine wave added at specific frequency). The goal is to filter the signal and get it as close as possible to the clean signal provided.</p> <p>I've done an FFT and plotted the results and found a very large spike at...
<p>As mentioned in my comment, the filter returned by <code>iirnotch</code> is useless. From your filter coefficients you can see that the filter is only marginally stable due to two poles on the unit circle at DC and at Nyquist. Furthermore, even though the filter has a notch, it also attenuates all other frequencies ...
760
digital filter
Cascading first order digital filters in C++
https://dsp.stackexchange.com/questions/70969/cascading-first-order-digital-filters-in-c
<p>In a <a href="https://dsp.stackexchange.com/questions/70960/given-a-3db-octave-filter-that-makes-pink-noise-how-can-i-make-a-3db-octave">related question</a> a probable solution was given to build a first-order digital filter and then cascade three of them in order to turn white noise into pink. I have applied the ...
<p>My late night brain made foolish mistakes, for the record, if anyone needs this, the working code is as follows:</p> <p>Header:</p> <pre><code>float state1; float state2; float state3; </code></pre> <p>Implementation:</p> <p>In Constructor:</p> <pre><code>state1 = 0; state2 = 0; state3 = 0; </code></pre> <p>Robert's...
761
digital filter
Issue understanding implementing digital filters in practice
https://dsp.stackexchange.com/questions/80740/issue-understanding-implementing-digital-filters-in-practice
<p>I am reading Introduction to Digital Filters by J.O Smith III, which is an amazing book. The part for which I have a question is quoted below.</p> <blockquote> <p>By virtue of Euler's relation and the linearity of the filter, setting the input to <span class="math-container">$ x(n) = e^{j\omega nT}$</span> is physic...
<p>A real operation on a complex input can be implemented as two real operations in parallelle, rather than a truely complex operation.</p> <p>An example would be multiplying a complex number with a real number. Rather than a full complex multiply, you get away with two real multiplies, one for the real part of the inp...
762
digital filter
How do I initialize the state of a digital filter in Direct Form II?
https://dsp.stackexchange.com/questions/56476/how-do-i-initialize-the-state-of-a-digital-filter-in-direct-form-ii
<p>Suppose I have a digital filter implemented in Direct Form II. How do I initialize the state of the filter as if the input <span class="math-container">$x[n]$</span> had a fixed value <span class="math-container">$x_0$</span> for all <span class="math-container">$n&lt;0$</span>?</p> <p><a href="https://i.sstatic.ne...
<p>The difference equations for this filter are:</p> <pre><code>y[n] = b0 w[n] + b1 w[n-1] + b2 w[n-2] w[n] = x[n] - a1 w[n-1] - a2 w[n-2] </code></pre> <p>To achieve steady-state, <code>w[n] == w[n-1] == w[n-2]</code>. Call this value <code>w</code>. Solving the second difference equation, we find <code>w = x/(1 ...
763
digital filter
Sample rate of digital modems--how do they do digital filtering if sampling below Nyquist rate?
https://dsp.stackexchange.com/questions/93664/sample-rate-of-digital-modems-how-do-they-do-digital-filtering-if-sampling-belo
<p>I can't find this answer anywhere. I have a couple satellite modem manuals and they refer to digital filtering functions that they do, but they say almost nothing about their sample rate. I always thought, without considering it too much, that all the modems I've worked with were only sampling at a rate high enoug...
<p>All modems sample at higher than the symbol rate up until timing recovery is resolved, at which point the received waveform can de down-sampled to 1 sample per symbol.</p> <p>As for a digital IF: digital IF means the waveform is centered on some higher frequency, higher than its occupied bandwidth, and can be repres...
764
digital filter
How to design a digital filter in python that will run over an uC?
https://dsp.stackexchange.com/questions/59688/how-to-design-a-digital-filter-in-python-that-will-run-over-an-uc
<p>I am trying to implement a digital filter over a uC (it doesn't really matter which filter and which micro controller because I'm looking forward to learn how to do it in the future with different filters and different microcontrollers). I've been told that you can design, implement and debug a digital filter in pyt...
<h3>Filter representation and design</h3> <p>A DTLTI IIR filter is characterized by its transfer function <span class="math-container">$ H(z) = \frac{Y(z)}{X(z)} = \frac{b_0 + b_1 z^{-1} + b_2 z^{-2} + \dots + b_{P} z^{-P}}{a_0 + a_1 z^{-1} + a_2 z^{-2} + \dots + a_{Q} z^{-Q}} $</span>. The transfer function is closel...
765
digital filter
Digital filter design of time series for specified frequency response function
https://dsp.stackexchange.com/questions/55303/digital-filter-design-of-time-series-for-specified-frequency-response-function
<p>I am currently working with vibration measurements in structures. In the netherlands there is a guideline for verifying vibration measurements for damage to machinery. This is the so-called "SBR Trillingsrichtlijn". In this guideline a frequency weighting function is specified to modify the time series from vibratio...
<p>This is <em>the</em> classical problem of filter design: </p> <blockquote> <p>You've got a frequency response that you want, how to implement it using a FIR?</p> </blockquote> <p>I'm not going to lay out all the theory here, because it can easily be found by looking for <em>Fourier approximation methods for FIR ...
766
digital filter
Gibbs phenomenon in Hamming&#39;s digital filters
https://dsp.stackexchange.com/questions/7605/gibbs-phenomenon-in-hammings-digital-filters
<p>In 'Digital Filters' by Hamming there is a cryptic section where he describes how the Gibbs phenomenon can be viewed as the displacement between the centers of two functions as they are convolved together. This is on pages 112 - 113 of the 3rd edition.</p> <p>In the process of this he shows that truncating the Four...
<p>I think the main issue is you are jumping ahead of yourself. You probably remember or read somewhere that the Fourier transform of a $rect$ function is a $sinc$ function. This is true; however, no where in this section does he mention Fourier transform! In fact, what he is doing is not Fourier transform. </p> <...
767
digital filter
How do I add more resolution / taps to an analog -&gt; digital filter?
https://dsp.stackexchange.com/questions/53669/how-do-i-add-more-resolution-taps-to-an-analog-digital-filter
<p>(I am trying to create an IIR audio filter that adds reverb to an initial sample)</p> <p>Say I designed an analog filter to model acoustic attenuation based on the following mathematical model:</p> <p><span class="math-container">$$ I = I_0 e^{pt}, $$</span></p> <p>Where <span class="math-container">$p$</span> is...
<p>Doing a decent sounding audio reverb with IIR filters is difficult. You need way more poles that you can generate with a normal IIR structure and you need a way to do it efficiently.</p> <ol> <li>There is a significant trade off between sound quality versus MIPS, memory, latency &amp; controllabilty</li> <li>A good...
768
digital filter
Why is the Z-transform so important in digital filters analysis and design?
https://dsp.stackexchange.com/questions/55043/why-is-the-z-transform-so-important-in-digital-filters-analysis-and-design
<p>Please elaborate on why this mathematical transform can help analyzing as well as designing any type of digital filter.</p>
<p>The Z Transform is to discrete-time (digital) signals precisely the same role that the Laplace Transform is to continuous-time (analog) signals.</p> <p>Linear Time-Invariant (LTI) Systems (a.k.a. "filters"), are made up of signal-processing elements that fall into 3 fundamental classes:</p> <ol> <li>adders (device...
769
digital filter
Periodicity of transfer function of FIR filter proof (Parks and Burrus, Digital Filter Design)
https://dsp.stackexchange.com/questions/31155/periodicity-of-transfer-function-of-fir-filter-proof-parks-and-burrus-digital
<p>In Digital Filter Design by Parks and Burrus, p. 19.</p> <hr> <p>The transfer function of an FIR filter is given by the $\mathcal Z$-transform of $h(n)$ as:</p> <p>$$H(z)=\sum_{n=0}^{N-1}h(n)z^{-n}$$</p> <p>(where $h$ is the filter)</p> <p>The frequency response of a filter is defined as</p> <p>$$H(\omega)=\su...
<p>$$\sum_{n=0}^{N-1}h(n)e^{-j\omega n}e^{-j2\pi n}=\sum_{n=0}^{N-1}h(n)e^{-j\omega n}\cdot1$$</p> <p>Since \begin{align} e^{-j2\pi n}&amp;=\cos(-2\pi n) + j\sin(-2\pi n)\\ &amp;=\cos(2\pi n) - j\sin(2\pi n)\\ &amp;=1-0\\ &amp;=1 \end{align}</p>
770
digital filter
How to design IIR digital filters?
https://dsp.stackexchange.com/questions/72729/how-to-design-iir-digital-filters
<p>Practical <a href="https://en.wikipedia.org/wiki/Infinite_impulse_response" rel="nofollow noreferrer">infinite impulse response</a> (IIR) filters are usually based upon analogue equivalents (Butterworth, Chebyshev, etc.) using a transformation known as the <a href="https://en.wikipedia.org/wiki/Bilinear_transform" r...
<p>An approach to design IIR filters without mapping from classical analog designs is the least squares method where the poles and zeros are selected within a constraint of filter order and targets for the magnitude and phase of the frequency response. This can result in non-causal solutions, so some experience is nece...
771
digital filter
Why is Fourier space not adequate for (theoretical or digital) filters?
https://dsp.stackexchange.com/questions/70754/why-is-fourier-space-not-adequate-for-theoretical-or-digital-filters
<p>As far as I have seen, almost all theoretical filter design occurs in Laplace or Z-space. Also, there is a pervasive connection to real life analog filters in the design. If one is just thinking in a mathematical theoretical thing (or something that could be implemented digitally), why wouldn't one filter signals in...
<p>As far as I know and I have experienced, filtering in Fourier space has the advantages of modifying the frequencies directly on the frequency domain. Let's say that you have a frequency component at 50 Hz and you can manually remove then even better than a Butterworth filter. That being said, you might modify the ph...
772
digital filter
Create a minimum phase filter from an elliptic digital filter
https://dsp.stackexchange.com/questions/94048/create-a-minimum-phase-filter-from-an-elliptic-digital-filter
<p>I have the numerator and denominator of a lowpass digital elliptic filter. I know how to create a minimum-phase filter with the same magnitude response using cepstrum technique. But I came across <a href="https://www.dsprelated.com/freebooks/filters/Linear_Phase_Really_Ideal.html" rel="nofollow noreferrer">this</a> ...
<p>The impulse response <code>hmp</code> is computed by convolving the impulse response of the elliptic filter with itself. We know that the elliptic filter is marginally minimum-phase, i.e., it has no zeros outside the unit circle. Convolving the impulse response with itself corresponds to squaring the transfer functi...
773
digital filter
Design of a digital A-weighting filter with arbitrary sample rate
https://dsp.stackexchange.com/questions/36077/design-of-a-digital-a-weighting-filter-with-arbitrary-sample-rate
<p>I want to A-weight a time series with arbitrary sample rate. </p> <p>An analog A-weighting filter is defined exactly by IEC 61672-1. But there's no definition for a digital filter. One method is to use the bilinear transform (BLT) to convert the analog filter to the digital filter (as done here <a href="https://dsp...
<p>It's a common misconception that the approximation of an analog filter by a digital filter must be bad close to Nyquist. This idea might come from the ubiquity of the bilinear transform, for which this is usually indeed the case. Of course, there are certain constraints on the frequency response of discrete-time fil...
774
digital filter
Designing digital filters on basis of $\sigma(\tau)$ diagrams
https://dsp.stackexchange.com/questions/97781/designing-digital-filters-on-basis-of-sigma-tau-diagrams
<p>I have read some articles on Allan deviation and understand that the slope of the <span class="math-container">$\sigma(\tau)$</span> diagram corresponds to the exponent of power-law noise:</p> <p><span class="math-container">$$S_y(f)\sim f^\alpha \implies \sigma(\tau) \sim \tau ^{-\frac{\alpha + 1}{2}}$$</span></p> ...
<p>The Allan Deviation is a powerful tool for assessing the stationarity of noise processes. However it is not suited for designing frequency-selective filters, which generally assume stationary signals. For filter design, what's more useful is the power spectral density (PSD) of the signal - understanding which portio...
775
digital filter
Digital or analogue filtering?
https://dsp.stackexchange.com/questions/52920/digital-or-analogue-filtering
<p>I'm trying to self learn the art of signal processing whilst moving through my third year pure maths degree. </p> <p>Sorry if my terminology is incorrect however I hope I am understandable!</p> <p>I am looking at data which is coming from an accelerometer, distance data from a separate sensor and time data increme...
776
digital filter
Trying to implement a digital A frequency filter
https://dsp.stackexchange.com/questions/85733/trying-to-implement-a-digital-a-frequency-filter
<p>I'm trying to implement a digital filter that has the frequency response shape equal to the image below:</p> <p><a href="https://i.sstatic.net/rYXJ2.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/rYXJ2.png" alt="enter image description here" /></a></p> <p>Where i will use equation (11) to implement i...
<ol> <li>IIR filters should, almost exactly universally* be broken down into first- and second-order sections and cascaded**. The sensitivity of filter pole locations to coefficient values goes up with filter order; even the slightest rounding error will screw up a 10th-order filter.</li> <li>If you have the signal pr...
777
digital filter
Bireciprocal lattice wave digital filter
https://dsp.stackexchange.com/questions/15112/bireciprocal-lattice-wave-digital-filter
<p>I have posted this question &quot;Electrical Engineering&quot;, but this seems a more appropiate place. I am trying to model a bireciprocal Cauer filter in LTspice but I don't get the expected results. More precisely, using this formula for the coefficients</p> <p><span class="math-container">$\gamma=\frac{re(p_i)−1...
<p>Let's try to sort of answer this from the BLWDF point of view (without much of the WDF-theory, since this can to a large extent be skipped as you know which structure you want).</p> <p>Starting from a second-order BLWDF allpass section (based on symmetric two-port adaptors without any negations in the feedback), th...
778
digital filter
Obtaining a high sample rate digital approximation to an analog filter from lower frequency measurements
https://dsp.stackexchange.com/questions/64207/obtaining-a-high-sample-rate-digital-approximation-to-an-analog-filter-from-lowe
<p>Consider a set of dense, but generally irregularly-spaced frequency response measurements of some real low-pass analog filter. Denote the maximum frequency for which a frequency response measurement is available as F_a_max.</p> <p>I would like to create a digital filter model for this analog filter. The sample ra...
<p>You mention <span class="math-container">$2F_{a_{max}}$</span>, which makes me think that you're trying to invoke the Nyquist-Shannon sampling theorem. But that theorem doesn't deal with any "highest measured values". It deals with that process of getting a signal from the continuous-time domain (or some higher-ra...
779
digital filter
Digital implementation of first order analog filter using bilinear transformation
https://dsp.stackexchange.com/questions/11345/digital-implementation-of-first-order-analog-filter-using-bilinear-transformatio
<p>I'm trying to create a digital filter from a first order analog filter with transfer function $$H(s)=\frac{1}{1+\tau s}$$ with time constant $\tau=.1\text{s}$, and sampling rate $f_s=1000\text{Hz}$.</p> <p>Applying the bilinear transform in Matlab however appears to yield a filter with the a different 3dB point t...
<p>The expected 3dB frequency is wrong because of radian conversion. With $s=j\omega$, $$H(j\omega) = \frac{1}{1+\tau j\omega} $$ and $20\log_{10}|H(j\omega)|\approx-3$ when $\omega=\omega_{3dB}=\frac{1}{\tau}$. However $\omega=2\pi f$, so $$f_{3dB}=\frac{\omega_{3dB}}{2\pi}=\frac{1}{2\pi\tau}.$$ With $\tau=0.1\text{s...
780
digital filter
Approximate the magnitude response of an analog filter with a digital filter, starting from its gain expression
https://dsp.stackexchange.com/questions/15134/approximate-the-magnitude-response-of-an-analog-filter-with-a-digital-filter-st
<p>I have an analog filter with its frequency response curve in dB described by the following expression: $$ N_{dB}=20log_{10}\omega t_1 \sqrt{\frac{1+(\omega t_2)^2}{1+(\omega t_1)^2}} $$ This expression is derived from the series connection of two lowpass filters each associated with the following RC circuit:<br> <im...
<p>From the given magnitude response (and from what is written in the document), the transfer function of your system is</p> <p><span class="math-container">$$H(s)=\frac{st_1(1+st_2)}{1+st_1}\tag{1}$$</span></p> <p>Note that this system is not stable. I suppose that this response is only to be approximated in a certa...
781
digital filter
Digital Butterworth filter design error
https://dsp.stackexchange.com/questions/19279/digital-butterworth-filter-design-error
<p>I am trying to design a digital ButterWorth filter for the given specifications.</p> <pre><code>rp=3; rs=15; FS=1; wp=0.5*pi; ws=0.75*pi; pwp=2*FS*tan(wp/2); pws=2*FS*tan(ws/2); [n,wn]=buttord(pwp,pws,rp,rs,'s') [b,a]=butter(n,wn,'s'); [bn,an]=bilinear(b,a,FS);%error freqz(bn,an,512,FS); </code></pre> <p>If I design...
<p>I cannot run your code because I have not matlab on this pc, but I can try to give you some advice.</p> <p>The first thing I will check is the way you defined the cut-off frequencies. The Matlab function uses normalized frequencies (look at the examples here <a href="http://it.mathworks.com/help/signal/ref/buttord....
782
digital filter
digital filter and epoch length
https://dsp.stackexchange.com/questions/17246/digital-filter-and-epoch-length
<p>A reviewer has asked me to re-filter my data to remove baseline drift.</p> <p>Each sweep is 170ms sampled at 1000Hz and the reviewer wants it high-pass filtered at 0.5Hz. The original bandpass settings on the hardware were 0.15 to 1000Hz</p> <p>Although this is easy to code in matlab, the epoch is very short comp...
783
digital filter
What is the name of this digital low pass filter?
https://dsp.stackexchange.com/questions/46278/what-is-the-name-of-this-digital-low-pass-filter
<p>I found this digital filter in code I am working on. It is a low pass filter. In the code it is called an "alpha filter", but it is not the same as the <a href="https://en.wikipedia.org/wiki/Alpha_beta_filter#Alpha_filter" rel="nofollow noreferrer">alpha filter mentioned here</a>.</p> <p>I post the relevant code be...
<p>I'm new, so I can't add this comment to Matt L.'s answer.</p> <p>It is not an exponential filter, the equation is actually:</p> <p>$$ y[n] \ = \ \alpha \, x[n] \ + \ ( 1 - \alpha ) \, x[n-1] $$</p> <p>So it is a very short FIR filter, not an IIR filter. I'm not expert enough to know a specific name.</p> <p>Ced...
784
digital filter
Appropriate digital filter for GPS tracks?
https://dsp.stackexchange.com/questions/37197/appropriate-digital-filter-for-gps-tracks
<p>I have an <a href="https://github.com/bcrowell/kcals" rel="nofollow noreferrer">open-source software project</a> whose purpose is to analyze a GPS track, or a similar track made by an application such as google maps, and estimate the physical exertion required to hike or run that route. Traditionally, people have go...
785
digital filter
matched filter in digital demod
https://dsp.stackexchange.com/questions/96513/matched-filter-in-digital-demod
<p>I am working on the demodulation of digital signals, I am following <a href="https://pysdr.org/_images/sync-diagram.svg" rel="nofollow noreferrer">this</a> block diagram.</p> <p><img src="https://pysdr.org/_images/sync-diagram.svg" alt="block diagram"><br> <sup>Source: <a href="https://pysdr.org/content/sync.html" r...
<blockquote> <p>The problem is, I don't know what kind of filter tx is using, so what kind of matched filter i have to use?</p> </blockquote> <p>You need to estimate the transmit filter than, and also, if anything, what filtering the &quot;Wireless channel&quot; in your block diagram adds to that.</p> <p>The job of est...
786
digital filter
Least-squares digital IIR filter design (with arbitrary responses)
https://dsp.stackexchange.com/questions/10455/least-squares-digital-iir-filter-design-with-arbitrary-responses
<p>I'm studying the IIR filter design that is described in the book: <a href="http://www.nt.tuwien.ac.at/fileadmin/users/gerhard/diss_Lang.pdf" rel="nofollow noreferrer">Algorithms for the constrained design of digital filters with arbitrary phase and magnitude responses</a>. </p> <p>You can get the code at page 171 (...
<p>The variable <code>tau</code> was chosen so that the phase of <code>D</code> at $om = 0.2$ is $-\pi$.</p> <p>It is easier to understanding what is going on if you plot <code>D</code>, which is the desired magnitude/phase response of the filter. Add the following code to help you visualize what is going on:</p> <pr...
787
digital filter
Matlab: How to design digital equivalent for a lowpass Bessel filter (Thiran filter)?
https://dsp.stackexchange.com/questions/82411/matlab-how-to-design-digital-equivalent-for-a-lowpass-bessel-filter-thiran-fil
<p>In the process of applying a lowpass Bessel filter to my signal, I realized that besself function does not support the design of digital Bessel filters and the bilinear function can be used to convert an analog filter into a digital form, except for Bessel filters. The digital equivalent for Bessel filters is the Th...
<p>I don't have Matlab but the coefficients for the Thiran filter are given by the Gaussian hypergeometric function. If you have <a href="https://wxmaxima-developers.github.io/wxmaxima/" rel="nofollow noreferrer">wxMaxima</a> there already is a built-in function. If you'll run these two lines (the first one is only nee...
788
digital filter
Advice on designing a digital filter that doesn&#39;t have phase-sensitive edge artifacts?
https://dsp.stackexchange.com/questions/69643/advice-on-designing-a-digital-filter-that-doesnt-have-phase-sensitive-edge-arti
<p>I'm pretty well versed in statistics, but not really digital signal filtering. I have a data scenario where I expected to be able to pretty easily filter out some noise (human pulse) that's at a known frequency band, but I'm having a lot of trouble using the standard tools in the scipy.signal library and think I mus...
<p>Your basic problem is that filtfilt (and most other linear filtering routines) take filters that are designed for infinitely long time expanses, and apply them to a chunk of data as if the data were extended infinitely in both directions with zeros.</p> <p>So you have a legitimate bandpass filter, and it's &quot;see...
789
digital filter
Composing digital filters
https://dsp.stackexchange.com/questions/79091/composing-digital-filters
<p>I'm interested in composing filters for realtime audio processing on an microcontroller (MCU). Ideal frequency response is unity as a default, with deviations up and down at specific freq-domain pointers according scalers, and some type of smooth transition between these points. This is conceptually similar to an eq...
<p>One canonical solution is described by an old Motorola Application Note on how to design a 10-band equalizer for the 56000 DSP chip. Occasionally recomputing the IIR coefficients usually requires far fewer ops than running the filters.</p>
790
digital filter
Creating a digital filter, from Laplace to $\mathcal Z$-transform (zero order hold) to code?
https://dsp.stackexchange.com/questions/18329/creating-a-digital-filter-from-laplace-to-mathcal-z-transform-zero-order-ho
<p>I'm trying to create a digital filter in code(C) but any language is fine. Now I've got an analogue filter that I have represented by an equation in the Laplace domain and I want to try and implement it digitally. </p> <p>So my filter has this form in the Laplace domain: $$\frac{as+b}{cs^2+ds}$$</p> <p>I then use ...
<p>The example I looked at used a tustin or bilinear conversion not a zero order hold(the default for matlabs "c2d" command). So this is more an answer to what i wanted to do rather than the question that i asked above.</p> <p>I solved the following (converting the s domain function into code) by taking the s domain f...
791
digital filter
About designing digital filters
https://dsp.stackexchange.com/questions/10056/about-designing-digital-filters
<p>I'm currently using MATLAB's fdatool for filter design. Using that tool, I can easily design different kind of filters. For example, let's take a band-pass FIR filter with 10-40 Hz passband, and 5-10 Hz and 40-45 Hz transition bands. Usually, I design the filter with the selection "least-squares", which, if I unders...
<p>Filtering can be done in the frequency domain which is actually a very efficient technique (and it can very well be, that Matlab does this internally). However, for very long signals it's not as straight-forward as "taking the FFT and applying a frequency response". You can read up on overlap-add filtering which is ...
792
digital filter
Alias-free digital nonlinear filter design
https://dsp.stackexchange.com/questions/51533/alias-free-digital-nonlinear-filter-design
<p>@Jazzmaniac has a good answer to the question of how to design an alias-free digital nonlinear time-invariant filter here: <a href="https://dsp.stackexchange.com/a/28787/18276">https://dsp.stackexchange.com/a/28787/18276</a></p> <p>Basically, according to that answer, a digital nonlinear time-invariant filter is al...
<p>First, allow me to address the subsample shift property in relation to non-linear signal mappings. It is fairly straightforward to see time shifting is not as simple a property as for linear systems. Consider a discrete time signal given by the sequence $$\dots ,1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, \dots$$ This seque...
793
digital filter
Nyquist (Nth) digital filters
https://dsp.stackexchange.com/questions/29386/nyquist-nth-digital-filters
<p>I am working in something were I should use a upsampling filter. I have decided to use a Nyquist filter(Lth filter). I know that there are two constraints. The first The frequency vector values must mirror each other in pairs around $\pi/2$. The second is the amplitude vector values must mirror each other in pairs a...
<p>This Mathworks documentation gives a good overview about the different parameters: <a href="http://uk.mathworks.com/help/dsp/examples/fir-nyquist-l-th-band-filter-design.html?requestedDomain=uk.mathworks.com" rel="nofollow">http://uk.mathworks.com/help/dsp/examples/fir-nyquist-l-th-band-filter-design.html?requestedD...
794
digital filter
Highly damped IIR/FIR digital filter
https://dsp.stackexchange.com/questions/37089/highly-damped-iir-fir-digital-filter
<p>I want a highly damped highpass filter (damping of at least $2$), with a cutoff somewhere around $1\textrm{ Hz}$ ($51.2\textrm{ Hz}\quad f_s$)</p> <ul> <li>How do i go about designing the filter with adequate control over the damping?</li> </ul> <p>My best guess was to use a standard second order response and freq...
<p>Your second-order high pass transfer function is wrong. You should use </p> <p>$$H(s)=\frac{s^2}{s^2+2\zeta\omega_0 s+\omega_0^2}$$</p> <p>But - as mentioned in the comments - a high damping and a sharp cut-off are incompatible requirements.</p>
795
digital filter
Is there really no perfect digital filter?
https://dsp.stackexchange.com/questions/70462/is-there-really-no-perfect-digital-filter
<p>In context of transition width vs. stopband attenuation, different windows (Blackman, Hamming, etc) are compared in terms of <em>tradeoffs</em> between the two, always noting that one cannot perfect both.</p> <p>Why not? Make it long enough - problem solved. We're working with <em>finite</em> frequency and amplitude...
<p>Yes Virginia, There is a perfect digital filter.</p> <p>I assume the OP means by &quot;perfect filter&quot; what we would typically call an &quot;ideal filter&quot;: 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 ...
796
digital filter
Scipy filter analog vs. digital
https://dsp.stackexchange.com/questions/87005/scipy-filter-analog-vs-digital
<p>It would be greatly appreciated if the usage of the python package scipy's filter (e.g. butter) analog=True argument could be explained. I don't understand what is meant by this (any signal being processed by scipy in python on a computer is discrete and will always be digital?). I an pretty familiar with DSP but ha...
<p>The function <code>butter()</code> doesn't do any signal processing. It is a routine to <em><strong>design</strong></em> a filter, either digital or analog. I.e., it computes the filter coefficients.</p> <p>I use Matlab/Octave where you have basically the same function. The command</p> <pre><code>[b,a] = butter(2,1,...
797
digital filter
Can we have a Digital Anti Aliasing filter?
https://dsp.stackexchange.com/questions/9205/can-we-have-a-digital-anti-aliasing-filter
<p>I am working on a board that has no antialisaing filter at the input of the ADC. I have option to I implement my own filter using RC + Opamp circuit. But is it also possible to implement Anti Aliasing filter after sampling by ADC and processing in Digital domain: a digital Anti aliasing filter? </p>
<p>Just to support Matt's answer and provide a few more details:</p> <p>Most modern ADCs do most of the hard antialiasing job in the digital domain. Reason is that digital filters tend to produce less by-products for a much lower cost. The actual chain is:</p> <ul> <li>Analog Input.</li> <li>Analog Anti-aliasing filt...
798
digital filter
Design of efficient digital interpolation filter
https://dsp.stackexchange.com/questions/59929/design-of-efficient-digital-interpolation-filter
<p>I came across this paper entitled "Design of Efficient Digital Interpolation Filters and Sigma-Delta Modulator for Audio DAC" where the author oversamples an input frequency, fsig = 1kHz with ratio L = 128 and update frequency, fsi = 64kHz. The interpolation filter specification is given by:</p> <ul> <li>passband r...
<p>Butterworth low-pass filters are not going to work for this, as demonstrated in the following. You'd need to use other types of filters, for example linear-phase finite impulse response (FIR).</p> <p>The magnitude frequency response of an order <span class="math-container">$N$</span> discrete-time Butterworth low-p...
799
adaptive filtering
RLS adaptive filter
https://dsp.stackexchange.com/questions/10017/rls-adaptive-filter
<p>I am using an adaptive RLS adaptive filter for noise cancellation. My sampling freq. is 500 Hz, but I am interested in only frequencies of up to 60 Hz. I filter the input and the reference signal to the desired frequency range and then apply the adaptive filter. The adaptive filter does a good job at removing the no...
800
adaptive filtering
How general are adaptive-filtering techniques?
https://dsp.stackexchange.com/questions/52380/how-general-are-adaptive-filtering-techniques
<p>How often do problems arise that let you use adaptive filters? Unless I am understanding something incorrectly it seems the requirement that the input signal be stationary(or even WSS) is too strong for most places I would want to use adaptive filters.</p> <p>Am I wrong? How often do adaptive filters come up in com...
801
adaptive filtering
Speech dereverbaration via maximum kurtosis adaptive filtering
https://dsp.stackexchange.com/questions/45344/speech-dereverbaration-via-maximum-kurtosis-adaptive-filtering
<p>I'm trying to code the algorithm described in <a href="https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/ICASSP01makurt.pdf" rel="nofollow noreferrer">Speech dereverbaration via maximum-kurtosis subband adaptive filtering</a> by <em>Gillespie, Malvar and Florencio</em>, and the signal looks cleaner...
<p>As was advised to me by A_A in the comment section I will close this thread with a "self-answer". The code present in the question is a code for a speech signal de-reverberation adaptive filter based on the Kurtosis signal of the signal's Lp residual. The original idea isn't mine (the reference is in the question)....
802
adaptive filtering
Why does my signal magnitude increase after adaptive filtering?
https://dsp.stackexchange.com/questions/65901/why-does-my-signal-magnitude-increase-after-adaptive-filtering
<p>I am using a series-cascade of multiple NLMS adaptive filters each with step size 0.0040, leakage factor 1.0, and 100 filter taps. My signal gains magnitude at each step of the filtering, say the peak magnitude increases from 0.2 originally to 2.5 after using the first adaptive filter to 12.5 after the using the sec...
<p>I don’t have the specific details for your filter but with digital filters in general it is typical for the filter to grow the signal in band in contrast to analog filters that shrink the signal out of band. It is all just a matter of scaling. Consider the simple case of a moving average FIR filter consisting of the...
803
adaptive filtering
Performance of adaptive filter
https://dsp.stackexchange.com/questions/28054/performance-of-adaptive-filter
<p>I have designed an adaptive filter for noise cancellation. Is there any standard way of testing adaptive filters?</p>
<p>It is usually evaluated using the Mean Square Error:</p> <p>$$ e(n) = \frac{\displaystyle\sum_{i=1}^{N}(d_{i}(n) - y_{i}(n))^2}{N} $$</p> <p>Where $ d(n) $ are the values of the samples used to train your filter, and $ y(n) $ are the samples of the filter output. So, you train your filter a number of times $ N $, ...
804
adaptive filtering
Tapped delay line + ADALINE = Adaptive filter?
https://dsp.stackexchange.com/questions/87750/tapped-delay-line-adaline-adaptive-filter
<p>When studying neural networks from Neural Networks and Learning Machines, by Simon Haykin, the author highlights the close similarity between of adaptive filtering and neural networks.</p> <p>From a scalar-valued signal, if we put a tapped delay input along with an ADALINE (Adaptive Linear Neuron), do we have an ada...
<p>I think adaptive filter, and a single layer perceptron with MSE error, will be equivalent.</p>
805
adaptive filtering
MATLAB Adaptive Filters
https://dsp.stackexchange.com/questions/28672/matlab-adaptive-filters
<p>In the audio domain, I am currently attempting to use MATLAB to distil:</p> <ol> <li><p>$\textrm{signal}$ from $\textrm{noise + signal}$</p></li> <li><p>$\textrm{noise}$ from $\textrm{noise + signal}$ using two adaptive filters $\rightarrow$ two results. </p></li> </ol> <p>I get the first answer quite effectivel...
<p>Reason for it might be the continuous adaptation, even in non speech regions. So, you can try Voice Activity Detector (VAD) for knowing the exact regions for adaptation of filter, and processing will be frame wise (20 ms). </p>
806
adaptive filtering
Adaptive filtering: Optimum filter length and delay
https://dsp.stackexchange.com/questions/37902/adaptive-filtering-optimum-filter-length-and-delay
<p>I'm trying to find the optimum filter length for an Adaptive Filtering, using RLS Algorithm.</p> <p>I'm using this design: <a href="https://i.sstatic.net/UG9w9.png" rel="noreferrer"><img src="https://i.sstatic.net/UG9w9.png" alt=""></a></p> <p>So the "error" signal is the signal without noise (and that's the signa...
<p>In order to be able to choose an optimal value for the delay $\Delta$ it's important to understand how the system works. The purpose of the delay is to decorrelate the desired signal $s(n)$ and the signal component $s(n-\Delta)$ at the input of the adaptive filter. This means that $\Delta$ must be chosen such that t...
807
adaptive filtering
2D adaptive filters
https://dsp.stackexchange.com/questions/10482/2d-adaptive-filters
<p>Does anyone know about different adaptive filtering implementations (LMS, RLS ...) in 2D or even 3D ? I have sequences of 2D images and 3D volumes with repeating patterns but small differences. I was thinking of using one as my reference input and extract differences between the pair (A simple subtraction doesn't wo...
<p><a href="http://en.wikipedia.org/wiki/Unsharp_masking#Local_contrast_enhancement" rel="nofollow noreferrer">Local contrast enhancement</a> a.k.a. Unsharp masking is a simple, fast method for modeling, then removing, smooth (low-frequency) background noise. In a nutshell,</p> <ol> <li>extract a smooth background ima...
808
adaptive filtering
Is a neural network an adaptive filter?
https://dsp.stackexchange.com/questions/78687/is-a-neural-network-an-adaptive-filter
<p>I am confused as to the difference between neural networks and adaptive filters: As far as I understand it, &quot;neural networks&quot; are largely used for solving inverse problems, where an unknown system is to be identified by the neural network in order to, for example, predict some output. The same is true for ...
<p>An adaptive filter is a special case of a neural network (NN). They have in common that they multiply an input x[n] with weights w[n], the result y[n]=x[n]<em>w[n] is compared to the target t[n] (e.g. the system to be identified or the prediction to be made). The resulting error e[n] = t[n] - y[n] is used to adapt t...
809
adaptive filtering
Performance of adaptive filters
https://dsp.stackexchange.com/questions/43255/performance-of-adaptive-filters
<p>Can somebody please provide an intuitive answer or reference for the following questions?</p> <p><strong>Q1: Dependence of estimation performance on number of data points</strong> -- I could not find any information whether the estimation performance of Adaptive filters such as Least Mean Square (LMS), Constant Mod...
<blockquote> <p>Q1: Dependence of estimation performance on number of data points</p> </blockquote> <p>Since LMS and RLS are <strong>adaptive</strong> filters, their estimation performance improves as the number of their <strong>iterations</strong> increase. Hence more data points will make their outputs closer to t...
810
adaptive filtering
Adaptive filter with two inputs
https://dsp.stackexchange.com/questions/31608/adaptive-filter-with-two-inputs
<p>I have general theoretical questions: </p> <ul> <li>Is it true that an adaptive filter with two inputs (one normal and one delayed by the single time increment) can completely get rid of any <strong>single frequency</strong> noise? </li> <li>Is it then true that a three-input adaptive filter can (completely) get ri...
<p>In general case, to fully filter out a noise consisting of $N$ (arbitrary) harmonics, one needs an adaptive filter with length (number of taps) of at least $2N$.</p>
811
adaptive filtering
System Identification using LMS Adaptive Filter
https://dsp.stackexchange.com/questions/53924/system-identification-using-lms-adaptive-filter
<p>I just have a question about using an least-mean-squares algorithim adaptive filter for system identification. Consider the following <a href="https://i.sstatic.net/homVX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/homVX.png" alt="enter image description here"></a></p> <p>I am told that as the er...
<p>Because an LMS estimator will, over time, "average out" uncorrelated zero-mean noise. It's pretty much in the name.</p> <p>But yes, you're right, there <em>is</em> a noise component in the estimate; one of the qualities of an estimator is how little the noise variance influences the estimate variance after a given ...
812
adaptive filtering
Adaptive Filter Gradient Descent
https://dsp.stackexchange.com/questions/23143/adaptive-filter-gradient-descent
<p>The quadratic performance surface of an adaptive filter is a paraboloid. Its minimum can be found wherever the gradient is zero. However, since there are two types of paraboloids (elliptical and hyperbolic), is there a way to tell if the minimum detected is a global minimum or just a saddle point?</p>
<p>The quadratic surface is determined by the autocorrelation matrix of the data, which is always positive definite or positive semi-definite. This means that any stationary point is always a minimum. In the worst case, this minimum is not unique if the matrix is singular, but it can never be a saddle point.</p>
813
adaptive filtering
Adaptive filter weight adjustment
https://dsp.stackexchange.com/questions/17617/adaptive-filter-weight-adjustment
<p>I have 3 sensor inputs: $a(t)$, $b(t)$ and $c(t)$. I want to design a filter such that the weighted linear combination of the three is always a constant. Kind of like:</p> <p>$$w_1(t)a(t) + w_2(t)b(t) + w_3(t)c(t) = k$$</p> <p>So from my undergrad modules I think I need a adaptive filters. I can perform training t...
<p>What I was getting at in the comments above is that the linear system $w_1(t)a(t) + w_2(t)b(t) + w_3(t)c(t) = k$ has an infinite number of solutions, so you need to state some criterion that allows you to choose a unique solution. I think you have pointed out a constraint that is worth examining.</p> <p>The idea: n...
814
adaptive filtering
What Does an Adaptive Filter Do?
https://dsp.stackexchange.com/questions/1572/what-does-an-adaptive-filter-do
<p>I studied a bit about adaptive filter on internet and found that its a special filter which keep on updating its filter value as soon as it proceeds. It finds out the difference between input and output and using the error function and previous coefficients finds out the new filter coefficients.</p> <p>But this doe...
<p>The key concept that you are missing is that you are not just minimising the difference between input and output signals. The error is often calculated from a 2nd input. Just look at the <a href="http://en.wikipedia.org/wiki/Adaptive_filter#Example_application" rel="noreferrer">Wikipedia example related to the ECG</...
815
adaptive filtering
Adaptive filtering
https://dsp.stackexchange.com/questions/88750/adaptive-filtering
<p>I want to mention upfront that I'm not very experienced in this field.</p> <p>I have a signal <span class="math-container">$u(k)$</span> that I get from a black box simulation (sampled irregularly). The signal looks like this:</p> <p><a href="https://i.sstatic.net/miL0y.png" rel="nofollow noreferrer"><img src="https...
<p>You may have few options:</p> <ol> <li>On Line Least Squares<br /> You may use the <a href="https://dsp.stackexchange.com/a/56670/128">Sequential Least Squares</a> (MATLAB Code available in the link).<br /> This will give you exactly what you got using the polynomial model.<br /> Since it is a polynomial model, you ...
816
adaptive filtering
Modelling Unwanted Signal in a LMS Adaptive Filter
https://dsp.stackexchange.com/questions/53427/modelling-unwanted-signal-in-a-lms-adaptive-filter
<p>I'm having some confusion learning about the LMS Adaptive Filter. I understand that the whole model of adaptive filters relies on the fact that we give it a reference signal to which it keeps comparing the input * filter with and the filter coefficients keep changing until the error between input and reference is ze...
<p>The LMS and many of the variants of Adaptive Filters (In the Linear System context) work in the following settings (Intuitive):</p> <ol> <li>You have access to 2 signals.</li> <li>One signal is the result of the other one when a Linear System is applied.</li> </ol> <p>This sounds really limiting, yet in practice i...
817
adaptive filtering
Why adaptive filter does not work in my application
https://dsp.stackexchange.com/questions/23229/why-adaptive-filter-does-not-work-in-my-application
<p>I got a problem when I was trying to denoise a signal. Actually, it is a simple simulation. The signal is the addition of a step signal (The info I wish to get) and a sinusoidal one (the noise I wish to remove). See below<img src="https://i.sstatic.net/NcyNr.jpg" alt="(a) The noise (b) The signal and (c) Signal + th...
<p>I tried your code change adaptfilt.lms to adaptfilt.nlms<br> also decrease the step size to 0.0001<br> These conditions gave me better results.<br> nlms is better than lms as there is stability in learning filter coefficeints.The lms algorithm could change the filter coefficients drastically.</p>
818
adaptive filtering
Maximum step size for adaptive filter convergence
https://dsp.stackexchange.com/questions/3554/maximum-step-size-for-adaptive-filter-convergence
<p>I’m trying to understand the conception of function <a href="http://www.mathworks.com/help/dsp/ref/maxstep.html" rel="nofollow noreferrer">maxstep</a> </p> <p>The foundation of this function is function <code>firwiener</code> with input parameters: length of adaptive filter, samples of input signal, which returns...
819
adaptive filtering
&quot;Desired signal&quot; in LMS adaptive filters?
https://dsp.stackexchange.com/questions/31892/desired-signal-in-lms-adaptive-filters
<p>I'm trying to understand how to specify the "desired signal" in adaptive LMS filters such as the following: <a href="http://www.mrtc.mdh.se/projects/wcet/wcet_bench/lms/lms.c" rel="nofollow noreferrer">This one</a>, or <a href="http://read.pudn.com/downloads158/ebook/707037/10%20DSP%20applications%20using%20C%20and%...
820
adaptive filtering
Variable Step Size LMS vs Leaky LMS Adaptive Filter Algorithm
https://dsp.stackexchange.com/questions/36664/variable-step-size-lms-vs-leaky-lms-adaptive-filter-algorithm
<p>What is the advantage of Variable step size LMS over Leaky-LMS adaptive filter algorithm? Which one has a better performance?</p>
<p>Variable step size LMS is generally used to improve the speed of convergence or decrease steady-state error. Leaky adaptation is used to combat problems like the potential instability of the filter in a finite-precision implementation. It is closely related to the L2 norm regularization technique and results in cont...
821
adaptive filtering
non-standard error function for adaptive filter
https://dsp.stackexchange.com/questions/21677/non-standard-error-function-for-adaptive-filter
<p>I want to create an adaptive filter. Its coefficients have this general shape:</p> <p><img src="https://i.sstatic.net/ZeXvs.jpg" alt="enter image description here"></p> <p>When the input signal for the filter is a sine wave, the filter behaves the desired way if the look-back window is set to a length equal to 1/4...
822
adaptive filtering
Can Temperature Data be Predicted Using Adaptive Filter (Such As LMS) Algorithm?
https://dsp.stackexchange.com/questions/54955/can-temperature-data-be-predicted-using-adaptive-filter-such-as-lms-algorithm
<p>I am working on a project which requires me to implement adaptive filter as a predictor. I have just started on adaptive filter and I intend to use least mean square algorithm for weight adjustment.</p> <p>How can I predict future values from this system ?</p> <p>Any help would be beneficial for me. Thanks. <img s...
<p>Yes you can predict future temperatures, based on past temperatures, using adaptive filtering as well.</p> <p>The optimal linear estimation of a WSS random process from its past values, which is known as linear prediction, is given by a Wiener filter structure where the desired response to be estimated is the curre...
823
adaptive filtering
Covariance matrix of an adaptive filter input
https://dsp.stackexchange.com/questions/38161/covariance-matrix-of-an-adaptive-filter-input
<p>I run many times in equations containing the trace of covariance matrix of an adaptive filter input. But it is not really clear what it is.</p> <p>For example in <a href="http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=902113" rel="nofollow noreferrer">this paper</a> the input covariance matrix is</p> <p>$$\te...
<p>The Covariance Matrix is commonly defined as </p> <p>$$\mathbf Q = E\left[ (\mathbf x -\mathbf\mu_{x})(\mathbf x -\mathbf\mu_{x})^*\right]$$ with $\mu$ denoting the mean value, i.e. $\mu_{x}=E\left[\mathbf x\right]$, and $\mathbf x$ being column vectors. The fact that you define the covariance matrix as</p> <p>$$\...
824
adaptive filtering
adaptive filter does not converge for all inputs
https://dsp.stackexchange.com/questions/9529/adaptive-filter-does-not-converge-for-all-inputs
<p>I am trying to make a frequency domain adaptive filter in matlab. It uses matlab adaptfilt.fdaf to create the filter parameters like step size and initializing initial filter weight values. Then I have tried to implement the overlap - save frequency domain adaaptive filter algorithm from the paper "<a href="http://u...
825
adaptive filtering
Transient and steady-state analysis for adaptive filter
https://dsp.stackexchange.com/questions/37100/transient-and-steady-state-analysis-for-adaptive-filter
<p>I have got review for my work saying, that my work (adaptive filter variant) should be analyzed in transient and steady-state before claiming it improves performance.</p> <p>I have done common (in my opinion) analysis:</p> <ol> <li>prediction of linear system</li> <li>prediction of non-linear system</li> <li>predi...
826
adaptive filtering
Why can adaptive IIR filters result in unstable solutions?
https://dsp.stackexchange.com/questions/61159/why-can-adaptive-iir-filters-result-in-unstable-solutions
<p>For adaptive filtering, both finite and infinite impulse response (FIR/IIR) filters can be utilized. As an advantage of FIR filters in this context, guaranteed stability is often mentioned, while IIR filters do not share this property (see <a href="https://dsp.stackexchange.com/questions/32129/whats-the-advantage-of...
<p>The IIR filter doesn't have to be unstable, but it has the potential of being so; unlike the FIR case which doesn't have even the potential.</p> <p>One reason for the (potential) unstability of an IIR (adaptive) filter is the numerical issues due to coefficient quantization. When the poles are closer to unit circle...
827
adaptive filtering
MSE in adaptative filter
https://dsp.stackexchange.com/questions/9784/mse-in-adaptative-filter
<p>I'm trying to filter some motion noise from an ECG signal. To do that I'll try to implement an adaptive filter using the LMS algorithm.</p> <p>I think I have to calculate the MSE of this:</p> <p><code>E[e^2 ] = E[(s + n )^2 ]+ 2E[(s + n)X ]W^T + WE[X^T X ]W^T</code></p> <p>in which <code>s+n</code> is the noised ...
<p>This <a href="http://www.scilab.org/" rel="nofollow">scilab</a> script implements a simple LMS adaptive filter.</p> <pre><code>M = 50; LMS = zeros(M,N); LMS(:,1) = zeros(M,1); ERR = zeros(1,N); y = zeros(1,N); mu = 0.0005; for t=M:N, Uwindowed = u(t - [0:M-1]'); y(t) = LMS(:,t)'*Uwindowed.'; ERR(t) = d...
828
adaptive filtering
Why is White Noise so important in System Identification or Adaptive Filters
https://dsp.stackexchange.com/questions/58956/why-is-white-noise-so-important-in-system-identification-or-adaptive-filters
<p>I'm looking to implement a feedback cancellation filter using Wiener Filtering, where an adaptive Wiener filter is used to cancel the feedback occurring in the path between a loudspeaker and a mic (assume PA system). The idea is essentially from this paper: </p> <blockquote> <p>Spriet, Ann, et al. "Adaptive feedb...
<p>I believe the point of feeding white noise into the system is for the filter to adapt its coefficients before actually generating the signal <span class="math-container">$x[k]$</span>. This would mean there are two "operating modes" for the system: coefficient adapting mode (in which white noise, a broadband signal,...
829
adaptive filtering
Are all least square filters adaptive?
https://dsp.stackexchange.com/questions/42192/are-all-least-square-filters-adaptive
<p>Are least square filters, or filters that minimize error energy, the same as least mean square adaptive filters?</p>
<p><strong>TL;DR:</strong> No, they are not necessarily the same.</p> <hr> <p><strong>Gory Details</strong></p> <p>Least squares is just an optimization technique. It is used in a variety of ways.</p> <p>For filter <strong>design</strong> it is used to select that realizable filter $H_r(e^{j\omega})$ that most clos...
830
adaptive filtering
What is usual independence assumptions on adaptive filters
https://dsp.stackexchange.com/questions/33771/what-is-usual-independence-assumptions-on-adaptive-filters
<p>In <a href="http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1261952&amp;tag=1" rel="nofollow">this paper</a> stands:</p> <blockquote> <p>The derivation and analysis of NLMS rest upon the usual independence assumptions.</p> </blockquote> <p>It has a footnote:</p> <blockquote> <p>The independence assumptio...
<p>I think there is an error in your referenced independence assumption. $w(k)$ should be the update part $\Delta w(k)$ i.e the</p> <p>$w(k+1)=w(k)+\mu \Delta w(k) =w(k)+\mu \frac{x(k)*e(k)}{c+x(k)^Hx(k)}$ </p> <p>The error after convergence is uncorelated and zero mean. </p> <p>The two other assumptions are correct...
831
adaptive filtering
What is leakage in frequency domain adaptive filters?
https://dsp.stackexchange.com/questions/9441/what-is-leakage-in-frequency-domain-adaptive-filters
<p>What does it mean by leakage in case of digital filters? My specific question is about the frequency domain adaptive filter function provided in the Matlab DSP toolkit, accessed as adaptfilt.fdaf. It has a parameter called LEAKAGE, but I am not sure what exactly does it represent or how it affects the filter respons...
<p>In adaptive filtering, leakage is a stabilization method which may be useful if the covariance matrix is close to singular (i.e. at least one of the eigenvalues is very small), or if there are finite-precision effects in the implementation of the adaptive filter. Leakage changes the update formula such that not only...
832
adaptive filtering
Training a non-linear-phase adaptive filter
https://dsp.stackexchange.com/questions/95984/training-a-non-linear-phase-adaptive-filter
<p>Note: This post was made to aid with adaptive equalizer design.</p> <p>Adapting an FIR filter using algorithms like LMS, RLS, etc... will generally result in updates that are non-symmetric and therefore non-linear phase.</p> <p>When the adaptive FIR filter taps are linear phase, one can synchronize a &quot;desired&q...
833