<< Chapter < Page Chapter >> Page >
A convincing sine wave can be reconstructed from its samples using sinc interpolation. The choppy wave represents the samples, and the smooth wave shows the reconstruction.
A convincing sine wave can be reconstructed from its samples using sinc interpolation. The choppy wave represents thesamples, and the smooth wave shows the reconstruction.

In implementing [link] , some approximations are used. First, the sum cannot be calculated over an infinitetime horizon, and the variable over replaces the sum k = - with k = - o v e r o v e r . Each pass through the for loop calculates one point of the smoothed curve wsmooth using the M atlab function interpsinc.m , which is shown below. The value of the sinc is calculated at each timeusing the function srrc.m with the appropriate offset tau , and then the convolution is performed by the conv command. This code is slow and unoptimized. A clever programmerwill see that there is no need to calculate the sinc for every point, and efficient implementationsuse sophisticated look-up tables to avoid the calculation of transcendental functions completely.

function y=interpsinc(x, t, l, beta)   x = sampled data   t = place at which value desired  l = one sided length of data to interpolate   beta = rolloff factor for srrc function       = 0 is a sinc if nargin==3, beta=0; end;          % if unspecified, beta is 0tnow=round(t);                      % create indices tnow=integer part tau=t-round(t);                     % plus tau=fractional parts_tau=srrc(l,beta,1,tau);           % interpolating sinc at offset tau x_tau=conv(x(tnow-l:tnow+l),s_tau);  % interpolate the signaly=x_tau(2*l+1);                     % the new sample
interpsinc.m interpolate to find a single point using the direct method (download file)

While the indexing needed in interpsinc.m is a bit tricky, the basic idea is not: the sinc interpolation of [link] is just a linear filter with impulse response h ( t ) = sinc ( t ) . (Remember, convolutions are the hallmark of linear filters.) Thus, it is a lowpass filter, since thefrequency response is a rect function. The delay τ is proportional to the phase of the frequency response.

In sininterp.m , what happens when the sampling rate is too low? How large can the sampling interval Ts be? How high can the frequency f be?

In sininterp.m , what happens when the window is reduced? Make over smaller and find out. What happens when too few points are interpolated? Make intfac smaller and find out.

Create a more interesting (more complex) wave w ( t ) . Answer the above questions for this w ( t ) .

Let w ( t ) be a sum of five sinusoids for t between - 10 and 10 seconds. Let w ( k T ) represent samples of w ( t ) with T = . 01 . Use interpsinc.m to interpolate the values w ( 0 . 011 ) , w ( 0 . 013 ) , and w ( 0 . 015 ) . Compare the interpolated values to the actual values.Explain any discrepancies.

Observe that sinc ( t ) dies away (slowly) in time at a rate proportional to 1 π t . This is one of the reasons that so many terms are used in the convolution(i.e., why the variable over is large). A simple way to reduce the number of terms is to use a functionthat dies away more quickly than the sinc; a common choice is the square-root raised cosine (SRRC) function, which plays an important role in pulse shaping in Chapter  [link] . The functional form of the SRRC is given inEquation [link] . The SRRC can easily be incorporated into the interpolationcode by replacing the code interpsinc(w,tnow(i),over) with interpsinc(w,tnow(i),over,beta) .

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Software receiver design. OpenStax CNX. Aug 13, 2013 Download for free at http://cnx.org/content/col11510/1.3
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Software receiver design' conversation and receive update notifications?

Ask