EE640 SPRING 2000 COMPUTER PROJECT 2 3-28-00 PART A: ORTHOGONALIZATION We consider two different stochastic aspects of orthogonalization. Prewhitening is used to convert colored noise into white noise thereby simplifying discrimination architectures such as the maximum likelihood ratio. Edge enhancement is often thought of as orthogonalizing deterministic images. In fact, the SOBEL edge enhancement is a correlation technique that is optimum for detecting lines corrupted by additive white Gaussian noise. 1. Prewhitening Colored Noise. Generate three 1024x1 Gaussian random vectors. Their elements are iid, zero mean with variance 2 =1. Form three new vectors from these such that: t1=3g1+2g2+g3 t2=g1+3g2+2g3 t3=2g1+g2+3g3 3 1 2 a. Analytically determine Ctt = E{T T} in terms of C = 2 3 1 1 2 3 T where T=[t1 , t2 , t3]. b. Using the concept of eigenvectors and eigenvalues, determine a weighting matrix W such that Z = T W and CZZ = E{ZTZ} = I where W is 3x3. c. Use matlab to solve for W and empirically estimate CZZ. d. Is W C-1 ? e. C is a circulent matrix. One solution for its Nx1 eigenvectors are 0 j 2Nk k e e e j 2 2 k N where k = 0,1...(N-1). The eigenvector matrix is then 1 e j 2 ( N 1) k N T 0 1 N 1 T Verify that will diagonalize C. 2. Edge Enhancement Edge Enhancement can be used to decorrelate two different images. This is true for images where the edges carry the discriminating information. One of the most common edge enhancement techniques is known as SOBEL enhancement. Interestingly, very few researchers realize that this technique is optimum in output Signal-to-Noise Ratio (SNR) for edges corrupted by additive white Gaussian noise (AWGN). The technique is correlation based and the bank of correlation filters are combined in the “largest of” architecture. The filters are in the form of 3 3 kernels which are individually convolved with the input. The output convolutions are elementwise combined by taking the “largest of” or maximum value to be the final element output. The kernels are: 1 2 1 2 1 0 1 0 1 0 1 2 S 1 0 0 0 , S 2 1 0 1 , S 3 2 0 2 , S 4 1 0 1 , 1 2 1 0 1 2 1 0 1 2 1 0 1 2 1 2 1 0 1 0 1 0 1 2 S 5 0 0 0 , S 6 1 0 1 , S 7 2 0 2 S 8 1 0 1 1 2 1 0 1 2 1 0 1 2 1 0 where half the kernels are negatives of the other half such that S 5 S 1 , S 6 S 2 , S 7 S 3 , S 8 S 4 . Each kernel is convolved with the input image s.t. Y n a , b S n a , b X a , b , The output result is Za, b maxY 1a, b, Y 2 a, b, Y 8 a, b , Because half of the responses are negatives of the other half, the output result can be simplified to be the maximum of the absolute value of four of the kernels. Using fft2 and ifft2, show the matlab code for convolving each of the kernels (don't forget to zero pad, and don't forget to convert Yn to real values after the fft2 based convolution). Also show how you would get the result from the first 4 kernels. 2 PART B: BINARY DISCRIMINATION 1. Frequency Shift Keying. a. You have two sinusoidal oscillators. They generate two signals s1(t) = cos(2f1 t) and s2(t) = cos(2f2 t) where f1 = 8 Mhz and f2 = 16 Mhz. We will frequency shift key these two signals with a binary signal p(t). We assume that we know each bit position of p(t) and that there are an integer number Ncycle, of cycles of s1(t) per bit duration. Using 32 bit values, where P(bit = 0) = p0 = P(bit = 1) = p1 = 0.5, set up a test signal s1 (t ) if r (t ) s2 (t ) if p(t ) 0 p(t ) 1 Assume s1(t),s2(t) and p(t) are coherent. Generate r(t) as a discrete vector r where the sampling rate is 8f2. Generate a noise vector g1 just as large as r where g’s elements are iid.,zero mean gaussian random variables with the variance, 2, varies linearly from 0 to 4 for the length of the vector. b. Set up a discrete correlation receiver analogous to the continuous time one in Fig. 1, with sequence length based on the number of cycles per bit for s1(t) and generate a vector z=r+g Using Ncycle = 1, and Ncycle = 20, plot output response, y(t) as a function of time. Note that the integrators in Fig. 1 are reset to 0 at the beginning of each bit period and only integrate the values within the specific bit period. t d 0 H1 y(t) z(t) s1(t) t d > < H2 0 s2(t) Figure 1: Binary Detector. NOTE:The integrators are reset at the beginning of each bit period. 3 c. In time units of bits per second, how fast can you transmit data at PE = 0 ? 2. Direct Sequence Spread Spectrum. The idea of Direct Sequence Spread Spectrum (DSSS) is to use orthogonal, wide band sample signals to represent one symbol or another. This is analogous to Frequency Shift Keying (FSK) with a specific frequency representing a specific symbol. However, unlike FSK, DSSS spreads the symbols information across a bandwidth of frequencies making the demodulation less sensitive to a single frequency jamming signal then the FSK technique. Repeat B.1, but replace s1 (t ) and s2 (t ) with two iid. pseudo-random sequences. Each sequence should have a different seed and their distribution should be bipolar s 1, 1 , with P(1) P( 1) 0.5 and therefore 0 mean. PART C: 2-D DETECTION WITH NOISE 1. Test Image Selection. Choose two 64 64 sections of the Mandelbrot set. One section will represent the target image that you want to detect and the other will be a clutter image that you want to suppress. Give the instructor, by email, the coordinates of these two images. The auto-regressive formula, for each pixel position is Z n 1 Z n2 C If magnitude of Z>2 then encode the x, y pixel shade as n. Let real C x , imagC y and give the coordinates for x ll , y ll as lower left corner and xur , yur as the upper right corner of the image window. 2. Training Set Generation. Rotate the original target and clutter images by 45 degrees to obtain training sets of 8 images each. The trick to rotation is to select an output matrix element and then rotate it backwards to the closest input matrix element. This method eliminates “pin holes” which are pixels with no assigned value. Pin holes will occur if the input matrix elements are mapped to the closest output matrix. The rotation transformation from input to output locations by angle is given as: xout xout ,center cos sin xin xin ,center y y out ,center out sin cos yin yin ,center By multiplying the above equation by the inverse transformation matrix we obtain the transformation from output back to input as 4 xin xin ,center cos sin xout xout ,center y y in ,center in sin cos yout yout ,center The pseudo code for rotating an M N image A by and storing the result in B is given as: N 1 2 M 1 2 xin ,center x out ,center yin ,center y out ,center for m=1 to M for n=1 to N { x out n y out m x xin xout xout ,center cos yout yout ,center sin xin ,center yin out xout ,center sin yout yout ,center cos yin ,center Truncate xin , yin to be integers if 1 xin N and 1 yin M then Bm, n A yin , xin else Bm, n background shade } Once the images are rotated, then the training images should be SOBEL edge enhanced. Typically, the edge enhancement should follow the rotation to more accurately model an actual system where the target object will be of arbitrary rotation when imaged and then edge enhanced by the computer. Let the edge enhanced image of A be X. 3. Test Set Generation. The test image is formed by first augmenting all the target and clutter images together in a checker board pattern to form a 256 256 image. A noise image is added to this signal image. The noise image is white gaussian noise attenuated from left to right from 0 noise level to a noise level equivalent to a Noise-to-Signal Ratio (NSR) of 2. The NSR is defined as 1 NSR n 2 n 2 64 64 64 X a, b a 1 b 1 2 where noise element variance is 2 n n 1 . N 1 The value of N is 4=(256/64) so n corresponds to each of the four 256 64 partitions. Each partition has its own NSR(n) where n=1,2,3,4. 4. Filter Correlation Test. 5 You will need to zero pad the 64 64 filter impulse responses to be 256 256 before correlating them with the test image. Be sure to use the 2-D FFT to perform the correlation process. a. Form an Linear Phase Coefficient Composite Filter (LPCCF) set from the target training set and show a 3-D mesh representation of the correlation intensity response with the test image with noise, for filter orders k 0,1,2 and 3 . b. Form a Minimum Average Correlation Energy (MACE) filter and repeat 4a. REFERENCES 1. David Forney, Jr., "Maximum-Likelihood Sequence Estimation of Digital Sequences in the Presence of Intersymbol Interference," IEEE Transactions on Information Theory, 18(3), 363378, May (1972). 2. David Forney, Jr., "The Viterbi Algorithm," Proceedings of the IEEE, 134(3), 268-278, March (1973). 3. Kabal and S. Pasupathy, "Partial-response signaling," IEEE Transactions on Communications, 23(9), 921, September (1975). 4. Spencer and P. J. Hurst, "Analog implementation of sampling detectors," IEEE Transactions on Magnetics, 27(6), 4516-4521, November (1991). 5. Paul H. Siegel and Jack K. Wolf, "Modulation and Coding for Information Storage," IEEE Communications Magazine, 68-86, December 1991.* 6. Spencer, "Simulated performance of analog Viterbi detectors," IEEE Journal of Selected Areas in Communications, 10(1), 277-288, January (1992). 7. Abhijit Mahalanobis, B.V.K. Vijaya Kumar, and David Casasent “Minimum average correlation energy filters,” AO, Vol. 26, No. 17, pp. 3633-3640, September 1 (1987). 8. Hassebrook, Kumar and Hostetler, "Linear Phase Coefficient Composite Filter Banks for Distortion-Invariant Optical Pattern Recognition," Optical Engineering, 29, 1033-1043, (1990). 9. Yun Zhang, S. Shtrikman, and H. Neal Bertram, “Playback Pulse Shape and Spectra for shielded MR Heads,” IEEE Transactions on Magnetics, 33(2), 1093-1103, (March 1997). 10. Roy D. Cideciyan, Francois Dolivo, Reto Hermann, Walter Hirt and Wolfgang Schott, “A PRML System for Digital Magnetic Recording,” IEEE Journal of Selected Areas in Communications, 10(1), 38-56, (January 1992). 6