# Tag Info

20

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

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

6

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 become $$y[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

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.

4

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{\... 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, ... 4 I will explain why method 2 is often a better choice over method 3. The frequency domain approach is equivalent to the "Windowing" method of filter design- in that to do that approach correctly you should window your data before taking the FFT. For an anti-alias filter design in the time domain approach, the least squares filter design algorithm ... 4 Their numbers work out right if you do the stated decimation before the stage, and you pay attention to the fact that decimations are cumulative. So stage one operates at 1/3 of the input rate, stage two operates at 1/6, stage three operates at 1/12, and stage four operates at 1/48. If you scale the adds and multiplies by those numbers, then their stated ... 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 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 For posterity, I'm going to add that you can build the pyramid in this way. In other words, if you choose the correct standard deviation for the gaussians, you can do all the low-pass filtering to the original image first, and then downsample later to make identical results to if you had used the normal blur-downsample-blur-downsample method. Here is ... 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 All of the answers above are good in their own way. The reason that the Oppenheim-Schafer book and other similar resources use a gain of L for upsampling and a gain of 1 for downsampling is to maintain a constant amplitude for the signal before and after the operation. Do the processes of upsampling and downsampling affect the magnitude of the ... 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 Let us define the terms first: Downsampling means reducing the sampling rate of a signal. If there is energy outside the new Nyquist frequency, there will be aliasing. Filtering means eliminating all energy in some frequency bands. Decimation means anti-alias filtering a signal and then downsampling it. In a typical SDR application, your captured bandwidth ... 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 ... 3 Sample rate conversion systems (expansion or decimation) are time-varying operators. For your example system of decimation by M : y[n] = T\{x[n]\} = x[Mn] $$you can easily see that results of shift in the input and output are not the same; i.e.,$$ y_1[n] = T\{ x[n-d] \} = x[Mn - d] $$and$$ y_d[n] = y[n-d] = x[M(n - d)] \neq y_1[n]

3

First, 0.3dB is generally considered small potatoes in signal processing. Second, the documentation for scipy.signal.decimate states that it uses an 8th-order Chebychev filter by default (without specifying the ripple, dangit!). Chebychev filters have some ripple in the passband; if the bulk of your signal's energy is falling into the troughs of the ripple,...

3

Imagine an incoming signal with 60dB SNR over the whole spectrum. The 60 dB isn't what matters here – what matters is that you've got the same power spectral density all over your spectrum, including the 39/40 that you'll alias onto your remaining band. So, if you don't want the SNR of that remaining band to be affected, you'd need infinite attenuation; can'...

2

Ignoring your original question, and referring to your comment: I am observing the FFT of the downsampled signal presents an attenuation. I don't understand why. The output of FFT (or DFT in general) isn't normalized - it is relative to the signal length (the total amount of samples being transformed). When decimating a signal (say, by a factor of M), ...

2

Assuming the signal was reasonably band-limited before sampling, you can just use a high quality interpolation, such as a Sinc interpolation kernel, to calculate new equally spaced points at any lower density. For small frequency deltas, even a long interpolation kernel or high degree polynomial interpolation can be a lot more efficient than naively ...

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

When we have a discrete signal it is usually sampled on a grid of indices. Both sub sampling and down scaling changes the grid. The classic definition is that Sub Sampling is a step in Down Scaling. Sub Sampling Given a signal which is sampled on a grid of indices Sub Sampling means to keep only the samples which on a sub set of the indices grid. Down ...

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