Interpolation algorithm for discrete time series (sinc function interpolation)

Source: Internet
Author: User

Sometimes, in order to be more convenient for subsequent processing, we need to interpolate the collected data points, that is, the so-called oversampling. In this paper, we discuss some common interpolation algorithms.

Sincinterpolation in function

Our signal x (t) is a real signal with limited bandwidth and limited energy. X[n] =x (nΔ) and x ' [n] =x (nδ ') are two samples of this signal and both satisfy the requirements of the sampling theorem, meaning that the information is not lost. The sample rate of two samples satisfies the following relationship.


This means that the sampling rate of the second sample is M times the sample rate of the first sample . If we have x ' [n], then it's easy to get x[n]:


But the reverse is not so easy. Here's how to calculate X ' [n] in the case of known X[n].

For continuous signal x (t), there is the following relationship.


For discrete signal X[n], there are the following relationships.

The relationship between Ω and ω here is as follows: Ω=ωδ, what does X ' (ω) have to do with X (ω)? We first assume X ' (ω) =x (ω), then there are:


This shows that X ' (ω) =x (ω)/δ. Using this relationship, you can get:



At this point, the formula using the sinc function interpolation comes out:

When Δ=1 , the upper formula can also be simplified to:

Here is an example of a test,Scilab language.

Function y = sinc_interp (x, n)    s = size (x);    if s (1) = = 1 then         NX = S (2);        NY =  (NX) * N;        S (2) = NY;    else        NX = s (1);        NY =  (NX) * N;        S (1) = NY;    End    y = zeros (s (1), S (2));        for (i = 1:ny)        t = (i-1)/n + 1;        A = Ceil (t-5);        b = Floor  (t + 5);        if (a < 1) then A = 1;  End        if (b > NX) then B = NX;  End           If t = = Int (t) then            y (i)  = x (t);        else            z = 0;            For j =a:b                z = z + x (j) * sin ((t-j) *%PI)/((T-J) *%pi);            End             Y (i) = Z;        End        End   Endfunction
Using this function, we randomly test the interpolation results of a random sequence of numbers.

Comparing this result with the FFT interpolation results, you can see similar effect, the reason is not exactly the same, because this code only used the adjacent 5 data points, and at the boundary of the direct truncation processing. FFT interpolation is the result of calculating the data period extension.


Interpolation algorithm for discrete time series (sinc function interpolation)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.