DTFT, DFT, ZT, and FFT 523
Example 5.8
Let a communication signal consist of a random noise signal plus an information signal
f(t) consisting of three frequencies—1000, 2000, and 3000 Hz.
The noise signal and information signal f(t) are defi ned as follows:
noise = [0 0.5*randn(1, 255)]
f(t) = 0.7sin(2π1000 t) + 0.93cos(2π 2000 t) + 0.69sin(2π3000 t)
Let the communication signal be given by signal(t) = noise + f(t), over the range 0 < t <
(1/8000)255, where the sampling period is Ts = (1/8000) s and its sequence length of
N = 256.
Create the script fi le signal_n that returns the contaminated signal signal(t) in the
time and frequency domains. Observe that in the time domain, the frequencies 1000,
2000, and 3000 Hz are not clearly evident, while in the frequency domain its present is
clearly visible.
MATLAB Solution
% Script file: signal _ n
fs = 8000;Ts =1/fs;
N=256;t = linspace(0,Ts*255,256);noise = [0 0.5*randn(1,255)];
0 50 100 150 200 250 300
0 50 100 150 200 250 300
Index k
DTFT
DTFT
4
2
0
− 2
− 4
4
2
0
− 4
− 2
DFT for k = 64
DFT for k = 32
Phase of the DTFT and DFT
Phase angle
Phase angle
FIGURE 5.36
Phase plots of DTFT and DFT of f(n) of Example 5.7.