We changed our privacy policy. Read more.

Questions tagged [interpolation]

Interpolation is a method of constructing new data points within the range of a discrete set of known data points.

Filter by
Sorted by
Tagged with
14
votes
3answers
14k views

How to Resample Audio Using FFT or DFT

I'm down sampling voice audio by first performing an FFT, then only taking the parts of the result that I need, and then performing an inverse FFT. However, it's only working properly when I'm using ...
7
votes
5answers
2k views

Multi-channel audio upsampling interpolation

I have a four-channel audio signal from a microphone tetrahedral array. I wish to upsample it from 48 kHz to 240 kHz. Is there a preferred interpolation method for audio? Does cubic ...
5
votes
3answers
596 views

Absolute convergence of periodic sinc interpolation

An $N$-periodic complex discrete-time sequence $[x_0, \dots, x_{N-1}]$ can be resampled to an $M$-periodic sequence $[y_0, \dots, y_{M-1}]$ with $M>N$, using sinc interpolation: $$\begin{align}y_m ...
3
votes
1answer
384 views

The Proper Way to Do Sinc Downsampling (DFT Downsampling) for Uniformly Sampled Discrete Signals with Finite Number of Samples

Given a signal $ \left\{ x [ 0 ], x [ 1 ], ..., x [ N - 1 ] \right\} $ what would be the correct way to downsample it in the frequency domain (Sinc interpolation)?
27
votes
6answers
2k views

Calculating the PDF of a waveform from its samples

A while ago I was trying different ways to draw digital waveforms, and one of the things I tried was, instead of the standard silhouette of the amplitude envelope, to display it more like an ...
8
votes
4answers
2k views

Whittaker-Shannon ($\mathrm{sinc}$) interpolation for a finite number of samples

Given an infinite number of samples $(N)$, a higher (or lower) number of samples $(cN)$ can be derived using sinc interpolation followed by sampling. How can this be applied to finite length signals? ...
7
votes
2answers
2k views

Interpolation of magnitude of discrete Fourier transform (DFT)

For example for peak frequency finding, it seems valid to use band-limited interpolation methods on the complex DFT bins, or separately on their real and imaginary parts and to calculate the ...
20
votes
2answers
6k views

Frequency-domain zero padding - special treatment of X[N/2]

Suppose we wish to interpolate a periodic signal with an even number of samples (e.g. N=8) by zero-padding in the frequency domain. Let the DFT X=[A,B,C,D,E,F,G,H] ...
2
votes
3answers
1k views

Resampling and removing high frequency noise?

I am currently working on a simple sampler that will allow me to load in a wav file and use my MIDI keyboard to play the loaded wav sample at the frequency according to the note played. Now I need ...
5
votes
4answers
8k views

How Can I Resample a Signal with an Arbitrary Factor (For Example - 128000Hz to 16000.1Hz) in MATLAB?

I need to simulate the sampling of a continuous (fsCtu = 128000Hz), acoustic signal with two microphones that have a slight offset in sampling rate (fsMic1 = 16000, fsMic2 = 16000.1) in Matlab. What ...
8
votes
2answers
14k views

Savitzky-Golay filter parameters

I am trying to smooth a series of data in order to obtain a continuous function that could represent that given data set. It came out that the Savitzky-Golay method could be a good way. Now, I don't ...
4
votes
2answers
494 views

Nonnegative or positive band-limited interpolation

Given samples of an everywhere non-negative or positive-valued continuous-time signal band-limited to half the sampling frequency, is there some practically applicable way to interpolate it so that ...
2
votes
2answers
3k views

Resampling of signal with non uniform sampling frequency

I have a non uniform sampling frequency signal and I have to convert it in a constant sampling frequency. I tried to interpolate it with an Hermite spline interpolation but it make a lot of wrong ...
4
votes
4answers
2k views

Algorithm for 1d spline interpolation suitable for 8 bit microcontroler

What is a concise, fast, down to earth algorithm for doing (or closely approximating) spline interpolation on a 1d continuous stream of data? (Edit1: The paragraph below equates to saying "the ...
1
vote
1answer
70 views

Why does my sinusoid look "AM" in shape?

My code is : Fs=200e6; Ts=1/Fs; NFFT=2^14; Runtime=(NFFT-1)*Ts; t=0:Ts:Runtime; f_in=90*1e6; y_in=sin(2*pi *f_in *t); plot(t,y_in) ylim([-1.5 1.5]) Then why does ...
0
votes
1answer
2k views

Frequency Domain Interpolation: Convolution with Sinc Function

I am reading a paper, and I came across the following definition of sinc interpolation. Warning. I don't have a strong background in signal processing. Also, I have no clue what that bar on $\bar{F}$ ...
14
votes
2answers
6k views

Differences between filtering and polynomial regression smoothing?

What are the differences between classical low-pass filtering (with an IIR or FIR), and "smoothing" by localized Nth degree polynomial regression and/or interpolation (in the case of upsampling), ...
4
votes
2answers
17k views

What is the difference between cubic interpolation and cubic "Spline" interpolation?. How to use it for upsampling purpose?

After considering a couple of advices and suggestions for upsampling techniques here, I finally converged to use the cubic interpolation technique to estimate the voltage values corresponding to ...
7
votes
1answer
573 views

How to mix two signals without changing the overall loudness?

I have two audio signals that I want to mix at various mixing ratios. Initially, I simply went for something like $y(t) = \alpha \cdot x_1(t) + (1-\alpha) \cdot x_2(t)$ where $\alpha$ is the ratio ...
6
votes
4answers
16k views

Interpolation with an FIR filter

How can I use interpolation with an FIR filter? I am more familiar with interpolation such as nearest distance interpolation, linear interpolation and so on. Suppose a signal is given as the ...
5
votes
4answers
2k views

Is interpolation of an audio signal to increase frequency resolution possible?

I apologize if some of what I ask is not entirely correct, I'm new to this field, but extremely interested. I have an Audio signal of sample rate 44.1 kHz that I want to segment into 30 frames, and ...
4
votes
1answer
9k views

Bicubic Interpolation

I'm trying to do bicubic interpolation on an 8*8 matrix(image) shown below. ...
1
vote
5answers
10k views

Output gain when upsampling and downsampling

Do the processes of upsampling and downsampling affect the magnitude of the transform of a signal? And if not, why am I seeing everywhere that a filter with gain different from 1 is applied after up/...
10
votes
3answers
4k views

Finding local peaks in-between samples

I have $n$ discrete samples of a seismic signal $y[n]$: I want to find local maxima in the signal. A naive test for if $y[n]$ is a maximum would be: $$y[n]: maxima \textbf{ if } y[n] > y[n-1] \...
9
votes
4answers
10k views

Zero, First, Second ... nth-order Hold

The rectangular function is defined as: $$\mathrm{rect}(t) = \begin{cases} 0 & \mbox{if } |t| > \frac{1}{2} \\ \frac{1}{2} & \mbox{if } |t| = \frac{1}{2} \\ 1 & \mbox{if } |t| < \...
9
votes
1answer
5k views

When is cubic spline interpolation better than an interpolating polynomial?

The following plot is a slight variation of an example in a text book. The author used this example to illustrate that an interpolating polynomial over equally spaced samples has large oscillations ...
18
votes
2answers
1k views

How can I design Nyquist interpolation filters with the Parks-McClellan algorithm?

We can easily design interpolation filters that obey certain frequency-domain constraints using the Parks-McClellan algorithm. However, it's not immediately clear how to enforce time-domain ...
13
votes
2answers
2k views

Real-valued ringing when zero-padding odd-length FFT

So I'm trying to write a frequency-domain interpolator that zero-pads the frequency response of a signal and inverse transforms. There's two cases I have to deal with: Even-length response - have to ...
9
votes
3answers
562 views

Signal values we will 'miss' between sampling instances during sampling of band limited signals

According to the Nyquist–Shannon sampling theorem, any continuous time signal with a bandwidth $B$ smaller than Nyquist frequency $f_N=f_s/2$ (with $f_s$ the sampling frequency), which is sampled at ...
8
votes
4answers
7k views

Higher order spline interpolation

I noticed that spline interpolation with a degree higher than 3 (everything beyond cubic splines) have a very high interpolation error, hence the prediction is mostly awful. I've come across various ...
4
votes
2answers
1k views

Sinc Interpolation Using DFT (FFT)

Lets say I want to double the number of points in an array f. I had the idea to do this: F=fft(f);N=length(f); FF=[F(1:N/2) zeros(1,N) F(N/2+1:N)]; f=ifft(FF); ...
3
votes
1answer
4k views

Can you decimate / downsample a signal in frequency domain just like you can interpolate / upsample it?

To interpolate a signal I can just zero pad it in the frequency domain. If I want to decimate the signal, can I just discard some part of the frequency domain? So in MATLAB this works: ...
1
vote
2answers
255 views

Types of interpolation used for reconstruction in DSP?

What are the different types of interpolation used in DSP for reconstruction of analog signal from discrete/digital signal I am able to somehow learn two types of interpolation 1st is "zero order ...
1
vote
2answers
143 views

Efficient double upsampling of a pure real tone

Has anyone seen this trick before? Let's say I'm working with a real pure tone signal that's dangerously close to Nyquist. So, I want to upsample it by a factor of two to move it near the four ...
4
votes
3answers
2k views

Interpolation by factor of 2

I want to up-sample my input signal by a factor of $2$. I saw zero padding followed by low pass filter method being used in few cases. But still I need some help in this. Say I have $10$ input ...
2
votes
1answer
128 views

Estimation / Reconstruction of an Image from Its Missing Data 2D DFT

Given the 2D DFT of an image i.e. a NxM matrix of complex numbers, with some missing lines (or even partial lines), considering we have zeros in the missing positions. Any suggestions for an ...
2
votes
1answer
134 views

How to get an interpolation weight from a mathematical definition

It was recently explained to me that a "Nearest neighbor" kernel for 1D interpolation can be implemented like this using NumPy ...
2
votes
1answer
581 views

Practical vs ideal lowpass interpolator

Consider a signal with a sample rate $f_s = 44.1$ kHz. Let us upsample the signal by a factor of $L = 2$ and interpolate the zeros. An ideal lowpass interpolator would have a gain of $L$ and a cutoff ...
1
vote
5answers
800 views

Sequence expansion by zeros and interpolation - does it insert additional frequencies?

I am struggling with understanding the consequences of oversampling on the frequency spectrum of the signal. If I understand correctly, with an oversampling rate of 8X we insert 7 new values for each ...
1
vote
0answers
22 views

3D interpolation of a volume with irregular upsampling

Given a collection of 2D slices which as a whole corresponds to a 3D volume (medical image of an organ), I only take specific slices (i.e. I replace the ones I dont want with zeros) and so, I end up ...
1
vote
1answer
1k views

Resampling time series to regular array, then downsampling (Butterworth)

Long time reader, first time poster. I have a few very simple questions that are troubling me and I am hoping that one of you guys can help me out. Setup & Aim: I have a time series that I want ...
1
vote
2answers
7k views

How does nearest neighbour, bilinear and cubic interpolation work in images?

More math is appreciated for each of the methods and references are appreciated. I have tried understanding from Wiki and matlab link but don't understand how the translation matrix is being used ...
1
vote
2answers
494 views

Interpolated FIR filter group delay

I'm trying to design a digital low pass filter with a narrow transition band. My sampling rate is 25 kHz, the cut off frequency is 60 Hz & the transition band width is 4 Hz. I'm looking for about ...
1
vote
2answers
495 views

Sinc interpolation of pure sine wave sampled just at Nyquist frequency

Following this question: Shannon-Nyquist theorem reconstruct 1Hz sine wave from 2 samples could you explain the algorithm to apply for sinc interpolation to avoid the "sawtooth" effect due to linear ...
1
vote
0answers
72 views

Interpolation methods for radar and acoustic imaging and potential pitfalls

A) What are the most common methods used to remap data for current generation imaging radars and acoustic sensors? B) What are some of the pitfalls in these methods? For example, in the past, at ...
0
votes
1answer
405 views

Resampling scattered data with MATLAB's $\tt interp$ and $\tt resample$

I am recording acceleration data with an MPU6050 connected to a Arduino1 and stored on a SD. Here you can find the code. I need to calculate the FFT of an acceleration signal that was not sampled ...
0
votes
2answers
132 views

Interpolation and harmonics

A real valued causal sequence $x1[n]$ exists with length of the sequence being $N$. Valid indices of x conform to $0 \le n \le N-1 $ The DFT of x[n] is: $$ X1[k] = \sum_{n=0}^{N-1} x1[n].e^{-j.2.\...