# Tag Info

21

To understand the linearity property more easily.Let us consider the above diagram,here we have 2 sequences namely Xn and Yn. when we add both the sequence we get Xn+Yn whose amplitude value are represented with blue colour. when any system which satisfy this condition then it is called linear. In case of mean filter, mean value for sequence Xn is 1+1+3/3=5/...

19

Nonlinear filters are those for which the linearity relationship breaks down. Consider two signals $A$ and $B$, for linear filter such as mean filter $F_m$,you have $F_m(A+\lambda B) = F_m(A) + \lambda F_m(B)$, but the equation is not satisfied for an nonlinear filter such as the median filter. In application, the median filter removes outliers and shot ...

9

The problem with the moving average is that the average is not robust to the presence of the outliers - so you would need a very large window size to "dilute" the outliers. Try a non-linear filter instead, like a median filter: Apply a median filter on your signal - you would need a window size of at least 300 samples. Compute the difference between the ...

9

Your first order filter recursion for some real constants $a,b,c$ is $$y[n] = a x[n] + b x[n-1] - c y[n-1]$$ with the two initial memory states $x[-1]$ and $y[-1]$ at $n=0$. Your "no transient" condition can be translated to $y[0]=0$ and a necessary second condition so that you can solve for both of your memory states. The second condition could be, ...

6

I'm pretty new to this myself, so please correct me if I get this wrong. Using your example, J = ordfilt2(I, 9, true(5)). ordfilt2 will move over the 2d array I in blocks of the same size as true(5). For each of these 5x5 blocks, sort all the elements from smallest to largest. Now fill in the corresponding block in J with a bunch of copies of the 9th ...

5

In a linear filter, the output will change linearly with a change in the input. You could plot some sort of straight line from the relationship between the two. A median filter can change non-linearly with certain input changes. e.g. take an input vector where all the data values are different: a change in a non-middle value won't affect the median output ...

5

Yes, the order does matter. In a real system with noise (as opposed to an idealized model) if you decimate before filtering, all the noise in the bands you aren't interested in will alias back in, raising the noise floor of your system. In your example, if you downsample by two before filtering you would have twice the noise in your bands of interest ...

5

Gaussian Kernel is made by using the Normal Distribution for weighing the surrounding pixel in the process of Convolution. Since we're dealing with discrete signals and we are limited to finite length of the Gaussian Kernel usually it is created by discretization of the Normal Distribution and truncation. I created a project in GitHub - Fast Gaussian Blur. ...

5

I need to preprocess raw ecg data in R, here is a sample already standardized. I'm not an expert in signal processing nor experienced in working with medical data,... Not being an expert on how the heart works and how its phases manifest themselves on the ElectroCardioGram (ECG) is not a problem. But it would help immensely if you mentioned what is the ...

5

Sampling at a higher rate will distribute the quantization noise over a wider frequency, thus reducing the noise spectral density due to that quantization noise, with a lot of caveats. For more details on that see What are advantages of having higher sampling rate of a signal? In your last paragraph, if you are referring to running the same filter at a ...

5

You can achieve this result by using two combs filters : https://en.wikipedia.org/wiki/Comb_filter Put simply, the comb filter consists of adding a delayed version of the signal to itself, causing destructive or constructive interference. For instance, with $K = 20$ and a negative gain value after the delay line, you can significantly decrease or suppress ...

5

Update If I understood your model, you have a model of Constant Velocity in 2D (Cartesian Coordinate System). While your measurement are in Polar Coordinate System. Pay attention that your measurement function is: $$h \left( x, y, {v}_{x}, {v}_{y} \right) = \begin{bmatrix} \sqrt{ {x}^{2} + {y}^{2} } \\ {\tan}^{-1} \left( \frac{y}{x} \right ) \end{bmatrix} ... 5 Zero-phase filtering is a non-causal procedure, so it cannot be done in real time, only offline (or pseudo real-time, i.e., with a sufficient delay). A zero-phase filter needs to have a purely real-valued frequency response, and, consequently, it must have an impulse response that is even with respect to the time index n=0, i.e., it is non-causal. Zero ... 5 A personal rule: in general, it can be better to perform non-linear operations before linear ones. One reason behind that is that a lot of practical concerns are related to outliers or suspect behavior, which can easily be smoothed out (and become indistinct from other signals) by linear filters. Let me reformulate. If f_i denote filters, and s_i ... 5 Classic filteration is indeed done using convolution. Though I have seen broader definition of filtering as shaping the signal in its frequency domain which can be done in many other methods as well. Of course you can create meaningful operations using element wise operations and even specifically multiplication. Think of the case you have a noise with the ... 5 The way I understand the problem is each sample of the output is a linear combination of the samples of the input. Hence it is modeled by:$$ \boldsymbol{y} = H \boldsymbol{x} $$Where the  i  -th row of  H  is basically the instantaneous kernel of the  i  -th sample of  \boldsymbol{y} . The problem above is highly ill poised. In the classic ... 4 You can design that filter manually without problems. Matlab just uses a very simplistic approach to comb filtering with a delay line. In order to keeps things as simple as possible I would recommend you use a series of notch filters to remove each partial of your harmonic noise separately. That also gives you more control over how much of each harmonic ... 4 A finite impulse response (FIR) digital filter implements the following convolution sum$$y(n)=\sum_{n=0}^{N-1}h(k)x(n-k)\tag{1}$$for each output sample y(n), where x(n) is the discrete-time input signal, h(n) is the filter's impulse response, and N is the filter length. The values h(n) are also called filter taps, and N is then referred to as ... 4 Wavelets are ideal for localized events. The Fourier Transform represents a function as a sum of sines and cosines, neither of which are localized. The spectrogram does keep some time information, at the expense of frequency resolution In your case, the signal is not localized at all. The spectrogram smears your 15 Hz band over several Hz, as it captures ... 4 In Short: The order does matter. Detailed: Downsampling by a factor of 2 without filtering, will cause aliasing in frequencies of 500Hz and more. Since your signal is bandlimited to 600Hz, the frequency range of 400Hz-500Hz will be corrupted. So (theoretically) the frequency range 0Hz-400Hz will be the same with or without filtering. If you were only ... 4 I'm not sure what's you model is. Let's say it is something like:$$ y = H x + n $$Now, using the Least Squares model is optimal (In the MSE sense) when  n  is AWGN (It is the linear optimal estimator if the noise is white). So unless the noise in your model is colored, no gain by filtering the data before applying the Least Squares method. Now, what ... 4 In general it's only possible to implement causal and stable filters. There are exceptions where marginally stable filters are used, but this doesn't apply here. So if you want to invert a given filter, this is only possible if its zeros are inside the unit circle of the complex plane (such filters are called minimum-phase filters). The zeros of the given ... 4 Looks like your data is virtually free of noise. That, combined with a very high sampling frequency would mean that at the jumps the data is exactly at the threshold between two quantized values. Set up nodes at the middle points of the vertical jumps and construct splines that connect the nodes. The easiest is to just draw straight lines between successive ... 4 Consider an D-tap FIR filter with liner phase, the group delay (measured in samples) is$$g=\frac{D-1}{2}\tag{1}$$and therefore, if it is measured in seconds it will be$$g=T_s\frac{D-1}{2}\tag{2}$$where T_s=1/F_s. The CIC filter which is also denoted as recursive running sum filter is indeed a special implementation of a moving-average filter. The ... 4 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 the autocorrelation R_{ss}(k) of s(n) is ... 4 A first order lowpass filter is usually implemented like this:$$p[n] = \alpha p[n-1] + (1-\alpha) pi[n] Where $p[n]$ is your filtered power estimation, $p[n-1]$ is the previous result, $pi[n]$ is your new measurement (probably the product of instantaneous voltage and current measurements), and $\alpha$ is a positive parameter just less than 1. The ...

4

Yes, integration and differentiation can be linear filters. You can start from laplace properties that say: $\int_{0}^{t} {x(t)dt} \longrightarrow \frac{X(s)}{s} \\ \frac{d}{dt}x(t) \longrightarrow sX(s)$ So you can find transfer function of integration and differentiation: $H_{INT}(s) = \frac{1}{s} \\ H_{DIFF}(s)=s$ You can convert these transfer ...

4

Welcome to DSP Community. General We assume 2 types of filters: LPF or HPF. Classifying Filter Type Usually, if it is a well planned LPF and well Planned HPF a simple test will do. Calculate the sum of all coefficients. The sum of the coefficients is the first element of the DFT of the signal. It means it is the DC gain and well behaved LPF has gain of 1 ...

4

In general you will need to multiply first and then low pass filter. You also have to make sure that your sample rate is high enough so the multiply doesn't create aliasing. Let's look at a simple example: feed a 1kHz signal into a loudspeaker and measure current and voltage to determine the average (thermal) power with maybe a 100ms time constant. The ...

4

The Least Mean Square solution to find the "channel" or response of the filter is provided by the following MATLAB/Octave Code using the input to the filter as tx and the output of the filter as rx. For more details on how this works, see this post: Compensating Loudspeaker frequency response in an audio signal: function coeff = channel(tx,rx,ntaps) % ...

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