Signal Recovery Using Cepstral Smoothing in the Shallow Water Environment by Jean Ok Nam Submitted to the Department of Electrical Engineering and Computer Science in partial fulfillment of the requirements for the degrees of Bachelor of Science in Electrical Science and Engineering and Master in Engineering in Electrical Engineering and Computer Science at the MASSACHUSETTS INSTITUTE OF TECHNOLOGY September 1994 ©Massachusetts Institute of Technology 1994. All rights rred. MWiTHi:. MASSACHiSE~ fINSTTlUE I sa0asiea*raolsrrwaU, Author.................. Department of Electrical Engineering and Computer Science September 2, 1994 Certifiedby..... _T h J. Robert Fricke Assistant Professor Thesis Supervisor Acceptedby.... F.R. Morgenthaler Chairman, Departmental Com ittee on Undergraduate Thesis Signal Recovery Using Cepstral Smoothing in the Shallow Water Environment by Jean Ok Nam Submitted to the Department of Electrical Engineering and Computer Science on September 2, 1994, in partial fulfillment of the requirements for the degrees of Bachelor of Science in Electrical Science and Engineering and Master in Engineering in Electrical Engineering and Computer Science Abstract The shallow water channel is complicated by multipath effects because of the proximity of the surface and bottom. The goal of this project is to extract the shape of the original signal from the received signal which is corrupted by the multipath effects. Given the impulse response of the channel and the received signal, an inverse filtering method utilizing the minimum-phase components can be very effective. However, because of the dynamic nature of the channel due to turbulence, internal waves, and thermal stratification calculation of the exact impulse response is not realistic. A more robust signal recovery method is necessary. In fact it is possible to separate the signal from the channel impulse response in the cepstral domain. A process known as cepstral smoothing can effectively do just this. And in this case, it makes the recovery technique independent of the transfer function and robust to noise. This minimum-phase method recovers the shape of the original signal, but all timing is lost. It can be recovered by a moving root-mean-square window over the received signal. Thesis Supervisor: J. Robert Fricke Title: Assistant Professor Acknowledgments There are many people to thank. First and foremost I think Professor Robert Fricke and Draper Laboratories for having the blind faith last fall to take me in as a Masters student. Rob, you have my sincerest gratitude. Thanks to my family, friends, and hockey mates. Without your love, support, and fun distractions I would have never made it. A special thanks to Jeremy for all the computer help that anyone could ever want and more. And to Deb, Matt, and Smitty: thanks for keeping me happy and sane. Contents 1 Introduction 7 1.1 Procedures . . . . . . . . . . . . . . . . 1.2 Simulations . . . . . . . . . . . . . . ................................ . 7 8 2 Inverse Filtering 10 3 Minimum Phase 12 4 Cepstral Processing 15 4.1 Cepstrum ................................. 15 4.2 Separation of [r] and h[T] ........................ 18 4.3 Cepstral Smoothing . . . . . . . . . . . . . . . . . 5 Adding Noise ......... 19 23 5.1 Signal-to-Noise Ratio ........................ 23 5.2 Matched Filtering .......................... 25 6 Timing Recovery 29 7 Two Targets 34 8 39 Conclusions A Choosing Cepstrum Cut-off for Cepstral Smoothing 42 A.1 Impulse Response ............................. 42 A.2 Signal ................................... 45 4 List of Figures 1-1 Shallow water channel .......................... 9 2-1 Sonar Signal, Channel Response, and Received Signal ......... 11 3-1 Minmum-Phase Decomposition. ..................... .. 13 4-1 Subtraction Method and Calculation of Xmin(t) from min[T]...... 16 4-2 17 [-r] and ax,min[T] are equivalent. .................... 4-3 Plots of 9(r) - h(r), for exact and inexact impulse responses. 4-4 Recovered signals from exact and inexace impulse responses .... 19 ..... 20 4-5 Separation of signal and impulse response in cepstral domain ..... 21 4-6 Slowly and quickly varying frequency responses 21 ............ 4-7 Hanning windowing of cepstrum signal .................. 22 4-8 Signal recovery using cepstral smoothing ................. 22 5-1 Calculation of Signal-to-noise ratio 23 .................. 5-2 Effect of different levels of noise on the frequency response of the received signal ............................. 25 5-3 Effect of different noise levels in cepstral domain ............ 26 5-4 Improvement in sigal recovery after matched filtering ......... 27 5-5 Cepstum of pure noise .......................... 28 6-1 Shallow water channel ........................... 29 6-2 Determination of tobject .......................... 30 6-3 Root-mean-square windowing ...................... 31 5 6-4 Maximum noise level for timing recovery, no matched filtering .... 32 6-5 33 Maximum noise level for timing recovery, with matched filtering . . . 7-1 Two targets ................................. 35 7-2 Cepstral smoothing window for multi-target signal ........... 36 7-3 Recovery of multi-target signal ...................... 37 8-1 Shallow water channel ........................... A-1 First and second signal paths. ...................... 39 43 A-2 Cepstrum of impulse response of channel with Dt=15m, Ds=5m, D=35m, L=210m .................................. 44 A-3 Cepstrum of impulse response of channel with Dt=3m, Ds=3m, D=35m, L=210m .................................. 44 A-4 Cepstrums of signals of varying pulse length .............. 45 A-5 Recovered signals using different values of T- .............. 46 6 Chapter 1 Introduction Shallow water channels are characterized by multipath effects because of the proximity of the surface and bottom. Furthermore, the highly variable propagation conditions make the shallow water environment very difficult to use as a communication channel. The ideal goal of this research is to extract the shape of a sonar signal from the received signal, which is corrupted by reverberant and ambient noise. However, here we will only recover a signal of the same frequency content as the original signal and of a comparable pulse length. Also we would like to recover the arrival time of the first return. This will give us information about the distance to objects in the channel. The motivation for this research originates with the end of the Cold War. It is unlikely that in the near future there will be another major war or battle in the middle of the deep ocean. However, it is more probable that there will be smaller skirmishes fought off the shores of third world countries. The Persian Gulf War is a prime example. Because of the new face of naval warfare, the Navy is very interested in the shallow water environment. (The depth of shallow water is on the order of 50 meters.) 1.1 Procedures Since we are trying to recover a signal after it has passed through a linear timeinvariant system, an obvious method is inverse filtering (Chapter 2). That is, to 7 pass the received through a system which undoes the effects of the channel. This, however, proves ineffective because of the possible non-invertibility of the channel impulse response and the inability to measure the exact impulse response. To solve the first problem, we do all processing on only the minimum-phase components of the signals (Chapter 3). This is a valid approach as long as the sonar signal we are using is a minimum-phase signal. Therefore we are only losing nonminimumphase characteristics of the channel in which we have no interest. Solving the problem of not having an exact impulse response is more complicated. The inverse filtering method is sensitive to inexactness, and any approximation seriously affects the results. Taking a hint from research in room acoustics, we looked into cepstral analysis (Chapter 4). In the cepstral domain the signal can be separated from the channel response. A process called cepstral smoothing further improves the system to make it completely independent of the channel response. So far only reverberant noise has been considered. We need to also examine the effects of ambient noise on the recovery system (Chapter 5). After minimum-phase processing, the time delay which tells us the distance to any detected objects is lost. Recovery of this timing is facilitated by looking at a moving root-mean-square window of the received signal (Chapter 6). Finally, since the reverberant trains are longer than the original signal, it is possible that there two or more signals are so close in time that the received signals overlap. Using minimum-phase processing and cepstral smoothing we can still recover the signals. The case of two targets is explored (Chapter 7). 1.2 Simulations All signals are simulated using the software package Matlab, version 4.1, copyrighted to The MathWorks, Inc. The channel is characterized with the following parameters (See Figure 1-1): D = Channel Depth = 35 m Ds = Depth of Source and Receiver ranges from 3 to 32 m 8 Dt = Depth of Target ranges from 3 to 32 m L = Range to Target from Source = 210m Sea Surface it 1 JL Target Sea Bottom Figure 1-1: Shallow water channel. The signal used is a 10 kHz gated sine wave of pulse length 3.3 x 10- 4 s with a 3 kHz bandwidth. While these simulations presented in this thesis are done for fixed values of channel depth and object range, the phenomenologies and techniques for minimum-phase processing and cepstral smoothing are applicable to other shallow water environments. 9 Chapter 2 Inverse Filtering The object here is to recover the originally sent signal, x(t), from the received signal, y(t), and the impulse response of the shallow water channel, h(t). See Figures 1-1 and 2-1. The relationship between these signals is the following: y(t) = x(t) * h(t). (2.1) If the water channel is considered a linear time invariant system, then the relationship can be represented in the frequency domain as follows: Y(w) = X(w)H(w). (2.2) Therefore, given the received signal and the impulse response, we can recover the original signal by filtering Y(w) with the inverse of the impulse response of the channel, H-l(w), provided the inverse exists; X(w) = Y(w)H- 1 (w). (2.3) We can go back and forth between the frequency and time domains using the following transform pair [8]: x(t) = J X(w)etdw, -00o 10 (2.4) x(t) ,, h(t) A U.1 2 0.05 01 i 0 .2 -0.05 -4 _n . -5 0 5 10 (a) Seconds I0.26 15 x 10 - 4 I 0.28 0.3 (b) Seconds 0.32 y(t) 0.4 0.2 0 -0.2 _n A 0.278 0.28 0.282 0.284 0.286 0.288 0.29 0.292 0.294 (c) Seconds Figure 2-1: (a) Sonar Signal, x(t), (b) Channel Response, h(t), (c) Received Signal, y(t). X(w) = -00 x(t)e-itwdt. (2.5) This is an effective recovery process if the exact transfer function of the channel is known and the inverse exists. That is, there are no zeros in the transfer function, H(f). In practice we will only have an estimate of the transfer function. Because of the dynamic situation due to water waves and varying bottom conditions we cannot calculate an exact transfer function. this inexactness. We need to make signal recovery robust to One method for improving the process is to use minimum-phase processing [13] and cepstral smoothing [3]. The minimum-phase processinginsures that the inverse transfer function exists, and cepstral smoothing makes the process independent of the impulse response of the channel. 11 Chapter 3 Minimum Phase The transfer function of the channel may be contaminated with nonminimum-phase zeros. These zeros will make the inverse, H-l(w), unstable. We can avoid this by using minimum-phase processing. To exploit the properties of minimum-phase processing,it is important that the original signal is minimum-phase itself. If the received signal contains any nonminimumphase zeros, the same zeros will be present in the transfer function. Therefore, if the exact transfer function is known, the minimum-phase zeros will cancel in the inverse filtering step. However, we cannot exactly measure or compute the impulse response, and approximations of the transfer function will not exactly cancel the nonminimumphase zeros [10]. The result is unstable poles in the inverse transfer function causing it to be neither causal nor stable. By using only the minimum-phase component of the transfer function, the inverse will always be stable and causal. Consider only the minimum-phase components of the received signal and the channel response. Each signal can be decomposed into minimum-phase and all-pass components. The decomposition is the following [5]: S(w) = Smin(w)Sap(W). (3.1) The minimum-phase component contains only poles and zeros above the real frequency axis in the complex plane, and the all-pass component has unit magnitude 12 jis I x X 0X X Transfer Function co 0 II I o 0x x X 0 X X OX > | X x X x X > > 0o Minimum-Phase All-Pass o Figure 3-1: Minmum-Phase Decomposition. for all frequencies but has a phase which changes by -27r for each pole-zero pair. See Figure 3-1. Since the minimum-phase component has all zeros and poles above the real frequency axis, it is both causal and stable. Furthermore, the inverse, Smin(), exists and is also stable and causal. To recover the minimum-phase component of the original signal we need only multiply the minimum-phase component of the received signal by the inverse of the minimum-phase component of the transfer function [11], Xmin(w) = Hmn()Ymin ()- (3.2) By using this minimum-phase processing we have lost all linear phase information of the channel to the all-pass component. Therefore, we have lost the timing of the 13 first return which is the information we need to determine the distance to the target. Recovery of this timing is discussed in Chapter 6. 14 Chapter 4 Cepstral Processing 4.1 Cepstrum The complex cepstrum [5] is defined as the inverse Fourier transform of the complex logarithm of the Fourier transform of a signal, :[T]= F-l{log(X(w))}. (4.1) The advantage of working in this complex cepstral domain is that convolution in the time domain maps to addition in the cepstral domain. We already know that convolution in time maps into multiplication in the frequency domain: y(t) = x(t) * h(t), (4.2) Y(f) = X(f)H(f). (4.3) When the logarithm is taken, log(Y(f)) = log(X(f)H(f)) = log(X(f)) + log(H(f)). 15 Taking the inverse Fourier transform, (4.4) Y)T]= x[T] + h[T], since the transform is a linear operation. To find the cepstrum of the minimum-phase component of the original signal, we calculate the cepstrums of the minimum-phase components of the received signal and transfer function and subtract the latter from the former. We will refer to this as the subtraction method of signal recovery [9]: Xmin[T7]= To find min[7] - hmin[T]. (4.5) min(t) from the cepstrum, we take the transform, put it in the exponent of e (this is the inverse log operation), and then take the inverse transform. This is illustrated in Figure 4-1. Q Ymin[T] min[T] t hmin [T] Xmin[T] | exp ' F (.) | I_ ,min (t) Figure 4-1: Subtraction Method and Calculation of Xmin(t) from Xmin[T]. Since we are dealing with minimum-phase signals, we can conveniently avoid the complications of the complex logarithm. To explain this we need to utilize two properties of minimum-phase functions. 1. Minimum-phase signals are causal; x(t) = 0 for t less than zero. 2. As shown in Figure 4-2, the magnitude of the Fourier transform of the minimum16 phase component is equal to the magnitude of the Fourier transform of the total signal. It is simpler to calculate the real cepstrum, which is the inverse of the logarithm of the magnitude of the transform of the signal: a,[] = F-{loglX(w)} = :[-] - +2*[-] (4.6) where x[r] is the complex cepstrum of x(t). The first property of minimum-phase signals and Equation 4.6 leads to the following [5]: (4.7) [ ,T] = a [T]tmin [T], where Lmin[T]= 2[,[] - [T]. (4.8) In Equation 4.8, [r] is the unit step function and [r] is the delta function. The second property of minimum-phase signals indicates that the real cepstrum of the total signal and the real cepstrum of the minimum-phase component are equal. See Figure 4-2. X(w) x(t) -- .logX(w) - IFT CX[T] - II Xmin(t)- L Xmin (w) Figure 4-2: loglXmin(W) /iosix,,(w) / II IPT , minFT T] x,mi[r] [r] and ax,mi,[T] are equivalent. Then according to Equation 4.7, [r] and Xmin[T]are equivalent. Therefore, the complex cepstrum of a signal can be calculated by first calculating the real cepstrum 17 and then using Equation 4.7. This is advantagous because when calculating the complex cepstrum directly, we must take the complex logarithm of the phase of X (w). To take the logarithm successfully, the phase must be a continuous function; however, the phase is ambiguous since any integer multiple of 27rcan be added to the phase of X(w). Before taking the logarithm, an intermediate step to insure continuity of the phase is necessary. [5]. The subtraction method requires the transfer function. Using an approximation of the transfer function is not very effective. The impulse response of the channel contributes impulses to the high cepstrum of the received signal. An estimate of the impulse response is not going to exactly cancel all the impulses. See Figure 4-3. These high cepstrum components will corrupt the recovered signal. In Figure 4-4, we can see the corruption of the received signal when an inexact impulse response is used. A more ideal recovery process would be robust to inexactness in the impulse response measurement. A method called cepstral smoothing [3]is actually independent of the impulse response. The basic idea is to separate the cepstrums of the signal and the impulse response and then extract only the information relevant to the signal. 4.2 Separation of x[T] and h[r] If we examine the pertinent signals in the cepstral domain, we can see the the original signal and the transfer function occupy different regions of the cepstrum. See Figure 45. The signal occupies "low-time" cepstrum [9] and the transfer function occupies "high-time" cepstrum. These will be referred to as low cepstrum and high cepstrum. The cepstral domain gives us a view of the variability of the Fourier transforms of the signals we are analyzing. In Figure 4-6(b), the frequency response has higher rates of variability than in Figure 4-6(a). Therefore, the cepstrum of the signal in Figure 4-6(b) occupies a higher part of the cepstrum than the signal in Figure 4-6(a). In other words, the "frequencies" of the frequency response are higher in the signal in Figure 4-6(b) than in the signal in Figure 4-6(a). 18 1 I I I I I I I I 0.5 CI -0.5 -1 I I., I 0 1 I . Ir 0.002 - I J I I 1, I I I I Iur I 0.004 0.006 0.008 0.01 0.012 0.014 0.016 (a) Cepstrum, Using the Estimated Impulse Response I I I I I i I I I I I Il~7.. 0.018 I I I I 0.02 0.55 C -O.1 5 -1 0 0.002 I I 0.004 0.006 0.008 0.01 0.012 0.014 0.016 (b) Cepstrum, Using the Exact Impulse Response 0.018 0.02 Figure 4-3: Plots of (r) - h(r), for exact and inexact impulse responses. 4.3 Cepstral Smoothing The idea behind cepstralsmoothingis that the signal to be recoveredand the transfer function of the channel occupy different areas of the cepstrum. As shown in Figure 47, we are using a Hanning window to isolate the low cepstrum: (t)0.5- 0.5cos{2r(t- T/2)/T} if-T/2 < t < T/2 otherwise. hannng(t) O (4.9) otherwise. The method for choosing the value for T is explained in Appendix A. The high cepstrum is eliminated and only the low cepstrum occupied by the signal remains. However, depending on the value of T, the recovered signal may not be exactly the 19 4 - 2 Actual Impulse Response Estimated. Impulse Response 0 -2 -4 0.285 0.295 (a) Seconds 0.29 0.1 0.04 0.05 r 0.02 a\ · _ L 0.305 0.3 0 v -0.02 -0.05 _n i _ 0.28 . 0.3 _nv.v28-r nA .~~~~~~~~~ 0.32 0.28 0.34 (b) Seconds 0.3 0.32 0.34 (c) Seconds Figure 4-4: (a) Impulse responses, (b) Recovered signal using exact impulse response, (c) Recovered signal using inexact impulse response. original signal. It will be the same frequency, but may be of a different pulse length. More discussion is in Appendix A. The obvious advantage here is that our recovery method is independent of the transfer function. Therefore, recovery has become robust to changes in the transfer function due to the variations in the propagation channel. In Figure 4-8, the recovery process is shown from left to right and up and down. The x-axes of the plots of the signal, impulse response, received signal, and recovered signal is seconds. For the cepstrums, it is the r domain. Notice that we have lost information about the time of the first return. We will recover this timing in Chapter 6. 20 .4 0.5 0 1 1.5 2 2.5 3 Cepstrum x 10-3 Figure 4-5: Separation of signal and impulse response in cepstral domain 0 -1 a) 03 ( -3 -4 , -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 Hertz 2.5 044 x 10 r () "o -0 03 ('S C -2 -1.5 -1 -0.5 0 Hertz 0.5 1 1.5 2 2.5 4 x 10 Figure 4-6: (a) Slowly varying frequency response, (b) Quickly varying frequency response. 21 I 0 0.5 1 1.5 2 2.5 3 Cepstrum 103 Figure 4-7: Hanning windowing of cepstrum signal. I, I v. . I I 0 _ 0 -- _.v.. \[\I\I\/ 0 5 10 15 Signal 0.2 x 10 -4 I -- k.... i -.. 0 -1 I 0 _ eJ 0.27 0.28 0.29 Channel Response 1 . . . 0 ~1n -5 0.27 . -5 0.28 0.29 Received Signal 0.5 1 1.5 2 Cepstrum of Received x 10-3 0.2 0 -0.2 - 0 0.5 1 1.5 2 After Cepstral Smoothing 10- 3 0 0.5 1 1.5 Recovered Signal Figure 4-8: Signal recovery using cepstral smoothing. 22 2 x 10 - 3 Chapter 5 Adding Noise In these simulations we added zero mean Gaussian noise at different levels of variance. 5.1 Signal-to-Noise Ratio The signal-to-noise ratio (SNR) is calculated by looking at the power spectra of the noise and the received signal strength. Since the signal is narrowband, only the power levels in a narrowband around the carrier frequency are considered. The ratio is the average noise power divided by the average signal power in this narrowband. See Figure 5-1. rA cc aE. 5 Hertz 4 x 10 Figure 5-1: Signal-to-noise ratio calculated in the shaded regions. The cepstral smoothing method performs well in the presence of ambient noise. 23 We can explain why by examining the effect of the added noise to the received signal in the cepstral domain. Unfortunately, addition in the time domain does not map to a convenient function in the cepstral domain because the relationship is non-linear. In the simulations, noise is added after convolving the signal with the impulse response, y(t) = [x(t) * h(t)] + n(t). (5.1) When we take the logarithm of the magnitude of the frequency response, loglY(w)l = loglX(w)H(w) + N(w)j = loglX(w)H(w)(1+ K(w))j, where N(w) K(w) = X(w)H(w) (5.2) Therefore, loglY(w)l = loglX(w)l+ loglH(w)l+ logll + K(w)l, loglY(w)l = loglX(w)j + loglH(w) + N"(w). The inverse Fourier transform of the last term, N"(w), can be considered the effect of the noise in the cepstral domain, h"[r]. The general shape of the Fourier transform of Gaussian white noise, N(w) is a constant function with many local variations. See Figures 5-2(c,d). As the amplitude of the noise is increased in the time domain (more noise is added), the magnitude of N(w) increases. As the magnitude of N(w) increases, N"(w) also increases. However, the shape remains the same. So in effect, it is as if a DC component has been added. See Figure 5-2. When the inverse transform of N"(w) is taken ("[r]) to see the effect of noise in the cepstral domain, this DC component maps to the point r = 0. 24 X 10 - 4 iI I . 0 _ · · I C n -1 L -- I I 0.02 0.03 0.01 (a) Noisel, Seconds 0 I I - 0.04 0 0.03 0.02 0.01 (b) Noise2, Seconds 0 0.04 0 m -20 -40 I, IL -2 a -20 pm__uIII . -2 x 10 4 0 2 (d) FFT of Noise2 , . . f -40 LI 2 0 (c) FFT of Noisel x 104 . . . 0 m -20 - -40 -60 I 0 1 Ii '1 0 41 1A. m -20 -40 I -2 0 (e) N"(w) lilrvr lfllpRIlif*· FiprigvTln -60 -2 2 x 104 0 (f) N"(w) 2 x 104 Figure 5-2: (a) Noisel such that the SNR is 75 dB, (b) Noise2, 15 dB, (c) FFT of Noisel, (d) FFT of Noise2, (e) N"(w) for Noisel, (f) N"(w) for Noise2. Therefore, for stronger noise levels, the cepstrum of the signal is larger at =0. Again, for T f: 0, fi"[T] doesn't change significantly. See Figure 5-3. 5.2 Matched Filtering In hopes of improving the signal recovery we match filter the received signal. The matched filter, m(t), is the time reverse of the original signal, x(t); m(t)= x x(to-t) for0<t<to 0 otherwise. This to is the pulse length of the signal. 25 (5.3) I 3 · -SNR 2 = 15 dB - - SNR = 5 dB ..... SNR =.5 dB I i 1 0 0 0.l O 1. 5 1 0.5 x 10-3 (a) Cepstrum I I I I I - 3, 2e I - - SNR=5dB -i .... 1 SNR = 15 dB SNR = .5 dB I \, " C 0.5 0 1 1.5 (b) Cepstrum 2 2.5 x 10 - 4 Figure 5-3: (a) Cepstrums of noise effect, F- 1 {logl1 + K(w)l), are similar, (b) Dif- ference at = 0. The result after matched filtering is = y(t) *m(t) Ymatched(t) (5.4) The matched filtering will cut out all noise that is not in the bandwidth of the original signal. Furthermore, much of the noise in the signal's frequency band will also be filtered out since it is not correlated with the signal [6]. The matched filtering permits signal recovery (shape, not timing) with the signal-to-noise ratio as low as -1 dB. This is an improvement of approximately 16 dB over the system without matched filtering. In Figure 5-4 [Tr]is plotted for different noise levels. In this figure, we are illustrating that as the noise increases, the cepstrum of the received signal becomes corrupted. 26 In Figure 5-4(al) the low cepstrum component from the signal is visible. However, in Figure 5-4(a2) the low cepstrum component from the signal is not distinguishable from the rest of the cepstrum. We cannot definitely say, that the low cepstrum is indeed the result of the signal. While comparing it to the cepstrum of pure noise in Figure 5-5, we cannot distinguish one from the other. Signal recovery breaks down. In Figures 5-4(bl,b2) the plots are the resulting [r]'s after matched filtering. The low cepstrum component corresponding to the signal is still distinguishable even if the noise power is higher than the signal power (i.e. -1 dB SNR). Matched filtering also improves the minimum signal-to-noise ratio at which we can do the timing recovery described in the next chapter. 0.5 ,, U., 0.2 0.1 0 0 -0.1 -0.2 nr 0 0.5 1 1.5 (al) 2 0 0.5 x10 - 3 1 (bx) 1.5 1 1.5 2 x10 - 3 0.2 0.1 0 -0.1 A') -v.0 0 0.5 1 (a2) 1.5 2 0.5 (b2) x 10 - 3 2 -3 x 10 Figure 5-4: (al),(a2) [T]'swithout matched filtering for noise levels of 15 dB and 6 dB respectively; (bl), (b2) [T]'s after matched filtering for noise levels of 0 dB and -1 dB. 27 0.5 C -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 (a) Cepstrum 0.5 i -0.5 0 I I I I I I I 0.5 1 1.5 2 I I I 5 x 10-3 I I 2.5 3 (b) Cepstrum I 3.5 I I I I 4 4.5 5 X 10 -3 Figure 5-5: (a) Cepstum of Gaussian white noise, (b) Cepstrum of received signal with 7dB of noise, no matched filtering. 28 Chapter 6 Timing Recovery Although a representative of the original signal is recovered in the minimum-phase recovery, the timing of the received signal is lost. The timing we are interested in is the time that it takes for the signal to be sent out and return along the shortest path, tobject.That is, the time it takes for the signal to travel back and forth on the path A as shown in Fig 6-1. This will directly give us the distance to the detected object. Sea Surface it I ~~~~ '""" -'_ Sea Bottom Figure 6-1: Shallow water channel. The signal received, which includes paths B, C (Figure 6-1), and paths with more surface and bottom reflections, is shown in Figure 6-2. It is the superposition of the signal returns from all of the different paths. Since A is the shortest path, it causes the earliest signal return. We can determine tobject by seeing where in time the received signal begins. According to Figure 6-2, tobject is 0.28 s. 29 4A 2 0 . . . . . . . .. . . . . .. . . . . . . . .· .· .· .· .·..· -2 -4 _rl 0.28 0.285 0.29 (a) Impulse Response 0.05 _ ......... .. I I . .. . ........... (b) Signal ~~__I_ : .. _ ..... I . :....... 0 _ ' 'I!" 0 0.278 I .... ; ', .......... 40 . r, -U.Uo .. x10- .. ........ : I0. 0.28 0.282 I 0.284 0.286 0.288 (c) ReceivedSignal I i I 0.29 0.292 0.294 Figure 6-2: (a) Impulse response, (b) Original signal, (c) Impulse response convolved with signal, received signal, tobject= 0.28 s. Moving RMS Window The root-mean-square (RMS) value is a measurement of the amount of power in a signal. If we look at small time windows of the signal then we can calculate the amount of power in these time windows. When a moving RMS window is applied to a signal, the result is the following. The value of the resulting signal at time to is the RMS value of a window of the signal from time to to to + t, where t is the width of the time window, Xrms(t) This resulting signal, = j/ot x2 (t)dt. (6.1) rms(t), will show a peak at the first time when the power of the received signal is significantly above the noise. This peak is at tobject. Depending on the size of the window, rms(t), will actually start to increase before the signal x(t) begins to grow. A cursory explanation is that information about x(t + t). rms(t) contains One way to decide the timing of the signal, tobject, by determining the time when Xrms reaches a threshold value. For example, if the threshold is 0.9 x 10 - 4 units of power, then according to Figure 6-3(a), the timing 30 x 104 (a) After RMS Windowing 0.278 0.28 0.282 0.284 0.286 0.288 (b) ReceivedSignal 0.29 0.292 Figure 6-3: (a) After RMS windowing, Xrm,,,(t),(b) Received signal, y(t). is approximately tobject = 0.28 s. From Figure 6-3(b) we can check that 0.28 s is approximately where the received signal begins. As noise increases, the peaks become less defined. In Figure 6-4 we see the minimum SNR for successful timing recovery (no matched filtering), is 9 dB. The timing for the signal with SNR of 0 dB cannot be successfully recovered because the peaks are not well enough defined over the noise. If the threshold is defined as 3 x 10 - 4 units of power, we can recover the timing from the signal of 9 dB SNR, but we cannot from the signal of 0 dB SNR. Another way to determine the timing is to see when rmS(t) has it's first peak which is significantly (say 1.5 times) the level of the noise floor. In Figure 6-5(bl) (using matched filtering) the noise floor is at approximately 1.5 x 10 -4 units of power. The first peak significantly above that is at t = 0.281 s. In Figure 6-5(b2) the noise floor is at 2 x 10 - 4 . The first peak significantly above that is at t = 0.286 s, not the correct peak. The noise level is too high. With matched filtering, timing recovery is possible for an SNR of 0 dB, but -1 dB is too much noise for effective recovery. For total signal recovery, shape and timing, we need to exceed the minimum SNR 31 -4 x 10 0.28 0.285 0.29 (al) 0.295 0.28 0.285 0.29 0.295 (bl) x 10 0.6 3 0.4 0.2 0 -0.2 -0.4 --- 0.28 ---- --- 0.285 0.29 (a2) ---- 0.295 0.28 0.285 0.29 (b2) 0.295 Figure 6-4: Without matched filtering: (al) Received signal, SNR = 9 dB, (bi) After RMS windowing, SNR = 9 dB, (a2) Received siganl, SNR = 0 dB, (b2) After RMS windowing, SNR = 0 dB. for both signal shape recovery (Chapter 5) and signal timing recovery (Chapter 6). For the recovery method of cepstral smoothing, matched filtering, and rms windowing, the minimum SNR for shape recovery is -1 dB. And the minimum SNR for timing recovery is 0 dB. Therefore, the method is valid as long as the SNR is greater than 0 dB. 32 1 4- 0.2 0.1 01~ ITIIp fIr ? 11' I'T I- 11" 7 -0.1 -0.2 0.28 0.285 0.2 I I - 7q 0.29 (al) . 0.295 (bl) . , I 0.1 0 -0.1 ,. . o 0.28 . 0.285 . 0.29 (a2) I .~~~~~~~~~~~~~~~~~~~ 0.28 0.295 0.285 0.29 (b2) 0.295 Figure 6-5: With matched filtering: (al) Received signal, SNR = 0 dB, (bl) After RMS windowing, SNR = 0 dB, (a2) Received siganl, SNR = -1 dB, (b2) After RMS windowing, SNR = -1 dB. 33 Chapter 7 Two Targets Because of the reverberant tails, a received signal is relatively long in time duration compared the to the original signal. Hence, it is possible that two signals are so closely spaced in time that the target returns are overlapping. Recovery is still possible using minimum-phase processingand cepstral smoothing. However, the Hanning window must be modified [4]. Here we will consider two targets in the channel creating two overlapping received signals. See Figure 7-1. Each target reflects back a group of returns, yl(t) and y2(t). The result is a superposition of the two signals, Ytotal(t) = yl(t) + y2(t). (7.1) Each of these received signals is the convolution of the sonar signal with the channel impulse response. That is, yl(t) = x(t) * hl(t), y2(t) = x(t) * h2(t). Note that the channel response is dependent on the range of the object from the source and receiver. This is why hl(t) and h2(t), the channel impulse responses of each of the targets, are different. In this chapter, we are going to assume that the 34 Sea Surface D Sea Bottom Figure 7-1: Two targets. distance between the targets allows us to approximate hl(t) and h2(t) as follows: hi (t) = h2(t- t), (7.2) where t is the difference in travel time of the first response from target 1 and the first response from target 2. In effect, we are assuming that the impulse response of the channel is the same for both target locations except for a time delay of to. Using the approximation if Equation 7.2, the double target received signal is the received signal of one target convolved with a double impulse separted by t. See Figure 7-3(a). The cepstrum of double impulses is an infinite impulse train of the same spacing as the impulses in the time domain as shown next. If m[n] is the double impulse (most easily analyzed in the discrete-time domain because there are only two non-zero points) [7, 4], m[n] = 6[n]+ a6[n - N], (7.3) where [n] is the delta function and a is a constant less than 1, then the Z-transform is M(z) = 1 + az - N, (7.4) and the log of the Z-transform is M(z)= log(1+ az-N )= (-1)n+1l n=1 35 ° -nN (7.5) Taking the inverse transform gives us the complex cepstrum, m[- = (-1)r1 r=l _6(T - rN), r (7.6) an infinite impulse train spaced by N. Note that N corresponds to t divided by the sampling rate of this discrete-time analysis. Since convolution in the time domain maps into addition in the cepstral domain, the cepstrum of the double target is the cepstrum of the single target added to the cepstrum of the double impulse. That is, ytotal(t)= y(t) * mln], (7.7) Ytotal(T) = (T) ) + (T). (7.8) I 0.5 0 -0.5 _4 0 1 2 I I 1 2 2 3 (a) Cepstrum 4 5 6 x 10o I 1 0.5 0 -0.5 -1 0 3 3 (a) Cepstrum 4 5 6 x 10-3 Figure 7-2: (a) Cepstrum of the multi-target signal, (b) Cepstral smoothing window. The cepstrum of the double target signal occupies the low cepstrum like the single target signal, but it also includes the infinite impulse train of spacing N. Therefore, to recover all of the signal cepstrum from the received signal's cepstrum we need to 36 adjust the cepstral smoothing window to include this impulse train. See Figure 7-2. The new cepstral smoothing window is the same low-time Hanning window with a comb-like window to include the impulse train. The spacing, N, can be found from the received signal's cepstrum. The distance to the first peak is N. When there is no noise, the cepstrum of the received signal has many peaks from the impulse response. See Figure 4-5. However, when noise is added these peaks quickly disappear. See Figure A-4(b). So, the only peaks are a result of the double target. The comb-like window can then be created to have a comb at locations rN where r is the tooth number and goes from 1 to oo. 0 0.001 0.002 0.003 0.004 0.005 0.006 (b) Seconds 0.007 0.008 0.009 0.01 Figure 7-3: (a) Multi-target signal, t = .002s, (b) Recovered signal. The cepstrum of the double impulses is an exponentially decaying infinite impulse train. So, it is sufficient to only include the first two or three impulses in the new comblike cepstral smoothing window. This, however, creates a slight problem. When we convert back to the time domain, the now finite impulse train will become an infinite train in the time domain. Therefore, the new recovered signal will be an infinite train convolved with the new signal. Fortunately, the infinite train is exponentially decaying so by the third occurrence of the signal, the magnitude is significantly smaller than 37 the first two signals. The original received signal and the recovered signal are shown in Figure 7-3. Note how the time separation, to, has been recovered. 38 Chapter 8 Conclusions In this thesis simulations have been done to successfully recover a sonar signal from the received signal which is corrupted with both ambient and reverberant noise. Testing was done for a channel with the following parameters (See Figure 8-1): D = Channel Depth = 35 m Ds = Depth of Source and Receiver ranges from 3 to 32 m Dt = Depth of Target ranges from 3 to 32 m L = Range to Target from Source = 210m Sea Surface )t r Target Sea Bottom Figure 8-1: Shallow water channel. The signal used was a 10 kHz gated sine wave of pulse length 3.3 x 10 - 4 S with a 3 kHz bandwidth. These simulations presented were done for fixed values of channel depth and object range. However, the phenomenologies and techniques for cepstral smoothing and minimum-phase processing are applicable to other shallow water envi39 ronments. An explanation of how to adapt the system to other channels and signals is given in Appendix A. Reverberation noise was eliminated by using cepstral smoothing. The received signal is the convolution of the sonar signal and the impulse response in the time domain. However, in the cepstral domain, the received signal is the superposition of the cepstrums of the signal and the impulse response (Chapter 4). Additionally, the cepstrum of the signal occupies low cepstrum (Chapter 4) and the cepstrum of the impulse response occupies high cepstrum. Therefore, the signal's cepstrum can be extracted by "low-time" cepstral filtering. That is, by cutting out the high cepstrum components. Details about defining the cut-off between low and high cepstrum are in Appendix A. The combination of minimum-phase processing and cepstral smoothing proved to be quite robust to ambient noise. Signal recovery was successful for signal-to-noise ratios down to 15 dB. If the received signal was first matched filtered (Chapter 5) with the time reverse of the original signal and then run through the minimum-phase and cepstral smoothing processing, signal recovery was then possible for signal-to-noise ratios down to 0 dB. Since we are using minimum-phase processing we have lost the linear time shift of the signal to the all-pass components (Chapter 3). In other words, we have only recovered the frequency and approximate shape (Appendix A) of the original signal. To determine the distance from the sonar source to the detected target, we need the timing information of the received signal (Chapter 6). This timing recovery was robust for signal-to-noise ratios down 9 dB (without matched filtering). After matched filtering, the recovery works down to 0 dB. The signal frequency, shape, and timing must all be recovered. Therefore, the system works for signal-to-noise ratios down to 0 dB when matched filtering is used (15 dB if matched filtering is not used). The case of two targets in the channel was also explored. Signal recovery is possible by modifying the cepstral smoothing window to include a comb-like window (Chapter 7). 40 Future Work There are two areas in which future work is recommended: timing recovery and multiple targets. Although the moving RMS windowing is quite robust to ambient noise, improvements can be made. With the present system deciding when the peaks are not well enough defined is an arbitrary process. Something more exact, like a defininte threshold or a system of quantifying the definition of a peak is necessary. The issue of multi-targets is more important. It is very unlikely that only one target will be in range at a given time. However, since the processes for one target recovery and two target recovery are different, we need to know when to use which recovery scheme. Also, the recovery method for two targets can only be extended to multi-targets that are equidistant from each other. This is because the effective signal (impulse train convolved with the sonar signal) needs to be minimum-phase for the processing technique to work [4]. Equal spacing between targets is very unrealistic, so a more versitle method is needed. 41 Appendix A Choosing Cepstrum Cut-off for Cepstral Smoothing The cut-off point for cepstral smoothing is dependent on both the impulse response of the channel and the sonar signal. A.1 Impulse Response Fortunately, we can determine what part of the cepstrum the impulse response occupies by an indirect method. That is, we don't need to know the impulse response itself. The location of the beginning of the cepstrum of the impulse response is dependent on the time difference between the first two returns. The first return is the shortest distance, the direct path, to the detected object, and the second return is the path which has one reflection off of either the bottom or top of the channel. See Figure A-1. Generally, as seen in Figures A-2 and A-3, the smaller the time variation, the earlier in the cepstrum the impulse response starts. When doing cepstral smoothing we want to cut off in the cepstral domain at i before the impulse response begins. This Tiis the maximum r such that we can eliminate the effects of the impulse response. Geometrical analysis shows that the minimum difference between the first and second returns occurs when the source depth, Ds, and the target depth, Dt, are 42 Target Image )t I Target Image Figure A-1: First and second signal paths. chosen to minimize the difference between either B and A or C and A in Figure A-1. The minimum value of all possibilities of B - A and C - A is the minimum difference between the first and second path returns. Equations for A, B, and C follow: A = directpath = L2 + (Dt- Ds)2, B = L2 + (Dt + Ds)2 , C = L2+ ((D- Ds)+ (D-Dt))2. The minimum difference between the first and second returns for the channel of depth 35m occurs when the source and target are close to the surface or bottom. We let this minimum distance be 3m. The resulting ri is 1 x 10 - 4 s. 43 Q x10 I -2 -4 75 0.28 0.285 0.295 0.29 0. 3 Seconds n v.< .. A. U r, I 0.1 I 0.2 0.3 0.4 I 0.5 0.6 Cepstrum 0.7 I I 0.8 0.9 X1 3 Figure A-2: (a) Impulse response with Dt=15m, Ds=5m, D=35m, L=210m, (b) Cepstrum of impulse response. .x10l Jl !L 2 0 -2 -4 -- i. T· 0275 0.28 I I 0.285 0.29 0.295 0.3 Seconds Iv.u I. · · · · 0 r I 0.1 I 0.2 0.3 I 0.4 0.5 0.6 Cepstrum I 0.7 0.8 0.9 1 x1 Figure A-3: (a) Impulse response with Dt=3m, Ds=3m, D=35m, L=210m, (b) Cepstrum of impulse response. 44 A.2 Signal First let's examine the cepstrums of some signals of various time durations. In Figure A-4 all the signals are 10 kHz pulses with time durations of 2 x 10 - 3 s, 6.7 x 10- 4 s, and 4 x 10- 4 s. (These durations correspond to the widths of the central peak of the sinc function in the frequency domain being 1 kHz, 3 kHz, and 5 kHz.) We can see that the as the pulse length decreases, the width of the low cepstrum component also decreases. Also from Figure A-4, we can see that the frequency of the signal is identical to the frequency of the low cepstrum component. Cepstrums Signals 0.05 0.5 0 0 -0.05 He 0 2 4 (al) 6 x 10-4 4 (a2) 6 x10 -0.5 0 1 2 3 4 x 10-4 (bl) Ai U.UO 0 uC uI ; V'VY I 0 2 0 1 2 3 4 (b2) x10 eI U.3 I - 0 (l n 0 2 4 (a3) 6 x 10 0 4 1 2 3 (b3) 4 x 10 Figure A-4: (a) Signals of 10kHz carrier, (b) Cepstrums. When we do the cepstral smoothing, we are not actually recovering the original signal. We are recovering a signal of the same frequency content but of perhaps a different pulse length. This pulse length is dependent on where the cepstrum is cut off when doing the cepstral smoothing. We will call this %T,the minimum T at which we can cut off in the cepstral smoothing process. In Figure A-4 we see that as the length of the signal pulse is decreased, the width of the low cepstrum component of the signal is also decreased. This leads us to believe that the opposite is true. That is, the lower 45 T8 is, the shorter the pulse length of the recovered signal. For our purposes, the actual signal length of the recovered signal does not have to be the same as the original signal. However, we would like to be able to identify the recovered signal as being the same frequency as the original signal. Therefore, we must recover a signal that is at least half a wavelength so that we can determine the frequency. For a signal of 10kHz, half a wavelength is 5 x 10 - 5 s. So Ts > 5x 10 - 5 s. Examples are in Figure A-5. Putting the constraints from the impulse response and the signal together, Ts < Tc < i, (A.1) where rc is the r at which the cepstrum of the signal is cut off in the cepstral smoothing process. For a signal of 10kHz in a 35m channel, 5 x 10 - 5 < ir < 1 V~U-- - 0.5 . - 10-4. 0.5 NV v 0 0.5 1.5 1 (bl) 2 x10 3 2 C 0.5 1 (a) 1.5 -2 2 --0.5 1.5 (cl) 1.5 2 x10 0.2. ~ 1 1 0.2 I IA 0 0.5 (b2) 1 -1 1/ 0 x 10 2 0 x 10 I 1( 5 4 (dl) x 10- 5 (d2) x 10 1 1 0 0.5 1 (c2) 1.5 0 2 x 10 10 Figure A-5: (a) Cepstrum of signal, (b) Ts = 5 x 10 - 4 , (c) Ts = 2 x 10 - 4 , (d) -r, = 1 X 10-4. The ()'s are the cepstrum, and the (2)'s are the recovered time domain signals. 46 Bibliography [1] A. Drake, Fundamentals of Applied Probability Theory, McGraw-Hill, 1967. [2] L. Liu and R.H. Lyon, Application of group delay to noise problems, In Pro- ceedings of Noise-Con 91 (1991). [3] R.H. Machinery Noise and Diagnostics, Butterworths-Heinemann, Lyon, Boston, 1986. [4] D.J. McCarthy, Vibration-BasedDiagnostics of ReciprocatingMachinery, PhD thesis, Massachusetts Institute of Technology, 1994. [5] A. Oppenheim and R. Schafer, Discrete-Time Signal Processing, Prentice Hall, 1989. [6] A. Papoulis, Probability, Random Variables, and Stochastic Processes, McGrawHill, 1991. [7] L. Rabiner and R. Schafer, Digital Processing of Speech Signals, Prentice Hall, Englewood Cliffs, NJ, 1978. [8] W. Siebert, Circuits, Signals, and Systems, The MIT Press and McGraw-Hill, 1986. [9] M. Tohyama, R.H. Lyon, and T. Koike. "Inverse filtering for reverberant transfer functions", In Proceedings of the International Union of Theoretical Applied Mechanics, Tokyo, Japan (May 1992). 47 [10] M. Tohyama, R.H. Lyon, and T. Koike, "Reverberent phase in a room and zeros in the complex frequency", Journal of the Acoustical Soceity of America, 89(4):1701-1707 (April 1991). [11] M. Tohyama, R.H. Lyon, and T. Koike, "Pulse waveform recovery in a reverber- ant condition", Journal of the Acoustical Soceity of America, 91(5):2805-2812 (May 1992). [12] M. Tohyama, R.H. Lyon, and T. Koike, functions", "Statistics on reverberant transfer In Second International Congress on Recent Developments in Air and Structure-Borne Sound and Vibration - Auburn University, Alabama (1992). [13] M. Tohyama, R.H. Lyon, and T. Koike, "Phase variability and zeros in a reverberent transfer function". Journal of the Acoustical Soceity of America, 95(1):286-296, (January 1994). 48