22

There are indeed rare instances of recordings in which the L&R channels are in opposite phase. This was done in the late 70s and early 80s to create a cheap "spatial sound" effect (like the "surround" button on low-end hi-fi systems of the time), and on such recordings, computing the average of the left and right channels gives a null output. Some stereo ...


16

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


10

It should not, the need really depends on your application. However, this is a safe bet for most needs, and almost mandatory when you want to control the information lost by the downsampling. Blurring is often another word for low-pass filtering. When an image contains high-frequency content (fast variations), downsampling can produce visually weird or ...


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


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


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


6

According to (digital) sampling theory, 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 filter is very suitable as a filter, as it has a number of nice features. The Gaussian function is mathematically tractable. ...


5

Simplest reason for downsampling is simply to reduce the amount of data you have. Say you have a audio raw stream sampled at 44.1 kHz. You may simply want to reduce your data rate to 22.05 kHz because your algorithm can work with that sampling rate. Apply the same principle anywhere else. Just because you have more data does not mean you always need it. It ...


5

The "spikes" (they are quite small in magnitude, but large compared to the nearby filter taps) at the beginning and end are part of how the equiripple property is achieved. In his book "Multirate Signal Processing for Communication Systems" (a book that I recommend quite highly), fredric harris indicates that it is sometimes advantageous to eliminate the ...


5

I've not seen this notation before. However, it does seem to make sense. The $M$-downsampler is defined by the equation: $$ y_D[n] = x[Mn] $$ Its $z$ transform is defined by the equation: $$ \begin{align} Y_D(z) &= \sum_{n=-\infty}^\infty y_D[n]z^{-n} \\ &= \sum_{n=-\infty}^\infty x[Mn] z^{-n} \end{align} $$ Apply a change of variable, letting $n'...


5

Thanks for the reference! You forgot to mention your work on drums enhancement, which may also be of interest for Summer_More_More_Tea's application. Well, that all really depends on what you want to do with it. Do you have a specific "end application" in mind? I completely agree with pichenettes's above statements. To be complete, I should however say that ...


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

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


4

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


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

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


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


3

A common reason for upsampling is rate matching, for instance mixing two signals with different sample rates, or sending different lesser rates of audio to a player that only plays at 44.1kHz. And you are correct that downsampling does potentially destroy information in a signal (assuming there was spectral energy in the portion that has to be low-pass ...


3

EDIT: I took this answer down for a time because I realized a lot depends on whether there are any idiosyncrasies in how images are mapped to pixels by actual devices, and, not being an image guy, I don't know a lot about that. I decided to bring it back, with the caveat that the answer may be insufficient given said idiosyncrasies. The image should be ...


3

As you've figured out, for the filter specifications you gave, you need a very high filter. To summarize, you're asking for: Passband edge: 30 Hz Stopband edge: 32 Hz Minimum stopband attenuation: 68 dB The main determining factor for the filter order that you need to meet the specifications is the width of the transition band as a fraction of the sample ...


3

There are a couple of ways that you can do it. The first is with resample, but it is a multi-step process. First, you have to figure out which interpolation and decimation factors will get you the sample rate you want. [n, k] = rat(16000.1 / 128000); That gets you an interpolation factor of 20000 and a decimation factor of 159999. You factor those to ...


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


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