Você está na página 1de 10

Statistical Signal Processing Project: PC-Based Acoustic Radar

Mats Viberg Revised February, 2002


Abstract The purpose of this project is to demonstrate some fundamental issues in detection and estimation. The project consists of theoretical tasks as well as computer simulations and laboratory-scale experiments. As an illustrative example, an acoustic radar system is used. The ambition is to make this work without using any special hardware, but merely a standard sound card that comes with any modern PC.

Introduction

This laboratory project concerns detection of signals and time delay estimation. The project consists partly of theoretical tasks and simulations, such as comparing the theoretical detection and estimation performance with computer simulations. The experimental part uses only commercially available PC equipment. The purpose is to try the techniques you have tried in the simulations on real data. A suitable radar pulse is generated in Matlab, and fed to the loudspeakers of a PC using the sound command. The rst problem is to measure the distance between two loudspeakers based on the time-delay estimation method. The next challenge is to try a real radar experiment. The objective is then to detect a relatively weak reected pulse from some object. The problem is complicated by the presence of severe multipath propagation, so the experiment setup has to be chosen carefully! The project is part of the examination in the Statistical Signal Processing course. It should be performed in groups of 2-4 students. The results must be reported in a written document. The project is essentially unsupervised, but some help will be provided, especially during the experimental phase.

Some Radar Background Theory

This section gives a brief overview on radar systems. For a more detailed description we refer to e.g. [1].

2.1

Background

Radar is short for RAdio Detection And Ranging. The idea in any radar system is to transmit electromagnetic energy in certain directions (spatial sectors in the 3-D case), and decide on the presence of targets based on the return signal. A radar pulse usually occupies a narrow frequency band, relative to the center frequency of the pulse. In a practical system, the (total) bandwidth can be on the order of MHz, whereas the center frequency is usually several GHz. A narrowband signal can always be expressed as a modulated carrier: s(t) = (t) cos(0 t + (t)) , 0 t T, (1)

where (t) is the amplitude modulation (envelope) and (t) represents the phase modulation. The pulse is narrowband if (t) and (t) are of low-pass character, and of bandwidth much smaller than the center frequency 0 . As an example, consider the so-called Gaussian pulse depicted in Figure 1. Here, (t) = 0 and (t) has the form of a Gaussian probability density function. An example of a phase modulated signal is the chirp pulse, where (t) = const and the phase function is a second-order polynomial, (t) = 0 + 1 t + 2 t2 . The 1 instantaneous frequency of a signal of the form (1) is dened as IF (t) = 2 t (0 t + (t)). Since the chirp pulse has a linearly increasing (or decreasing) frequency, it is also referred to as a linear FM signal. An interesting remark is that dolphins and bats appear to use this type of signal in their sonar system! 2

0.8

0.6

0.4

0.2

0.2

0.4

0.6

0.8

10

20

30

40

50

60

70

Figure 1: A noiseless radar pulse. In a radar system, an array of transmitters is normally used to focus the energy into a narrow spatial sector (beamforming). The presence of a target at the sector in question results in that some of the energy is back-scattered towards the radar. The receiving antenna array may either be identical to or dierent from the transmitter. Assume that the individual antenna elements at the receiving array are combined, using beamforming, to produce a scalar output signal. This return signal is sampled at a number of time instants with dierent time delays relative the transmitted pulse. Suppose we are given N samples of the continuous-time signal return signal r(t), say rn = r(nTs ), n = 0, . . . , N 1 , where Ts is the sampling interval. Assume that a target is detected at the time delay = n0 Ts . The distance R to the target can then be computed from the formula = 2R/c, where c is the speed of light. Therefore, the time samples of a particular pulse are termed range bins (Swedish: avst andsf allor). In a pulsed Doppler radar system, the objective is to detect moving targets. This is accomplished by transmitting several pulses in the same spatial sector. If the target is moving at a constant speed, there will be a constant phase shift between consecutive return signals. After matched ltering (see below), the signal is reduced to a sinusoid, whose frequency is proportional to the target speed. However, here we will only be concerned with stationary targets (unless you decide otherwise!). The idea of transmitted several pulses to the target may still be useful to reduce the eects of noise!

2.2

Matched Filter Processing

The detection of a signal in noise is complicated by the presence of noise, induced by undesired external signal sources, receiver imperfections, A/D converters etc. In most practical radar systems, the distances to the targets are relatively large and their radar cross sections are usually small, leading to a low signal-to-noise ratio (SNR). Figure 2 shows the sampled pulse of Figure 1 buried in additive white
1.5

0.5

0.5

1.5

10

20

30

40

50

60

70

Figure 2: A noisy radar pulse. The SNR is 0 dB. Gaussian noise. Apparently, detecting the presence of and nding the distance to a target is non-trivial in this severe noise case! To formalize, we are given the N samples rn = r(nTs ), n = 0, . . . , N 1 of the noisy radar return signal. The objective is to determine wether or not the signal is present, in other words decide between the hypotheses: H 0 : rn = v n H 1 : rn = s n + v n Here, sn denotes the signal and vn represents additive noise. A useful tool for this purpose is the matched lter. A simple derivation follows below. Let us decide to base our decision on a linear combination of the observed samples: yN =
N 1 n=0 wn r n ,

where wn are the weights to be chosen. For generality, we allow the signal and 4

weight samples to be complex-valued. Let us write this in vector form: yN = w r where w = [w1 , . . . , wN 1 ]T and r = [r1 , . . . , rN 1 ]T . The output yN will contain a signal part ys = w s and a noise part yn = w v. A natural choice of weighting vector is one that maximizes the SNR at the output, dened as SN Rout (w) = E[|ys |2 ] . E[|yn |2 ] (2)

Assuming a deterministic signal and white noise, E[|ys |2 ] = |ys |2 = |w s|2 and E[vn vm ] = 2 n,m , where 2 is the noise variance and n,m is the Kronecker delta. In matrix form this reads E[vv ] = 2 I, and it follows that SN Rout (w) = |w s|2 . 2 |w|2 (3)

Applying Cauchy-Schwartz inequality, |w s|2 |w|2 |s|2 , with equality for w proportional to s, we see that the SNR is maximized for w=s. (4) This result is natural it means that the components of w will cancel any phase dierences among the components in s, so that they can be summed coherently (with weighting according to their relative amplitude). In contrast, the noise samples are summed incoherently, so that the match ltering process eciently increases the SNR! A natural denition of the SNR before match ltering is SN Rin = |s|2 |s|2 /E[|v|2 ] = N 2 . Thus, using the matched lter, SN Rout = N SN Rin , i.e. the SNR is increased by a factor of N . Clearly, if the received signal consists only of noise, |yN |2 will be smaller than if the signal is present. How much smaller depends on the SNR. As an example, see Figure 3 where the histograms of |yN |2 are plotted for the Gaussian pulse of Figure 1. The noise is assumed white and Gaussian (WGN), and SN Rin = 1 (=0 dB). It is quite clear that we can successfully decide between H0 and H1 by studying |yN |2 only. The threshold for deciding which hypothesis to believe in is usually determined to achieve a certain given probability of false alarm (PFA), dened as the probability to decide in favor of H1 when H0 is true. To decide the threshold, we thus need to compute the (approximate) distribution of the test statistic under H0 (the null hypothesis). The matched lter is expressed as a correlation between the weights wn and sn above. Another interpretation is to view this as a convolution yN =
N 1 n=0

hn rN n1 ,

where the impulse response is dened as hn = wN n1 . The optimal lter has impulse response hn = sN n1 , i.e. it is matched to the signal. The Matlab implementation is most conveniently done based on the matched lter interpretation, and using the conv or lter commands, rather than explicitly writing out the correlation sum. This is especially practical in the case studied in the next section.

300

250

200

Signal absent

150

Signal present

100

50

20

40

60

80

100

120

140

160

180

Figure 3: Histogram for the matched lter output in case the signal is present and absent respectively. The SNR is 0 dB.

2.3

Time Delay Estimation

In the case of interest here, the received signal vector depends on an unknown time delay parameter . In principle, the radar return signal for the pulse given in (1) can be modeled by r(t) = g(t ) cos(0 (t ) + (t )) + n(t) where the positive scalar g is proportional to the object size (the RCS - Radar Cross Section). In a practical radar system, can rarely be determined with an accuracy on the order of 1/0 , since 0 is very large. Instead, it is often natural to view the carrier phase as a random variable, uniformly distributed in the interval (0, 2). To handle this situation, it is most convenient to adopt a Bayesian framework. The matched lter receiver derived above follows if we assume known carrier phase and WGN. Integrating the test statistic over the random phase leads to the quadrature matched lter detector structure. The details can be found in, for example, [2]. In this scenario, the observation time N Ts is typically much longer than the pulse length T . Let M = T /Ts be the discrete-time pulse length. For a given time-delay , the test statistic is then computed as yc ( ) = ys ( ) =
M 1 n=0 M 1 n=0

rn ( )n cos(0 nTs + n ) rn ( )n sin(0 nTs + n ) 6

(5) (6)

PN ( ) = |yc ( )|2 + |ys ( )|2 .

(7)

Here, rn ( ) denotes the sampled version of the time-advanced received signal r(t+ ). In practice, if the sampling time Ts is short enough, it suces to evaulate PN ( ) at integer-multiples of the sampling time using rn (kTs ) = rn+k , k = 0, 1, . . . , N M . As an example, consider the same scenario as in Figure 3. However, the received signal is now delayed, and the test statistic PN (kTs ) is evaluated for k = 0, . . . , 1000. The result is shown in Figure 4. The true delay is 500 samples, which agrees very
80

70

60

50

40

30

20

10

100

200

300

400

500

600

700

800

900

1000

Figure 4: The Quadrature Matched Filter power as a function of the hypothesized time delay of the radar pulse. The SNR is 0 dB. well with the location of the largest peak of PN (kTs ). The combined detection and time-delay estimation procedure can now be summarized as follows: 1. Compute PN (kTs ) for the desired delay values of k. 2. Determine the delay estimate as = Ts k, where k is the value of k for which PN (kTs ) attains its maximum. 3. Decide if a signal is present or not by comparing PN (kTs ) to a threshold. The computation of the threshold above is complicated for a number of reasons. Firstly, and most seriously, under H0 , PN (kTs ) is an order statistic. We are interested in the distribution of the maximum of the sequence of identically distributed (but not independent!) samples PN (kTs ), k = 0, 1, . . . , kmax . Furthermore, neither the radar cross-section c nor the noise variance 2 are known in practice. A desirable 7

feature of a test is that the (approximate) PFA should be independent of the noise variance. Such a test is termed invariant. In a practical radar system, there may be a number of targets present at dierent distances. Thus, PN (kTs ) may have several peaks, each of which may be classied as a target. However, if the distance between two targets is too close, there will still be only one peak! Thus, the matched lter has a limited resolution, which is given by the width of the main peak of the correlation function of the radar pulse. For the case in Figure 4, the resolution is approximately 20 samples. The time resolution is inversely proportional to the bandwidth of the signal. The total bandwith of, for example, a chirp signal may be much larger than the inverse of the duration of the signal. The resolution is then much better than what could be expected from the pulse length. The matched lter processing as described above is therefore often termed pulse compression in the radar language. The advantage of using a long transmit pulse is of course to allow better noise suppression at the receiver.

Project Denition

In this section the problems you are supposed to attack are presented. The rst two problems contain theoretical questions and computer simulation tasks. In the latter two you are also required to do practical experiments. The last moment, Section 3.4, is not mandatory. However, if you do a serious attempt on this task, you could skip some of the easier problems. The experiments can in principle be carried out anywhere, but it is useful to have a full-duplex sound card, so that you can play and record at the same time. A designated experiment setup is available in the Kretslab, located at the department of signals and systems. To book the lab, contact Lars Brjesson, lars-b@s2.chalmers.se, phone: 1789. o

3.1

Matched Filter Detection Performance

The rst task concerns the detection performance. Suppose a completely known deterministic signal is to be estimated in WGN. For simplicity, the noise variance is assumed known. For a xed threshold of the test statistic, nd expressions for the false alarm rate (PFA), as well as the probability of correct detection (PD). A false alarm occurs if H1 is chosen when H0 is true, whereas a correct detection means that H1 is accepted when it is indeed true. Then, by varying the threshold, plot the PD as a function of the PFA. Such a curve is called a receiver operating characteristic (ROC). The ROC curve illustrates the fundamental trade-o between PD and PFA, which is always present in detection problems. How well this trade-o can be handled depends of course on the SNR. Thus, plot ROC curves for a few dierent SNR values. In practical radar systems, the (unltered) SNR can well be as low as -30 dB, and rarely more than 0 dB. The matched lter has the eect of enhancing the output SNR, which is why reliable detection is possible at all using such weak signals! Try to verify the theoretical results by simulations in Matlab. Use a Gaussian shaped pulse (Matlab-command: gauspuls). Implement the matched lter using

the lter command. Try the same SNR values as used in the theoretical ROC curves. For each SNR value, apply the test to suciently many independent data sets, so that a reasonable agreement with the theoretical PD and PFA could be expected. Also, use dierent threshold values to empirically verify the ROC curves at a number of points.

3.2

Time-Delay Estimation Performance

In this problem the accuracy of the time-delay estimate is considered. Suppose we wish to estimate the time-delay of a known deterministic signal observed in WGN. Derive the Cramr-Rao lower bound (CRLB) for the time-delay estimate. Try to e interpret the lower bound in terms of physical quantities; specically the SNR and the bandwith of the signal! Since the matched lter estimate is also the maximum likelihood estimate, we can expect it to reach the CRLB. Using Monte-Carlo simulations in Matlab, obtain the empirical mean-square error (MSE) of the time-delay estimates. Use chirp pulses (Matlab command: chirp) with a few (2-3) dierent total bandwidths. Also try a number of dierent SNR values (at least ve) for each signal, and plot the CRLB together with the empirical MSE versus the SNR. What happens for very low SNR values? Also, determine the resolution of the time-delay estimator, dened as the 3-dB width of the peak. What does the resolution depend on?

3.3

Time-Delay Estimation Experiment

In this experiment you will try to measure the distance between the two loudspeakers of a PC. The designated lab computer is equipped with a full duplex sound card. If you are using a single duplex card you will need two PC:s, one for generating the pulse and one for recording it. You will transmit a chirp pulse via both loudspeakers at the same time (ignoring possible channel imbalance) - this is easily done in Matlab using the command sound. Now, select a suitable frequency range and generate a chirp signal. The range resolution should be at least on the order of a decimeter. What time resolution does this correspond to, and what bandwidth does it require? Arrange the loudspeakers so that they are at least 50 cm apart. Transmit the chirp pulse from both loudspeakers (default), and record the microphone output using for example Windows Sound Recorder. (This moment may require some assistance!). Edit the recorded sound so that no more than 2 sec (preferably 0.5-1 sec) containing the interesting pulse is kept. Remember that you are sampling at 44.1 kHz if CD quality is used! Save the le in a directory where you can nd it. The le is stored in a so-called wave-format, and it can be read by Matlab using the wavread command. Apply your matched lter time-delay estimator and search for the largest (separated) two peaks. Convert the time delay into distance, and check if it agrees reasonably well with the actual loudspeaker separation. It is likely that you see several smaller peaks in the matched lter output. What is the reason for this? Repeat the experiment for a few dierent separations. If your results are not great, try to think of possible sources of errors!

3.4

A PC Radar

In this experiment you will try to implement a radar range estimator. The acoustic channel is dicult, there are reections from many objects in the room. You must therefore design the experiment carefully so that there are no ambiguous signal paths. Check with the course assistant for getting help with the experiment. One possibility is to place the loudspeaker on the oor (use only one in this experiment), and let the wall be the interesting object. Place the microphone next to the loudspeaker, so that both the transmitted and the reected pulses will be recorded. Based on the time-delay between these it will be possible to estimate the distance to the reector. We must warn you that this experiment is rather dicult if you use a more realistic object! There are possible tricks to handle the nasty propagation channel. One way is to measure the background signal (the signal without object), and try to subtract the background from the real signal. However, this requires a precise time alignment between the background measurement and the data of interest. Another, further more elaborate, possibility is to try to estimate the impulse response of the room. However, the impulse response depends on the location, which complicates matters! Probably, you need the impulse response from the loudspeaker to the microphone, as well as that from the object location to the microphone. If these are known, you can perhaps use a pre-ltered radar pulse in the matched ltering; or alternatively (probably no so good) try to inverse-lter the received signal. Finally, if you are using a small object, resulting in a low SNR, you can try to transmit several pulses to the object. If these are aligned and averaged before matched ltering, you have performed coherent integration. What eect does this have on the eective SNR?

References
[1] A. Farina. Antenna-Based Signal Processing Techniques for Radar Systems. Artech House, Norwood, MA, 1992. [2] R.N. McDonough and A.D. Whalen. Detection of Signals in Noise. Academic Press, New York, 1995.

10

Você também pode gostar