02.10.2019 Views

UploadFile_6417

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Sampling and Reconstruction of Analog Signals 93<br />

1<br />

Reconstructed Signal from x1(n) using sinc function<br />

xa(t)<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

–5 –4 –3 –2 –1 0 1 2 3 4 5<br />

t in msec.<br />

FIGURE 3.16 Reconstructed signal in Example 3.21<br />

MATLAB script:<br />

% Discrete-time Signal x1(n)<br />

>> Ts = 0.0002; n = -25:1:25; nTs = n*Ts; x = exp(-1000*abs(nTs));<br />

% Analog Signal reconstruction<br />

>> Dt = 0.00005; t = -0.005:Dt:0.005;<br />

>> xa = x * sinc(Fs*(ones(length(n),1)*t-nTs’*ones(1,length(t))));<br />

% check<br />

>> error = max(abs(xa - exp(-1000*abs(t))))<br />

error =<br />

0.0363<br />

The maximum error between the reconstructed and the actual analog signal is<br />

0.0363, which is due to the fact that x a(t) isnot strictly band-limited (and also<br />

we have a finite number of samples). From Figure 3.16, we note that visually<br />

the reconstruction is excellent.<br />

□<br />

□ EXAMPLE 3.22 From the samples x 2(n) inExample 3.17b reconstruct x a(t) and comment on<br />

the results.<br />

Solution<br />

In this case x 2(n) was obtained by sampling x a(t) atT s =1/F s =0.001 sec. We<br />

will again use the grid spacing of 0.00005 sec over −0.005 ≤ t ≤ 0.005, which<br />

gives x(n) over −5 ≤ n ≤ 5.<br />

% Discrete-time Signal x2(n)<br />

>> Ts = 0.001; n = -5:1:5; nTs = n*Ts; x = exp(-1000*abs(nTs));<br />

% Analog Signal reconstruction<br />

>> Dt = 0.00005; t = -0.005:Dt:0.005;<br />

>> xa = x * sinc(Fs*(ones(length(n),1)*t-nTs’*ones(1,length(t))));<br />

% check<br />

>> error = max(abs(xa - exp(-1000*abs(t))))<br />

error =<br />

0.1852<br />

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).<br />

Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!