Digital Signal Processing Applications

digital signal processing applications in mobile communications and digital signal processing objective type questions answers pdf free download
HelenBoyle Profile Pic
HelenBoyle,Greece,Researcher
Published Date:14-07-2017
Your Website URL(Optional)
Comment
Digital Signal Processing Applications Sanjit K Mitra2Contents 1 Applications of Digital Signal Processing 1 1 Dual-Tone Multifrequency Signal Detection . . . . . . . . . . . . . . . . . . . . . . . . 1 2 Spectral Analysis of Sinusoidal Signals . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3 Analysis of Speech Signals Using the STFT . . . . . . . . . . . . . . . . . . . . . . . . 11 4 Spectral Analysis of Random Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5 Musical Sound Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 6 Digital Music Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 7 Discrete-Time Analytic Signal Generation . . . . . . . . . . . . . . . . . . . . . . . . . 37 8 Signal Compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 9 Transmultiplexers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 10 Discrete Multitone Transmission of Digital Data . . . . . . . . . . . . . . . . . . . . . . 55 11 Oversampling A/D Converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 12 Oversampling D/A Converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 13 Sparse Antenna Array Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 14 Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 iii CONTENTSApplications of Digital Signal Processing As mentioned in Chapter 1 of Text, digital signal processing techniques are increasingly replacing con- ventional analog signal processing methods in many fields, such as speech analysis and processing, radar and sonar signal processing, biomedical signal analysis and processing, telecommunications, and geo- physical signal processing. In this chapter, we include a few simple applications to provide a glimpse of the potential of DSP. We first describe several applications of the discrete Fourier transform (DFT) introduced in Sec- tion 5.2. The first application considered is the detection of the frequencies of a pair of sinusoidal signals, called tones, employed in telephone signaling. Next, we discuss the use of the DFT in the determination of the spectral contents of a continuous-time signal. The effect of the DFT length and the windowing of the sequence are examined in detail here. In the following section, we discuss its application of the short-time Fourier transform (STFT) introduced in Section 5.11 of Text for the spectral analysis of non- stationary signals. We then consider the spectral analysis of random signals using both nonparametric and parametric methods. Application of digital filtering methods to musical sound processing is considered next, and a variety of practical digital filter structures useful for the generation of certain audio effects, such as artificial reverberation, flanging, phasing, filtering, and equalization, are introduced. Generation of discrete-time analytic signals by means of a discrete-time Hilbert transformer is then considered, and several methods of designing these circuits are outlined along with an application. The basic concepts of signal compression are reviewed next, along with a technique for image compression based on Haar wavelets. The theory and design of transmultiplexers are discussed in the following section. One method of digital data transmission employing digital signal processing methods is then introduced. The basic concepts behind the design of the oversampling A/D and D/A converters are reviewed in the following two sections. Finally, we review the sparse antenna array design for ultrasound scanners. 1 Dual-Tone Multifrequency Signal Detection Dual-tone multifrequency (DTMF) signaling, increasingly being employed worldwide with push-button telephone sets, offers a high dialing speed over the dial-pulse signaling used in conventional rotary tele- phone sets. In recent years, DTMF signaling has also found applications requiring interactive control, such as in voice mail, electronic mail (e-mail), telephone banking, and ATM machines. A DTMF signal consists of a sum of two tones, with frequencies taken from two mutually exclusive groups of preassigned frequencies. Each pair of such tones represents a unique number or a symbol. Decoding of a DTMF signal thus involves identifying the two tones in that signal and determining their 12 1: Applications of Digital Signal Processing corresponding number or symbol. The frequencies allocated to the various digits and symbols of a push- 1 button keypad are internationally accepted standards and are shown in Figure 1.35 of Text. The four keys in the last column of the keypad, as shown in this figure, are not yet available on standard handsets and are reserved for future use. Since the signaling frequencies are all located in the frequency band used for speech transmission, this is an in-band system. Interfacing with the analog input and output devices is provided by codec (coder/decoder) chips or A/D and D/A converters. Although a number of chips with analog circuitry are available for the generation and decoding of DTMF signals in a single channel, these functions can also be implemented digitally on DSP chips. Such a digital implementation surpasses analog equivalents in performance, since it provides better precision, stability, versatility, and reprogrammability to meet other tone standards and the scope for multichannel operation by time-sharing, leading to a lower chip count. The digital implementation of a DTMF signal involves adding two finite-length digital sinusoidal sequences, with the latter simply generated by using look-up tables or by computing a polynomial expan- sion. The digital tone detection can be easily performed by computing the DFT of the DTMF signal and then measuring the energy present at the eight DTMF frequencies. The minimum duration of a DTMF signal is 40 ms. Thus, with a sampling rate of 8 kHz, there are at most 0:04 8000 D 320 samples available for decoding each DTMF digit. The actual number of samples used for the DFT computation is less than this number and is chosen so as to minimize the difference between the actual location of the sinusoid and the nearest integer value DFT indexk. The DTMF decoder computes the DFT samples closest in frequency to the eight DTMF fundamental tones and their respective second harmonics. In addition, a practical DTMF decoder also computes the DFT samples closest in frequency to the second harmonics corresponding to each of the fundamental tone frequencies. This latter computation is employed to distinguish between human voices and the pure sinu- soids generated by the DTMF signal. In general, the spectrum of a human voice contains components at all frequencies including the second harmonic frequencies. On the other hand, the DTMF signal generated by the handset has negligible second harmonics. The DFT computation scheme employed is a slightly modified version of Goertzel’s algorithm, as described in Section 11.3.1 of Text, for the computation of the squared magnitudes of the DFT samples that are needed for the energy computation. The DFT lengthN determines the frequency spacing between the locations of the DFT samples and the time it takes to compute the DFT sample. A large N makes the spacing smaller, providing higher resolution in the frequency domain, but increases the computation time. The frequencyf in Hz corre- k sponding to the DFT index (bin number)k is given by kF T f D ; kD0;1;:::;N 1; (1) k N whereF is the sampling frequency. If the input signal contains a sinusoid of frequencyf different from T in that given above, its DFT will contain not only large-valued samples at values of k closest to Nf =F in T but also nonzero values at other values ofk due to a phenomenon called leakage (see Example 11.16 of Text). To minimize the leakage, it is desirable to chooseN appropriately so that the tone frequencies fall as close as possible to a DFT bin, thus providing a very strong DFT sample at this index value relative to all other values. For an 8-kHz sampling frequency, the best value of the DFT lengthN to detect the eight fundamental DTMF tones has been found to be 205 and that for detecting the eight second harmonics 2 is 201. Table 1 shows the DFT index values closest to each of the tone frequencies and their second 1 International Telecommunication Union, CCITT Red Book, volume VI, Fascicle VI.1, October 1984. 2 Digital Signal Processing Applications Using the ADSP-2100 Family, A. Mar, editor, Prentice Hall, Englewood Cliffs NJ, 1992.1. Dual-Tone Multifrequency Signal Detection 3 697 Hz 770 Hz 100 100 50 50 0 0 10 15 20 25 10 15 20 25 k k 852 Hz 941 Hz 100 100 50 50 0 0 15 20 25 30 15 20 25 30 k k 1209 Hz 1336 Hz 100 100 50 50 0 0 25 30 35 40 25 30 35 40 k k 1447 Hz 1633 Hz 100 100 50 50 0 0 35 40 45 35 40 45 k k Figure 1: Selected DFT samples for each one of the DTMF tone signals forN D205: harmonics for these two values of N , respectively. Figure 1 shows 16 selected DFT samples computed using a 205-point DFT of a length-205 sinusoidal sequence for each of the fundamental tone frequencies. 3 Program A-1 can be used to demonstrate the DFT-based DTMF detection algorithm. The outputs generated by this program for the input symbol are displayed in Figure 2. 3 All MATLABprograms mentioned in this section are given in the Programs Section of the CD. Xk Xk Xk Xk Xk Xk Xk Xk4 1: Applications of Digital Signal Processing Table 1: DFT index values for DTMF tones forN D205 and their second harmonics forN D201: Basic Nearest tone Exactk integer Absolute in Hz value k value error ink 697 17.861 18 0.139 770 19.731 20 0.269 852 21.833 22 0.167 941 24.113 24 0.113 1209 30.981 31 0.019 1336 34.235 34 0.235 1477 37.848 38 0.152 1633 41.846 42 0.154 Second Nearest harmonic Exactk integer Absolute in Hz value k value error ink 1394 35.024 35 0.024 1540 38.692 39 0.308 1704 42.813 43 0.187 1882 47.285 47 0.285 2418 60.752 61 0.248 2672 67.134 67 0.134 2954 74.219 74 0.219 3266 82.058 82 0.058 Adapted from Digital Signal Processing Applications Using the ADSP-2100 Family, A. Mar, editor, Pren- tice Hall, Englewood Cliffs NJ, 1992. 100 80 60 40 20 0 15 20 25 30 35 40 45 k Touch-tone symbol = Figure 2: A typical output of Program A-1. Xk2. Spectral Analysis of Sinusoidal Signals 5 2 Spectral Analysis of Sinusoidal Signals An important application of digital signal processing methods is in determining in the discrete-time do- main the frequency contents of a continuous-time signal, more commonly known as spectral analysis. More specifically, it involves the determination of either the energy spectrum or the power spectrum of the signal. Applications of digital spectral analysis can be found in many fields and are widespread. The spectral analysis methods are based on the following observation. If the continuous-time signal g .t/ a is reasonably band-limited, the spectral characteristics of its discrete-time equivalent gŒn should pro- vide a good estimate of the spectral properties of g .t/. However, in most cases, g .t/ is defined for a a 1 t 1, and as a result, gŒn is of infinite extent and defined for1 n 1. Since it is difficult to evaluate the spectral parameters of an infinite-length signal, a more practical approach is as follows. First, the continuous-time signalg .t/ is passed through an analog anti-aliasing filter before it is a sampled to eliminate the effect of aliasing. The output of the filter is then sampled to generate a discrete- time sequence equivalentgŒn. It is assumed that the anti-aliasing filter has been designed appropriately, and hence, the effect of aliasing can be ignored. Moreover, it is further assumed that the A/D converter wordlength is large enough so that the A/D conversion noise can be neglected. This and the following two sections provide a review of some spectral analysis methods. In this sec- tion, we consider the Fourier analysis of a stationary signal composed of sinusoidal components. In Sec- tion 3, we discuss the Fourier analysis of nonstationary signals with time-varying parameters. Section 4 4 considers the spectral analysis of random signals. For the spectral analysis of sinusoidal signals, we assume that the parameters characterizing the si- nusoidal components, such as amplitudes, frequencies, and phase, do not change with time. For such a j signalgŒn, the Fourier analysis can be carried out by computing its Fourier transformG.e /: 1 X j jn G.e /D gŒne : (2) nD1 In practice, the infinite-length sequence gŒn is first windowed by multiplying it with a length-N window wŒn to make it into a finite-length sequence Œn D gŒn wŒn of length N . The spectral j characteristics of the windowed finite-length sequence Œn obtained from its Fourier transform.e / j then is assumed to provide a reasonable estimate of the Fourier transform G.e / of the discrete-time j signalgŒn. The Fourier transform.e / of the windowed finite-length segment Œn is next evaluated at a set ofR.RN/ discrete angular frequencies equally spaced in the range0 2 by computing itsR-point discrete Fourier transform (DFT)Œk. To provide sufficient resolution, the DFT lengthR is chosen to be greater than the windowN by zero-padding the windowed sequence withRN zero-valued samples. The DFT is usually computed using an FFT algorithm. We examine the above approach in more detail to understand its limitations so that we can properly make use of the results obtained. In particular, we analyze here the effects of windowing and the evaluation of the frequency samples of the Fourier transform via the DFT. j j Before we can interpret the spectral content of .e /, that is, G.e /, from Œk, we need to re- examine the relations between these transforms and their corresponding frequencies. Now, the relation j between theR-point DFTŒk of Œn and its Fourier transform.e / is given by ˇ j ˇ ŒkD .e / ; 0k R1: (3) D2k=R 4 For a detailed exposition of spectral analysis and a concise review of the history of this area, see R. Kumaresan, "Spectral analysis", In S.K. Mitra and J.F. Kaiser, editors, Handbook for Digital Signal Processing, chapter 16, pages 1143–1242. Wiley- Interscience, New York NY, 1993.6 1: Applications of Digital Signal Processing The normalized discrete-time angular frequency corresponding to the DFT bin number k (DFT fre- k quency) is given by 2k D : (4) k R Likewise, the continuous-time angular frequency˝ corresponding to the DFT bin numberk (DFT fre- k quency) is given by 2k ˝ D : (5) k RT To interpret the results of the DFT-based spectral analysis correctly, we first consider the frequency- domain analysis of a sinusoidal sequence. Now an infinite-length sinusoidal sequencegŒn of normalized angular frequency is given by o gŒnD cos. nC/: (6) o By expressing the above sequence as   1 j. nC/ j. nC/ o o gŒnD e Ce (7) 2 and making use of Table 3.3 of Text, we arrive at the expression for its Fourier transform as 1 X  j j j G.e /D e ı. C2`/Ce ı.C C2`/ : (8) o o `D1 Thus, the Fourier transform is a periodic function of with a period2 containing two impulses in each j period. In the frequency range,  , there is an impulse at D of complex amplitudee o j and an impulse at D of complex amplitudee . o To analyze gŒn in the spectral domain using the DFT, we employ a finite-length version of the se- quence given by ŒnD cos. nC/; 0nN 1: (9) o The computation of the DFT of a finite-length sinusoid has been considered in Example 11.16 of Text. In this example, using Program 11 10, we computed the DFT of a length-32 sinusoid of frequency 10 Hz sampled at 64 Hz, as shown in Figure 11.32(a) of Text. As can be seen from this figure, there are only two nonzero DFT samples, one at binkD5 and the other at binkD27. From Eq. (5), binkD5 corresponds to frequency 10 Hz, while bink D 27 corresponds to frequency 54 Hz, or equivalently,10 Hz. Thus, the DFT has correctly identified the frequency of the sinusoid. Next, using the same program, we computed the 32-point DFT of a length-32 sinusoid of frequency 11 Hz sampled at 64 Hz, as shown in Figure 11.32(b) of Text. This figure shows two strong peaks at bin locations k D 5 and k D 6; with nonzero DFT samples at other bin locations in the positive half of the frequency range. Note that the bin locations 5 and 6 correspond to frequencies 10 Hz and 12 Hz, respectively, according to Eq. (5). Thus the frequency of the sinusoid being analyzed is exactly halfway between these two bin locations. The phenomenon of the spread of energy from a single frequency to many DFT frequency locations as demonstrated by Figure 11.32(b) of Text is called leakage. To understand the cause of this effect, we recall that the DFTŒk of a length-N sequence Œn is given by the samples of its discrete-time Fourier j transform (Fourier transform).e / evaluated at D2k=N ,k D0;1;:::;N1. Figure 3 shows the Fourier transform of the length-32 sinusoidal sequence of frequency 11 Hz sampled at 64 Hz. It can be seen that the DFT samples shown in Figure 11.32(b) of Text are indeed obtained by the frequency samples of the plot of Figure 3.2. Spectral Analysis of Sinusoidal Signals 7 15 10 5 0 0 0.5π π 1.5π 2π Normalized frequency Figure 3: Fourier transform of a sinusoidal sequence windowed by a rectangular window. To understand the shape of the Fourier transform shown in Figure 3, we observe that the sequence of Eq. (9) is a windowed version of the infinite-length sequencegŒn of Eq. (6) obtained using a rectangular windowwŒn:  1; 0nN 1, wŒnD (10) 0; otherwise. j Hence, the Fourier transform.e / of Œn is given by the frequency-domain convolution of the Fourier j j transformG.e / ofgŒn with the Fourier transform .e / of the rectangular windowwŒn: R Z  1 j j' j.'/ .e /D G.e / .e /d'; (11) R 2  where sin.N=2/ j j.N1/=2 .e /De : (12) R sin.=2/ j SubstitutingG.e / from Eq. (8) into Eq. (11), we arrive at 1 j j j. / j j.C / 1 o o e .e /C e .e /: (13) .e /D R R 2 2 j As indicated by Eq. (13), the Fourier transform.e / of the windowed sequence Œn is a sum of the j frequency shifted and amplitude scaled Fourier transform .e / of the windowwŒn; with the amount R of frequency shifts given by˙ . Now, for the length-32 sinusoid of frequency 11 Hz sampled at 64 Hz, o the normalized frequency of the sinusoid is11=64D 0:172. Hence, its Fourier transform is obtained by j frequency shifting the Fourier transform .e / of a length-32 rectangular window to the right and to R the left by the amount0:1722 D 0:344, adding both shifted versions, and then amplitude scaling by a factor 1/2. In the normalized angular frequency range 0 to 2, which is one period of the Fourier transform, there are two peaks, one at0:344 and the other at2.10:172/ D 1:656, as verified by Figure 3. A 32-point DFT of this Fourier transform is precisely the DFT shown in Figure 11.32(b) of Text. The two peaks of the DFT at bin locationsk D5 andkD6 are frequency samples of the main lobe located on both sides of the peak at the normalized frequency 0.172. Likewise, the two peaks of the DFT at bin locationsk D 26 andk D 27 are frequency samples of the main lobe located on both sides of the peak at the normalized frequency 0.828. All other DFT samples are given by the samples of the sidelobes of the Fourier transform of the window causing the leakage of the frequency components at˙ to other o bin locations, with the amount of leakage determined by the relative amplitude of the main lobe and the sidelobes. Since the relative sidelobe levelA , defined by the ratio in dB of the amplitude of the main s` DTFT magnitude8 1: Applications of Digital Signal Processing N = 16, R = 16 8 6 6 4 4 2 2 0 0 0 5 10 15 0 0.5π π 1.5π 2π k Normalized angular frequency (a) (b) N = 16, R = 32 N = 16, R = 64 8 8 6 6 4 4 2 2 0 0 0 5 10 15 20 25 30 0 10 20 30 40 50 60 k k (c) (d) N = 16, R = 128 8 6 4 2 0 0 20 40 60 80 100 120 k (e) Figure 4: (a)–(e) DFT-based spectral analysis of a sum of two finite-length sinusoidal sequences of normalized frequencies 0.22 and 0.34, respectively, of length 16 each for various values of DFT lengths. lobe to that of the largest sidelobe, of the rectangular window is very high, there is a considerable amount of leakage to the bin locations adjacent to the bins showing the peaks in Figure 11.32(b) of Text. The above problem gets more complicated if the signal being analyzed has more than one sinusoid, as is typically the case. We illustrate the DFT-based spectral analysis approach by means of Examples 1 through 3. Through these examples, we examine the effects of the length R of the DFT, the type of window being used, and its lengthN on the results of spectral analysis. EXAMPLE 1 Effect of the DFT Length on Spectral Analysis The signal to be analyzed in the spectral domain is given by 1 xŒnD sin.2f n/C sin.2f n/; 0nN 1: (14) 1 2 2 Let the normalized frequencies of the two length-16 sinusoidal sequences bef D0:22 andf D0:34. 1 2 We compute the DFT of their sum xŒn for various values of the DFT length R. To this end, we use Program A-2 whose input data are the length N of the signal, length R of the DFT, and the two frequencies f and f . The program generates the two sinusoidal sequences, forms their sum, then 1 2 computes the DFT of the sum and plots the DFT samples. In this example, we fixN D16 and vary the DFT lengthR from 16 to 128. Note that whenR N, the M-filefft(x,R) automatically zero-pads the sequencex withR-N zero-valued samples. Magnitude Magnitude Magnitude Magnitude Magnitude2. Spectral Analysis of Sinusoidal Signals 9 10 10 8 8 6 6 4 4 2 2 0 0 0 20 40 60 80 100 120 0 20 40 60 80 100 120 k k (a) (b) 10 10 8 8 6 6 4 4 2 2 0 0 0 20 40 60 80 100 120 0 20 40 60 80 100 120 k k (c) (d) Figure 5: Illustration of the frequency resolution property: (a)f D0:28,f D0:34; (b)f D0:29,f D0:34; (c) 1 2 1 2 f D0:3,f D0:34; and (d)f D0:31,f D0:34. 1 2 1 2 Figure 4(a) shows the magnitudejXŒkj of the DFT samples of the signalxŒn of Eq. (14) forRD16. j From the plot of the magnitude jX.e /j of the Fourier transform given in Figure 4(b), it is evident that the DFT samples given in Figure 4(a) are indeed the frequency samples of the frequency response, as expected. As is customary, the horizontal axis in Figure 4(a) has been labeled in terms of the DFT frequency sample (bin) number k, where k is related to the normalized angular frequency through Eq. (4). Thus, D28=16D corresponds tokD8; and D215=16D1:875 corresponds tokD15. From the plot of Figure 4(a), it is difficult to determine whether there is one or more sinusoids in the signal being examined and the exact locations of the sinusoids. To increase the accuracy of the locations of the sinusoids, we increase the size of the DFT to 32 and recompute the DFT, as indicated in Figure 4(c). In this plot, there appear to be some concentrations aroundk D7 and aroundk D11 in the normalized frequency range from 0 to 0.5. Figure 4(d) shows the DFT plot obtained forRD64. In this plot, there are two clear peaks occurring atk D 13 andk D 22 that correspond to the normalized frequencies of 0.2031 and 0.3438, respectively. To improve further the accuracy of the peak location, we compute next a 128-point DFT, as indicated in Figure 4(e), in which the peak occurs aroundkD27 andkD45, corresponding to the normalized frequencies of 0.2109 and 0.3516, respectively. However, this plot also shows a number of minor peaks, and it is not clear by examining this DFT plot whether additional sinusoids of lesser strengths are present in the original signal or not. As Example 1 points out, in general, an increase in the DFT length improves the sampling accuracy of the Fourier transform by reducing the spectral separation of adjacent DFT samples. EXAMPLE 2 Effect of Spectral Separation on the DFT of a Sum of Two Sinusoids In this example, we compute the DFT of a sum of two finite-length sinusoidal sequences, as given by Eq. (14), with one of the sinusoids at a fixed frequency, while the frequency of the other sinusoid is varied. Specifically, we keepf D 0:34 and varyf from0:28 to0:31. The length of the signal being 2 1 analyzed is 16, while the DFT length is 128. Xk Xk Xk Xk10 1: Applications of Digital Signal Processing Figure 5 shows the plots of the DFTs computed, along with the frequencies of the sinusoids obtained using Program A-2. As can be seen from these plots, the two sinusoids are clearly resolved in Fig- ures 5(a) and (b), while they cannot be resolved in Figures 5(c) and (d). The reduced resolution occurs when the difference between the two frequencies becomes less than 0.04. j As indicated by Eq. (11), the Fourier transform .e / of a length-N sinusoid of normalized an- j gular frequency is obtained by frequency translating the Fourier transform .e / of a length-N 1 R rectangular window to the frequencies˙ and scaling their amplitudes appropriately. In the case of a 1 sum of two length-N sinusoids of normalized angular frequencies and , the Fourier transform is 1 2 obtained by summing the Fourier transforms of the individual sinusoids. As the difference between the two frequencies becomes smaller, the main lobes of the Fourier transforms of the individual sinusoids get closer and eventually overlap. If there is a significant overlap, it will be difficult to resolve the peaks. It follows therefore that the frequency resolution is essentially determined by the main lobe  of the ML Fourier transform of the window. Now from Table 10.2 of Text, the main lobe width  of a length-N rectangular window is given ML by4=N . In terms of normalized frequency, the main lobe width of a length-16 rectangular window is 0:125. Hence, two closely spaced sinusoids windowed with a rectangular window of length 16 can be clearly resolved if the difference in their frequencies is about half of the main lobe width, that is,0:0625. Even though the rectangular window has the smallest main lobe width, it has the largest relative sidelobe amplitude and, as a consequence, causes considerable leakage. As seen from Examples 1 and 2, the large amount of leakage results in minor peaks that may be falsely identified as sinusoids. We now 5 study the effect of windowing the signal with a Hamming window. EXAMPLE 3 Minimization of the Leakage Using a Tapered Window We compute the DFT of a sum of two sinusoids windowed by a Hamming window. The signal being analyzed isxŒnwŒn, wherexŒn is given by xŒnD0:85 sin.2f n/C sin.2f n/; 1 2 and wŒn is a Hamming window of length N . The two normalized frequencies are f D 0:22 and 1 f D0:26. 2 Figure 6(a) shows the 16-point DFT of the windowed signal with a window length of 16. As can be seen from this plot, the leakage has been reduced considerably, but it is difficult to resolve the two sinusoids. We next increase the DFT length to 64, while keeping the window length fixed at 16. The resulting plot is shown in Figure 6(b), indicating a substantial reduction in the leakage but with no change in the resolution. From Table 10.2, the main lobe width of a length-N Hamming window is8=N . ML Thus, forN D16, the normalized main lobe width is0:25. Hence, with such a window, we can resolve two frequencies if their difference is of the order of half the main lobe width, that is,0:125 or better. In our example, the difference is0:04; which is considerably smaller than this value. In order to increase the resolution, we increase the window length to 32, which reduces the main lobe width by half. Figure 6(c) shows its 32-point DFT. There now appears to be two peaks. Increasing the DFT size to 64 clearly separates the two peaks, as indicated in Figure 6(d). This separation becomes more visible with an increase in the DFT size to 256, as shown in Figure 6(e). Finally, Figure 6(f) shows the result obtained with a window length of 64 and a DFT length of 256. 1 through 3 that performance of the DFT-based spectral analysis depends It is clear from Examples on several factors, the type of window being used and its length, and the size of the DFT. To improve 5 For a review of some commonly used windows, see Sections 10.2.4 and 10.2.5 of Text.3. Analysis of Speech Signals Using the STFT 11 N = 16, R = 16 N = 16, R = 64 5 5 4 4 3 3 2 2 1 1 0 0 0 5 10 15 0 10 20 30 40 50 60 k k (a) (b) N = 32, R = 32 N = 32, R = 64 8 8 6 6 4 4 2 2 0 0 0 5 10 15 20 25 30 0 10 20 30 40 50 60 k k (c) (d) N = 64, R = 256 N = 32, R = 256 8 15 6 10 4 5 2 0 0 0 50 100 150 200 250 0 50 100 150 200 250 k k (e) (f) Figure 6: (a)–(f) Spectral analysis using a Hamming window. the frequency resolution, one must use a window with a very small main lobe width, and to reduce the leakage, the window must have a very small relative sidelobe level. The main lobe width can be reduced by increasing the length of the window. Furthermore, an increase in the accuracy of locating the peaks is achieved by increasing the size of the DFT. To this end, it is preferable to use a DFT length that is a power of 2 so that very efficient FFT algorithms can be employed to compute the DFT. Of course, an increase in the DFT size also increases the computational complexity of the spectral analysis procedure. 3 Analysis of Speech Signals Using the STFT The short-term Fourier transform described in Section 5.11 of Text is often used in the analysis of speech, since speech signals are generally non-stationary. As indicated in Section 1.3 of Text, the speech signal, generated by the excitation of the vocal tract, is composed of two types of basic waveforms: voiced and unvoiced sounds. A typical speech signal is shown in Figure 1.16 of Text. As can be seen from this figure, a speech segment over a small time interval can be considered as a stationary signal, and as a result, the Magnitude Magnitude Magnitude Magnitude Magnitude Magnitude12 1: Applications of Digital Signal Processing 3000 3000 2000 2000 1000 1000 0 0 0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5 Time Time (a) (b) Figure 7: (a) Narrow-band spectrogram and (b) wide-band spectrogram of a speech signal. DFT of the speech segment can provide a reasonable representation of the frequency domain characteristic of the speech in this time interval. As in the case of the DFT-based spectral analysis of deterministic signals discussed earlier, in the STFT analysis of non-stationary signals, such as speech, the window also plays an important role. Both the length and shape of the window are critical issues that need to be examined carefully. The function of the windowwŒn is to extract a portion of the signal for analysis and ensure that the extracted section ofxŒn is approximately stationary. To this end, the window lengthR should be small, in particular for signals with widely varying spectral parameters. A decrease in the window length increases the time- resolution property of the STFT, whereas the frequency-resolution property of the STFT increases with an increase in the window length. A shorter window thus provides a wide-band spectrogram, while a longer window results in a narrow-band spectrogram. A shorter window developing a wide-band spectrogram provides a better time resolution, whereas a longer window developing a narrow-band spectrogram results in an improved frequency resolution. In order to provide a reasonably good estimate of the changes in the vocal tract and the excitation, a wide- band spectrogram is preferable. To this end, the window size is selected to be approximately close to one pitch period, which is adequate for resolving the formants though not adequate to resolve the harmonics of the pitch frequencies. On the other hand, to resolve the harmonics of the pitch frequencies, a narrow-band spectrogram with a window size of several pitch periods is desirable. The two frequency-domain parameters characterizing the Fourier transform of a window are its main lobe width  and the relative sidelobe amplitude A . The former parameter determines the ability ML s` of the window to resolve two signal components in the vicinity of each other, while the latter controls the degree of leakage of one component into a nearby signal component. It thus follows that in order to obtain a reasonably good estimate of the frequency spectrum of a time-varying signal, the window should be chosen to have a very small relative sidelobe amplitude with a length chosen based on the acceptable accuracy of the frequency and time resolutions. The following example illustrates the STFT analysis of a speech signal. EXAMPLE 4 Short-Time Fourier Transform Analysis of a Speech Signal Themtlb.mat file in the Signal Processing Toolbox of MATLAB contains a speech signal of duration 4001 samples sampled at 7418 Hz. We compute its STFT using a Hamming window of length 256 with an overlap of 50 samples between consecutive windowed signals using Program 3 in Section 14. Figures 7(b) and (c) show, respectively, a narrow-band spectrogram and a wide-band spectrogram of the speech signal of Figure 7(a). The frequency and time resolution trade-off between the two spectrograms of Figure 7 should be evident. Frequency Frequency4. Spectral Analysis of Random Signals 13 4 Spectral Analysis of Random Signals As discussed in Section 2, in the case of a deterministic signal composed of sinusoidal components, a Fourier analysis of the signal can be carried out by taking the discrete Fourier transform (DFT) of a finite- length segment of the signal obtained by appropriate windowing, provided the parameters characterizing the components are time-invariant and independent of the window length. On the other hand, the Fourier analysis of nonstationary signals with time-varying parameters is best carried out using the short-time Fourier transform (STFT) described in Section 3. Neither the DFT nor the STFT is applicable for the spectral analysis of naturally occurring random signals as here the spectral parameters are also random. These type of signals are usually classified as noiselike random signals such as the unvoiced speech signal generated when a letter such as "/f/" or "/s/" is spoken, and signal-plus-noise random signals, such as seismic signals and nuclear magnetic 6 resonance signals. Spectral analysis of a noiselike random signal is usually carried out by estimating the power density spectrum using Fourier-analysis-based nonparametric methods, whereas a signal-plus- noise random signal is best analyzed using parametric-model-based methods in which the autocovariance sequence is first estimated from the model and then the Fourier transform of the estimate is evaluated. In this section, we review both of these approaches. 4.1 Nonparametric Spectral Analysis Consider a wide-sense stationary (WSS) random signalgŒn with zero mean. According to the Wiener– Khintchine theorem of Eq. (C.33) in Appendix C of Text, the power spectrum ofgŒn is given by 1 X j` P ./D  Œ`e ; (15) gg gg `D1 where Œ` is its autocorrelation sequence, which from Eq. (C.20b) of Appendix C of Text is given by gg   Œ`DE.gŒnC`g Œn/: (16) gg In Eq. (16),E./ denotes the expectation operator as defined in Eq. (C.4a) of Appendix C of Text. Periodogram Analysis Assume that the infinite-length random discrete-time signal gŒn is windowed by a length-N window sequence wŒn, 0  n  N 1, resulting in the length-N sequence Œn D gŒnwŒn. The Fourier j transform.e / of Œn is given by N1 N1 X X j jn jn .e /D Œne D gŒnwŒne : (17) nD0 nD0 O The estimateP ./ of the power spectrumP ./ is then obtained using gg gg 1 j 2 O P ./D j.e /j ; (18) gg CN 6 E.A. Robinson, A historical perspective of spectrum estimation, Proceedings of the IEEE, vol. 70, pp. 885-907, 1982.14 1: Applications of Digital Signal Processing where the constantC is a normalization factor given by N1 X 1 2 C D jwŒnj (19) N nD0 and included in Eq. (18) to eliminate any bias in the estimate occurring due to the use of the windowwŒn. j O The quantityP .e / defined in Eq. (18) is called the periodogram whenwŒn is a rectangular window gg and is called a modified periodogram for other types of windows. O In practice, the periodogramP ./ is evaluated at a discrete set of equally spaced R frequencies, gg j D2k=R,0k R1, by replacing the Fourier transform.e / with anR-point DFTŒk of k the length-N sequence ŒnW 1 2 O P ŒkD jŒkj : (20) gg CN As in the case of the Fourier analysis of sinusoidal signals discussed earlier, R is usually chosen to be greater thanN to provide a finer grid of the samples of the periodogram. O It can be shown that the mean value of the periodogramP ./ is given by gg Z    1 j./ 2 O E P ./ D P ./j .e /j d; (21) gg gg 2CN  j whereP ./ is the desired power spectrum and .e / is the Fourier transform of the window sequence gg wŒn. The mean value being nonzero for any finite-length window sequence, the power spectrum estimate given by the periodogram is said to be biased. By increasing the window length N , the bias can be reduced. We illustrate the power spectrum computation in Example 5. EXAMPLE 5 Power Spectrum of a Noise-Corrupted Sinusoidal Sequence Let the random signal gŒn be composed of two sinusoidal components of angular frequencies 0:06 and 0:14 radians, corrupted with a Gaussian distributed random signal of zero mean and unity vari- ance, and windowed by a rectangular window of two different lengths: N D128 and1024. The random signal is generated using the M-filerandn. Figures 8(a) and (b) show the plots of the estimated power spectrum for the two cases. Ideally the power spectrum should show four peaks at equal to 0.06, 0.14, 0.86, and 0.94, respectively, and a flat spectral density at all other frequencies. However, Figure 8(a) shows four large peaks and several other smaller peaks. Moreover, the spectrum shows large amplitude variations throughout the whole frequency range. AsN is increased to a much larger value, the peaks get sharper due to increased resolution of the DFT, while the spectrum shows more rapid amplitude variations. To understand the cause behind the rapid amplitude variations of the computed power spectrum en- countered in Example 5, we assume wŒn to be a rectangular window and rewrite the expression for the periodogram given in Eq. (18) using Eq. (17) as N1N1 X X 1  j.mn/ O gŒmg Œne P ./D gg N nD0 mD0 0 1 N1 N1jkj X X 1  jk A D gŒnCkg Œn e N nD0 kDNC1 N1 X jk O D  Œke : (22) gg kDNC14. Spectral Analysis of Random Signals 15 N = 128 N = 1024 20 30 20 10 10 0 0 _ 10 _ 10 _ 20 _ _ 20 30 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Normalized frequency Normalized frequency (a) (b) Figure 8: Power spectrum estimate of a signal containing two sinusoidal components corrupted with a white noise sequence of zero mean and unit variance Gaussian distribution: (a) Periodogram with a rectangular window of lengthN D128 and (b) periodogram with a rectangular window of lengthN D1024: O Now Œk is the periodic correlation of gŒn and is an estimate of the true correlation Œk. Hence, gg gg O O P ./ is actually the Fourier transform of  Œk. A few samples ofgŒn are used in the computation gg gg O of Œk whenk is nearN; yielding a poor estimate of the true correlation. This, in turn, results in rapid gg amplitude variations in the periodogram estimate. A smoother power spectrum estimate can be obtained by the periodogram averaging method discussed next. Periodogram Averaging 7 8 The power spectrum estimation method, originally proposed by Bartlett and later modified by Welch, is based on the computation of the modified periodogram of R overlapping portions of length-N input samples and then averaging these R periodograms. Let the overlap between adjacent segments be K samples. Consider the windowedrth segment of the input data .r/ ŒnDgŒnCrKwŒn; 0nN 1; 0r R1; (23) .r/ j with a Fourier transform given by .e /. Its periodogram is given by 1 .r/ .r/ j 2 O P ./D j .e /j : (24) gg CN .r/ O The Welch estimate is then given by the average of allR periodogramsP ./,0r R1W gg R1 X 1 W .r/ O O P ./D P ./: (25) gg gg R rD1 It can be shown that the variance of the Welch estimate of Eq. (25) is reduced approximately by a factor R if theR periodogram estimates are assumed to be independent of each other. For a fixed-length input 7 M.S. Bartlett, Smoothing periodograms from the time series with continuous spectra, Nature (London), vol. 161, pp. 686-687, 1948. 8 P.D. Welch, The use of fast Fourier transform for the estimation of power spectra: A method based on time averaging over short, modified periodograms, IEEE Trans. on Audio and Electroacoustics, vol. AU-15, pp. 70–73, 1967. Power spectrum, dB Power spectrum, dB16 1: Applications of Digital Signal Processing Overlap = 0 samples Overlap = 128 samples 25 25 20 20 15 15 10 10 5 5 0 0 _ _ 5 5 _ _ 10 10 0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5 ω/π ω/π (a) (b) Figure 9: Power spectrum estimates: (a) Bartlett’s method and (b) Welch’s method. sequence, R can be increased by decreasing the window length N which in turn decreases the DFT resolution. On the other hand, an increase in the resolution is obtained by increasingN . Thus, there is a trade-off between resolution and the bias. It should be noted that if the data sequence is segmented by a rectangular window into contiguous segments with no overlap, the periodiogram estimate given by Eq. (25) reduces to Barlett estimate. Periodogram Estimate Computation Using MATLAB The Signal Processing Toolbox of MATLAB includes the M-filepsd for modified periodogram estimate computation. It is available with several options. We illustrate its use in Example 6. EXAMPLE 6 Estimation of the Power Spectrum of a Noise-Corrupted Sinusoidal Sequence We consider here the evaluation of the Bartlett and Welch estimates of the power spectrum of the random signal considered in Example 6. To this end, Program 4 in Section 14 can be used. This program is run first with no overlap and with a rectangular window generated using the functionboxcar. The power spectrum computed by the above program is then the Bartlett estimate, as indicated in Figure 9(a). It is then run with an overlap of 128 samples and a Hamming window. The corresponding power spectrum is then the Welch estimate, as shown in Figure 9(b). It should be noted from Figure 9 that the Welch periodogram estimate is much smoother than the Bartlett periodogram estimate, as expected. Compared to the power spectrums of Figure 8, there is a decrease in the variance in the smoothed power spectrums of Figure 9, but the latter are still biased. Because of the overlap between adjacent data segments, Welch’s estimate has a smaller variance than the others. It should be noted that both periodograms of Figure 9 show clearly two distinct peaks at0:06 and0:14. 4.2 Parametric Model-Based Spectral Analysis In the model-based method, a causal LTI discrete-time system with a transfer function 1 X n H.z/D hŒnz nD0 P L k P.z/ p z k kD0 D D (26) P M k D.z/ 1C d z k kD1 Power spectrum, dB Power spectrum, dB

Advise: Why You Wasting Money in Costly SEO Tools, Use World's Best Free SEO Tool Ubersuggest.