10

Both low pass filtering and polynomial regression smoothing could be seen as approximations of a function. However, the means of doing this are different. The key question to ask here is "Can you do one in terms of the other?" and the short answer is "not always", for reasons that are explained below. When smoothing by filtering the key operation is ...


10

There is no such proof because it's not always true. It's a rule of thumb, because I guarantee that you could come up with a situation- an infinite number of situations actually- where higher order splines would do better than cubic splines. The optimal spline order for any given situation is the exact same order as the system you are trying to model. If ...


10

Does cubic interpolation (or any other) have any advantages over linear for the specific case of audio? You'd use neither for audio. The reason is simple: The signal models you typically assume for audio signals are very "Fourier-y", to say, they assume that sound is composed of weighted harmonic oscillations, and bandlimited in its nature. Neither linear ...


9

One design method, albeit one that is limited to powers of two, would be to start with one halfband filter, insert zeros at every other (creates a spectral replica), then convolve it with a second halfband filter having a wider transition band. Repeat the process until you get to the required power of 2. Here's an example that creates a lowpass filter with ...


9

That depends somewhat on the application. In most cases a "constant energy" pan will be best. This can be expressed as $$y(t)=\sqrt{\alpha} \cdot x_{1}(t)+\sqrt{1-\alpha}\cdot x_{2}(t)$$ where $\alpha = .5$ is the point of equal energy. If you are working with fixed point signals, such as wave files for examples, you may run into clipping problems. That ...


8

This is not the case. First of all, a second-order hold would use three sample points to compute an interpolation polynomial, but your suggested impulse response $\text{tri}(t)\star\text{tri}(t)$ is non-zero in an interval of size $4$ (assuming a sample interval of $T=1$, as you do in your question). However, the impulse response corresponding to a second-...


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


7

Let's look at the frequencies of the bins in your 8-point DFT: $$ \begin{array}{c} \omega_A = 0,\\ \omega_B = \pi/4,\\ \omega_C = \pi/2,\\ \omega_D = 3\pi/4,\\ \omega_E = \pi = -\pi\ ({\tt mod}\ 2\pi),\\ \omega_F = 5\pi/4 = -3\pi/4\ ({\tt mod}\ 2\pi),\\ \omega_G = 3\pi/2 = -\pi/2\ ({\tt mod}\ 2\pi), \\ \omega_H = 7\pi/4 = -\pi/4\ ({\tt mod}\ ...


7

Interpolate to several times the original rate (e.g. 8x oversampled). This allows you to assume a piecewise linear signal. This signal will have very little error compared to the infinite resolution, continuous sin(x)/x interpolation of the waveform. Assume every pair of oversampled values has a continuous line from one value to the next. Use all the ...


7

What I'd go with is essentially Jason R's "random resampler", which in turn is a presampled-signal based implementation of yoda's stochastic sampling. I've used simple cubic interpolation to one random point between each two samples. For a primitive synth sound (decaying from a saturated non-bandlimited square-like signal +even harmonics to a sine) it looks ...


7

Getting a sub-sample resolution A very cheap (in terms of code size) solution is just to upsample your signal. In matlab, this can be done with interp(y ,ratio). A slightly more complicated solution consists in naively detecting peaks ; and for each peak, fitting a parabola through y[peak - 1], y[peak], y[peak + 1] ; then using the point at which this ...


7

There are several key insights you need in order to understand how DFT allows you to shift an image. First, Fourier's theorum: It's probably easier to look at the continuous (i.e., analog) case first. Imagine you have some function, call it g(t). For simplicity, let's say that g(t) is an analog audio recording, so it's a one-dimensional function, which ...


7

I don't have a real answer but I have the feeling that this result will help you out: Bernstein's inequality says that, if the signal $x(t)$ is bandlimited to $|f|\leq B$, then $$\left| \frac{\textrm{d}x(t)}{\textrm{d}t}\right|\leq 4\pi B \,\textrm{sup}_{\tau\in\mathbb{R}}|x(\tau)| ,\,\,t\in\mathbb{R}$$ where $\textrm{sup}$ stands for "least upper bound". I ...


7

I do not understand why you have 30Hz resolution so I will focus only to the principle of the question "does interpolation increase resolution?". Short answer is no, no new data, no new information. A longer answer needs the spectrum visualization below, with time domain, continuous frequency domain and discrete frequency domain from left to right. The ...


6

You want to have an interpolation with a equal number of weights on both sides of the points you want to interpolate in between. So you choose either one or two weights on each side, resulting in an interpolation of two (linear) or four (cubic) points. An quadratic interpolation would need three points, which would only make sense at the border of a grid, ...


6

The difference between cubic interpolation as described in your question and cubic spline interpolation is that in cubic interpolation you use 4 data points to compute the polynomial. There are no constraints on the derivatives. Cubic spline interpolation computes a third order polynomial only from two data points with the additional constraint that the ...


6

This plot depicts how to convert your digital signal back to the analog one, using $\mathrm{sinc}$ functions. The nice property of these functions used in this process, is that maximum of each function always occurs at minimums of the other, shifted function: Now the process of the D/A conversion that is depicted on your plot is basically taking a $\mathrm{...


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

Duane Wise and i wrote a paper back in the 90s that we presented to an AES convention that spelled out how to model time-domain polynomial interpolation (of which linear interpolation is an example) in the frequency domain. i think you can get a copy here: Performance of Low-Order Polynomial Interpolators in the Presence of Oversampled Input


5

Implementation Assuming you already have a line drawing routine, you just need to supplement that with some kind of interpolation. The curves are created by drawing enough interpolated short lines to make the result look smooth. A good starting point would be to use an existing interpolation routine, like the ones given by Paul Bourke here. I'll illustrate ...


5

While I'm not familiar with this specific type of filter, based on the plot you've shown, I would guess that the maxima that aren't found by your process are just butting up against the time resolution inherent in the process. Any kind of "smoothing" implies that there is some time-local smearing of the signal of interest, such that if there are two nearby ...


5

One method to get your desired zero crossings is to do a hybrid design. Start out with a Parks-McLellan/Remez half-band filter given equal weight to passband and stopband. Since it is a halfband filter, it will have zeros at alternate samples. You can then interpolate the time domain by sin(x)/x by zero-stuffing in the frequency domain. Example: ...


5

While your approach is theoretically correct (and needs to be slightly modified for non-monotonic functions), it is extremely hard to calculate the inverse of a generic function. As you say you'll have to deal with branch points and branch cuts, which is doable, but you seriously wouldn't want to. As you already mentioned, regular sampling samples the same ...


5

The interpolation lowpass filter computes a weighted sum of input samples, which results in the zero input samples being interpolated using the non-zero samples of the input signal. The $*$ sign is NOT multiplication but convolution! EDIT: I'm adding a simple example to clear things up a bit. Let's consider the impulse response $h = [0.5, 1, 0.5]$ and a ...


5

You are looking at the wrong metric of "correctness". Nearest neighbor is introducing significant discontinuities that are showing up as massive quantities of noise in the result. The problem is that you should be comparing to the result you would have gotten if you had sampled at 26.25MHz in the first place. Let's try it (sample a 12Hz sine wave at 26 Hz ...


5

There are various methods on 2d interpolation (this one, and this one). But most of them considered at least 4 points rather than 2. The simplest 2d interpolation is 3 1d interpolation, in which you interpolate the points between (x1-d1, y1-d2) and (x1+d1, y1-d2) as (x2,y2), then you interpolate the points between (x1-d3, y1+d4) and (x1+d3, y1+d4) as (x3,y3)....


5

Yes, you can interpolate and decimate at the same time. This is called "resampling". If you google resampling you will find lots of information about it. And yes, your reasoning about resampling is mostly correct. When thinking about resampling theoretically you usually put the interpolation first to avoid Nyquist issues. An interpolator is upsampling ...


5

so this is why i think an $n$-th order hold is a $\operatorname{rect}\left( \frac{t - T/2}{T} \right)$ convolved against itself $n$ times. Wikipedia isn't the final reference of all things, but there is something that i sniffed from there. consider sampling and reconstruction (the Shannon Whittaker whatever formula). if the original bandlimited input is $...


5

Observations I have used +1 and -1 in the sequence instead of your 1 and 0. With $\alpha=1$, the band-limited continuous function $f_m(T)$ in your first two figures (with the above mentioned modification) is: $$f_m(T) = \sum_{k=1-m}^m \operatorname{sign}\left(\operatorname{sinc}(\pi k - \pi/2)\right)\operatorname{sinc}(\pi T-\pi k),\tag{1}$$ where: $$\...


5

First a demonstration that the squares of both $$\begin{align}&[\dots, 0, 0, 1,\hphantom{-}1, 0, 0, \dots] \text{ and}\\ &[\dots, 0, 0, 1, -1, 0, 0, \dots]\end{align}$$ equal $$[\dots, 0, 0, 1, \hphantom{-}1, 0, 0, \dots]\hphantom{\text{ and}}$$ but the squares of their sinc interpolations differ (Fig. 1): Figure 1. Squares of sinc interpolations ...


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