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

14

You need to filter first and then downsample. Otherwise, you will run into aliasing problems. I.e. frequencies that are above 30 Hz will create images within your frequencies of interest. You can consider the little script below to compare both methods: Fs = 128.0 t = np.arange(0, 10, 1/Fs) signal = np.sin(2*np.pi*10*t) + np.sin(2*np.pi*50*t) sigma2 = 0.5 ...

13

An image "should not be blurred using a Gaussian Kernel" in general. This can be a safe bet for a lot of basic image processing needs, and a smoothing is almost mandatory when you want to control the information lost by the downsampling. Blurring is (often, not always) another word for low-pass filtering. When an image contains high-frequency ...

9

This derivation is a tricky one. The approach suggested before has a flaw. Let me demonstrate this first; then I will give the correct solution. We wish to relate the $\mathcal{Z}$-transform of the downsampled signal, $Y_D(z) = \mathcal{Z}\{x[Mn]\}$, to the $\mathcal{Z}$-transform of the original signal $X(z) = \mathcal{Z}\{x[n]\}$. The wrong way One could ...

8

I don't get your downsample step when you downsampled by factor $M$. Let me go from scratch with the spectrum visualization below, with time domain, continuous frequency domain and discrete frequency domain from left to right. When we reduce the sampling frequency by a factor $k$, the signal spectrum is copied to new replicas at $f_s/k$. The discrete ...

8

Yes the signal is perfectly reconstructed. Consider the process at each stage as I show using the block diagram below: Consider each sample of the signal at each node in the diagram (each sample is shown using the sample index at the node for each row): (Note: You see the same form of reconstruction in the FFT algorithm). I will attempt to illustrate how ...

8

According to (digital) sampling theorem, signals should be properly bandlimited, before they are (down) sampled. A digital filter limits the bandwidth of the signal and makes it suitable for downsampling without aliasing. A Gausssian kernel is very suitable as a lowpass filter, as it has a number of nice features. The Gaussian function is mathematically ...

7

You don't have a loss in time precision when using FFTs because the FFT is fast. The FFT is just a fast algorithm for implementing the discrete Fourier transform (DFT), nothing more. Instead, there is an inherent tradeoff in time and frequency resolution due to the Heisenberg uncertainty principle. While its statement is explicitly focused at quantum ...

5

You're correct, it has to do with the Cut Off frequency of the Gaussian Blur Filter in its Frequency Domain. In order to see it, just apply a DFT (Using MATLAB it can be achieved by fft / fft2) and look on the absolute value. Look for the -3dB point and you'll see. There is also an intuitive explanation on the original article which say that blurring ...

5

The RTL-SDR, as most software-defined radios, has an analog front-end that includes a tunable mixer. This mixer can down-convert the frequency band you're interested in to baseband, where it is sampled. For example, let's say that you want to receive a signal centered around 900 MHz and with bandwidth $2B$ -- that is, the band covers the range from $900-B$ ...

5

First note that when you use a logarithmic function you shall avoid negative arguments if it's output should be real valued. Then consider the following relation: $$y[n] = \ln( 1 + x[n] )$$ where the input $x[n]$ is conditioned such that $0 < 1 + x[n] \leq2$ is maintained. Then a Maclaurin series expansion of this expression will be $$y[n] = \ln(1 + ... 5 Suppose you have initially a real-valued sequence x of length N. The function is basically doing this: To upsample, it transforms to the frequency domain and adds N/2 zeros at the end. Then it transforms back to the time-domain. To downsample, it transforms to the frequency domain and deletes the second and third groups of N/4 elements (which correspond to ... 5 Is it possible to combine decimation and low pass filtering in one step? Not necessarily only for images but also for general signals. Yes, that's what people usually do when they implement downsampling: since of the output of the anti-aliasing filter, you throw away N-1 samples, why even calculate these? The trick is to decompose your filter into polyphase ... 5 No. The aliased component will interfere with the non-aliased components and the interference can constructive or destructive. Trivial example:$$x[n] = \sin\left(\frac\pi2n\right)$$If you down sample this to y[n] = x[2n], you get all zeros. 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 Averaging is filtering with a rectangular filter kernel, which has a poor frequency response, both in pass band ripple and stop band attenuation, Because of the poor stop band response it won't anti-alias very well. The non-flat passband will distort the final result even if there is no high-frequency spectral content to alias. 4 In the final result, you want to express the spectrum X_d(e^{j\omega}) in terms of X(e^{j\omega}), the spectrum of x[n]=x_c(nT). Since X(e^{j\omega}) is already periodic, it must be possible to represent X_d(e^{j\omega}) as a sum of a finite number (M) of shifted versions of X(e^{j\omega}). This is why the original infinite sum is split up into ... 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

Your understanding is correct. I don't have the full text of the paper, but it sounds like they aren't being very precise with their description. As you pointed out, downsampling doesn't improve frequency resolution in and of itself, it merely reduces the amount of bandwidth that can be represented unambiguously. However, I can take a guess at what they ...

4

Since I can't comment on this particular site I'd say this, consider the following before you do what you're trying to do. Due to the Nyquist law you want your sampling frequency to be that of the DOUBLE of the maximum frequency your analog signal has. If you downsample to 64 hz that means you'll only be able to see signal data up to 32 Hz. EEG contains the ...

4

First, the P. P. Vaidyanathan condition is a sufficient one, not a necessary one. The upper part keeps every even sample. The lower part convert odds to evens, keeps every (novel) even, and put the (novel) evens back to thir old place. Hence, the delays $z^{-1}$ and $z^{+1}$ exactly interleave the kept evens (top) and odds (bottom). From P. P. ...

4

Decimating a signal (selecting every Dth sample and discarding the rest) does not distort the signal within the passband in any way other than to cause aliases from higher frequencies to fold into the signal bandwidth. Depending on how we model the system the phase may be effected since $z^{-n}$ is replaced with $z^{-n/D}$, but the phase will still be ...

4

Since you have already properly low pass filtered the signal, then there is no risk in taking every other sample to complete the downsampling operation. If you were to create a low pass filter that passed your spectrum of interest with no distortion, and rejected all energy in the alias frequency locations then taking every other sample would provide a ...

4

The problem with downsampling is that it can be lossy -- since you're reducing the sampling rate, you can introduce aliasing. So, you can reverse the order whenever downsampling does not result in aliasing. For example, say your discrete-time signal $x[n]$ contains energy in frequencies up to $f_N/3$, where $f_N$ is the Nyquist frequency. Then, downsampling ...

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

Absolutely positively -- uh -- maybe. It depends entirely on the underlying process that generated the original series, what the series "means", how much unique information is actually present in those ten samples, how much you're willing to throw away, and what you know about how that information is structured. At the extreme "no" end ...

3

MP3 doesn't really go as high as 44.1 kHz anyway. The first step in compression filters out audio above 18 kHz, so a 36 kHz sample rate would have been sufficient. But that's not really the problem anyway. FM is analog and therefore doesn't even have a sample rate. A sample rate is the rate at which digital samples are taken. FM does have bandwitdh, as you ...

3

Resampling (by rational or even irrational ratios) can be done by low-pass filtering in conjunction with high quality interpolation of all the samples needed for the new rate, directly. No two-step up-sampling following by downsampling is required (although that is one possible implementation for simple ratios). A Sinc kernel, being a reconstruction ...

3

First you need to interpolate between samples rather than just retaining and discarding samples (which introduces horrible jitter noise during non-integer downsampling). Then, if the original audio data contained spectrum around or above 4000 Hz (half the sample rate), you will need to low-pass filter before or in conjunction with the interpolation to the ...

3

Oversampling can be used to reduce noise only when you're oversampling the same quantity and the noise samples are uncorrelated and have zero mean. This is seldom the case. Let's say you're sampling signal $s(t)=r(t)+n(t)$, where $r(t)$ is the signal you're interested in, and $n(t)$ is zero-mean noise, which comes primarily from internal noise in your ...

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