IMTS Electrical Eng. (Signal and system)

Page 114

110

CHAPTER 5. SAMPLING THEOREM AND SPECTRAL COMPUTATION

Magnitude spectrum

(a)

(b)

0.07

0.08

0.06

0.07 0.06

0.05

0.05 0.04 0.04 0.03 0.03 0.02

0.02

0.01 0

0.01 0

5000 10000 Frequency (Hz)

15000

0 200

300

400 500 Frequency (Hz)

600

Figure 5.10: (a) Magnitude spectrum in [0, 11025] (Hz) of the middle C in Figure 1.3 with sampling frequency 22050 Hz. (b) In [200, 600] (Hz).

5.4.2

Magnitude spectrum of middle-C sound

We now compute the magnitude spectrum of the signal shown in Figure 1.3. It is obtained using the sampling frequency fs = 22050 Hz. We modify Program 5.5 as %Program 5.7 (f510.m) xb=wavread(’f13.wav’); x=xb([30001:52000]);N=length(x); fs=22050;T=1/fs;D=fs/N; X=T*fft(x); mp=0:N/2; subplot(1,2,1) plot(mp*D,abs(X(mp+1))),title(’(a)’),axis square ylabel{’Magnitude spectrum’},xlabel(’Frequency (Hz)’) subplot(1,2,2) plot(mp*D,abs(X(mp+1))),title(’(b)’),axis square axis([200 600 0 0.08]),xlabel(’Frequency (Hz)’) The first three lines are taken from Program 3.6. The rest is similar to Program 5.5. The program will generate in Figure 5.10(a) the magnitude spectrum for the entire positive Nyquist frequency range [0, 0.5fs ] = [0, 11025] Hz and in Figure 5.10(b) for frequencies between 200 and 600 Hz. It is the magnitude spectrum of the middle C shown in Figure 1.3. Its spectrum has narrow spikes at roughly fc = 260 Hz and kfc , for k = 2, 3, 4, · · ·. Moreover the energy around 2fc = 520 is larger than the energy around 260 Hz.9 In any case, it is incorrect to think that middle C consists of only a single frequency at 261.6 Hz as listed in Wikipedia. From Figure 5.10(a) we see that the spectrum is identically zero for frequency larger than 2500 Hz. Thus we may consider middle C to be bandlimited to fmax = 2500. Clearly the sampling frequency fs = 22050 used in obtaining Figure 1.3 is unnecessarily large. Thus we may select a smaller f¯ which is larger than 2fmax = 5000. In order to utilize the data obtained using fs = 22050, we select f¯s = fs /4 = 5512.5 or T¯ = 4T = 4/22050. Using a program similar to Program 5.6 we can obtain the magnitude spectrum shown in Figure 5.11. It is indistinguishable from the one in Figure 5.10(a).

5.4.3

Remarks for spectral computation

We give some remarks concerning FFT spectral computation of real-world signals. 9 The

grand piano I used may be out of tune.

FOR MORE DETAILS VISIT US ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.