# Tag Info

11

You seem to understand correctly what is going on. However, I'm not sure what you expect to get. Take your initial example. Let your input signal be $x[n]$: $$x[n] = \delta[n]$$ The first step in the decimation process is that the input signal is convolved with the anti-aliasing filter's impulse response $h[n]$: \begin{align} x_f[n] &= x[n] * h[n]... 11 Downsampling and upsampling are operations that change the sampling rate of a signal. Each one of them is composed of two steps, changing the sampling rate and filtering. Usually, the amount of change is expressed as a ratio. When downsampling, we are trying to take the signal from some Fs to some Fs_n < Fs. The key problem with doing this is that we ... 8 Two more reasons to over-sample: Low latency: for example control loops require very low latency. Oversampling gets data in and out faster, so that reduces latency. Also any lowpass filtering introduces group delay. The sharper the lowpass filter, the higher the group delay. If you oversample, you need a less steep anti-aliasing filters and end up with less ... 6 You can determine the "best" filter by analyzing what type of errors is created and how much of each error your specific application can live with. If your original content is already perfectly band limited, than you don't need a low pass filter at all and can directly throw away the extra samples. The decimation low pass filter typically determines how ... 6 Interpolation (sampling frequency 44.1 kHz ➔ 88.2 kHz) Your original 44.1 kHz sampled signal has frequencies up to 22.05 kHz, so you should lowpass filter at 22.05 kHz after dilution with zeros. Your filter should have a gain of 2. Otherwise the signal amplitude drops to half because you set half of the samples to zero. Like Jim Clay says, you can combine ... 6 Your questions still leave me wondering as to what you're actually designing. For software implementation on modern x86 CPUs, CICs make almost no sense, but they are extremely elegant in hardware. These filter definitions are ridiculous if you're planning to use a FIR – a transition width of 1mHz means that a minimum phase equiripple filter [1, (5.75), p. ... 5 The phases of a polyphase filter can be interpreted as a fractional delays. Consider your filter with 8\cdot 256 taps in the up-sampled domain. In order to avoid aliasing the filter needs to be a low pass that doesn't allow any content above 1/256 of the sample rate. Since there is no energy above 1/256\cdot f_s in the transfer function you can ... 5 Your interpolation operation is an upsampling operation with subsequent low-pass filtering. This translates to zero-padding in the frequency domain. Given your original signal x[n], you upsample it to becomey[n] = \begin{cases}x[n/M]& n/M \in \mathcal{Z} \\ 0 & \text{else}\end{cases}$$to become an M-times upsampled signal. Then, your ... 4 The root of your problem is that you are not familiar with the Nyquist Sampling Theorem. First of all, I question your premise that your sample rate is 70 MHz and that you can represent your signals, which range from 0 to 70 MHz, at this rate. The Nyquist sampling theorem indicates that you can only represent signals up to half the sample rate, which is 35 ... 4 So, let's not forget what SNR is: it's a relation of powers present. The thing that improves SNR is a propoer low-pass: it leaves the signal power alone and reduces the power of the noise. An ideal low-pass filter will leave zero noise outside its specified bandwidth – so it doesn't matter whether you "cut off" these bandwidths using decimation or not, ... 3 The problem is in the input signals to your polyphase filters. They should be delayed and subsampled versions of the input signal, like in the following code fragment: M=8; % downsampling factor L=256; % length of input signal, integer multiple of M x=randn(L,1); % input signal h = fir1(127, 1/M); yp = zeros(L/M, 1); for i = 1:M, xtmp = [zeros(i-1,... 3 Every type of filter has its characteristics. For instance, Butterworth filter needs a higher order than Chevyshev, which implies that it is likely that it would computationally cost more. Other characteristics, such as the ripple in the stop filter (which implies different attenuation in those bands), the phase distortions in both stop and pass bands, ... 3 One advantage of the polyphase filter is when hardware resources are limited. The polyphase approach replaces a L tap filter with N filter sets of L/N taps. Once you've done that you can just use a single L/N filter set and swap coefficients. 3 Yes, your method is correct, and will work just fine. You can reduce the computational load by combining the upsampling (insertion of zeros) and low-pass filter into a single interpolating filter, and combining the low-pass filter and removal of samples into a single decimating filter, but that is not necessary to get correct results. 3 You have the right idea about Interpolation/Decimation and the steps involved. Two points: Interpolation: When you insert zeros between samples, the spectrum is now the new sampling frequency wide (88.2kHz in your case) with copies of the original spectrum showing up at multiples of the original frequency (44.1kHz in your case). When you lowpass filter, ... 3 Don't be confused; you're doing everything correctly here:$$\begin{align*} f_{sample,in} &&\overset{\text{interpolate}}{\rightarrow}&& f_{sample,intermediate} &&\overset{\text{decimate}}{\rightarrow}&& f_{sample,out}\\ 22 \mathrm{kHz}&&\overset{\uparrow 20}{\rightarrow}&& 440 \mathrm{kHz} &&\overset{\...

3

In communications and in typical GnuRadio applications, decimation is most commonly used to reduce the sampling rate of an oversampled signal, in order to reduce the computational complexity of the system. Consider this example: You design a stereo FM receiver in GnuRadio. The FM signal is approximately 200 KHz wide, so you sample the downconverted signal ...

3

This answer assumes that some passband flatness is required. Two-path all-pass half-band IIR If you can accept the phase distortion, may I recommend the HIIR half-band lowpass filter library by Laurent de Soras. It implements half-band elliptic lowpass filters as a sum of all-pass filters that are 180° out of phase in the stop band. It is a very efficient ...

3

Try adding a gain of 16 before your low pass filter, or equivalently using a low pass filter with a passband gain of 16 instead of 1.

3

I do a lot of decimation in the frequency domain. Little details are important. I assume you already know the basic rules for fast convolution: the FFT length N is equal to the data blocksize L plus the length of the filter impulse response M minus 1. Each operation uses L samples of new data plus M-1 samples of data from the old block. Ensure that the ...

3

I may have originally misinterpreted your question so I'll change my answer here. As to why we don't typically just sample at our a decimation rate (i.e. the Nyquist rate for the bandwidth of interest). It really comes down to the practicality: If you had a 200hz signal of interest, yes you could sample at 400hz assuming there was absolute no noise in your ...

3

What you are calling decimation is in fact downsampling: keeping one of every $k$ samples from the original signal. Proper decimation involves a digital low-pass filter in order to eliminate all components above $\pi/k$ (or $f_s/(2k)$ in continuous time) since these components cannot be represented at the new lower sampling frequency (and will result in ...

2

One reason to keep the signal oversampled is the dynamic range / oversampling tradeoff. Roughly, every time you double the bandwidth "unnecessarily" for the signal of interest you get an extra bit of sampling resolution, once filtering is applied (which can happen in the digital domain) you can store the results at a higher bit depth and those bits contain ...

2

You can generate a scale volume from an image by convolving it with Gaussians of increasing $\sigma$. Or, equivalently, by convlolving it repeatedly with the same Gaussian. It just won't be a pyramid. :) One reason to generate a pyramid by downsampling is to reduce the amount of computation, because once you apply a low-pass filter the full resolution ...

2

After my trials, I realize that problem is directly about Warning: Image is too big to fit on screen; displaying at 67% warning. I use imwrite to my matrix and convert it to jpg file. After looking the image using jpg file , there is no problem.

2

If all you want to do is get an estimate of the DC component of your data then you can simply obtain the average value of your signal over a unit of time. This can be easily shown by looking at the expression for calculating the Fourier coefficients for 'f=0' (DC component). The easiest way to do this is via a moving average filter (http://en.wikipedia.org/...

2

If you are only decimating by four, then a CIC filter is not the way to go. CIC filters have two advantages and one big disadvantage. The advantages are that they don't require any multipliers, just (large) adders, and they can efficiently decimate by really large factors. The no-multipliers advantage was a big deal years ago when multipliers were ...

2

so, what's wrong with a simple 1st-order, 1-pole, IIR filter, where you're a little careful with the coefficient that soooo close to 1? $$y[n] = (1-p) x[n] + p y[n-1]$$ where $p = \cos(\omega_0) = \cos\left(\pi \frac{0.1}{54000} \right)$ but express the whole thing in terms of $1-p$ instead of $p$. \begin{align} y[n] & = (1-p) x[n] + p y[n-1] \\...

2

any low-pass filter with DC gain of 1 ( $H(1)=1$ ) is a candidate for DC extraction filter. this kind of "get DC" filter problem is pretty much equivalent and complementary to the "DC blocking filter" problem. i don't see why you wouldn't use a far lower order IIR filter for your LPF. you can get sharp without 768 taps (and, presumably 768 multiply-...

2

The decimate function in matlab does 2 things. First, the signal is filtered. From your code, and the function doc page, I see that it uses Chebyshev Type I IIR filter of order 10 with normalized cutoff frequency 0.8/p(i) and passband ripple 0.05 dB. Next, the signal is downsampled. The filter can be created using [a_lp,b_lp] = cheby1(10,0.05,0.8/p(i)); ...

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