Digital Signal Processing Reference
In-Depth Information
5.10.1 CTFT using M ATLAB
Step 1 Sampling In order to manipulate the CT signals on a digital computer,
the CT signals must be discretized. This is normally achieved through a process
called sampling. In reality, sampling is followed by quantization, but because
of the high resolution supported by M ATLAB , we can neglect quantization
without any appreciable loss of accuracy, at least for our purposes here. Sam-
pling converts a CT signal x ( t ) into an equivalent DT signal x [ k ]. To prevent
any loss of information and for x [ k ] to be an exact representation of x ( t ), the
sampling rate ω s must be greater than at least twice the maximum frequency
ω max present in the signal x ( t ), i.e.
ω s
2 ω max .
(5.80)
This is referred to as the Nyquist criterion . We will consider sampling in depth
in Chapter 9, but the information presented above is sufficient for the following
discussion.
The CTFT of the periodic cosine signal is given by (see Table 5.2)
CTFT
←−−→
4 cos(10 π t )
4 π [ δ ( ω − 10 π ) + δ ( ω + 10 π )];
(5.81)
hence, the maximum frequency in x ( t ) is given by ω max = 10 π radians/s. Based
on the Nyquist criterion, the lower bound for the sampling rate is given by
ω s
20 π radians/s .
(5.82)
We choose a sampling rate that is 20 times the Nyquist rate, i.e. ω s
=
400 π radians/s. The sampling interval T s is given by
= 2 π
ω s
T s
= 5 ms.
(5.83)
Selecting a time interval from 1 to 1 second to plot the sinusoidal wave, the
number N of samples in x [ k ] is 401. The M ATLAB command that computes
x [ k ] is therefore given by
> t = -1:0.005:1;
% define time instants
> x = 4*cos(10*pi*t);
% samples of cosine wave
> subplot(221); plot(t,x)
% for CT plot
> subplot(222); stem(t,x)
% for DT plot
The subplots are plotted in Fig. 5.21(a) and (b) and provide a fairly accurate
representation of the cosine wave.
Step 2 Fast Fourier transform In M ATLAB , numeric computation of the
CTFT is performed by using a fast implementation referred to as the fast
Fourier transform (FFT). At this time, we will simply name the function without
Search WWH ::




Custom Search