<< Chapter < Page Chapter >> Page >

The samples w ( k T s ) form a sequence of numbers that represent an underlying continuousvalued function w ( t ) at the time instants t = k T s . The sampling interval T s is presumed to have been chosen so that the sampling rate f s > 2 B where B is the highest frequency present in w ( t ) . The Nyquist sampling theorem presented in "Sampling and Aliasing" states that the values of w ( t ) can be recovered exactly at any time τ . The formula (which is justified subsequently) for recovering w ( τ ) from the samples w ( k T s ) is

w ( τ ) = t = - w s ( t ) sinc ( τ - t ) d t ,

where w s ( t ) (defined in [link] ) is zero everywhere except at the sampling instants t = k T s . Substituting [link] into w ( τ ) shows that this integral is identical to the sum

w ( τ ) = k = - w ( k T s ) sinc ( τ - k T s T s ) .

In principle, if the sum is taken over all time, the value of w ( τ ) is exact. As a practical matter, the sum must be taken over a suitable (finite) time window.

To see why interpolation works, note that the formula [link] is a convolution (in time) of the signal w ( k T s ) and the sinc function. Since convolution in time is the same as multiplicationin frequency by [link] , the transform of w ( τ ) is equal to the product of F { w s ( k T s ) } and the transform of the sinc.By [link] , the transform of the sinc function in time is a rect function in frequency.This rect function is a lowpass filter, since it passes all frequencies below f s 2 and removes all frequencies above. Since the process of sampling acontinuous time signal generates replicas of the spectrum at integer multiples of f s by [link] , the lowpass filter removes all but one of these replicas.In effect, the sampled data is passed through an analog lowpass filter to create a continuous-time function, and the value ofthis function at time τ is the required interpolated value. When τ = n T s , then sinc ( τ - n T s ) = 1 , and sinc ( τ - n T s ) = 0 for all k T s with k n . When τ is between sampling instants, the sinc is nonzero at all k T s , and [link] combines them to recover  w ( τ ) .

To see how [link] works, the following code generates a sine wave w of frequency 20 Hz with a sampling rate of 100 Hz. This is a modestly sampled sine wave, having only five samples perperiod, and its graph is jumpy and discontinuous. Because the sampling rate is greater than the Nyquist rate, it is possible inprinciple to recover the underlying smooth sine wave from which the samples are drawn. Running sininterp.m shows that it is also possible in practice. The plot in [link] shows the original wave (which appears choppy because it is sampled only five times per period), and the reconstructedor smoothed waveform (which looks just like a sine wave). The variable intfac specifies how many extra interpolated points are calculated, and need not be an integer. Largernumbers result in smoother curves but also require more computation.

f=20; Ts=1/100; time=20;           % freq, sampling interval, and time t=Ts:Ts:time;                      % time vectorw=sin(2*pi*f*t);                   % w(t) = a sine wave of f Hertz over=100;                          % # of data points to use in smoothingintfac=10;                         % how many interpolated points tnow=10.0/Ts:1/intfac:10.5/Ts;     % smooth/interpolate from 10 to 10.5 secwsmooth=zeros(size(tnow));         % save smoothed data here for i=1:length(tnow)  wsmooth(i)=interpsinc(w,tnow(i),over); end                                % and loop for next point
sininterp.m demonstrate interpolation/reconstruction using sin wave (download file)

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