UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

A study of wide-band time-delayed phased-arrays with phase and frequency encoded signals for arrival-time… Ho, Nelson 1996

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
831-ubc_1998-0126.pdf [ 10.56MB ]
Metadata
JSON: 831-1.0064848.json
JSON-LD: 831-1.0064848-ld.json
RDF/XML (Pretty): 831-1.0064848-rdf.xml
RDF/JSON: 831-1.0064848-rdf.json
Turtle: 831-1.0064848-turtle.txt
N-Triples: 831-1.0064848-rdf-ntriples.txt
Original Record: 831-1.0064848-source.json
Full Text
831-1.0064848-fulltext.txt
Citation
831-1.0064848.ris

Full Text

A STUDY OF WIDE-BAND TIME-DELAYED PHASED-ARRAYS WITH PHASE AND FREQUENCY ENCODED SIGNALS FOR ARRIVAL-TIME MEASUREMENT by Nelson Ho B . A . Sc. Hon., (Electrical Engineering) University of British Columbia A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENT FOR THE DEGREE OF MASTER OF APPLIED SCIENCE in THE FACULTY OF GRADUATE STUDIES ELECTRIAL ENGINEERING We accept this thesis as conforming to the required standard THE UNIVERSITY OF BRITISH COLUMBIA Apr i l 1996 ©Nelson Ho, 1996 Abstract Phase-encoded signals are useful for arrival-time estimation after correlation. The bandwidth to carrier frequency ratio for the phase-encoded signals used in certain applications is very high. As the narrow-band assumption is violated, conventional phase-tuned phased-arrays suffer from dispersion and do not function properly for these applications. Time-delayed phased-arrays do not suffer from dispersion and function normally under the wide-band requirement. This thesis studies the time-delayed array and three types of modulated signals: linear Frequency Modulated (FM) signal, complementary Barker-coded Phase Modulated (PM) signal and Golomb-coded P M signal, for the purpose of arrival-time estimation. It is shown that the time-delay tuning for the linear F M signal is equivalent to linearly offsetting the initial frequency and adding a quadratic phase across the array. A new way of adjusting the element spacing for the time-delayed phased-array for the three types of signal to minimize off-tuning angle correlation is presented. Performance of the time-delayed phased-array using the three types of signal are simulated and compared. Experiments have been performed to verify the practicality of the time-delayed phased-array. I i i Table of Contents Abstract ii Table of Contents iii List of Tables vi List of Figures vii Acknowledgments xi I. Introduction 1 II. Time Steering Array 4 Array Configuration and Tuning 4 Received Signal at a Distinct Point 6 Finite Duration Signal Pulse 9 III. Linear Frequency Modulated Signal Array 13 Far-field Field Pattern of the Linear Chirped Array 15 Edge-Effect Correction 23 Directivity 26 Chirp Processing and Element Spacing 28 Simulation of the Chirped Array Signal 34 Practical Consideration - Alternative Tuning Method 37 IV. Phase Modulated Signal Array 41 Far-Field Field-Pattern of a P M Array 42 Edge-Effect Correction 50 Directivity 51 Barker Code and Complementary Code and Processing 52 Golomb Pseudo-random Code and Processing 58 Source Element Spacing for the P M Array 65 Simulation of the P M Array signal 66 i i i V. Comparison of the Simulated Correlation Function Plots 70 Equivalence of the Correlation Function for the Barker-coded and Golomb-coded P M signals 71 Parameter Selection for the Correlation Function Comparison 72 Comparison 79 Other Considerations 87 VI. Array Experiment 88 Components of Experiment 89 Experimental Considerations and Parameters 92 Received Signal Processing 94 Results 98 VII. Conclusions and Future Work 113 Future Directions 116 Bibliography 117 Appendix — Circuit Diagrams and Program codes 120 Circuit Diagram 121 chirpm.m 121 pmm.m 125 tlx 130 tms.c 134 pci.c 140 fmda.m 148 finanal.m 151 cmpsnd.m 156 cmpda.m 161 cpmanal.m 165 pnsnd.m 172 pnda.m 177 iv pnanal.m 181 v List of Tables Table 1. Simulation Parameters for the Chirped Array 18 Table 2. Simulation Parameters for the Multiple Peak leakage of a Chirped Array 21 Table 3. Simulation Parameters for the Sidelobe Cancellation of a Chirped Array 33 Table 4. Simulation Parameters for a Chirped Array Movie 34 Table 5. Parameters for Time-Delay Tuning of a Chirped Array 39 Table 6. Parameters for Simultaneous-Start Tuning of the Chirped Array 39 Table 7. Simulation Parameters for the P M array 45 Table 8. Barker Codes 53 Table 9. A Complementary Barker Code and its Correlation 54 Table 10. Binary Patterns of the First 5 Golomb Pseudo-Random Sequences 59 Table 11. A D C offset Golomb Code, the Corresponding Filter and its Correlation 61 Table 12. Simulation Parameters for a P M Array Movie 67 Table 13. The Modulation Codes Used in the Experiment 93 v i List of Figures Figure 1. Tuning of an Linear Array with N Elements 5 Figure 2. Receiving Distance of an Linear Array with N Elements 6 Figure 3. Arrival-time when y/ = 90 ° 8 Figure 4. Arrival-time when y/ = 180 ° 8 Figure 5. Wave-front of the Radiated Signal 9 Figure 6. Arrival-time For Different Sources in the Array at the Tuning Angle 10 Figure 7. Far-field Arrival-times at the Off-tuning Angle 10 Figure 8. Decomposition of the Array Signal 12 Figure 9. Example of the Interference Pattern from the Chirped array 19 Figure 10. Contour Map of a Chirped Array Field Pattern Example 19 Figure 11. Square of the Amplitude of a Chirped Array 20 Figure 12. Radiation Pattern of a Chirp (Multi-peak) 22 Figure 13. Range of Correction Terms 24 Figure 14. The Simulation Gain of a Chirped Array 27 Figure 15. The Simulation Gain of a Chirped Array in dB 27 Figure 16. The Auto-correlation of the Chirp 30 Figure 17. Alignment for Cancellation of Consecutive Compressed Signals 31 Figure 18. The Auto-correlation of the Chirped Array at the Cancellation Angle 33 Figure 19. The Auto-correlation of the Chirped Array at the Tuning Angle 33 Figure 20. Interference Pattern to Show Beam-forming in the Chirped Array 35 Figure 21. Received Signal after Matched Filter Processing 36 Figure 22. Simulation of Time-delayed Tuning 40 Figure 23. Simulation of Simultaneous-start Tuning 40 Figure 24. The Difference between Delay-time Tuning and Simultaneous-Start Tuning 40 Figure 25. Simulated Composite Signal of the P M Array 45 v i i Figure 26. The Radiation Pattern of the P M array 46 Figure 27. The Contour of the Radiation Pattern of the P M array 46 Figure 28 Polarity Reversal of the P M signal at off-tuning Angles 47 Figure 29. Sections of the Radiation Pattern of a four-source P M array 49 Figure 30. The Simulation Gain of a P M array 52 Figure 31. The Simulation Gain of a P M array in dB 52 Figure 32. Auto-correlation of the Modulation Codes [1, 1,-1, 1] and [1, 1, 1,-1] 57 Figure 33. The Smoothing Wavelet 57 Figure 34. Auto-correlation of the P M Signal for each Complementary Code 57 Figure 35. Auto-correlation of the P M Signal—Sum of the Results Shown in Figure 34 57 Figure 36. Received Golomb Code with Delay at Symbols 25 and 37 61 Figure 37. Periodic Representation of the Code in Figure 36 62 Figure 38. Periodic Cross-correlation Result of Code in Figure 37 62 Figure 39. Example of the D C offset Golomb-coded P M Transmit signal, TG 63 Figure 40. Example of the D C offset Golomb-coded P M Filter signal, FG 63 Figure 41. Cross-correlation of the Golomb Code Sequence 65 Figure 42. Cross-correlation of the D C offset Golomb-coded P M Signal 65 Figure 43. Time Delay for Cancellation 66 Figure 44. Cross-correlation at the Chosen Cancellation Angle 66 Figure 45. Interference Pattern to show Beam-forming in a P M Array 68 Figure 46. Processed Signal From Complementary Barker-coded P M signal 69 Figure 47. Processed Signal From Golomb-coded P M Signal .69 Figure 48. Correlation Function Plot of an F M Array with Eight Sources and Variable Element Spacing 74 Figure 49. Correlation Function Plot of an F M Array with a Fixed Cancellation Spacing of 0.29AC. and a Variable Number of Sources 75 Figure 50. Correlation Function Plot of a P M Array with Eight Sources and a Variable Element Spacing 77 v i i i Figure 51. Correlation Function Plot of a P M Array with Fixed Cancellation Spacing of 0.29A6 and a Variable Number of Sources 78 Figure 52. 3-dB Beam-width as a Function of Element Spacing 80 Figure 53. 3-dB Beam-Width as a Function of the Number of Sources in an Array 80 Figure 54. Ma in lobe to Sidelobe Ratio as a Function of Element Spacing ( Eight Sources ) 81 Figure 55. Ma in lobe to Sidelobe Ratio as a Function of the Number of Sources 81 Figure 56. Boundary Definition of the "Main Cloud" 82 Figure 57. Interference for the Array as a Function of Element Spacing with Eight Sources. 83 Figure 58. Interference for the Array as a Function of Source Element for 0.29AC Spacing... 83 Figure 59. Correlation Directivity as a Function of Element Spacing with Eight Sources..... 85 Figure 60. Correlation Directivity as a Function of the Number of Sources with 0.29Ac-Spacing 85 Figure 61. Time-Dependent Correlation Directivity 86 Figure 62. Block Diagram for the Experimental Setup 89 Figure 63. Recording Structure for the Experiment 91 Figure 64. Space Required by the Recording Structure 92 Figure 65. Typical Transmitted Chirp 94 Figure 66. Typical Received Chirp 94 Figure 67. Experimental F M Array Response for 90° Tuning 101 Figure 68. Simulation of the F M Array Response for 90° Tuning 102 Figure 69. Experimental F M Array Response for 135° Tuning 103 Figure 70. Simulation of the F M Array Response for 135° Tuning 104 Figure 71. Experimental Complementary P M Array Response for 90° Tuning 105 Figure 72. Simulation of the Complementary P M Array Response for 90° Tuning 106 Figure 73. Experimental Complementary P M Array Response for 135° Tuning 107 Figure 74. Simulation of the Complementary P M Array Response for 135° Tuning 108 Figure 75. Experimental Golomb Code P M Array Response for 90° Tuning 109 Figure 76. Simulation of the Golomb Code P M Array Response for 90° Tuning 110 ix Figure 77. Experimental Golomb Code P M Array Response for 135° Tuning I l l Figure 78. Simulation of the Golomb Code P M Array Response for 135° Tuning 112 Acknowledgments I wish to thank Dr. Matthew Yedlin for the guidance and the editorial assistance of my work. Especially, his emotional support is greatly appreciated. Thanks are also due to Natural Sciences and Engineering Research Council of Canada for the financial support. I gratefully acknowledge, Ernie Majer, head of the Subsurface Geophysics Group, Lawrence Berkeley National Laboratory ( L B N L ) for providing office space and computer equipment and Lai-Fong Tarn, my godmother, for providing accommodation during my work-visit at L B N L in the Summer of 1994. Finally, I would like to dedicate this thesis to my parents, Miu-San Ho and Chi-Leung Ho, and my brother Ming-Sun Ho, for their constant support and encouragement. x i Chapter I. Introduction I. Introduction Travel-time estimates are essential in many applications, including, radar, medical imaging, non-destructive testing and oi l exploration. The linear frequency modulated (FM) signal, which is also known as a chirp, Barker-coded phase modulation (PM) signal and m-sequence pseudo-random encoded P M signals are some of the most commonly used frequency and phase-encoded signals utilized for arrival-time estimates. The long duration of these signals do not hinder the accurate determination of the arrival-time, as the signal can be pulse-compressed to a duration approximately equal to the reciprocal of its bandwidth. In fact, transmitting a continuously coded signal and then compressing it into a high resolution pulse improves the total signal to noise ratio (SNR). Birdsall (1988) has produced a complete tutorial on the processing of pseudo-random m-sequences for arrival-time estimation for use in undersea applications. Haller (1993) has used the pseudo-random code modulated signal for a sonar sea floor charting experiment which involves echo arrival estimation and obtained a 23 dB gain. Such results clearly show the advantage of correlation techniques over arrival-time estimation from the classical echo pulse technique. For the applications requiring arrival-time estimation, being able to focus the energy to obtain an arrival-time from a particular angle is highly desirable. One option available to focus the energy is the use of a phased-array. However, current phase-steered phased-arrays are based on a narrow-band approximation. For some applications such as oi l deposit location, the chirp signal used for seismic reflection usually has a carrier frequency of about 45 Hz and a bandwidth of about 70 Hz. Since the carrier frequency is comparable to signal bandwidth, the narrow-band assumption of the conventional phase-steered phased-array fails. A number of researchers have examined the response of the phased-array. Plumb (1993) tried to increase the array bandwidth by approximating the response of the time-delayed array using time-varying weights (Plumb, 93). Rogers et al. (1973) found bounds on 1 Chapter I. Introduction 2 array length, modulation index and scan angle to avoid dispersion in transmitting a wide-band signal. Knittel (1974) examined the relation between array bandwidth, range resolution and S N R for planar arrays. Arora and Arora (1976) have looked into the matched response of a linear F M signal from an array. Patel and Arora (1978) also looked at the dispersion effect for a linear frequency modulated signal from an array. It is clear from their results that i f the traditional phase steering technique is used for the wide-band frequency settings for the seismic reflection, then not only is the radiated signal predicted by the phase-steered phased-array theory inaccurate, but also the distortion is so large that a beam wi l l not even form at the focusing angle. In other applications where the narrow-band assumption is satisfied, the main beam still suffers from distortion at the tuning angle (Plumb, 1991). Therefore, a different method to focus the beam energy and to analyze the field pattern of the array is required so that a focused beam can be tuned electronically to illuminate an arbitrary angle and generate a better target image. A n alternative to phase-steering technology is the time-delayed steering technology. The time-delay steering does not suffer from the problem of limited bandwidth as there is no distortion on the tuning axis (Plumb, 1991). However, there have been limited studies done on time-steered phased-arrays because time-delay steering is equivalent to phase-steering under the narrow-band assumption" and the narrow-band assumption holds under most applications. There has been no study done on the behavior of the wide-band linear F M single signal or other highly compressible P M signal applied to the time-delayed array for arrival-time estimation. Recent advances in digital signal processing hardware also enable the synthesis of the delayed wide-band signal required to feed the array. Wide-band here means a bandwidth to carrier frequency ratio of about 0.5 to 2, which would cover signals used for geological (10-80 Hz) and wide-band undersea (500-10000 Hz) experiments. This thesis studies the basic principle of the time-delayed phased-array with the assumption that the duration of the signal sent is finite. The implication for the field pattern under such an assumption is also examined. Since the signal pulse needs to be pulse-Chapter I. Introduction 3 compressed in determining the arrival-time, a new scheme of setting the element spacing is developed to reduce the compression sidelobes at off-tuning angles. The field pattern of the time-delayed array is signal dependent. Three types of wide-band frequency and phase encoded signals are examined in detail in order to find a suitable signal for the array. The signals examined are : 1) Linear frequency-modulated signals; 2) Phase modulated signals using the complementary Barker code; 3) Phase modulated signals using the Golomb pseudo-random binary sequence. For the F M and P M signal, the far-field approximation is used and the field pattern is obtained. From the field pattern, the gain is computed for a sample signal. For each signal, the radiated field result is match filtered so that the arrival-time estimates may be compared. In Chapter U , the general concept of the time-delayed phased-array is examined. Chapter U l covers the linear F M signal where the signal and its processing results are examined. The far-field field pattern of the time-delayed phased-array and the gain is analyzed. Simulations to show interference and beam-forming are included. A new way of adjusting the array-element spacing which would result in the reduction of correlation sidelobes at off-tuning angles is developed. In Chapter IV, the P M signal and the field pattern of the P M array are examined. The two types of coding schemes, namely, the Barker code and the Golomb pseudo-random code are reviewed. The frame by frame simulation of a Barker code P M array is included. The array spacing requirement is also examined. In Chapter V , the simulations of the processed signals from the F M and P M arrays are plotted and parameters such as half power angle, main lobe to sidelobe ratio, level of interference and correlation directivity are compared. Chapter V I , presents the actual data collected experimentally. This data is then compared with the simulated data. Conclusions and future research directions are summarized in Chapter VII. Chapter II. Time Steering Array 4 II. Time Steering Array The physical construction for the time-delayed phased-array is the same as that for the phase steered array. The only difference between the two is the tuning signal fed to the array. In a phase-steered phased-array, beam focusing is achieved by controlling the phase angle of the feeding signal to the array. This is normally done by phase shifters. For a monotonic frequency signal, the phase shift or delay is directly proportional to the time delay. Hence, feeding a phase-delayed signal is equivalent to feed a time delayed signal, provided the signal used is narrow-band. The delay compensates for the travel-time difference due to the spatial displacement of different elements of the array. The transmitted signal constructively interferes at the tuning angle. Therefore, the conventional type of phased-array achieves the required time delay by adjusting the phase of the narrow-band signal with phase shifters. For a wide-band signal, constant phase shift for all the different frequencies translates into different time delays experienced by each different frequency making up the signal. Consequently, the different time delays result in dispersion of the signal pulse and the proper delay is not achieved. This is the fundamental reason that phase-delayed steering does not work on wide-band signals. To generate the required time delay for the wide-band signal, a digital to analog converter under the control of a digital signal processor can be utilized. However, for the time-delayed phased-array to work properly, the medium in which the array operates must be linear and non-dispersive. Otherwise, the transmitted signal w i l l be dispersed in the medium and constructive interference wi l l not occur at the tuning angle of the array. Array Configuration and Tuning Consider an even N-element array with non-directive sources as shown in Figure 1. The distance between source elements is d and the tuning angle at which the energy is focused is y/. The center of the array is Ac. There is no source at the array center, Ac, and the Chapter II. Time Steering Array 5 sources are indexed according to their distance from the array center. This indexing scheme is adopted so that the field pattern and the phase of a two-element chirped array can be easily determined. Target Direction / / ' / / / ' / / / ' / / / ' / / / ' / / / / ' / / / ' / / / ' / / / ' / / \id72 cos . / / f / / / ' / / / A/ / The ith Source : -N+1...-3 -1 A c 1 3 . . . N - 1 Source Position : -3d/2 -d/2 d/2 3d/2 Figure 1. Tuning of an Linear Array with N Elements To achieve maximum signal power at an angle y/ as shown in the diagram above, the signal wave from a source left of the array center, Ac, must be advanced while those sources to the right must be delayed. The delay/advance is required to compensate for the difference in. travel distance from the source to a distant point at tuning angle yf. With such a travel-time correction, each signal radiated from all of the different sources constructively interferes with the others, resulting in a beam at the tuning angle. The rays from the sources to the target are assumed to be parallel. Then, the difference in distance between a ray from the center of the array and a ray from the ith source is I id/2 cosy/ I, as shown. If the center of the array is chosen to be the reference of the array, the time delay or steering delay, tsi, for the ith source is calculated by dividing the extra ray distance with the velocity of the medium. Thus, id cos w Chapter II. Time Steering Array 6 where v is the velocity of the signal wave in the medium (which is assumed to be non-dispersive and isotropic). We note that element spacing d, and the tuning angle yf can be chosen arbitrarily. For any given d and yr, a correct steering delay, tsi, can be obtained from ( 1 ). That is, i f the signal to be sent is /(0 with reference to the center of the array, Ac, the signal, f(t- tsi), sent by the ith source would have the correct time delay to constructively interfere at the tuning angle y/. Received Signal at a Distinct Point In order to determine the total time delay experienced by a signal from the ith source before reaching a receiver at a distance R and at an angle 0 , the distance, R{, from the ith source to the receiver point needs to be determined. The distance, R, from the center of the array configuration to the receiver point is shown in a dotted line in Figure 2. Receiver (R,(j>) The ith Source : -N+1...-3 Source Position : -3d/2 -1 1 3 ... N - l -d/2 dll 3d/2 Figure 2. Receiving Distance of an Linear Array with N Elements Then, the distance, from the ith source to the receiver is: (2) Chapter II. Time Steering Array 1 In all the discussion to follow, we assume that the sources are line sources. Therefore, all geometrical analysis is done in the source plane. B y expanding the above equation by a Taylor series and keeping only the linear term, this distance can be simplified. Therefore, Ri = R- {id/2) cos <f>. (3) The simplification is valid provided that the array length is much less than the receiver distance, i.e. (N- l ) - i i « R. This is consistent with the far-field assumption. If all the transmitters in the array fire instantaneously, the distance, w i l l dictate the travelling delay, tse„i, for a signal from the ith source received at the point ( R,(p ). tgeoi = Rilv = R / v - id / 2v -(cos (p) ( 4 ) However, since the different elements of the array are fired with the tuning or steering delay tsi in order to tune the maximum beam angle at yr, the total delay t-t, w i l l contain contributions from the geometrical delay tgeoi, in addition to the steering delay. The delay U is also known as the retarded time or the arrival-time and is given by ti = tSi + tgeoi - R / v + id-(cos y/ - cos (p)/(2v). (5) Along the tuning angle, (0 = yf), the retarded time for all the sources reduces to U = R/v, which confirms that all the different signals from different sources are aligned and therefore constructively interfere with each other to create the maximum beam. Note that given an arbitrary tuning angle yr, the arrival-time, U, from an arbitrary source to a point (R,(j)) is identical to the arrival-time for the point (R,-(j)). Conversely, given an arbitrary receiver Chapter II. Time Steering Array 8 angle (p , the arrival-time is an even function of yf. Thus, i f the array is tuned for the angle yf, there are two main beams forming, one at the angle yf, and the other at the angle -yf. Since the radiation is generated by the interference of the delayed signals from all sources, and the delays at the angle <p equal the delays at angle -0, the field pattern of the array is symmetrical about the line formed by the different sources. For a four-element array tuned at yf = 90°, with a wave velocity of 1000 meters per second, array separation d and the receiver distance R set to be 0.01 meter and 1 meter, respectively, the arrival-time can be approximated by the far-field assumption, and is plotted as shown below in Figure 3. In this case where yf= 90°, the steering delay, tSi equals 0 for all of the sources. Hence, Figure 3 is also a scaled plot of distance from each source to a point on a circle of 1 meter radius centered at the array center, Ac. If the tuning angle is set to be other than 90°, each graph of the arrival-time is shifted up and down the time scale to intercept at the tuning angle as shown in Figure 4 where yf - 180°. Since the arrival-time is an even function of both angles yf and (j), it is evident that the graphs of Figure 3 and Figure 4 are symmetrical about the zero degree point. Hence, there wi l l be 2 angles at which the beam is at its maximum except when iff is 0° or 180°. Figure 3. Arrival-time when yf = 90 °. Figure 4. Arrival-time when yf = 180 °. Chapter II. Time Steering Array 9 Finite Duration Signal Puise Suppose a finite duration signal /( t) is sent by a four-element array labeled in the convention shown in Figure 1. The signal from the ith source reaching an arbitrary receiver point (R, </>) would be given by At-U) =f(t- tsi - tge0i )=f(t-(R/v + id-(cos y/-cos 0) / 2 v ) ) . (6 ) If the tuning axis is set to 90°, then all the sources are fired at the same time and the wave-front of each signal from the different sources would appear as shown in Figure 5. Pseudo-Wave-Front Approximated (from Center) Wave-Front from Sources -{- Source Location Figure 5. Wave-front of the Radiated Signal Since the sources are linearly displaced along the x-axis, the complete wave-front of the radiated patterns would not be spherical, as shown by the outermost line in Figure 5. If the tuning angle is not set as 90°, the circular wave-fronts of each source w i l l not be of equal size. It is obvious that at the tuning angle, the signals are all arriving at the same instant, Rlv, and the signals are aligned as shown in Figure 6. Note that each rectangle in Figure 6 Chapter II. Time Steering Array 10 represents a signal from one of the sources. Since the acoustic wave is a scalar field, the composite received signal at the tuning angle would be the sum of the signals. In this case, the composite received signal is equal to one of the source signals with a magnitude amplification of four. From Source -3 -1 1 3 J _ J _ t=R7v Time Figure 6. Arrival-time For Different Sources in the Array at the Tuning Angle Along an arbitrary receiver angle other than the tuning angle, the signals would be misaligned as shown in Figure 7. From Source -3 -1 1 3 A ^ = d(cosy/- cos0 )/v R/v I I I I I t-3 t-i t\ ts Time Figure 7. Far-field Arrival-times at the Off-tuning Angle The times t.3i t.ji tly t3i are the far-field arrival-times for the four sources. Then, as indicated in Figure 7, the time displacement, A¥<p, for signals between adjacent sources to reach the receiver point is determined by the difference in the far-field arrival-times. For those particular sources derived in ( 5 ), the displacement A ^ is given by Chapter II Time Steering Array 11 A V 0 = I (cos y/-cos <p)-d/v I. (7) The time displacement is independent of the radial distance of the array under the far-field assumption. From Figure 7, it becomes evident that the characteristic of the composite interference waveform depends on the time displacement A ^ , which is directly proportional to the element spacing. If the element spacing of the array is set to 0, meaning that there is only one source at the array center, the signals from each sources wi l l always be aligned and there wi l l not be any focusing to generate a beam. If the element spacing is set to be non-zero, the time displacement is non-zero for off-tuning angles, making it possible for destructive interference to occur at those angles. The level of destructive interference depends on the type of waveform used in the array. Therefore, the wide-band phased-array does not have a general array field pattern as is the case in the narrow-band phased-array. In Chapter m and IV, the F M and P M signals are extracted from the composite wave formula to obtain the field pattern for the 3 types of modulated signals: (linear F M signal, P M signal using the complementary Barker code, and P M signal using the Golomb pseudo-random binary sequence). It wi l l be shown that the field pattern of the wide-band array, unlike the narrow-band phased-array, is time dependent. Figure 7 shows that the amount of misalignment depends on the tuning and the receiving angle. Hence, the duration of the composite waveform changes according to the receiving angle. The wave-front of the composite signal reaches the receiver point at Rlv+\&.W$\(N-\)I2, where N is the total number of sources. The factor of half is put in because the signal from the 1'" source is shifted by the amount IA^I/2 from the arrival-time from the center of the array, and subsequent signals are shifted by lA^ I . However, in calculating the field pattern, the wide-band signal itself is factored from the equation denoting the composite signal. Therefore, the starting point of the composite signal is of particular importance for the factorization. Since the center of the array is set to be the reference, the starting point of Chapter II. Time Steering Array 12 the composite signal should be considered as i f it has arrived at the time Rlv in order to calculate the field pattern. The detailed procedure is demonstrated in the following chapter. From Figure 7, the duration of the composite wave is determined to be r + I A ^ K A M ) , which should be adjusted to the signal duration T for the purpose of calculating the field pattern. Therefore, the composite wave transmitted from the time-steered array is separated into 2 parts: an essential part and the edge-effect part as shown in Figure 8. When Av,j, is much less than the duration, the significance of the edge-effect decreases as the energy carried in the edge signal is proportionately reduced. For a signal with long duration, this energy is negligible compared to that of the essential part of the composite signal. Therefore, the edge-effect portion of the signal is often discarded when the time-varying gain of the array is calculated. From Source 1 Essential Interval 4 • 4 • Edge effect 4 • A ^ / 2 t.j R/v tj Time Figure 8. Decomposition of the Array Signal Chapter III. Linear Frequency Modulated Signal Array 13 . Linear Frequency Modulated Signal Array The interference pattern of a time-delayed array fed with a linear frequency-modulated ( F M ) signal is formed by summing delayed chirp signals. Therefore, a representation of the chirp signal pulse is described in this section first. The instantaneous frequency of the frequency-modulated pulse signal depends on the frequency modulation rate, which is also know as the chirp-rate and is given by dco t-T/2 — = r e c t ( — — - ) • / „ ( * ) . (8) dt T In ( 8 ) , 0) is the instantaneous frequency, T is the duration and fcr(t) is the chirp-rate of the F M pulse. The function rectit) is defined so that it is unity for the interval [-1/2,1/2] and zero otherwise. If the chirp-rate function fcr(t) is constant, the signal is a linear F M pulse. The chirp-rate function is not assumed to be a constant for generality. The instantaneous frequency of the pulse can be determined i f the initial frequency is also known. Suppose the initial frequency of the pulse is b. The instantaneous frequency can be determined by the integral formula given by t-T/2 ( t G)(0 = r e c t ( — - — ) \fcr(s)ds + b (9) Assuming that the initial phase of the signal pulse is zero, we can determine the phase function (pit) by integrating the instantaneous frequency and obtaining <p(0 = rect(-—^^) • \ (O(s)ds. (10) Chapter III. Linear Frequency Modulated Signal Array 14 If the chirp signal starts at t = then, the differential equation ( 8 ) is modified as follows dm., t-t-T/2 (11) Here CO, is the instantaneous frequency of the new delayed signal. The instantaneous frequency is then given by ,t-t,-TI2. fi),(f) = rect( '— )• ft jfcr(s-ti)ds+-b (12) Then, the phase function, (p,(t) of a delayed F M pulse which starts at t = f, is given by q>,(t) = rect(-J-t-T/2 )• jaWds = rect(r ' ' r r / 2 ) - J lfcr(v-ti)dv + b (13) T du. Equation ( 13 ) allows us to determine the phase of an F M pulse with an arbitrary chirp-rate fcr{t) and initial frequency b. To determine the phase of a linear F M pulse, the chirp-rate function fcr(f) can be set to be a constant. For generality, the chirp-rate is assumed to be a power law of the form fcr{i) = af. (14) Since any rational function can be decomposed into Taylor series which is a sum of ( 14 ) with different a's and n's, ( 13 ) and ( 14 ) allow the determination of the phase of any Chapter III. Linear Frequency Modulated Signal Array 15 function with a rational chirp-rate function. Combining ( 14 ) and ( 12 ) yields the following result t-L-T/2 FL),.(0 = rect( ) f a n + 1 (t-t^+b (15) The phase of the delayed F M pulse is the integral of ( 15 ). This can also be obtained by combining ( 13 ) and ( 14 ) and is given by t-t-T/2 <p,(0 = rect( ) .(« + ! ) («+ 2) ( t - t ^ + K t - O (16) With the phase of the signal determined, the signal is represented by the real part or the imaginary part of theexp(j'<p,(0) • For practical reasons, the signal is normally set to be 0 at t = tj. Therefore, the imaginary part is used. Thus, t-t-T/2 S\ (0 = rect( '— ) • imag(exp(79,.)). (17) Far-field Field Pattern of the Linear Chirped Array The phase of a linear F M signal can be obtained by setting n = 0 in ( 16 ). Then, a linear F M signal with a delay tt is obtained. Substituting this result into ( 17 ), the linear F M signal is given by t-t-T/2 S,(t) = rect( ) • lmag^ exp J fa ^ -{t-tif+b{.t-ti) (18) Chapter III. Linear Frequency Modulated Signal Array 1 6 For a two-element array similar to the one shown in Figure 2 with a tuning angle set to y/, the delays experienced by the signals transmitted by the sources before reaching the a receiver point are determined by ( 5 ) and ( 7 ). The delays for 1st source, tj and -1st source, t.i are t] = R/v + d{cos iff- cos (f) )/2v = R/v + A¥lj) I 2 t-i = R/v - d(cos yf- cos (j))/2v = R/v - A^I 2 (19) (20) In ( 19 ) and ( 2 0 ) , R is the radial distance from the array center, v is the velocity of the medium, d is the array element separation distance and yr and (j) are the tuning and receiving angles respectively. Replacing the delay tt in ( 18 ) with the t/ of ( 19 ) determines the wave pattern, Si, for the 1st source as a function of radial distance R and observation angle (p . The 1/-JR spatial attenuation factor is ignored. Therefore, t - R l v - A ^ l l - T I l 5, (f, R, 0) = rect( -f ) • imags exp S«---4|t)i+*«---^> 2 v 2 v 2 (21) Similarly, the wave pattern, S.j, for the -1st source can be determined. Note that ( 21 ) is dependent on R in a manner analogous to the time variable t. If the wave pattern is observed with the same radial travelling velocity, the pattern described by ( 2 1 ) would appear stationary. Thus, it is convenient to introduce the retarded time t'= t-Rlv to incorporate the effect of the travelling pattern, with the wave-front of the travelling wave at / '=0 . The effect of distance can then be isolated. Therefore, the definition of the time-dependent gain of the array is possible as the pattern is normalized to start at t'= 0. Using the shifted time variable t' equation ( 21 ) reduces to Chapter III. Linear Frequency Modulated Signal Array 17 51(r',0) = rect( w ± - )• J a imagjexpl The wave pattern in the medium from the -1st source is ( 2 2 ) S^t'j) = rect( ^ )• T imag^ expi a ( 2 3 ) Because the medium which the array is transmitting is assumed to be linear, the interference pattern generated by the two-element chirp phased-array can be obtained by adding the wave pattern from the 1st source and the -1st source, denoted by ( 22 ) and ( 23 ) respectively. The interference pattern for the two-element array becomes ST(t',(p) = 5_, +5 j / + A „ / 2 - 7 7 2 n . rect( ) • imagi exp / - A ^ / 2 - 7 7 2 ^ . + rect( )-.imag^ exp a 2 2 J ( 2 4 ) 2 2 ' 2 j Note that there is a time misalignment for off-tuning angles as explained in Figure 7. If the time A ^ is much less than the pulse duration T, this misalignment can be ignored and the interference pattern is considered in the essential period 0 < t' < T as shown in Figure 8. To find the field pattern from the interference pattern in the narrow-band array, the carrier portion of the wave is factored out from the interference formula ( 24 ) . The part left behind is the envelope of the array signal or field pattern. In the linear F M case, factoring out one Chapter III. Linear Frequency Modulated Signal Array 18 monochromatic frequency at aT/2+b as carrier is not practical because the wide-band signal is different from a single monochromatic frequency. The wide-band signal itself is used to factor the interference pattern instead. This is feasible because the modulus of the chirp signal, I exp{ j( (at'/2)2+bt) ) I, is also unity as in the case of narrow-band array. The power of the signal can also be determined by the envelope. Factoring out the chirp pulse, I exp{ j( (at'!2)2+bt) ) I, the signal for the two-source array becomes f-T/2 ST(t',(p) = recti—— )' • imagi exp K-r+bf) •2 cos \{af+b)\ • • exp| (25) This expression is exact on the tuning axis and for the time range -lA^kf^r+IA^I for off-tuning angles due to the misalignment shown in Figure 7. It is obvious for the signal pattern of a chirped array with only two sources, the chirp carrier, the gain and the phase can be easily identified in ( 25 ) . For ( 25 ) , the edge-effects have been ignored. Table 1 lists the set of parameters of a chirped array for an underwater application. Duration Initial Freq. Final Freq. Separation Velocity Tune Angle Elements 2.667 ms 2000 H z 4000 Hz 0.015 m 1500 m/s 0° 2 Table 1. Simulation Parameters for the Chirped Array Figure 9 and Figure 10 below show the radiated signal and the corresponding contour map generated using ( 25 ) with the parameters of Table 1. It is obvious that there is no angle at which the response is null for the duration of the chirp. However, there is a curved null line as shown in the figures. Furthermore, the height and width of the islands wrapped around the vertical axes in Figure 10 approximate the instantaneous wavelength and the Chapter III. Linear Frequency Modulated Signal Array 19 beam-width of the signal. It clearly shows that the wavelength is decreasing and the beam-width is also decreasing as time is progressing. Figure 9. Example of the Interference Pattern from the Chirped array 150 200 Angle 300 350 Figure 10. Contour Map of a Chirped Array Field Pattern Example For an even N-element array which has more than two sources with the configuration of that defined in Figure 2, the interference pattern for the essential period can be obtained by summing equation ( 25 ). The result is t'-T/2 5w(f',0) = rect( ^ )• T • imags exp f a . \ \ ^ f(at'+b)kA ^ j(-f2+bt')[\ £ 2cos| •exp 2 A2 j — k A k = —N + \,—N + 3,.. .-3 -1,1,3, - N - 3, N - 1 , ( 2 6 ) The field pattern of the array is obtained by dropping the common term, I exp{ ./'((at'/2)2+bt) ) I. From now on, the gate function, rect( t'-T/2 ) , w i l l not be included explicitly. The field pattern is then given by Chapter III. Linear Frequency Modulated Signal Array 20 N-l ENW ><!>)= X 2 COSi (at'+b)kA • exp k=-N+\,k odd r a ^ j-k2A2 V 8 j ( 2 7 ) This sum represents the field pattern of a chirped array and is very similar to the discrete form of a Fresnel integral. The sum cannot be simplified further into a closed form. Therefore the field pattern has to be computed numerically. Unlike the field of the monochromatic phase-steered phased-array, the field of the chirp phased-array is not only angle dependent but also time dependent. Figure 11 shows the magnitude squared of equation (27 ) which is the magnitude of the chirped array with the parameters defined in Table 1. The magnitude squared of the array is of particular interest as it relates to the radiated energy of the array by a constant factor. As the tuning angle of the array is set to be 0° in Table 1, the peak of Figure 11 occurs at 0°. If any other tuning is chosen other than 0° or 180°, two peaks w i l l occur as explained in page 8 of Chapter II. Figure 11. Square of the Amplitude of a Chirped Array In choosing the parameters for the array, care must be taken to ensure that multiple peak leakage does not occur. The exponential term in ( 27 ) , is normally much less than zero. For example, for a typical underwater application, the product has a maximum value of 0.013. In that case, i f a small number of sources is used, then the exponential term, Chapter III. Linear Frequency Modulated Signal Array 21 exp(jak2A2v<fJ%) is approximately unity as the product inside the parenthesis approaches 0. Then, the field pattern in ( 27 ) can be approximated by N-l „ {(at'+b)kAu EN{f,4>)= X 2 c o s ^ where £ — k=-N+\,kodd sin Mi ; s in£ (at'+b)A^ (28) In ( 28 ), TV is an even integer representing the total number of elements in the array. The approximated EN has a peak value when £ equals 0 or multiples of %. Therefore, it is possible for the chirped array to have multiple peaks i f the following two conditions are met: 1. The exponential term in ( 27 ) exp(jak2A2¥<j,/ 8) = 1 for every k. 2. The term % in equation ( 28 ) is such that I £ I > 7t for some A and t'. If the duration of the chirp in Table 1 is doubled, the conditions above would be satisfied. The corresponding parameters are listed in Table 2 below. Since the chirp-rate, a, in Table 2 is equivalent to the value calculated from Table 1 and the duration is doubled, the highest frequency is also increased. Initial Freq. Final Freq. Duration Velocity Separation Tuning Ang . 2000 H z 6000 H z 5.222 ms 1500m/s 0.15m 0 Degree Table 2. Simulation Parameters for the Multiple Peak leakage of a Chirped Array Since the foregoing conditions are met, the radiation pattern with multiple peaks with phase error (since we set exp(jak2A2v<j/8) =1) is shown in Figure 12. Note that the radiation Chapter III. Linear Frequency Modulated Signal Array 22 pattern has a peak not only at the tuning angle of 0 degrees, but also has more peaks developing as £ in ( 28 ) increases beyond it as time progresses. Angle Figure 12. Radiation Pattern of a Chirp (Multi-peak) Figure 9 and Figure 10 show that the chirped array interference pattern does not have a constant null as in the narrow-band array, which can be explained by examining ( 27 ). For the interference pattern to have a null at an arbitrary angle, either the cosine term or the exponential phase term in ( 27 ) has to be zero. Since the exponential term is never zero, the envelope function is null whenever the cosine has an argument of itll+nit. That is, equation ( 29 ) below is satisfied: (at'+b)kA^=(l±2n)7r k =...-3-1,1,3,... ( 2 9 ) n = 0,1,2,... At a fixed receiving and tuning angle, is a constant term. Thus, for a null to occur at that receiving angle, the above equation has to hold for all t' and k, which is obviously not possible. Therefore, unlike the narrow-band phased-array, constant null angles do not exist in the linear F M array. Chapter III. Linear Frequency Modulated Signal Array 23 The effect of the tuning angle and receiving angle is included in the normalized angle difference variable AVQ.. For the field to attain a maximum modulus, the arguments for the cosine term and the exponential function in ( 27 ) must both be integer multiples of 7t, for all valid f and all source index value k. It is obvious that AVIJ) - 0 is the only solution i f the multiple peak leakage conditions are not met. Therefore, the maximum beam occurs only at the tuning angle and its mirror reflection angle as explained before. In that case, = 0 and the sum ( 26 ) simplifies to : In this case, the signal magnitude at the tuning angle is the sum of individual magnitude of the sources, without interference. Edge-Effect Correction It is sometime advantageous to have the complete field pattern instead of an approximate one. The complete pattern can be obtained by adding a correction term to the approximation pattern in equation ( 27 ) . B y comparing the range of existence of the signals in ( 24 ) and ( 25 ) and examining Figure 8, the correction term has to include the beginning portion of the advanced signals and the trailing portion of the delayed signals, both outside the essential region. The correction also has to remove the portion of the signal not transmitted but included in the essential interval field approximation. The portions to be removed are the interval before the beginning of the delayed signal and the interval after the end of the advanced signal as shown in Figure 13 below t'-T 12 (30) rect( T Chapter III. Linear Frequency Modulated Signal Array 24 From Source -1 Actual Signal Transmitted < — • Essential Interval Actual Signal Transmitted < - • H E _1__L U R/v t, Time 1^1 Yuh, portion of signal to be added back to the beginning 1 = 1 Yrn, portion of signal to be removed from the end Kr/,, portion of signal to be removed from the beginning Yan, portion of signal to be added back to the end Figure 13. Range of Correction Terms For a pair of sources about the array center, the additive correction term can be derived from the delay equations ( 19 ) and ( 20 ) and the signal equation ( 18 ) with the gate function set according to the interval not included in the essential region exp exp a , , 'A J '^yA -(?'+——y +b(t'+——) 0 2 2 2 0 - I A VP' <f<0 2 otherwise T< t'< T + -I A . J otherwise (31) The subtractive field correction term is obtained in a similar fashion with the gate function set to include the interval for the portion of the signal that should not be included ( Chapter III. Linear Frequency Modulated Signal Array 25 -exp -exp a IA -(f 2 2 0<t'< IA w1>' 0 — (t'+——) +b(t'+——) 2 2 2 0 otherwise T J h l < f < T 2 otherwise (32) The equations (31 ) and ( 3 2 ) are the field pattern correction terms for a pair of sources. Regrouping and simplifying the correction terms for the leading edge and trailing edge, the following results are obtained : -sgn(f ')cos (at'+b)-J sgn(r')cos (af+b)-+ 7 sin ( W (af+b)- exp V 8 / • recti j s i n (at'+b)-V exp J) rect2 (33) In ( 33 ) Cf and CD are the field correction terms for the leading and trailing edges, respectively. The sgn(t), rect\{t) and recflii) are defined as follows : sgn(f) = recti (t) = rect2(r) = I 1 t>0 [-1 r < 0 f l - 0 . 5< r<0 .5 [0 otherwise [1 - 0 .5< r<0 .5 10 otherwise (34) We note that the correction terms in ( 33 ) are computed for a pair of sources For an array with even-N elements, the complete field correction terms can be derived by summing ( 33 ). The effect of different separations between each pair of elements about the array center can Chapter III. Linear Frequency Modulated Signal Array 26 be included by multiplying A ^ . in ( 33 ) by the index k. Therefore, the total field-correction term for an N-element array is : N-\ *=1,3, *=1,3, Exp = exp' -sgn(7')cos (at'+b)-kA„ + 7 sin f kA ^ v<t> (at'+b)-sgn(?')cos (at'+b)-kA„ J sin (at'+b) kA ^ v<t> Exp • recti Exp • rect2 ' r  A ' r-T ^  Kk\AvAj (35) The complete field pattern is therefore the sum of the approximate field pattern in ( 27 ) and the correction terms in ( 35 ). It is shown in ( 36 ) and is given by f f-TI2s « „ | W A J E = ^ r e c t ( — - — ) • 2 , 2 c o s 1 ~ f • exp f a ^ j—k A,„, 8 (36) Directivity The time-dependent directivity of the phased-array signal is the ratio of the maximum signal energy at a particular time across all angles with respect to the average energy. For the line source array defined earlier, D{t) is given by Pit) D{t) = y ) m m P(t)mm ( 37) IK LJ>(r,4>)dQ Chapter III. Linear Frequency Modulated Signal Array 27 In ( 37 ) P(t,9) is the radiated energy at a paticular time t at a the receiver angle 6, P(t)max is the maximum value of P(t,ff) across all angles at a paticular time t. The radiated energy is related to the square of the field pattern, E, in equation ( 36 ) or its approximated value in ( 27 ) and is given by P(t,(j)) = , (38) where Za is the medium impedance which is assumed to be unity. Because the 1/ term was neglected in deriving ( 27 ) and ( 36 ), ( 38 ) need not be multiplied with R. Wi th the parameters of the chirp defined in Table 1 and its corresponding radiation pattern shown in Figure 11, the time-dependent gain of the chirped array is simulated and plotted in Figure 14 and Figure 15 below. Figure 14. The Simulation Gain of a Figure 15. The Simulation Gain of a Chirped Array Chirped Array in dB There is a gain increase due to reduction of the beam-width as time increases and then the gain decreases due to leakage of energy as other peaks begins to develop as seen in Figure 11. Chapter III. Linear Frequency Modulated Signal Array 28 Chirp Processing and Element Spacing It is obvious that as the source elements are more closely spaced, the resulting field pattern would more and more closely mimic that which is generated from a single source which has unity gain at all receiving angles. As the elements are spaced farther and farther apart, the misalignment at the off-tuning angles becomes more and more severe. Hence, there is more interference at the off-tuning angles and the gain at the tuning angle becomes higher in general. Therefore, the spacing of the source elements can be used to tune the array to the gain required by the application. It should be noted that the gain is not only a function of the tuning and receiving angle. It is also time-dependent. The gain mentioned in the traditional sense is the maximum power at an angle divided by the average power output of the array. However, optimizing merely the power gain of the array is not the only concern, as adjusting the source element spacing to control the angle-dependent sidelobes at off-tuning angles is desirable. Please note that the sidelobes are not the traditional time sidelobes arising in signal auto-correlation. Weights or windows in the matched filtering process can be applied to control the compression sidelobes near the tuning angle. It w i l l later be demonstrated that an element spacing setting can be used to control the angle-dependent sidelobes at the off-tuning angles of the correlation function plots. Let us now consider the auto-correlation processing of a single chirp signal. The auto-correlation processing of a chirp is of particular interest as it allows for the recovery of the travel-time from the array to the receiver point. The basic form of the chirp signal transmitted by the phased-array can be derived from equation ( 18 ) . Assuming the delay tt is zero, a simple chirp signal has the form 5 c A(0 = rectO t-T/2 T (39) The auto-correlation function for ( 39 ) with positive lag is defined as Chapter III. Linear Frequency Modulated Signal Array 29 f fa ) fa Rch(x) = sin —t2+bt -sin — (t-x)2 + b(t-x) d r . (40) Equation (40 ) can be easily calculated i f the quantities 0(t) and A0(t) are defined as 9(t) = -t2+bt 2 (41) A0(f,T) = 0(f)-0(f-T) Then, ( 40 ) can be rewritten as follows: Rch(T) = Jsin(0(O)sin(0(r)- A6{t,x))dt X = -Hcos(A0(f,T))df-Jcos(20(O-A0(r,T))dr (42) = —cos 2 V 2 |^ s in(f lT(r-T) /2) l r ' / x ZJ)T • — ^ — ' - - - J cos (20(0 - A9(t,T))dt The first term contains the essential information of the auto-correlation of the chirp signal, which is the correlation envelope multiplied by a sinusoid at the carrier frequency. The second term is related to the edge-effects of the auto-correlation which can be ignored (Aldridge, 1992). Since ( 42 ) is calculated with the assumption of positive lag, the above function is only valid in the range 0 < x < T. However, since the auto-correlation function of any real signal is even, the full auto-correlation function can be obtained by replacing x in ( 42 ) with I x I and discarding the second term in ( 42 ), Rchif) is given by Chapter III. Linear Frequency Modulated Signal Array 30 1 —cos 2 f aT \ s i n ( a T ( 7 - l T l ) / 2 ) V J 0 a r / 2 - T < l T l < T otherwise (43) It can be easily verified that the peak of the auto-correlation function occurs at the delay experienced by the original chirp signal. Figure 16 below shows the auto-correlation of a chirp signal starting at t=0, and having a frequency range of 2000 H z to 4000 H z and a pulse duration of 3 ms. The dotted line outlines the envelope of the auto-correlation, which peaks at t=0. x 1 0 - 3 Auto-corre lat ion of Chirp 1.5 0.5 0) T , f o e < - 0 . 5 - 1 . 5 - 3 - 2 - 1 0 1 2 3 Time x 1 ( ) - 3 Figure 16. The Auto-correlation of the Chirp If a composite signal made up from multiple, time-shifted chirps is pulse-compressed, then the resultant signal after compression would be the sum of the shifted auto-correlated signal in ( 43 ) because auto-correlation ( pulse-compression ) is a linear operation, we recall that the far-field response of the time-delayed chirped array at a particular angle is the sum of a set of the time-shifted chirps as shown in Figure 7. Therefore, the pulse-compression result i i i r / / / i A . T V . / / \ \ \ • - -V. _\ / N - \ /_.v.--r — After Democ Before Dem ulation pdulation J I I I l_ Chapter III. Linear Frequency Modulated Signal Array 31 of the composite received signal defined by ( 3 6 ) at a particular receiving angle can be expressed as S(t) + SM) = N-l N-] 1*^(0= 5Xc-o-\^i=~N+l,i odd,N even (44) i=-N+] In ( 44 ), S is the array signal defined in ( 36 ), SCH is the zero lag reference defined in ( 39 ) and Rch is the auto-correlation of the chirp defined in (42 ). The delays, r,-, between each individual compressed signal are equal to the delays experienced by the chirp signal itself as determined by ( 7 ) . The ' * ' represents the auto-correlation integral. Recall that the total delay experienced by a signal before reaching the receiver relates to the element spacing, as shown in ( 5 ) in Chapter n. Therefore, for a particular f, , the peak point and the lowest point of the individual correlation results can be aligned to cancel out each other as shown in Figure 17. Time X 1 0 - 3 Figure 17. Alignment for Cancellation of Consecutive Compressed Signals Chapter III. Linear Frequency Modulated Signal Array 32 Suppose that the carrier frequency, fc, equals (aT/2+b). It is obvious from examining (43 ) that the should equal a half period of the carrier signal to achieve the cancellation effect. Thus, ( 4 5 ) Note that in the timing arrangement shown in Figure 17, each peak is aligned with the 2 minimums from adjacent signals, one advanced and delayed respectively. Furthermore, the amplitude ratio between the peak and the minimum is 2:1 as shown by Figure 16. Therefore, the intrinsic cancellation is almost optimal already. It can be enhanced by weighting the source elements which wi l l be examined further in future research. Putting the delay cancellation into a time-delayed array perspective, the implication is that for a particular arbitrary tuning angle yr, it would be possible to choose an element separation d so that for a receiving angle <p not equal to yr, there is maximum sidelobe cancellation. This is achieve by equating r, in (45 ) to in ( 7 ) Thus, Xc=2-d\ (cos yr-cos </>) I, ( 4 6 ) where Xc is the wavelength at the carrier frequency. The tuning and receiving angles at which the minimum should occur can be assigned to be yf and (j) respectively. The element spacing d can then be chosen to satisfy the equation ( 4 6 ) . Since the spacing of the chirped array affects the delay time required to tune the maximum beam angle, the time delay required for tuning should be calculated by ( 1 ) with the element spacing generated from (46 ). In that case, both the maximum beam angle and the minimum sidelobe angle can be specified. For example, for an end-firing array with the maximum tuning angle set at 0° and cancellation Chapter III. Linear Frequency Modulated Signal Array 33 angle set to be 180°, the element spacing required is Xc I 4. The other parameters of such an array are listed in Table 3. Initial Freq. Final Freq. Duration Velocity Separation Tuning Ang . 2000 H z 4000 H z 2.666 ms 1500 m/s Xc/4=0.125 m 0 Degree Table 3. Simulation Parameters for the Sidelobe Cancellation of a Chirped Array Figure 18 and Figure 19 show the auto-correlation results for a four-element array at the cancellation angle and the tuning angle, respectively. Because of the canceling effect of signals from adjacent sources, the peak amplitude of the auto-correlation as shown in Figure 18 wi l l not increase as the number of elements in the array increases. In that case, the figure would expand sideways with almost zero sidelobes in the middle. However, the peak of Figure 19 increases linearly with the number of sources in the array because of constructive interference. Figure 18. The Auto-correlation of the Figure 19. The Auto-correlation of the Chirped Array at the Cancellation Angle Chirped Array at the Tuning Angle Chapter III. Linear Frequency Modulated Signal Array 34 Simulation of the Chirped Array Signal In the earlier sections, some properties of the F M time-delayed array were discussed. The simulation of the transmitted signal is shown in this section to demonstrate beam-forming. Snap shots of the interference patterns of a composite wave generated by the superposition of waves emitted by the source elements of the array can be simulated to show this beam. In each of the interference patterns, the amplitude of the wave is indicated by the level of brightness. Since the interference wave pattern is a function of time, each pattern can be computed and saved as a frame of a movie. The first frame starts at t=0. Subsequent frames of the wave field ( acoustic pressure ) can be generated at regular time intervals. A stream of frames can be displayed continuously showing the progress of the wave. A n ideal line source is assumed in the simulation. Because the high amplitude created at source points due to the singularity would skew the contrast making the rest of the simulation unreadable, the IIdecay factor is ignored in the pressure wave simulations. The parameters for the simulation are listed in Table 4. The element spacing, d, is chosen accord to ( 46 ) such that the maximum cancellation occur at 180°. Then the spacing, d, obtained is determined from (47) Duration Initial Freq. Final Freq. Spacing Velocity Tune Ang Elements 2.667 ms 2000 H z 4000 Hz 0.14645m 1500m/s 45° 8 Table 4. Simulation Parameters for a Chirped Array Movie Chapter III. Linear Frequency Modulated Signal Array 35 (a) (b) (c) (d) (e) (f) Figure 20. Interference Pattern to Show Beam-forming in the Chirped (a) Time (T)=0 msec (b) T=6.5e-3 msec (c) T=1.3e-3 msec (d) T=1.95e-3 msec (e) T=2.6e-3 msec (f) T=3.26e-3 msec Array Chapter III. Linear Frequency Modulated Signal Array 36 The simulation clearly shows that two beams form at 45° and -45°. The Matlab code used to generate the above simulation is included in the appendix. In order to precisely determine the arrival-time of the energy pulse from the time-delayed array, the signal is match-filtered at each angle. The matched filtering can be efficiently implemented by the FFT. The matched filter result of the chirped array signal is simulated in Figure 21 with a receiver distance of 20 meters using the array parameters shown in Table 3. The axes are travel-time and receiving angle, respectively. The intensity in this figure is related to the amplitude with the maximal positive value shown in white and maximal negative value in black. The figure clearly shows energy being focused at the tuning angle even with the energy leakage shown in Figure 11. The peak of the correlation function plot appears at the illumination angle at the expected arrival time. The horizontal lines near the tuning angle are the time sidelobes from normal auto-correlation. The eye-shape lines in the center of the figure show the off-tuning side-lobes. Application of the cancellation spacing ensures that there is almost zero sidelobe energy inside the eye-shaped lines. In Chapter V , simulations of array correlation function plots from different array configurations wi l l be compared. Chapter III. Linear Frequency Modulated Signal Array 37 Practical Consideration - Alternative Tuning Method Tuning the array by delaying the starting time of the chirp signal might not be feasible due to application-specific constraints. In that case, the sources must start transmitting at the same time. It is obvious that this is achievable mathematically by adjusting the starting point of the gate function. To elaborate this, suppose the chirp signal required to be transmitted starts at t-U as shown in ( 18). In order to make the signal start transmitting at f,=0, a different gate function can be used. The signal is given by However, there is a physical problem of starting the chirp at negative time. It w i l l be shown that the effect of starting a chirp with increasing frequency at negative time is equivalent to starting the chirp at a lower frequency with a constant phase. Therefore, it is possible to tune the array by adjusting both the start frequency and phase. In starting the vibrating sources at the same time, there is a side-effect of introducing distortion in the leading and trailing edges of the signal even at the tuning angle. However, the effect is not discussed here as it is assumed that the duration of signal is much longer than the tuning delay and hence the energy in the portions added in order to allow for simultaneous firing of the sources is very small and therefore can be neglected. Let us consider a delayed chirped signal at one of the source points to find the starting frequency and phase to achieve tuning for simultaneous firing. Suppose we know that tt is the time delay required to tune the array. From ( 18 ), the phase of the delayed chirp is given S,.(0 = g(0-imagjexp j\ ^(t-tt)2 + b(t-f.) with L y j (48) by Chapter III. Linear Frequency Modulated Signal Array 38 ^(t-tf+bit-t;). (49) A zero delay chirp with a new chirp-rate and new initial frequency and initial phase is denoted by Therefore, sending a chirp signal ( 5 0 ) with the parameters determined by ( 51 ) is equivalent to sending the signal ( 49 ). It should be noted that ( 50 ) is applicable only i f b' obtained in ( 51 ) non-negative. The result shows that a delayed chirp is equivalent to a chirp with a different initial frequency and initial phase. Because the chirp signals from different sources of the array are forced to start at the same time, the duration of each signal is set differently to ensure that the trailing end of the signal at the tuning angle do not suffer from distortion. The duration Dj for the ith source is then (Do+t,). D 0 is the duration for the source at the center of the array. The following example provides the tuning requirements for an eight-element chirped array for time-delayed tuning and simultaneous-start tuning. The velocity of the medium is assume to be 2100 m/s, the tuning angle is 60°, the duration is 0.10 second and the frequency range is 20-80 Hz . The duration and frequency vary across the source array for simultaneous-start tuning. For simultaneous-start tuning, the duration and frequency given applies to the source at array center (if it exists) only. To set the maximum correlation cancellation angle at a' , — t2 +b't + c'. (50) Expanding ( 49 ) and equating the result with ( 50 ) yields the following results (51) Chapter III. Linear Frequency Modulated Signal Array 39 180°, the spacing is determined to be: /L c /(2 + V 2 ) = 12.3015m. The parameters for time-delayed tuning are listed below: Source number : -7 -5 -3 -1 1 3 5 7 Start time, u (msec) -1.03 -0.73 -0.44 -0.15 0.15 0.44 0.73 1.03 Duration (sec) 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 Table 5. Parameters for Time-Delay Tuning of a Chirped Array If the simultaneous-start tuning method is used, the initial frequency, phase and duration required are: Source number : -7 -5 -3 -1 1 3 5 7 Chirp rate (Hz/s) 7 7 7 7 7 7 7 7 Initial Freq. (Hz) 26.15 24.39 22.64 20.88 19.12 17.36 15.61 13.85 Initial Phase (Rad) 1.486 1.021 0.589 0.188 -0.180 -0.516 -0.819 -1.090 Duration (msec) 89.7 92.7 95.6 98.5 101.5 104.4 107.3 110.3 Table 6. Parameters for Simultaneous-Start Tuning of the Chirped Array Figure 22 and Figure 23 below show the interference pattern for time-delayed tuning and simultaneous-start tuning, respectively. . Note that the sources in Figure 22 start in sequence, resulting in the egg-shaped wave-front, while the sources in Figure 23 start simultaneously as shown by the ellipsoidal wave-front. The parameters for the simulations are listed in the Table 5 and Table 6, respectively. Chapter III. Linear Frequency Modulated Signal Array 40 1 0 Figure 22. Simulation of Time-delayed Tuning - 2 0 0 - 1 5 0 - 1 0 0 - 5 0 0 5 0 1 0 0 1 5 0 2 0 0 Figure 23. Simulation of Simultaneous-start Tuning The amplitude difference obtained from subtracting the interference pattern in Figure 23 from that of Figure 22 is shown below in Figure 24. The edge differences caused by simultaneous starting in Figure 23 are clearly shown. There is no difference between the two patterns if the edge error caused by simultaneous-start tuning is not considered. Note that the maximum amplitude for the 2 interference plots of Figure 22 and Figure 23 is ± 8 as there are eight sources in each case. 150 •oo 50 0 - 5 0 - 1 0 0 - 1 5 0 - 2 0 0 0 x (meter) Figure 24. The Difference between Delay-time Tuning and Simultaneous-Start Tuning Chapter IV. Phase Modulated Signal Array 41 IV. Phase Modulated Signal Array The P M signal is a sinusoidal signal modulated by binary message code symbols consisting of positive and negative ones. A n offset is sometimes added to the code symbol for sidelobe cancellation. The signal amplitude of a P M signal is proportional to the amplitude of the modulating code symbol. A positive code symbol leaves the phase of a period of the sinusoid carrier in the P M signal unmodified while a negative code symbol adds a phase of n to the sinusoidal carrier (Birdsall, 1988a). If each code symbol modulates one period of the carrier, the sidelobe level of the code after correlation processing relates directly to the sidelobes of the P M signal after processing. Therefore, a code with high auto-correlation or cross-correlation and low sidelobes is desirable for the array. Two types of codes, the Barker (1953) code and the Golomb (1992) pseudo-random code with offset, are well known for their low correlation sidelobes. Even though the two signals are similar in appearance, the two types of codes requires two different types of processing for sidelobe minimization, namely aperiodic cross-correlation processing and periodic cross-correlation processing, respectively. Before the codes and their required processing are introduced, let us examine some properties of P M signals. If we assume that the sinusoidal carrier has a frequency coc, then the P M signal can be written as (52) where T is the duration of the P M signal and O(t) is the phase modulation function depending on the code symbol an used. O(t) is given by Chapter IV. Phase Modulated Signal Array 42 0 ( 0 = P(t) = 5>l n=0 f In t- n V I 2 J 0 •7T 0<n<M-l otherwise 1 0<t<— 0 otherwise - l o r l 0 < n < A f - l 0 otherwise. ( 5 3 ) When the code symbol is one, the phase 0(£) which is added to the sinusoidal carrier is 0, leaving the polarity of the carrier unchanged in the period. When the code symbol is a negative one, a phase of % is added to the sinusoid carrier, reversing its polarity. The signal is represented in this form so that the auto-correlation of signal can be simplified in the later sections. The half power bandwidth of the P M signal is directly related to the number of periods of the carrier signal that a code symbol modulates (Birdsall, 1988a). In this case, since each code modulates one period of the carrier, the highest bandwidth of the P M signal can be obtained by considering the windowing effect of a period of the carrier. Therefore, the bandwidth of the P M signal is equivalent to the bandwidth of a period of the sinusoidal carrier. A s a result, the bandwidth to carrier frequency ratio is one, and because of this high ratio, the traditional narrow-band field pattern analysis of phased-arrays does not apply at all. Far-Field Field-Pattern of a PM Array The far-field field-pattern of the P M array is constructed using delayed P M signals. The form of a P M signal with an arbitrary delay tit, can be derived from ( 5 2 ) . The exponential form is used to simplify future calculations. The imaginary function is not shown explicitly. Thus, a P M signal with an arbitrary delay tti, is given by Bplj (0 = exp(X»c •(t-t,) + <D(f - f,.))) • rect( '— ) . ( 54 ) Chapter IV. Phase Modulated Signal Array 43 In ( 54 ), the delay r, is dependent on the array geometry and viewing angle. To find the field pattern of the time-delayed P M phased-array, a pair of sources configured as in Figure 2 with the tuning angle set to y/is considered first. The delay experienced by the signal transmitted by the first source before reaching the a receiver point is found in ( 19 ) and the delay for -1st source is listed ( 20 ). The sources are named as described in Chapter U. The two delays are substituted in ( 54 ) to obtain 5, = exp 5_, - exp J(G>c(t-R \ v 2 -) + <D(f-R A„ v 2 - ) ) • rect(-t-R/v-A,„J2-T/2 - ) j(coc(t-- + ^ ) + 0(t-- + ^)) v 2 v 2 R t-RJv + A^2-TI2 • rect( - f ) . (55) In ( 55 ) coc is the carrier frequency, O is the modulation function defined in ( 53 ), R is the distance from the center of the array to the receiver point, v is the velocity of the wave in the medium and A ^ = (cosy/- costy)d/v is the angle dependent delay function defined in Chapter H The quantities Si and S.i are the wave patterns transmitted by the two sources. The interference pattern for the two-element array can be obtained by adding the two equations in ( 55 ). The whole interference pattern is travelling outward from the center of the array with velocity v. Except for the II^R amplitude decay which has been ignored, the pattern does not vary as it progressed outward. Therefore, a pseudo-stationary interference pattern can be created by adding the 2 equations in (55 ) and then setting t' = t-Rlv. The interference pattern is then given by S - expj + exp| t'—A / 2 - 77 2 rect( ) f + A # / 2 - 7 7 2 rect( ) (56) Chapter IV. Phase Modulated Signal Array 44 It can be noted that at a particular receiver angle (j), one of the two signals is advanced by A ^ 2 .while the other one is delay by If the signal duration Tis much greater then A ^ , then, the energy carried by the leading edge and the trailing edge is insignificant and the signal pattern can be approximated by those values existing in the range 0<t'<T. Ignoring the edge-effects due to the misalignment, the interference pattern can be written as f f exp V V f +exp \ 2 ) \ - ) ) t'-T/2 r ec t (—-—) J) (57) Equation ( 57 ) is an approximated interference pattern emitted from the center of the array center. As the wave travels outward, it is being retarded by Rlv. Therefore, f=0 should be considered as the start of the interference wave for the purpose of computing the field pattern. The P M signal is factored out from the interference pattern of (57 ) in order to obtain the field pattern. Then, equation ( 57 ) becomes S = expUa>/+Mt'))-exp(-j0(ny exp ( A A ^ K-coc^H mt'-f) + expl 2 t'-T/2 r e c t ( — - — ) . (58) The term exp(jcocf + jQ>(f)) in ( 58 ) is the common signal of the interfered phased-array signal. The portion of ( 58 ) without this signal is the field pattern for a pair of sources configured in the arrangement shown in Figure 2. Since the pattern depends on the discrete code used in the modulation, there is no general closed form for the pattern. The pattern can be computed numerically for the different codes used in the phase modulation. For the code Chapter IV. Phase Modulated Signal Array 45 with the parameters listed in Table 7, the simulated composite signal for the array is shown in Figure 25. Carrier Freq. Separation Velocity Tune Ang Element Code 3000 0.15 1500 m/s 0° 4 + + + — + - - + -Table 7. Simulation Parameters for the P M array Figure 25. Simulated Composite Signal of the P M Array For an even N-source array with the arrangement as shown in Figure 2, the field pattern can be obtained by summing the interference pattern ( 58 ) and omitting the P M carrier signal yielding exp( j((0{\ + 2k)^ + 0(f'-(1 + 2*)^*-))) (59) f-T/2 expOW))'rect( ^ ). Chapter IV. Phase Modulated Signal Array 46 N-l N-l This expression is exact within the range — - — < t ' < T-—-—A^ where N is the number of sources. This is the case because the range is clear of edge-effects. It is important to note that at the tuning angle, where A ^ = 0, the magnitude of ( 5 9 ) becomes identically N. The field in equation ( 59 ) wi l l be examined in more detail. As the square of the amplitude function is related to the radiated energy, the square of ( 59 ) is computed and plotted in the figure below with its corresponding contour map so readers can have a clearer perception of the shape and formation of the radiation envelope. The tuning angle is 0° in the following figures. 20 Figure 26. The Radiation Pattern of the P M array. X 1 0 ° j }ggg<8 ^ = f f i ^311! • ,i i i MI 11 i i i i nn ii i u 0 50 100 150 200 250 300 350 Angle Figure 27. The Contour of the Radiation Pattern of the P M array. Recall that the sequence used to modulate the P M signal listed in Table 7 consists of 3 leading +'s. Therefore, at early times across all angles in Figure 26 and Figure 27, the familiar radiation pattern of a narrow-band array is exhibited. The subsequent changes of the radiation pattern can be explained by the polarity reversals caused by the modulation and the different amounts of misalignment of the array signals as the receiver angle is varied. Let us look at the signal received at a particular off-tuning angle, as shown in Figure 28. Chapter IV. Phase Modulated Signal Array 47 From Source -3 -1 1 3 t-d\ III Ifr t-i t, Time ] Non-Reversed Period 3 Reversed Period Figure 28 Polarity Reversal of the P M signal at off-tuning Angles In Figure 28, each horizontal bar shows a signal from a particular source. The interference pattern is the sum of all 4 signals. The vertical line denote the received signal at a particular point in time. At the first vertical line in Figure 28, all signals from the array are of equal sign. That is O(r)=0. Note that Figure 28 shows the composite signal at a particular angle only. If there is no amplitude reversal across all received angles, then, the field pattern of the array in ( 59 ) becomes the narrow-band field pattern result given by Now suppose there is only one signal reversing its sign across all angles, as denoted by the second vertical line in Figure 28. The field pattern changes to E = ( 6 0 ) E = f - 2 • exp - jco V ( 6 1 ) Chapter IV. Phase Modulated Signal Array 48 The field pattern for 2, 3 and 4 signals reversed can be calculated similarly. For the four-source array shown in Figure 28, there are 4 possible reversals. A l l the signals have the same sign again at 4 reversals. In general, the field pattern can be generalized for an M -source P M array system. When none of the signal or all of the signals are amplitude reversed, the field is described by the narrow-band result, where the field pattern is given by sin coN-E = - ( 6 2 ) sin co There are M - l amplitude reverses possible before all the signals are of equal sign again. The fields for the M - l possibility can be described by the following generalized field equation : sin coN E = sin co — 2- exp -jco^(N-X) sin coX A VP sin co-( 6 3 ) In (63 ) X , which satisfies the inequality 0<X<N, is the number of periods of the carrier experiencing a sign change at the receiver. For a four-element array with parameters shown in Table 7, there are 5 different field patterns as shown by the 5 vertical lines in Figure 28. The 5 radiation patterns, which are the square of the field patterns, are plotted below Chapter IV. Phase Modulated Signal Array 49 16 T w o signals reverse sign One signal reverse sign All signals: :are equal sign o 0 50 100 150 200 Angle in Degree 250 300 350 400 Figure 29. Sections of the Radiation Pattern of a four-source P M array The two plots of signals with all signs equal are identical, as are the two plots for 1 signal or 3 signals reversed. Therefore, there are only 3 distinct curves in Figure 29 instead of 5. A s the tuning angle of the array is 0°, the peak for the field pattern, where all signals have the same sign at that angle. Note that these 3 curves make up the sections of the radiation envelope in Figure 26. To understand why, let us consider the following. At a particular receiver point, because of the misalignment of the signals, a signal from one of the array elements arrives at the receiver earlier than the others. This is the signal which is advanced the most. The receiver would receive a polarity-reversed carrier from the most advanced signal at some point in time before it would receive a polarity reversal from the other signals. Subsequently, as time progress, a second sign change of the signal from an adjacent source is received and so on. Therefore, the radiation pattern is divided into different sections according to the number of signals that have reversed polarity as time progress. Each following section has one more signal polarity reversal at the receiver, as shown in Figure 28. The field pattern of each section is therefore exactly expressed by ( 63 ) across all angles. Chapter IV. Phase Modulated Signal Array 50 From Figure 29, it is obvious that energy leakage in each of these sections is caused by the amplitude reversal of the periods. In fact, in this particular case, the signal is focused at some angle other that the desirable tuning angle at some later time. Furthermore, increasing the number of sources in the array also increases the possible number of amplitude reversals in ( 63 ) . Therefore, we cannot be sure that the leakage problem wi l l improve even i f more sources are used. Finally, since the misalignment of the signal does not change sign all at once across all angles, Figure 27 shows that the section boundary is a curve. Edge-Effect Correction The exact field pattern can be obtained by adding correction terms to ( 5 9 ) . As explained in previous sections, additive terms have to be included for the leading part of the advanced signal and the trailing part of the delayed signal. Again, a pair of sources is considered first. The additive corrective part is obtained by applying ( 5 4 ) to the regions which have been omitted in ( 5 8 ) . That is, A¥<p/2 < t'<0 for the advanced signal, and T < t'< T +AV4/2 for the delayed signal. The subtractive correction part is obtained from applying ( 54 ) to the extra regions which have been included in ( 58 ) . That is, 0< t'< A¥^I2 for the delayed signal, and T-A¥^2 <t'<T for the advanced signal. Rearranging the additive and subtractive correction terms yields the correction term for the leading edge. This is given by e x p ( ; a > ^ + 7 W + ^ ) ) - e x p ( - > < A - , W + % ) ) ' exp(y'0(r'))'rect t' (64) The correction term for the trailing edge is Chapter IV. Phase Modulated Signal Array 51 ; W + ^ ) ) exp(y'0(7'))-rect t'-T (65) IA These correction terms cannot be simplified further into closed form. For an even N -element array, the complete field pattern can obtained by summing ( 6 4 ) and ( 65 ) and ( 58 ). Note that the sum is obtained by multiplying A ^ with a constant factor to account for the location of each pair of sources. The complete field pattern is therefore I exp(yX«(l + 2 & ) ^ + 0( f ' - ( l + 2 £ ) ^ ) ) ) V 2 t'-T 12 r e c t ( ^ — ) + ex P( jcok^ + Mf+k ^ ) ) - exrf -ya* ^ - W+k ^)) rect-a l - + N-[ ( k=],3,5,..\ - exp( jcok ~Y + jQ(t'+k - y - ) ) + exp(- jivk • mt'+k-*-)) rect-t'-T \kA,J exp(;«l>(0)-(66) Directivity The directivity equation is defined in equation ( 37 ) with the power density function defined in ( 38 ) in Chapter HI. The directivity of the P M signal can be obtained by substituting the field pattern equation in ( 59 ) into ( 38 ) and then into ( 37 ). Figure 30 and Figure 31 show the directivity of the four-element array with parameters defined in Table 7. Chapter IV. Phase Modulated Signal Array 52 x NT 3 Figure 30. The Simulation Gain of a P M Figure 31. The Simulation Gain of a P M array array in dB The gain at the leading edge in Figure 30 and Figure 31 is a constant which can be determined by the narrow-band phased-array theory. As time progress, some of the period of the signals that make up the composite waveform experience a sign change. As a result de-focusing or leakage occurs. The gain therefore drops. Figure 30 and Figure 31 show that the gain peaks at some points where the sign change of the signal is half-completed. In this case, the gain is not a good measure of the performance because the main beam has disappeared and a second beam has formed at an off-tuning angle as shown in Figure 29. Therefore, the high gain in Figure 30 and Figure 31 is not a effective performance measure as in the linear F M case, where the energy is always focused at the tuning angle. Barker Code and Complementary Code and Processing In his (1953) paper, Barker presented a set of 9 binary codes which are highly compressible. These are now know as the Barker codes. The codes are listed below in Table 8. Chapter IV. Phase Modulated Signal Array 53 Length Code Symbols Auto-correlation of Code Symbols 2 i , - i -1, 2,-1 2 i , i 1, 2, 1 3 I , 1 , -1 -1, 0, 3, 0,-1 4 i , 1 , - 1 , i 1, 0,-1, 4,-1, 0, 1 4 I , I , 1 , -1 -1, 0, 1, 4, 1, 0 , - 1 5 I , I , 1 , - 1 , I 1, 0, 1, 0, 5, 0, 1, 0, 1 7 I , I , 1 , - 1 , - 1 , 1 , -1 -1, 0,-1, 0,-1, 0, 7, 0,-1, 0,-1, 0,-1 11 I , I , 1 , - 1 , - 1 , - l , 1 , - 1 , - 1 , I , - l -1, 0,-1, 0,-1, 0,-1, 0,-1, 0,11, 0,-1, 0,-1, 0, -1, 0,-1, 0,-1 13 I , I , I , I , I , - 1 , - 1 , I , 1 , - 1 , 1 , - 1 , l 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0. 13, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 Table 8. Barker Codes These nine codes have the property that for the code of length N , the maximum sidelobe level is 1/N relative to the main peak, which is normalized to 1. Because the sidelobe of the P M signal generated with a code is directly related to the sidelobe level of the correlation of the original code, the Barker code is a very good choice for modulating the P M signal. However, since there is no Barker code with length longer then 13, the usefulness of the code is severely limited. If the auto-correlations of the two Barker codes with length four listed in Table 8 are added together, the sum is a peak with no sidelobe at all. This class of code pairs for which the sidelobes would cancel out are referred to as complementary Barker codes. There are a number of different ways in which these complementary codes can be generated. Levanon (1987) presents a recursive algorithm which can generate the codes with a pair of complementary codes as "seed" codes. The algorithm proceeds as follows: 1. Let B , and B j C be a complementary code pair. 2. Bi+i = [Bj, Bj C ] . Chapter IV. Phase Modulated Signal Array 54 3. B ( i + i ) C = [B;, -B i c ] . 4. Let i = i + 1 5. Go back to 2. The length 4 complementary Barker code pair listed in Table 8 can be generated by using Bo = [1] = B 0 c as follows: B 0 = [ l ] B 0 c = [l] B , = [ l , l ] B l c = [ l , - 1 ] B 2 = [ l , 1, 1,-1] B 2 c = [ l , 1,-1, 1] Longer complementary codes for modulating the P M signals can be generated i f the algorithm is iterated a number of times. For the cancellation of the sidelobes to occur, the two codes must be transmitted and correlated respectively before adding the correlation results. For some applications that might present a problem as the target might move between the two transmissions. This is not true in the case of exploration seismology, as the target is stationary. Table 9 shows the auto-correlation of a pair of the complementary Barker codes and their sum. Code Auto-correlation of Codes Sum of Auto-correlations 1,1,-1,1,1,1,1,-1 -1,0,3,0,1,0,1,8,1,0,1,0,3,0,-1 0,0,0,0,0,0,0,16,0,0,0,0,0,0,0 1,1,-1,1,-1,-1,-1,1 1,0,-3,0,-1,0,-1,8,-1,0,-1,0,-3,0,1 Table 9. A Complementary Barker Code and its Correlation Chapter IV. Phase Modulated Signal Array 55 Let us now examine the auto-correlation function of the P M signal modulated by the Barker code alone without the array. As the amplitude of O(r) can only be 0 or 71, ( 52 ) can be rewritten in a different form as t — T12 Bp{t) = sin(<oc?)-cos(<S>(0)-rect(—-—) sm(coct)- rect(-t-n I a T \ (M-\ In I co. c J a„S(t —) co„ B period ( 0 * J U „ - , y ( 0 . (67) In ( 6 7 ) , is the convolution integral function. The first part of ( 67 ) is a truncated version of the carrier which has the duration of one period. The second part of the equation controls the polarity of each period of the carrier in the wave. M is the total number of cycles in the P M signal. The auto-correlation function, Rp(t), of a P M signal can be easily obtained using ( 67 ) . It is given by RP(t) = BP(t)*Bp(t) = * Bpo,arily(t)) • (Bperind(t) * Bvolarity{t)) \ I \ ( 6 8 ) = \ B p o l a r i t y ^ ) * BpolarityW) * \Bperiod^) * Bperiod^)) = Rpolarity(t) ^ ^ p e r i o d (0 • In ( 68 ) Rpoiarityif) is the auto-correlation of the polarity controlling signal, Bpoiarity(t) and Rperiodil) is the auto-correlation function of one period of the carrier. The auto-correlation of the controlling signal, Rpoiarity( 0, can be determined by Chapter IV. Phase Modulated Signal Array 56 r V«=0 W c y Vm=0 y *=1 -Af ®c ( 6 9 ) fet = Xai- f l.--i»i 1=0 k = 0—M)..(M-l). The sequence Z?„ is the discrete convolution of the sequence that modulates the P M signal. Figure 32 shows the function Rpoiarity( t) for each of the complementary Barker codes. The carrier frequency equals 3000 H z and modulation codes are [1, 1, -1, 1] and [1, 1, 1,-1], respectively. It should be noted that the time duration between each delta function is exactly the period of the carrier frequency. To obtain the complete auto-correlation function of the P M signal, the wavelet, Rperi„d{t), is generated from the auto-correlation function of one period of the carrier signal, which is calculated in ( 70 ) below as 2K_ 0>r RpenoAt) = J* sin(fi)cT) • sin(fi>cT-l f I )dx • rect 1't-Klcot ^ 2K/ m 1 , s,2n , , s s'mcojtl -cos(ft) 0 ( — - l r l ) + CO„ 2m \ f rect' ( 7 0 ) c J t-n I a 2K I co. 'c J Figure 33 below shows the auto-correlation, Rperiod(t), of a period of the carrier signal. Since Rperiod{t), is much shorter than the delta function series from auto-correlating the modulation code ( Rpoiarity{t) in (69 ) ), Rperu,diS) acts as a smoothing function for the delta series. Therefore, the sidelobe ratio of the auto-correlation of the Barker-encoded P M signal, depends greatly on the auto-correlation of the binary modulation sequence, as shown in ( 68 ). Chapter IV. Phase Modulated Signal Array 57 x10"" Figure 32. Auto-correlation of the Figure 33. The Smoothing Wavelet Modulation Codes [1, 1,-1, 1] and [1, 1,1,-1] The auto-correlation function of the P M signal is therefore the convolution of the two signals shown in Figure 32 and Figure 33. Because of the delta series nature of Rpoiarity( t), the auto-correlation function of the P M signal is a shifted and scaled sum of the Rperiod(t) function as shown in Figure 34. The figure clearly shows that the peak of the correlation occurs at the delay between the signal and its reference, which is zero in this case. Figure 34. Auto-correlation of the P M Figure 35. Auto-correlatiori of the P M S i g n a l -Signal for each Complementary Code Sum of the Results Shown in Figure 34 Chapter IV. Phase Modulated Signal Array 58 Before continuing to examine spacing for the elements in the Barker signal array, let us consider a second pseudo-random code, the Golomb pseudo-random code. Golomb Pseudo-random Code and Processing The high compressibility of the pseudo-random m-sequence code makes this code another prime candidate for modulating the P M signal (Birdsall, 1988a) . In particular, zero side-lobes in the code auto-correlation are made possible by introducing a D C offset in the code. In this case, however, periodic correlation is used instead of the aperiodic correlation normally used in matched filtering.(Birdsall, 1988) However, the code length of the m-sequence pseudo-random code is limited to 2 n - l , where n is any positive integer. Since periodic auto-correlation is required to achieve the zero sidelobes, the duration of the P M signal used in the array must be greater than the longest possible travel-time to be measured to avoid ambiguity. Therefore, the code-length of the m-sequence pseudo-random sequence might be inconvenient for some applications as a longer code-length imposes higher storage and processing power requirements. A new class of quadratic-residue pseudo-random codes exhibit many of the same properties of the m-sequences and exists in code lengths of prime integers of the form 4m+l. This was developed by Golomb (1992). The code is more flexible than the m-sequence in modulating the P M signal because there are more codes of different lengths. The result of the Golomb paper are included for reference (Golomb, 1992). If we let a n represent the nth element of the code sequence {a n}, the individual terms are determined by +1 i f n is a quadratic residue modulo L -1 otherwise (71) The quadratic residue is defined as those number satisfying the congruence equation Chapter IV. Phase Modulated Signal Array 59 x2=n{modL). ( 7 2 ) A simple method of implementing the sequence can be found in the Golomb paper. Table 10 below listed the first 5 sequences. Length Sequence 5 l , 1 , - 1 , - 1 , l 13 l , 1 , - 1 , l , l - 1 , - 1 , - 1 , - 1 , l l , - l , l 17 l , l , l , - l l - 1 , - 1 , - 1 , l , l - 1 , - 1 , - 1 , 1 , - 1 l , l 29 l , 1 , - 1 , - 1 , l l , l , 1 , - 1 , l - 1 , - 1 , - 1 , 1 , - 1 - l , 1 , - 1 , - 1 , - 1 l , - l , l , l , l l , - l , - l , l 37 l , 1 , - 1 , l , l - 1 , - 1 , 1 , - 1 , l l , l , 1 , - 1 , - 1 - l , 1 , - 1 , - 1 , - 1 - l , 1 , - 1 , - 1 , - 1 l , l , l , l , - l 1 , - 1 , - 1 , l , l - l , l Table 10. Binary Patterns of the First 5 Golomb Pseudo-Random Sequences It has been shown by Golomb that i f the sign of the first element is reversed to form a new sequence {b n}, the periodic cross-correlation of these pair of sequence has two values: a zero lag cross-correlation peak at L-2 and -1 at all other lags. The periodic cross-correlation is defined as : L-\ Ci =EaA.'+;)modL- ( 7 3 ) i=0 Cj itself represents a periodic sequence which has a period of L. To realize the zero sidelobes, two offset values a and (3 are added to each sequence respectively. The cross-correlation is then given by ( 7 4 ) Chapter IV. Phase Modulated Signal Array 60 For perfect sidelobe cancellation, C, = 0 for all j * 0, conditions ( 75 ) below must be satisfied. In that case, the peak cross-correlation value in ( 74 ), turns out to be L - l instead of the peak of L-2 when no offset is added to the Golomb code. The condition for perfect sidelobes are as follows : l-B n l + a a = n H or p = ( 7 5 ) Lp-l H La +1 It is important to note that the transmitted signal is different from the reference signal used in circular cross-correlation. This is of course not the case in matched filtering where the transmitted and reference signal are the same. As a result, there is a loss of detection probability, which would result in a lower SNR. However, as we are examining the response of the array in an ideal situation in this thesis, we are not concerned about this loss. In an environment where noise does exist, the receiver energy lost resulting from the mismatch of the signals can be minimized i f a and (3 are set according to the following criteria. That is, a and (3 should be set to the following : a =(V(L-l)-l)/L , , v ( 7 6 ) P =U(L-l) + \)/L We wi l l use this result for the array experiment which is included in Chapter V I . The two sequences of length 29 with D C offset determined by ( 76 ) which are cross-correlated to produce zero sidelobes are listed in Table 11 below. Note that in Table 11 w= 1 + a = 1.1480, x = -1 + a s -0.8520, y= 1 + p = 1.2169 and z =-1 + (3 = -0.7831. Chapter IV. Phase Modulated Signal Array 61 Type Sequence Transmit W, W, X, X, w w, w, w, x, w x, X, x, w, X X, w, x, x, X Or {Grn} W, X, w, w, w w, X , X, w F i l t e r z, y, z, z, y y- y, y. z, y z, z, z, y, z z, y, z, z, z or {GRn} y, z, y, y, y y, z, z, y cr o s s - 28, 0, 0, 0, 0 o, 0, 0, o, 0 0, 0, 0, 0, 0 0, 0, 0, 0, 0 c o r r e l a t i o n 0, 0, 0, 0, 0 o, 0, 0, 0 Table 11. A D C offset Golomb Code, the Corresponding Filter and its Correlation. As mention earlier, the use of aperiodic correlation in the detection of the Golomb code limits the unambiguous range. To see how this ambiguity arises, let us consider a received code which is composed of two transmission codes in Table 11 with a delay of 25 and 37 symbols, respectively. The received code is shown below in Figure 36. 1 1 1 TTTTTTT 111 II J 11 L i i l _ i i i l i _ 0 10 20 30 40 50 60 Bin Number Figure 36. Received Golomb Code with Delay at Symbols 25 and 37 To detect the delay of the code, it is separated into sections of 29 symbols, which is the code length, denoted by the vertical lines in the graph. The sections in Figure 36 are summed up to obtain a periodic representation of the received signal, as shown in Figure 37 below. The Chapter IV. Phase Modulated Signal Array 62 periodic cross-correlation result of Figure 37 and its reference in Table 11 is shown in Figure 38 below. nn nnl nnnnnnnnl or 10 15 Bin Number 20 25 Figure 37. Periodic Representation of the Code in Figure 36 10 15 Bin Number Figure 38. Periodic Cross-correlation Result of Code in Figure 37 The result in Figure 38 shows a two impulses, delayed at 8 symbol and 25 symbol respectively, which are clearly different from the actual delay at 25 symbol and 37 symbol. The ambiguity occurs when the code is delayed by more than the code length. In that case, the arrival-time is wrapped around, thus creating the ambiguity. The two sequences in Table 11 or signals generated similarly can be used to modulate the transmitted signal and to generate the receiver filter for the time-delayed array application. Let us first consider the representation of the Golomb-coded P M signal alone in the absence of the array. Similar to the Barker-coded P M signal in ( 67 ) , the Golomb-coded transmit signal To, and filter signal FG, can be decomposed into the convolution of two dirac delta modulation function sequences, B~SGTx(t) and B>SGRX(t), and a single period of the signal carrier. Therefore, Chapter IV. Phase Modulated Signal Array 63 FG(t) = • t ^ ,t-Kl(0 sin(a>c?) • rect( c-) v 2K I coc j • , , J - K / C O sin(ft)j) • rect( c-) 2K I a c , 2nK^ CO. c J \n=0 CO. c J = Bperiod{t)*BSGRx{t). (77) The aperiodic convolution is denoted by GTn and GRn are elements of the Golomb sequence. A n example of the Golomb code P M transmit and filter signals are simulated with the parameters listed in Table 11. The transmit and filter signals are shown in Figure 39 and Figure 40 below. Time Time Figure 39. Example of the D C offset Figure 40. Example of the D C offset Golomb-coded P M Transmit signal, Tc Golomb-coded P M Filter signal, FQ The periodic cross-correlation, Re, of the transmission signal, TG, and the receiver filter signal, Fc, can be expressed as Chapter IV. Phase Modulated Signal Array 64 RG(t) = TGQFG = ( J W O * W > ) © ( ^ ( 0 * W ) ) = (B^it) © 5 ^ ( 0 ) O (BIKriod(t) © Bperit)d{t)) = RSGn(t)ORperiod(t). (78) In ( 7 8 ) , and ' O ' , 'O' denote the aperiodic covolution, periodic convolution, and periodic correlation, respectively. The auto-correlation function, Rperiod, has been determined in ( 70) . It is obvious that the cross-correlation function RSGTR for the modulating delta sequence, Bscrxit) and BsGRx(t) can be expressed as w o = XC* ) k=0 Wc M-\ Q = S G 7 : G ^ , m o d M - (79) =0 fc = 0..(Af-l) For the D C offset value determined in ( 76 ), Co = M-l and = 0. Therefore, the cross-correlation function RSGTRU) generated by sequence in Table 11 which uses the D C offset value from in ( 7 6 ) has a peak with value 28 and zero elsewhere, as shown in Figure 41 below. Figure 42 shows the periodic cross-correlation, defined in ( 7 8 ) , for the Golomb-coded P M signals, TG and FG, which are shown in Figure 39 and Figure 40, respectively. Note that a delay is introduced in the figure so that the delta function does not occurs at r=0. Chapter IV. Phase Modulated Signal Array 65 1:1 Figure 41. Cross-correlation of the Golomb Code Sequence Figure 42. Cross-correlation of the D C offset Golomb-coded P M Signal Source Element Spacing for the PM Array In the previous two sections, the processing of two types of binary codes was examined. It was shown that the correlation result of the two types of P M signals both equal a scaled and shifted version of Rpenodf). It was noted that the peak of Rperiod(t) occurs at the delay between the signal and its reference. We recall that the signal transmitted from different sources of the array would be delayed differently at angles other then the tuning angle. It was shown in Chapter II that the delay is proportional to the element spacing. As the correlation applied to the received array signal is a linear operation, it is therefore possible to align the peak and trough of an individual correlation result by adjusting the element spacing of the array to achieve cancellation. To determine the spacing required, the minimum of Rperi„d{t) can be determined by d_ dt * W O = o or t = 0, : co„ ' CO, Chapter IV. Phase Modulated Signal Array 66 Therefore, it is obvious from ( 80) that the delay, tt, between arrival to achieve the cancellation effect is (81) Coincidentally, this is the same as the result for the linear F M array. Thus, the cancellation condition in ( 46 ) applies to the P M array as well. Figure 43 shows the time delay required to achieve the cancellation and Figure 44 shows effect of cancellation on the auto-correlation for the Barker-coded P M signal and cross-correlation for the Golomb-coded P M signal. Figure 43. Time Delay for Cancellation I 1 1 1 1 ) ; 1 1 r 1.5h 1h Figure 44. Cross-correlation at the Chosen Cancellation Angle Simulation of the PM Array signal A simulation of the Barker-coded P M signal is shown to demonstrate beam-forming. The simulation of Golomb-coded P M signal transmission is not generated. Processed results for both types of phase-coded signals are included. We begin by the simulation of a Barker-coded array. Chapter IV. Phase Modulated Signal Array 67 In each of the following interference patterns, the amplitude of the wave is indicated by the level of brightness. Each individual figure is a snapshot of the transmitted signal at different times. The parameters are listed in the following table. The cancellation spacing for 180° is used. Carrier Freq. Spacing Velocity Tuning Ang. Elements Code 3000 Hz 0.14654m 1500m/s 45° 8 [1, 1,-1, 1, 1, 1, 1,-1] Table 12. Simulation Parameters for a P M Array Movie Shown below are 6 frames from one of the complementary Barker codes. -4 3 - 2 - 1 0 1 2 3 4 -4 -3 -2 -1 0 1 2 3 4 x (meter) x (meler) (c) (d) Chapter IV. Phase Modulated Signal Array x (meter) x {meter) (e) (f) Figure 45. Interference Pattern to show Beam-forming in a P M Array (a) Time (T)=0 msec (b) T=6.5e-3 msec (c) T=1.3e-3 msec (d) T=1.95e-3 msec (e) T=2.6e-3 msec (f) T=3.26e-3 msec The simulation clearly shows a energy beam emitting from the center of the array. It should be noted that the 1/ spatial attenuation factor is ignored in order to prevent the high intensity near the center of the array from masking out the results. To obtain zero sidelobes along the tuning angle in order to determined the arrival-time, a second P M signal, with the code [1, 1,-1, 1,-1,-1 ,-1, 1], has to be transmitted. The two received signal are respectively match filtered. The match-filtered results are added to obtain the figure shown in Figure 46 below. Note that the signal is received at a 20m radius with the parameters of Table 12 for the simulation. Figure 47 shows the simulated correlation result for a Golomb-coded P M array. The 29 symbol Golomb code in Table 11 is used with the parameters of Table 12 for the simulation. The signal is received at a 10 m radius rather that 20m because of the limitation imposed by the code length. Both figures use the cancellation spacing. The figures clearly show that the energy is focused at 45° and 315°. The eye-shaped figure in the center of both plots represents angular sidelobes. Because the cancellation spacing is used in the simulation, there are minimal sidelobes inside the eye-shaped boundary. Chapter IV. Phase Modulated Signal Array 69 Figure 46. Processed Signal From Figure 47. Processed Signal From Complementary Barker-coded P M signal Golomb-coded P M Signal The arrival-times are clearly marked in both Figure 46 and Figure 47. In is important to note that as these figures are simulated in an noise free environment, they are only different by a constant factor introduced by the different in peak level of 2L in the Barker-coded P M signal and L - l in Golomb-coded P M signal, where L is the length of the code. Therefore, considering the performance in term of processing requirements in the noise-free simulation, the Golomb-coded P M signal has an advantage over the Barker-coded P M signal. Chapter V. Comparison of the Simulated Correlation Function Plots 70 V. Comparison of the Simulated Correlation Function Plots Methods to calculate the field pattern and the correlation function plots of the time-delayed array have been examined in previous chapters. In this chapter, simulations of correlation function plots for the different array settings are generated so that the performance can be compared. The main lobe in these function plots has been defined by a threshold approach in this thesis for comparing performance quantities such as the main lobe to sidelobe ratio. A s the boundary of the main lobe has to be determined numerically, a numerical comparison approach is chosen for all the quantities, instead of an analytic approach. The effect of the two array parameters, element spacing and number of source elements, is now examined. The effect of the tuning angle is not studied in this chapter because, as in the narrow-band phase-delayed array, the correlation patterns of the time-delayed array for different tuning angles are very similar except where the peak occurs. The concept that the field pattern for a narrow-band array is a window of the underlying sine function still applies in the time-delayed array. However, the underlying function is not a sine and is signal dependent in the time-delayed array case. Other parameters such as bandwidth, duration and carrier frequency are also not examined in this chapter in order to maintain the fairness of the comparison for reasons listed below. Although the duration have been shown to be related to the envelope of the auto-correlation of the F M signal, hence affecting the correlation function of the F M array, the intrinsic envelope of the auto-correlation of the P M signal does not depend on the duration of the P M signal. On the other hand, the carrier frequency of the P M signal expands or compresses the envelope of the auto-correlation of the P M signal while the carrier frequency of the F M signal has no effect on the envelope of the F M auto-correlaion provided the chirp rate and the duration are kept constant. Chapter V. Comparison of the Simulated Correlation Function Plots 71 Thus, the duration and carrier frequency for both signals must be matched for a fair comparison. Since the bandwidth of the P M signal can only be increased by changing the number of cycles that the modulation code modulates, varying the bandwidth of the P M signal changes the modulation scheme and different processing is required to generate the correlation function plots. A fair comparison between the two types of signals is not possible i f different processing schemes are used for P M signals with different bandwidths. To ensure the fairness of this comparison, the duration of the two types of signals are also set to be equal. Furthermore, the bandwidth to carrier frequency ratio is set to one and the same type of processing is applied to both types of signals. Four performance measurements are computed for each of the simulated correlation function for the two types of signals, F M and P M , for comparison. First, a 3 dB angle for each function is computed to show that the beam-width is directly related to element spacing. Second, the main lobe to sidelobe ratio is computed to measure the efficiency. However, it w i l l be shown that the ratio decreases with the number of sources used in both the P M and F M arrays. Third, it w i l l be shown that the amount of sidelobe energy beyond the third sidelobe is minimized i f the cancellation spacing is used for the P M array. Finally, the time-dependent correlation gain wi l l be computed. Equivalence of the Correlation Function for the Barker-coded and Golomb-coded PM signals In the last two chapters, time-delayed arrays utilizing the linear F M signal, the complementary Barker P M and Golomb-coded pseudo-random P M signals have been examined in detail. It has been shown that the processed signal of the time-delayed array can be used to generate a correlation function whose peak location yields an estimate of the arrival-time of the signal. Both the complementary Barker-coded signal and the Golomb-coded signal generate correlation functions with perfect sidelobe cancellation as shown in Figure 46 and Figure 47. The Golomb code suffers from a minor S N R reduction due to the Chapter V. Comparison of the Simulated Correlation Function Plots 72 mismatch between the transmitting and the filtering signals. The amount of signal lost decreases as the length of the code increases (Golomb, 1992). However, as this thesis is considering the correlation function plots produced in a noise-free environment, there is no meaning for this reduction in signal level. Because the two types of P M signal produce the same zero sidelobes correlation after processing, the correlation function plots generated from the time-delayed array with the complementary Barker code array and the Golomb code P M array have the exact same shape. Therefore, even though that the Barker signal needs two separate transmissions to achieve the cancellation while the Golomb signal needs only one, performance measures for the two signal types yield equivalent results. These are the 3-dB bandwidth, main lobe to sidelobe ratio, level of interference and the correlation gain. Therefore, the following section only compares the correlation functions obtained from the linear F M signal and that of the complementary Barker code, as the two P M correlation function plots are considered to be equivalent. Parameter Selection for the Correlation Function Comparison The parameters for the simulated correlations must be chosen in order to obtain a fair comparison between the F M signal and the P M signal. As has been mentioned in Chapter IV, the carrier frequency to bandwidth ratio for the P M modulation scheme is 1. The same ratio is set for the F M signal. This is very important for the F M signal because of the dependence of the correlation function on the carrier frequency, bandwidth and signal duration. The carrier frequencies for both signals are chosen to be 3000 H z and the bandwidth of both signals are chosen to be 3000 Hz . In the F M case, the signal is sweeping from 1500 H z to 4500 Hz . The duration for both signals are chosen to be 9.666 ms which is 29 periods for the P M signal. This number is chosen because of the existence of a Golomb code in this length. However the mismatch lost for the Golomb code signal is ignored and it should be noted that the correlation pattern from Golomb code array, other that a multiplicative factor, is equal to that generated by the Barker-coded P M signal. The velocity of the signal in the simulation assumed to be 1500m/s, which is the speed of sound under Chapter V. Comparison of the Simulated Correlation Function Plots 73 water. The tuning angle has been chosen as 45° and the cancellation angle has been chosen as 180°. To simulate the correlation function plots, the tuning delay and geometric delays are computed from equation ( 1 ) in Chapter H However, the component of the geometric delay that corresponds to outward travel of the wave has been ignored This effectively shifts the peak of correlation function plot to t'=0 and the far-field pattern is obtained. That is, we are using retarded time, which is zero right at the wave-front. Since correlation is a linear function, the correlation of the sum of the transmitted signals equal the sum of the correlation of each signal. A s a result, the correlation function plots can be simulated by summing the appropriately-delayed absolute valued correlation functions for the F M and P M in ( 43 ) and ( 7 0 ) in Chapter HI and IV. The absolute value is required so that the average volume underneath the correlation function plots can be evaluated in order to compute the correlation gain. The functional representation of the correlation function is necessary in order to allow for the adaptive integration of the functions to reduce integration error in computing the performance parameters. Because of the symmetry of the correlation function plots, all the performance measures are computed for 1/4 of the angle time domain. That is, all correlation function plots generated have angles ranging from 0° to 180° and time greater than zero. For each of the two signal types, two sets of correlation function simulations are generated for a tuning angle of 45°. The first set consists of 5 simulations which has eight sources and an element spacing that runs from 0.1 Xc to 0.5 Xc, in steps of 0.1 A,c. The second set of 5 simulations has a constant spacing of 0.29 Xc, which is the cancellation spacing for 180°, and has four to twelve sources in steps of two. Figure 48 shows the correlation results for the F M array simulation with a fixed number of sources with variable array-element spacing. Figure 49 is the processed result of the F M array simulation with a fixed spacing and a variable number of sources. Chapter V. Comparison of the Simulated Correlation Function Plots 74 (c) (d) (e) Figure 48. Correlation Function Plot of an F M Array with Eight Sources and Variable Element Spacing (a) with 0.1 A c Spacing (b) with 0.2 A c Spacing (c) with 0.3 A c Spacing (d) with 0.4 A c Spacing (e) with 0.5 A c Spacing 7 Chapter V. Comparison of the Simulated Correlation Function Plots 75 (e) Figure 49. Correlation Function Plot of an F M Array with a Fixed Cancellation Spacing of 0.29A t and a Variable Number of Sources (a) with Four Sources (b) with Six Sources (c) with Eight Sources (d) with Ten Sources (e) with Twelve Sources Chapter V. Comparison of the Simulated Correlation Function Plots 76 The sidelobes of the correlation function plots for the F M signal actually extend beyond the boundary of the figures in the time axis. The correlation function plots included are truncated so the leading part of the correlation function plot can be shown more clearly. Figure 48 (c) is a simulation of eight sources with an element spacing of 0.3 Xc which is very close to the 0.29 Xc of Figure 49 (c) in which the cancellation angle is 180°. Therefore, Figure 48 (c) has very minimal sidelobes at off-tuning angles. If the cancellation angle is set to 122.88° and 107.03°, the corresponding spacing computed is 0.4 and 0.5 Xc, respectively. Figure 48 (d) and Figure 48 (e) are simulated with such spacings and it is clearly visible that there are minimal sidelobes at those angles. From the examination of Figure 49, it is obvious that the cancellation spacing provides a fair compromise between beam-width and sidelobes at off-tuning angles. Figure 49 shows that the amplitudes of the peaks at the tuning angle in the figures increases linearly as the number of sources in the array increases. Figure 50 presents the correlation results for the P M array simulation with a fixed number of sources and a variable spacing. Figure 51 is the processed results of the P M array simulation with a fixed spacing and a varying number of sources. Chapter V. Comparison of the Simulated Correlation Function Plots 77 (a) (b) (c) (d) (e) Figure 50. Correlation Function Plot of a P M Array with Eight Sources and a Variable Element Spacing (a) with 0.1 A c Spacing (b) with 0.2 A c Spacing (c) with 0.3 Xc Spacing (d) with 0.4 Xc Spacing (e) with 0.5 Xc Spacing Chapter V. Comparison of the Simulated Correlation Function Plots 78 (e) Figure 51. Correlation Function Plot of a P M Array with Fixed Cancellation Spacing of 0.29XC and a Variable Number of Sources (a) with Four Sources (b) with Six Sources (c) with Eight Sources (d) with Ten Sources (e)with Twelve Sources Chapter V. Comparison of the Simulated Correlation Function Plots 79 Again, the P M correlation function plots exhibit behavior similar to the F M results in terms of the cancellation behavior. Figure 50 (c) is a simulation of eight sources with an element spacing of 0.3 kc which is very close to the 0.29 Xc of Figure 51 (c) in which the cancellation angle is 180°. Therefore, Figure 50 (c) has very minimal sidelobes at the off-tuning angles. If the cancellation angle is set to 122.88° and 107.03°, the corresponding spacings are 0.4 and 0.5 Xc. Figure 50 (d) and Figure 50 (e) are simulated with such spacing and it is clearly visible that there are minimal sidelobes at those angles. From an examination of Figure 51, it is obvious that the cancellation spacing again provides a fair compromise between beam-width and sidelobes at off-tuning angles. Figure 51 shows that the amplitudes of peaks at the tuning angle in the figures increase linearly as the number of sources in the array increases. Comparison Performance of the arrival-time estimation of the wide-band array is solely determined by the performance of its correlation function plots. From the visual comparison of the correlation function plots, it is clear that the P M correlation function plots are much cleaner than the F M . In both cases, the beam-width decreases when the spacing increases, with additional sidelobes appearing. In the following section, the performances of the simulated correlation function plot are computed and compared in terms of the beam-width, beam efficiency, sidelobe level and correlation gain. Figure 52 and Figure 53 show the 3 dB beam-width in angle at the fixed geometrical arrival-time of the 3-dimensional correlation function plots generated in the section above. Since the behavior of the cross-correlation function plot at the tuning angle is equivalent to the auto-correlation of the linear F M or Barker-coded P M signal, the 3 dB beam-width in the time axis is not included here. Chapter V. Comparison of the Simulated Correlation Function Plots 80 Element Spacing Number of Source Figure 52. 3-dB Beam-width as a Function Figure 53. 3-dB Beam-Width as a Function of Element Spacing of the Number of Sources in an Array Figure 52 and Figure 53 show that both arrays perform very similarly in terms of the beam-width. To understand why the P M array has a wider 3-dB beam width, we recall that the auto-correlation of the F M signal is a product of the carrier and a envelope function, which is defined in ( 43 ). The auto-correlation of the P M signal is a scaled auto-correlation of a period of the carrier, which is computed in ( 7 0 ) . It can be easily shown that for the same carrier frequency, the auto-correlation of the P M signal in ( 70 ) has a wider 3-dB width the F M one in (43 ). Because, the correlation function plots for the F M and P M arrays are composed fo the time-shifted auto-correlation function in (43 ) and ( 7 0 ) , the wider auto-correlation 3-dB width in the P M signal results in a wider 3-dB beam width in P M array. As mentioned in Chapter n, for a particular tuning angle y/, there are 2 beams occurring at y/ and -y/. Therefore, it is possible for the 2 beams to joint up and appear as a single beam i f each of the two beams do not decay fast enough across the receiver angles. This is the case in Figure 48 (a), Figure 49 (a), Figure 50 (a), and Figure 50 (b), Figure 51 (a). A s a result, the beam width appears much wider in the measurement, which is the case for the leading portion of both curves in Figure 52 and Figure 53. Both figures show a gradual drop in the 3-dB beam-width. This result is expected as the level of focusing should increase when the Chapter V. Comparison of the Simulated Correlation Function Plots 81 spacing of the source elements are increased or when the number of sources used in the transmission is increased. Analogous to the beam efficiency of the radiation plot in a narrow-band array, the efficiency of the correlation function plot is measured in terms of the main lobe to sidelobe ratio of the correlation functions. However, there is a problem for the definition of the main lobe. Unlike the narrow-band array where the main lobe and sidelobes are separated definitely by zero crossings or nulls, the correlation function plots of the wide-band array do not behave like this, as nulls do not exist at a constant angle. Many approaches have been tested to define the lobe boundary and a threshold approach has been chosen. The threshold is defined by the maximum value across all angles at the time at t '= l/4fc for each correlation function plot, where, fc is the carrier frequency. The time at t' = l /4 / c correspond to the first zero crossing of the correlation function at the tuning angle for an F M array. Such a threshold ensures that there is a boundary close to the main lobe. Figure 54 and Figure 55 show the main lobe to sidelobe ratio. — Mainlobe to Sidelobe ratio of PM Mainlobe to Sidelobe ratio of FM 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Element Spacing Figure 54. Ma in lobe to Sidelobe Ratio as a Function of Element Spacing ( Eight Sources ) i 4 L — Mainlobe to Sidelobe ratio of PM Mainlobe to Sidelobe ratio of FM i i Number of Source Figure 55. Main lobe to Sidelobe Ratio as a Function of the Number of Sources The efficiency decreases rapidly as the element spacing increases, while adding to the number of source elements has little effect on the efficiency for both signals. As shown in Chapter V. Comparison of the Simulated Correlation Function Plots 82 the figures, the efficiency of the P M array is almost triple that of the F M array, clearly showing superiority of the P M array. Since most of the volume under the correlation function plot is included in the main lobe and the first sidelobes on each side of the time axis, this correlation segment is useful in determining the arrival-time of the signal from the array, and is defined to be the "main cloud" of the plot. The rest of the volume is considered to be unwanted interference. The boundary of "main cloud" is not clear as there is no zero-crossing point at some angle. For the reason of convenient measurement, a rectangular bound for the "main cloud" is defined. The boundaries along time axis are t=0, t=l/fc, and the boundaries along the angle axis are defined by the two lines where the beam width decays by 1 Neper from the peak at t '= 0, as shown in Figure 56 below. Figure 56. Boundary Definition of the "Main Cloud" To show the effect of the cancellation spacing, the volume underneath the correlation function plot outside the "main cloud", which represents the level of the unwanted interference, is plotted in the following figures. Chapter V. Comparison of the Simulated Correlation Function Plots 83 Element Spacing (lambda) Number of Source Figure 57. Interference for the Array as a Figure 58. Interference for the Array as a Function of Element Spacing with Eight Function of Source Element for 0.29 A c Sources Spacing Since the cancellation spacing for the simulation is approximately 0.29 A c , Figure 57 clearly shows that the optimal spacing shown in ( 46 ) provides for minimal interference for the P M case. For the F M case, the minimum does not occur at the cancellation spacing at 0.29 A c . To understand why, let us examine the cancellation spacing in detail. The cancellation spacing is obtaining by adjusting the time delay between the signals making up the correlation function plot. The peak of a signal is aligned to the trough of an adjacent signal to produce a lower overall sidelobe. However, unlike the correlation of the P M signal, the correlation of the F M signal is much longer. Hence, aligning the peak and trough is not good enough as the contribution from the rest of the signal is not considered. However, the graph clearly shows that the delay produced by the cancellation spacing is a very good first approximation. Again, the P M array is superior as it is has a lower interference level in general. It should be noted that the interference level of the P M array signal seems to be quite insensitive to the number of sources utilized in the array. Finally, the correlation directivity of the F M and P M arrays can be defined in a similar fashion as for the narrow-band array from the correlation function plots denoted by \Rdt\ which are shown in Figure 48 to Figure 51. The normalized correlation function Chapter V. Comparison of the Simulated Correlation Function Plots 84 \Rn,et(9,t)\ is obtained by dividing the angle and time-dependent correlation function \Rg,(6,f)\ by is maximum value, l/?&(0,r)m a xl. Therefore we have \RA6,t)\ I/? (0,^)1= ft . ( 8 2 ) \Ra{e,t)mJ The directivity D of the array is given by the ratio of the peak correlation value to the average value of the correlation function plot over all times and angles. The average volume per unit time and angle of the correlation function plot can be founded by '7K volavg = (1/2*17-)J \\Rm{d,t)\dedt. ( 83 ) 0 0 Because of the time shift misalignment effect explained in Chapter TJ, the effective duration of the array would be different for each tuning angle and element spacing. However, for simplicity, the transmitted signal duration is used instead. Then, the correlation directivity is defined as DJRe,(e,t)mj = _L vol °° (y27tr)j j\Rn#(0,t)\dedt 0 0 The correlation directivity for the simulations in Figure 48 to Figure 51 are generated according to ( 8 4 ) . Figure 59 and Figure 60 below show the directivity as a function of element spacing with eight sources and the directivity as a function of the number of sources with the cancellation spacing of 0.29 Xc. Chapter V. Comparison of the Simulated Correlation Function Plots 85 0.25 0.3 0.35 Source Separation (lambda) Figure 59. Correlation Directivity as a Function of Element Spacing with Eight Sources i — P M : : — F M : Number of Sources 10 11 12 Figure 60. Correlation Directivity as a Function of the Number of Sources with 0.29Xc Spacing A high level of directivity is obtained due to the signal processing applied to the signal. Therefore, comparing this directivity to the conventional directivity in a narrow-band array signal would not be fair. The maximum directivity for eight sources should occur at a source separation of about 0.40 Xc for both the F M and P M arrays instead of the cancellation spacing of 0.29 Xc. However, the cancellation spacing is a fairly good first approximation for finding the spacing for maximum gain. The maximum directivity seems to be a linear function of the number of sources used. For a time-dependent correlation gain of the array, the numerator, \Ret(6,i)max\, of the ( 84 ) is replaced with a time-dependent maximum function, \Rm,max(t)\, where \Rot,,nax(t)\ is local maximum of the normalized correlation function at each time across all angles. Then, ( 84 ) becomes D(t): \R, 6t, max (r)l vol (85) avg Chapter V. Comparison of the Simulated Correlation Function Plots 86 In ( 85 ) the time-dependent correlation directivity is computed by considering the maximum absolute value of the correlation at each time, for all angles. The quantity volavg is the same as that defined in ( 83 ). From the simulations presented in Figure 48 to Figure 51, the time-dependent directivities are calculated from ( 85 ). The results are shown in Figure 61 below. 810 •0 .5 w a v e l e n g t h . P M •:.\ 'i :n *i — 0.4 w a v e l e n g t h . P M - • - 0 . 3 w a v e l e n g t h . P M 0.2 wave teng th ;PM 0.1 w a v e l e n g t h . P M Re ta rded T i m e x- » • 12 sources.FM if .A •- - 10 sources,FM : — fl sources.FM ft ;'••••> :•••• 6sources,FM 1 V VL . li *, Vfc j 4 sources,FM If] YK A ^ _ Retarded Time (b) o = 1 5 0 0 ! (c) Reta rded T i m e (d) I - 12 sou rces .PM j i : — 10 sources,PM -1'. • T : — 8 sources,PM V' p H 11 <'. ; 6 sources,PM I 4 sources,PM a N * ^ ~ -Figure 61. Time-Dependent Correlation Directivity (a) as a Function of Element Spacing with Eight Sources, (FM) (b) as a Function of the Number of Sources with 0.29 Xc spacing, (FM) (c) as Function of Element Spacing with Eight Sources, (PM) (d) as a Function of the Number of Sources with 0.29 Xc spacing, (PM) Chapter V. Comparison of the Simulated Correlation Function Plots 87 The directivity plot for the F M signal actually extends beyond what is being shown on the graph while the P M directivity plot drops to zero fairly quickly. It is for that reason that P M signal has a much lower average in (83 ) compared to the F M one. Hence, the directivity for F M signal is much lower than that for the P M signal. Since the local maximum is picked at each time when the directivity plot is computed, the angle at which the maximum occurs might be different than the tuning angle. It is for that reason that a high directivity in the later part of the plot is not desirable. Therefore, the P M signal has a much better performance than the F M case because the directivity plot approaches zero rather quickly. Other Considerations The computational and storage requirements for the 3 types of signals should also be compared. The Golomb code is most efficient in term of computing and storage requirements as it utilizes circular correlation processing.. The complementary Barker code is not as efficient because 2 separate processing steps are required to achieve the perfect sidelobe cancellation. Finally it should be noted that P M signals suffer from some disadvantages. For the Golomb-coded P M signal, because of the circular correlation processing used, the range of detection is limited by the duration of the signal. For the Barker code P M sequence, two separate transmissions with a transmission gap are required. Furthermore, in order to achieve perfect sidelobe cancellation, the transmission gap must be greater than the time for a return trip of the transmitted signal at the maximum range. Such a requirement might be unacceptable for some applications. It should also be noted that the P M array has a leakage of energy in transmission as shown in Figure 29 where as the F M array does not suffer from this problem i f enough sources are used. However, this leakage does not result in worse sidelobe performance. In fact, the P M array out-performs the F M array in terms of sidelobe performance. Therefore, the P M array has an advantage when the energy leakage does not cause any application-specific side-effects. Chapter VI. Array Experiment 88 VI. Array Experiment In Chapters HI and IV, we have examined some of the signals that can be used in the phased-array for travel-time measurement. This chapter describes the array experiment with non-ideal radiating elements without an extensive correction algorithm. It is important to test the array under such conditions because electromechanical transducers in most applications are less than ideal devices. Two good examples are the submersible sonar element and the vibrating truck used in oi l exploration. These transducers are difficult to adjust and are non-linear to a certain degree. If it could be shown that the array works with such non-ideal radiating elements, the number of applications possible for the array would be greatly increased. Other expected sources of error for the array include, sampling time and the AID, D / A conversion error, mismatch between the radiating or receiving elements. In addition, the multi-channel output amplifier and receiver pre-amplifier may exhibit gain or phase error. These errors are typical in real operating systems. With these possible sources of error, an experiment is required to verify the practicality of the array system. Once the simulated response of the array is verified by the experimental setup, the setup can then be calibrated to serve as a test-bed for a new signal generation scheme or serve as a verification tool for more complex simulations. Such simulations are essential to application development such as the array response of an inhomogeneous medium. The behavior of the array is tested experimentally using acoustic speakers, which are typical electro-mechanical transducers. The signals are generated digitally then converted and transmitted by audio speakers. The response of the array is recorded simultaneously at seven different angles due to the hardware limitations at the required sampling speed. Recorded signals are then processed and compared with simulated results. In the following sections, the components of the experiment, parameters of the signals and processing involved are presented. These are followed by the results of the experiment. Chapter VI. Array Experiment 89 Components of Experiment Three are 3 major components in the experimental setup. The first component of the setup is a 486 computer. The 486 computer is mainly responsible for data generation and processing. The second component consists of a 386 computer data acquisition system. The third component of the experiment consists of the external devices attached to the sampling computer. The block diagram detailing the interconnection of the components in the experimental configuration is shown in Figure 62 below. The role of each component is explained in more detail in the section following the diagram. Processing Computer Sampling Computer External Hardware Ethernet Intel 80486 C P U P C E I S A B U S Intel 80386 C P U T M S 3 2 0 C 3 0 D S P Card 16 Channel Output Card U 32 Channel Input Card D S P L I N K 32bit B U S T o 4 Channel Output Power A m p . Recording Structure 4 T o 8 Channel Microphone Pre -Amp. Figure 62. Block Diagram for the Experimental Setup The 486 computer is responsible for signal data generation, recorded signal processing and file-serving a data drive mapped to the 386 computer. Hence, data collected by the 386 computer can be transferred directly to the 486 computer. The 386 sampling computer is the host for the TMS320C30-based D S P system. A n output card and a sampling card are connected to the D S P system board via a proprietary 32-bit DSP-l ink bus. The four array signals are generated by the output board and the response of the array is recorded by the sampling card. The sampling rate is set at 50 p:sec, which is the sampling limit for concurrent four channel D \ A conversion and seven channel A \ D Chapter VI. Array Experiment 90 conversion. The D S P card system also provides analog filtering before the A \ D conversion to avoid aliasing in sampling and after the D \ A conversion to smooth out sharp conversion edges. External components include seven omni-directional condenser microphones and four units of an 8-ohm 0.25Watt speaker, the four-channel speaker amplifier, the eight-channel microphone pre-amplifier and the recording structure. Circuit diagrams for the two custom-designed single power supply amplifiers are included in the appendix. The four-channel output amplifier takes the output of the D \ A card of ± 8.192 Volts and converts the signal to a ± 4 Volts signal. The amplifier is required to provide enough current and individual gain control for the speakers. To avoid cross-talk between the different microphone input channels, each of the eight channels of the microphone pre-amplifier is isolated with a 12 Vol t regulator (Motorola part number T7812CT). This is particularly important as the condenser microphones required a D C bias. The D C bias requirement makes the amplifier particularly susceptible to cross-talk between channels, as any unwanted signal can leak through the bias resistor i f the power supplied to each amplifier is not isolated properly. Two levels of gain control are provided with each channel of the microphone pre-amplifier. The overall gain can be controlled by an adjustable potentiometer or by replacing the gain-controlling resistor to create signal levels of ±2.5 Volts from the 100 mi l l iVol t input signals. The potentiometers are necessary for compensating the microphone output-levels as they differ even i f each microphone is supplied with the same bias current. The removable resistors are used for quick adjustment of the overall gain. Hardware calibration is required, as the amplitude response differs for the microphones and speakes. Furthermore, the D C offset for the different input channels, inherent for A \ D conversion, should be removed by the software before signal processing is applied. The D C offset levels for each channel can be determined by taking the average of Chapter VI. Array Experiment 91 the recorded signals for each channel with the microphones replaced by 1 KQ. terminating resistors. In order to record and analyze the response of the time-delayed phased-array without multipath interference, a structure, as shown in Figure 63, is created. The structure consists of a semi-circular arch of inner radius 3'8" raised by wooden doweling to a height of 3'6" on a 4' by 8' sheet of plywood. Reflection Distance • Receivers Figure 63. Recording Structure for the Experiment The condenser microphones are placed on top of the arch at arbitrary angular intervals to record the sound wave generated by the acoustic array. The source array is placed at the center of the semi-circular arch without coupling to the base sheet. The travelling distance from the array to any one of the receivers through reflection from the base is determined by the method of images to be 7.9 feet. The reflection distance is shown in Figure 63. This distance is the primary limitation before multipath interference occurs. The maximum duration of a signal without interference is determined by Chapter VI. Array Experiment 92 Lenght of reflective path - radius of arch velocity of sound in air (86) 7.9 ft - 3.666ft in air Assuming the velocity of a sound wave in air is 1000 ft per second, the maximum signal length is approximately 4 ms. To ensure that the reflected signal from the objects placed next to the recording structure do not arrive within the 4 ms recording period, the structure should be placed in an area with 2 feet of space in the front and on both sides and an empty space of at least 3.5 feet at the back as shown in Figure 64 below : Experimental Considerations and Parameters The carrier frequency of all the signals to be tested is set to 3000 H z and the bandwidth of each signal is also set to 3000 Hz . The effects of sampling rate, characteristics of the speaker and the microphone and the receiver distance from the array in terms of the wavelength of the carrier, Xc, have been considered when the frequencies are selected. To record a data sample with reasonable frequency resolution, over-sampling is not an uncommon practice. As the highest frequency of the experiment is 4.5 kHz , the array signal is being sampled at a rate of 20 kHz . Thus, the input signals have an over-sampling ratio of about two at the highest frequency. Also with this frequency setting, the receiver is at about 2 feet Figure 64. Space Required by the Recording Structure Chapter VI. Array Experiment 93 ten wavelengths away from the array which ensures that the far-field characteristic is observed. Although a higher carrier frequency effectively increases the distance, in terms of XC, between the array and the receiver and hence the signal recorded can better approximate the far field behavior of the array, the frequency response of the speaker and the sampling rate limit the experimental carrier frequency. The element separation of the array is set to be 6 cm which is 0.5AXC or about 0.8 of the wavelength at the highest frequency. This is the lowest possible distance between the elements, as the diameter of the speaker is 5.7 cm. The microphone receivers are placed at 30°, 45°, 60°, 90°, 120°, 135° and 150° as shown in Figure 63. Because of the radiation characteristics of the speakers, the signal level is very low at 0° and 180°. The low signal level results in an extremely low S N R and recording at those two angles is not feasible. Therefore, instead of 30° equal angular placement of the receivers, the placement scheme above is selected. A l l three types of signals described in Chapter HI and IV are tested in the experiment. Each type of signal is tested with two different tuning angles, which are 90° and 135°. The chirp signal is transmitted from 1500 Hz to 4500 Hz . The code for the Barker-coded P M signal and the Golomb-coded P M signal are listed as follows : Complementary P M code 1 1, 1 , - 1 , 1, 1 1, 1 , -1 Complementary P M code 2 1, 1 , - 1 , 1 , -1 - 1 , - 1 , 1 Golomb pseudo Noise Tx code 1, 1 , - 1 , 1, 1 - 1 , - 1 , - 1 , - 1 , 1 1 , - 1 , 1 Golomb pseudo Noise Rx code - 1 , 1 , - 1 , 1, 1 - 1 , - 1 , - 1 , - 1 , 1 1 , - 1 , 1 Table 13. The Modulation Codes Used in the Experiment For the chirp signal and the complementary P M signal, 600 data points per channel are collected at 50 (xsec sampling. For the Golomb pseudo-random array experiment, the sampling rate has to be set in such a way that an integer number of samples defines the signal duration. Since there are 13 periods of a sinusoid at 3000 Hz , the sampling frequency has to Chapter VI. Array Experiment 94 be adjusted to 49.8 (isec from 50 (isec so that there is an integer number of samples for the Golomb-coded P M signal. A n integer number of samples is required for the circularization of the input signals. Received Signal Processing Because of the transducer characteristics, the received signal is not simply a scaled version of the transmitted signal. For example, a typical transmitted chirp and a received chirp are shown in Figure 65 and Figure 66. Sample Sample Figure 65. Typical Transmitted Chirp Figure 66. Typical Received Chirp Assuming the system is linear, the measured response can be expressed as the convolution of the transmitted signal and the system transfer function. The equation is expressed as follows in the time domain as • ( 8 7 ) In ( 87 ) sm is the measured response, st is the system transfer function, ts is the transmitted signal and denotes convolution. In order to estimate the transmitted signal, st, from the measured response, sm, digital deconvolution is applied. The approximated inverse system transfer function, S ~x, required for the deconvolution is obtained by Chapter VI. Array Experiment 95 (88) In ( 88 ) Smi and TS! are the time-corrected, frequency domain versions of the measured impulse response and transmitted impulse, respectively. The estimate of the signals are denoted by a ~ below. Since the experimental structure shown in Figure 63 is only capable of recording a signal free of multipath interference for about 4.0 msec after the initial arrival of the transmitted impulse, only the section free of multipath interference is used for the inverse filter calculation. The frequency domain estimate, TS, of the transmitted signal, ts , from the array is therefore given by In ( 89) Sm, TS, and St are the transforms from sm, ts and st in (87 ). Therefore, digital deconvolution is an additional processing step required for all of the three types of signals used in the experiment. This of course is followed by correlation processing. If a single deconvolution operator is used for all the different channels, special care must be used to scale the signal samples recorded at different angles to account for the radiation amplitude differences at different angles. For each of the recorded array signals, the estimated transmitted signal TX, is correlated with its zero-lag reference signal and compared with the simulated result. For the chirp signal, deconvolution and auto-correlation can be applied together in the frequency domain before the inverse transform. Thus we obtain Ts = Sm • St - i = TS-S,-S;\ (89) mchirp •S , - ' - con j (C r e / ) . (90) Chapter VI. Array Experiment 96 In ( 90 ) Cres is the estimated transmitted chirp, Smcnirp is the measured chirp and Cref is the zero-lag reference chirp signal in frequency domain. As the transforms of the reference and deconvolution filters are stored in the signal processor, the time-domain recorded chirp response, smchriP, is transformed, multiplied with the stored deconvolution and auto-correlation filter and then inverse transformed. Therefore, only 1 transform and 1 inverse transform is required to obtain the time domain estimated response cres. The implementation of the processing is shown below. We note that zero padding is necessary for computing the F F T of the recorded chirp and its reference to avoid time-aliasing in the aperiodic cross-correlation. Therefore, cres is given by c„ = ifft(fft(zeropad(sm c h i r p)) • conj(C r e / )•£,-'). ( 91) For the Barker-coded P M signal, instead of applying the deconvolution directly to each of the two complementary signals, the processing can be simplified by summing the two correlated complementary Barker signal before applying the deconvolution, as shown in the equation below. Thus, the estimated response Bns in frequency domain is given by Bm=(s -conj(5 r e f) + Sc -conj(B c )) • S,']. (92) r e s \ mBarker J v reJ ' mBarker "I ) ' In ( 9 2 ) S m B a r k e r and S m B a r k e r are the measured Barker signal and its complement in the frequency domain, Bref and Bcref are the zero-lag references for the Barker signal and its complement in the frequency domain. To implement ( 92 ) by the FFT , the recorded Barker signals and its complement in the time domain, denoted b y s m B a r k e r and s m B a r k e r , are transformed and cross-correlated with their respective reference signals, Bref and Bcref , which are stored in the computer. The results are added before the deconvolution. Therefore, 2 Chapter VI. Array Experiment 97 separate transforms and 1 inverse transform are required for the processing of the complementary Barker signal as shown in ( 93 ). We note that zero padding is necessary for computing the F F T of the recorded Barker signal, its complement and their references to avoid time-aliasing in the aperiodic cross-correlation. Thus, the correlation response, bres, in the time domain is given by bres = ifft((fft(zeropad( W e r ) ) • conj(5 r e / ) + ff t(zeropad(^ B a r k e r ) • conJCB',)) • S,"'). ( 93 ) For the Golomb pseudo-random signal, the three processing steps required are deconvolution, circularization and circular cross-correlation. The steps are listed below : g^ i f f t f f f tCzeropadC^)-^- 1 ) ) I f = c i r ( £ ) ' (94) gZ = ifft(fft(gf )-conj(G r e / )) In ( 94 ) gm is the measured signal and gs is the estimate of the transmitted Golomb code signal. The quantity g"r is the circularization result of gs. Note that in the circularization of gx, it is cut into sections of length equal to the duration of the transmitted Golomb-coded signal stored in the computer. The sections are summed to obtain the periodic signal g"r. In order to limit the noise in the system, only the first 2 periods are used. This is done since the later periods contain deconvolution noise. The quantity g"ers is the estimated response computed by circular cross-correlation. We note that zero-padding is not necessary for computing g"Js, as circular cross-correlation is required. The quantity Gref is the transform of the P M filter signal modulated by the Golomb filter code without zero-padding. Because of the circularization required, the aperiodic deconvolution must be done first. This is followed by period cross-correlation. As a result, two sets of forward and inverse transforms are required to produce the response for the Golomb-coded signal. Chapter VI. Array Experiment 98 Results Experiments are performed for the three different signals : linear F M signal, complementary Barker-coded and Golomb-coded P M signal for the parameters discussed in the earlier section in page 92. The processed results are shown together with the simulations in the following figures in the later part of this section. The experimental results show a little distortion and oscillation after the arrival of the main energy denoted by the peak. Such distortion and oscillation can be explained by the imperfect deconvolution operator. Other than that, the results match extremely well with the simulated plots. In most cases, even the signatures of the correlation match. Because the diameter of the speakers used is 0.52 Xc and the cancellation spacing is 0.29 Xc, an experiment using the cancellation spacing could not be conducted. Thus, the simulation and experiment were performed at a spacing of 0.54 Xc, with Xc being the wavelength of the carrier. The good match between the experimental and the simulated results for other spacings used in the experiment imply that the cancellation spacing wi l l work as shown in the simulations in Figure 49 and Figure 51 in Chapter V . From the experiment, it is found that an individual deconvolution operator for each channel is not required. The deconvolution operator generated with data recorded from the middle channel at 90° works for all the other channels. This is possibly due to the radiation characteristics of the microphone and speaker used. As the main concern of this thesis is not the response of the transducers, no further investigation of this was conducted. However, it is noted that the response from the middle channel has a slightly wider bandwidth. It is also observed that the correlation signature match is better in the two speaker source experiment. The results of the two-source experiments are not included because they show the same characteristics as the four-source experiment except for a lower oscillation amplitude after the peak. The better match for the two-source experiment can be attributed to a larger source of error in the four-source experiment. Possible errors include source placement error and Chapter VI. Array Experiment 99 response error as the speakers can only be placed with an error of one millimeter. Furthermore, the responses of speakers used were not calibrated. Figure 67 and Figure 68 show the results of the chirp experiment and the simulation for 90° tuning. Figure 69 and Figure 70 are the results for 135°. The little wavelet at the end of Figure 69 accounts for the reflected arrival from the base of the recording structure. Figure 71 and Figure 72 shows the results for the complementary P M experiment and simulation for 90°, respectively. Figure 73 and Figure 74 are the results for 135°. The results clearly show the zero sidelobe properties of the complementary P M signal in the leading edge of the main correlation lobe, representing the arrival-time. The oscillations at the trailing edge are caused by the imperfect deconvolution. The complementary P M results of Figure 71 and Figure 73 clearly show the advantage over the chirp results in Figure 67 and Figure 69. The advantage should be more visible i f the cancellation spacing is deployed. Again, the reflection from the base of the recording structure can be easily identified. Figure 75 and Figure 76 are experimental and simulation results for the array using the Golomb pseudo-random code for the tuning angle of 90°. Figure 77 and Figure 78 are the results using the same code for 135° tuning. The results show a lower amplitude when compared with the complementary P M code because of the mismatch between transmitted code and filter code and a shorter total transmitting duration. For the Barker-coded signals, two sequences of eight digits are transmitted while the Golomb code utilizes a single sequence of thirteen digits. Even with the lower transmitted energy and S N R loss due to the mismatch between the transmit and filter signals, the Golomb code does not suffer from extensive distortion and noise problems. Again, the zero sidelobe property of the code is clearly shown in the experimental results. However, because of the circular convolution used in processing the signal, the reflection from the base board is masked out by the main arrival. Furthermore, the leading part of the correlation function plots from the Golomb-coded signal experiment is more noisy than the correlation function plots from the other signals. This is because the correlation function plot is actually a periodic signal. Noise introduced by the imperfect Chapter VI. Array Experiment 100 deconvolution wraps around to the front of the correlation function plot. Finally, it is noted that the Golomb-coded P M signal experimental result for 135° tuning appears better than that of 90°. As the shape of the noise at the leading part of the plot appears quite similar at different receiving angles and we have used only one deconvolution function all the receiver angles, it is suspected that the noise is caused by the imperfect deconvolution function. Since it is not possible to obtain a perfect deconvolution function and using different deconvolution functions for different signals would invalidate the comparison of the experimental results, the noisy 90°-tuned Golomb-coded array result is included with all the other results obtained by using the same deconvolution function. Chapter VI. Array Experiment 1000 o -1000 W W -0 2 4 6 1000 0 -1000 0 2 4 6 x 10 x 10 chirp response for channel 6(45deg) 1000 0 -1000 0 2 4 6 x 10 chirp response for channel 2(135deg) 1000 0 -1000 0 2 4 6 x 10 chirp response for channel 5(60deg) 1000 0 -1000 0 2 4 6 x 10" chirp response for channel 1 (150deg) 1000 0 1000 0 2 4 6 x 10 chirp response for channel 4(90deg) 1000 0 -1000 n 9 A R Figure 67. Experimental F M Array Response for 90° Tuning Chapter VI. Array Experiment 102 Simulation at 30 deg 100 0 -100 0 x 10"' Simulation at 120 deg 100 0 -100 . . A A A ,_ 0 x 10 ' 100 0 -100 0 Simulation at 45 deg 1 1 - A /\ " , . T ^ ^ V V V . x 10"' 100 0 -100 0 Simulation at 60 deg 1 p . . - y\ A A A . . x 10 ' 100 0 -100 Simulation at 135 deg •. • V v v : x 10 ' 100 0 -100 0 Simulation at 150 deg I 1 1 A A x 10 ' Figure 68. Simulation of the F M Array Response for 90° Tuning er VI. Array Experiment chirp response for channel 7(30deg) 2000 -2000 chirp response for channel 3(120deg) 2000 -2000 x 10 ' x 10 ' chirp response for channel 6(45deg) chirp response for channel 2(135deg) 2000 -2000 2000 -2000 x 10"' x 10"' 2000 chirp response for channel 5(60deg) chirp response for channel 1 (150deg) 2000 F -2000 0 2 4 6 x 10"' -2000 0 2 4 6 x 10"' chirp response for channel 4(90deg) 2000 -2000 0 2 4 6 x 10 ' Figure 69. Experimental F M Array Response for 135° Tuning Chapter VI. Array Experiment 104 Simulation at 90 deg 1 1 >———-x A A /-— 0 2 4 6 x10" 3 Figure 70. Simulation of the F M Array Response for 135° Tuning Chapter VI. Array Experiment P M response for channel 7(30deg) 1000 0 -1000 0 2 4 6 x 10 ' P M response for channel 3(120deg) x 10"' P M response for channel 6(45deg) 1000 0 -1000 0 2 4 6 x 10"' P M response for channel 2(135deg) 1000 0 -1000 0 2 4 6 x 10 ' P M response for channel 5(60deg) 1000 0 -1000 0 2 4 6 x 10 ' P M response for channel 1(150deg) 1000 0 -1000 0 2 4 6 x 10 ' P M response for channel 4(90deg) 1000 0 -1000 0 2 4 6 x 10"' Figure 71. Experimental Complementary P M Array Response for 90° Tuning Chapter VI. Array Experiment 200 0 -200 0 Simulation at 30 deg x 10"' 200 0 -200 Simulation at 120 deg V V x 10 ' 200 0 -200 0 Simulation at 45 deg x 10"' 200 0 -200 0 Simulation at 135 deg 1 I i i V V x 10 ' 200 0 -200 0 Simulation at 60 deg V V x 10"' 200 0 -200 0 Simulation at 150 deg -1 r— x 10 ' 200 0 -200 Simulation at 90 deg 0 2 4 6 x 10 ' Figure 72. Simulation of the Complementary P M Array Response for 90° Tuning Chapter VI. Array Experiment P M response for channel 7(30deg) P M response for channel 3(120deg) 1000 -1000 1 1 1 1000 1 1 1 *>•—~ . ^-~^fyU^A/\^Ayv\AA«vv.—j"*v°v n U 1 ^ 1/ : -1000 0 2 4 6 x 10"' 0 2 4 6 x 10 ' P M response for channel 6(45deg) 1000 -1000 0 2 4 6 x 10 ' P M response for channel 2(135deg) 1000 0 -1000 0 2 4 6 x 10 ' P M response for channel 5(60deg) 1000 0 -1000 0 2 4 6 x 10 ' P M response for channel 1(150deg) 1000 0 -1000 I 1 r -0 2 4 6 x 10 ' P M response for channel 4(90deg) 1000 0 -1000 0 2 4 6 x 10 ' Figure 73. Experimental Complementary P M Array Response for 135° Tuning Chapter VI. Array Experiment Simulation at 30 deg 200 0 -200 0 2 4 6 x 10" Simulation at 120 deg 200 0 -200 0 2 4 6 x 10 ' Simulation at 45 deg 200 0 -200 0 2 4 6 x 10 ' Simulation at 135 deg 200 0 -200 0 2 4 6 x 10"' Simulation at 60 deg 200 0 -200 0 2 4 6 X 10"' Simulation at 150 deg 200 0 -200 1 1 1/ j 0 2 4 6 x 10 ' Simulation at 90 deg 200 0 -200 0 2 4 6 x 10"' Figure 74. Simulation of the Complementary P M Array Response for 135° Tuning Chapter VI. Array Experiment Figure 75. Experimental Golomb Code P M Array Response for 90° Tuning Chapter VI. Array Experiment 110 100 0--100 Simulation at 30 deg 100 -100 Simulation at 120 deg x 10" x 10" 100 0 -100 Simulation at 45 deg 100 0 -100 Simulation at 135 deg x 10 ' x 10 ' 100 -100 Simulation at 60 deg 100 0 -100 Simulation at 150 deg x 10" x 10 ' 100 0--100 Simulation at 90 deg x 10" Figure 76. Simulation of the Golomb Code P M Array Response for 90° Tuning Chapter VI. Array Experiment pn response for channel 7(30deg) 500-0--500 x 10"' pn response for channel 3(120deg) 500 -500 x 10"' pn response for channel 4(90deg) 500 0--500 x 10"' Figure 77. Experimental Golomb Code P M Array Response for 135° Tuning Chapter VI. Array Experiment 112 100 o -100 Simulation at 30 deg — < A 0 1 2 3 4 x 10"; 100 0 -100 Simulation at 120 deg 0 1 2 3 4 x 10": 100 0 -100 Simulation at 45 deg VA A A / V 0 1 2 3 4 x 10": 100 0 -100 Simulation at 135 deg 0 1 2 3 4 x 10": 100 0 -100 Simulation at 60 deg 0 1 2 3 4 x 10"; 100 0 -100 Simulation at 150 deg 0 1 2 3 4 x 10": 100 0--100 Simulation at 90 deg — I 1 1 0 1 2 3 4 x 10"; Figure 78. Simulation of the Golomb Code P M Array Response for 135° Tuning Chapter VII. Conclusions and Future Work 113 VII. Conclusions and Future Work In this thesis, we have studied the behavior of wide-band time-delayed phased-arrays for the three types of signals: 1. Linear frequency modulated signals, 2. Phase modulated signal using the complementary Barker code, 3. Phase modulated signal using the Golomb pseudo-random binary sequence. In Chapter n, the general behavior of the time-delayed phased array are examined. The tuning delay and the geometrical delay combine to make up the complete delay experienced at a receiver point. Such a delay depends on the tuning angle and the receiver angle. Misalignment of the signal occurs at off-tuning angles as the delay is not zero. Summing the finite duration signals from different sources makes up the interference pattern of the array. The interference pattern is decomposed into two separate parts. The essential part, carries most of the energy and the edge part which can be ignored in most applications. In Chapter HI, the instantaneous frequency and phase of the F M signal is obtained by integrating the chirp-rate. For a linear F M signal, the chirp-rate is a constant. The interference pattern of the linear F M signal can be obtained by summing the linear F M signal in ( 21 ) with the total delay experienced found in ( 5 ). The field pattern can be obtain by factoring out the F M reference signal from the interference pattern. The result is shown in ( 27 ) i f only the essential region is considered. It is possible for the field pattern to have multiple-peak leakage i f the following two conditions are met: 1. The exponential term in ( 27 ): exp(jak2A2v^, I 8) = 1 for all the possible k terms; 2. The term \ in equation ( 28 ) is such that I \ I > %. Chapter VII. Conclusions and Future Work 114 The first condition is met i f the chirp-rate is low, a small number of sources are used and the ratio of element spacing to velocity is very small. The second condition is met i f the duration of the signal is long. The edge-effect correction terms, for the leading edge and trailing edge can be added back to the interference pattern to obtain the complete interference pattern as shown in ( 36 ). The time-dependent directivity of the F M array can be obtained by dividing the maximum power at the time across all angles with the average power as shown in (37 ). The gain increases until the secondary peak begins to emerge. The arrival-time of the chirped array signal can be obtained by cross-correlating the received array signal with a zero-lag reference signal. The sidelobe at the off-tuning angle can be reduced by applying the cancellation spacing as described in ( 46 ). A n alternative tuning method which simultaneously starts all the elements of the array is made possible by modifying the initial frequency and phase of the signal fed to each element. In Chapter IV, the interference pattern of the linear P M signal is obtained by summing the P M signal ( 52 ) with the total delay found in ( 5 ). The field pattern can be obtained by factoring out the P M reference signal from the interference pattern. The result is shown in ( 59 ) i f only the essential region is considered. The P M array suffers from energy leakage before correlation which would not improve even i f the number of sources used in the array increases. The complete field pattern can be obtained by adding the leading edge and trailing edge correction terms as shown in ( 66 ). Chapter IV also examines the Barker code and the Golomb code. The Barker code has the property that the maximum sidelobe level from compression is 1/N, where N is the length of the code. A pair of complementary Barker codes of length 2", n>l can be generated from the 4 word Barker code to achieve zero sidelobes, i f the complementary code is aperiodically auto-correlated separately and added to the aperiodic correlation result of the Chapter VII. Conclusions and Future Work 115 initial code. The P M signal modulated with such a code yields zero sidelobes i f the same kind of processing is applied. The Golomb pseudo-random code can be easily generated by considering the quadratic residue and it does not suffer from the limitation of a code length of 2 n . A reference code can be generated by replacing the first code symbol by a negative one. A n offset is required to be added to the two codes so that the periodic cross-correlation of such codes is included in ( 7 6 ) (Golomb, 1992). The P M signal modulated with such a code is shown to have zero sidelobes i f it is periodically cross-correlated with its reference signal generated by the Golomb D C offset reference code. Because periodic correlation is used in the signal processing, the longest unambiguous range is limited by the length of the modulation code. Because there is a mismatch between the transmitting code and the reference code, the signal-to-noise ratio is diminished. The spacing for off-tuning sidelobe cancellation for the P M array modulated with both codes is shown to be equivalent to that of the linear F M array. In Chapter V , the performance for the time-delayed array with different signals is compared. The correlation function plots for the complementary Barker code array and Golomb code P M array can be considered as equivalent. However, the Golomb code P M array has a lower signal to noise ratio because of the mismatch between the transmitted and reference signal. The correlation function plots of the P M array are generally much cleaner than those of the linear F M signal. The 3-dB band-width for the P M array is slightly higher than that of the F M array. In terms of the efficiency measured in main lobe to sidelobe ratio, the P M array performance is much better than that of the F M array. It is also shown that the cancellation spacing provide the minimum unwanted sidelobe i f the main lobe is defined to include the 1 s t lobe on both sides of the time axis and a drop to a level of 1/e in the angle axis. However, it is shown that, for the F M signal, the cancellation spacing does not provide the maximum correlation directivity defined as ( 84 ). Chapter VII. Conclusions and Future Work 116 In Chapter V I , an experiment for a four-source array is conducted and the response is measured at 7 angles across the array. The signal is processed and compared with the simulated results. Two tuning angles, 90° and 135° are examined for all three types of signals for this array. In all cases, the experimental results match the simulations extremely well . In most cases, even the signature of the experimental signal matches closely the experimental results. Future Directions This thesis has studied the fundamentals of time-delayed steering for a linear array of line sources and the waveforms suitable for travel-time estimation. Different array-structures, for example, a circular array and planar array, should be studied, as these structures process a symmetrical property which is very useful in certain applications. For a linear array, suitable weights that minimize both the correlation sidelobes along the tuning angle and sidelobes at off-tuning angles need to be developed. Different signal and processing techniques can be examined. In particular, the response of the array with a cubic chirp and the application of Hadamard processing for the P M signal modulated with D C offset Golomb code seem to be promising. The reflected signal from the array merits examination, especially when the target is not stationary and the reflected signal has a Doppler shift. 117 Bibliography Aldridge, D . F. (1992). Mathematics of linear sweeps. Canadian Journal of Exploration Geophysics, vol 28, pp 62-68. (June 1992) Arora, K . and Arora, R. K . (1976). Matched-filter response to a linear F M signal transmitted through a phased array. IEEE transactions on Aerospace and Electronic Systems, AES-12 , 1 (Jan. 1976). Barker, R. H . (1953). Group sychronizing of binary digital systems. Communication Theory. Academic Press, New York, 1953, pp 273-287. Bhargava, V . K . , Haccoun, Matyas R. and Nuspl P. Digital Communications by Satellite, Modulation, Multiple Access and Coding. J. Wiley & Sons, New York, 1981, ch 9, pp 269-287. Birdsall , T .G . and Metzger, Jr., K . (1988a). M-Sequence Signal Tutorial. Naval Oceanographic Office Presentation. July 1988. Birdsall, T .G . and Metzger, Jr., K . (1988b). Hadamard Processing of M-Swquence tutorial examples. Naval Oceanographic Office Presentation. August 1988. Bracewell, Ronald N . The Fourier Transform and its Applications, 2nd Edition. McGraw-H i l l , New York, 1978. Davis, Harry F. Fourier Series and Orthogonal Functions. A l l y n and Bacon, Boston, 1968. Golomb, Solomon W. , Gottesman, Stephen R. and Grieve, Philip G . (1992) A Class of Pseudonoise-Like Pulse Compression Codes. IEEE Transactions on Aerospace and Electronic Systems, 28, 2 (April . 1992). 118 Haller, Dennis R., and Lemon, David D. (1993). Sidescan Sonar Detection Performance with P R N Coded Signals. Ocean '93, pp I-237-I-242. Jain, A n i l K . Fundamentals of Digital Image Processing. Prentice Hal l , New Jersey, 1989, ch 5, pp 155-159. Knittel, B . H . (1974). Relation of radar range resolution and signal-to-noise ratio to phased array bandwidth. IEEE transactions on antennas and Propagation, AP-22,3 (May 1974). Kraus, John D . Electromagnetics. McGraw-Hi l l , New York. Levanon, N . Radar Principles, J. Wiley & Sons, New York, 1988, ch.8, pp 161-162. Levy, S. and Oldenburg, D. W . (1982). The Deconvolution of Phase-shifted Wavelets. Geophysics, 41,9 (sept. 1982) Patel, M . R. and Arora, R. K . (1978). Array dispersion effects on Matched filter outpout for a linear F M signal. IEEE Transactions on Aerospace and Electronic Systems, A E S -14,4 (July 1978). Plumb, R. G . (1993). Matched Filter Response of a Linear Array with time-varying weights. IEEE Transactions on Aerospace and Electronic Systems, 29, 3 (July. 1993). Plumb, R. G . (1991). Antenna array beam steering using time-varying weights. IEEE Transactions on Aerospace and Electronic Systems, 21, 6 (Nov. 1991). Proakis, John G . Digital Communications. M c G r a w - H i l l , New York, 1983, ch 8, pp 544-580. Rogers, J.D., LaGrone, A . H . and Fowler, J. (1973). Distortion generated in anglue-modulation system by phased arrays. IEEE transactions on Aerospacce and Electronic Systems, AES-9,5 (Sept 1973). 119 Schelkunoff, S. A . (1943). A Mathematical Theory of Linear Arrays. Bell System Technical Journal, 22,1 (January 1943) pp 81-107. 120 Appendix — Circuit Diagrams and Program codes This appendix contains some of the programs and circuit diagrams for amplifiers used in the thesis to generated results in the thesis. The table below explain the function of each program or circuit diagram included in the following sections. Title : Description : Circuit Diagram Power Amp. and Pre-Amp circuit diagram for the experiment. chirpm.m Matlab program to generate the movie for F M array. pmm.m Matlab program to generate the movie for P M array. t2.c Recording and Transmitting program running on the T M S D S P card. tms.c Library functions for the T M S D S P card. pci.c P C program to control and communicate with "t2.c". fmda.m Record data analysis program for F M signal. fmanal.m Program to compute and plot F M array simulation result. cpmsnd.m Program to compute the transmitting signal for complementary P M signal. cpmda.m Record data analysis program for complememtary P M signal. cpmanal.m Program to compute and plot complementary P M array simulation result. pnsnd.m Program to compute the transmitting signal for complementary P M signal. pnda.m Record data analysis program for Golomb code P M signal. pnanal.m Program to compute and plot Golomb P M array simulation result. 121 Circuit Diagram POWER IC1-T7812 C1-220uF + R1-10K >R2-15I< C2-1uF •R3-19K INPUT IC2-LF35B |—NAAr— ; R5-2.2K •R4-560 ~ C3-1uF 1 / 8 RECEIVER AMP. IC3-LM741 + > R7-2K ' R 6 - 5 6 0 ~ C4-1DuF + O U T P U T ^ :R8-1I< C5-10uF POWER INPUT V R 1 - 1 0 K YA TRANSMITTING AMP. J4 IC1-LM3B4 8 3,4 5,7 10 11 12 + C1-0.1uF~ C4-470uF OUTPUT R2-2.7 C2-4 .7uF~[C3-Q1uF chirpm.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % FILE: chirpt.m % To simulate the i n t e r f e r e n c e p a t t e r n w i t h c h i r p % waveforms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% c l g ; c l e a r ; colormap(gray); % PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %(Hz) i n i t i a l frequency of c h i r p %(Hz) f i n a l frequency of c h i r p %(m/s) v e l o c i t y of c h i r p wave % use v e l o c i t y to c a l . lambda min map_unit = 0.05 ; %(meter) and get map_unit (see note) FreqO = 1000 Freqf = 4000 v e l o c i t y = 1500 d u r a t i o n = 1/375; %(s) du r a t i o n of c h i r p i n i t _ p h a s e = 0 ; %(radian) i n i t i a l phase num_o_fra = 20 ; %(frames) minimum = 2 samples % % important note: % the min lambda i s at 4000Hz which i s % 1500(m/s) / 4000(Hz) = 0.375(m). To avoid % s p i c i a l a l i a s i n g and have a good r e s o l u t i o n % we have set the map u n i t to be 0.05(m) % i n that case we w i l l have about 8 data % poi n t s f o r the minimum lambda % X_axis = -80:80; % * map_unit (meter) Y_axis = -60:60; % * map_unit (meter) % % When the "X/Y_axis range i s change % make sure the d i s p l a y space i s changed % i f X_axis i s -80:80, and the map_unit % i s 0.05, the range of the graph to be % di s p l a y e d i s -4(meter) to 4(meter) % source_d =7.5; % not normalized x_source = [0 source_d 2*source_d 3*source_d]; % * map_unit (meter) y_source = [ 0 0 0 0 ]; % * map_unit (meter) % % x/y_source are not normalized % To get t h e i r l o c a t i o n i n meter, the % v a r i a b l e i s m u l t i p i e d w i t h map_unit % thetha = 0 /180*pi; %Angle of beam % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % END PARAMETERS [ i number_of_source] = s i z e ( x _ s o u r c e ) ; % i i s temperary v a r i a b l wf = Freqf * 2 * p i ; % i n i t i a l angular f r e q wO = FreqO * 2 * p i ; % f i n a l angular f r e q w_rate = (wf - wO) / durati o n ; % c h i r p - r a t e dvcosthetha = source_d*map_unit/velocity*cos(thetha); % time f o r wave to t r a v e l the distance % between p a r a l l e l ray from adjcent source 123 t i m e _ s t a r t = [0 dvcosthetha 2*dvcosthetha 3*dvcosthetha]; %(s) time_end = t i m e _ s t a r t + durat i o n ; %(s) % s t a r t and end time of each source % please see sim3.doc f o r d e t a i l x_mapsize = length(X_axis) y_mapsize = length(Y_axis) %number or element i n x d i r %number or element i n y d i r x_vector_ones = ones([1,x_mapsize]); y_vector_ones = ones([1,y_mapsize]); % a l l ones of length x % a l l ones of length y fo r s = 1:number_of_source dx = ( X_axis - x_source(s) ).^2; x = y_vector_ones' * dx; dy = ( Y_axis' - y_source(s) ). A2; y = dy * x_vector_ones; d = sqrt(x+y); d i s t = [ d i s t ; d ]; end % -% I % I % I -distance from each source i s c a l c u l a t e d and put i n t o a mat r i x cascade a l l matrixes d i s t = d i s t * map_unit; X_axis = X_axis * map_unit; Y_axis = Y_axis * map_unit; %normalize by multipy %with map_unit = moviein(num_o_fra); % i n i t i a l i z e movie % d e l t a (to avoid d i v by 0) % f o r i n i t i a l i z a t i o n frame = 1; d e l t a = 1/lelO; zero_matrix= zeros([y_mapsize,x_mapsize]); time_step = ((time_end+duration/2)/(num_o_fra-1)); % time step i s set so that 2/3 of the frames f o r % the f i r s t source to transmit and 1/3 of the frames % a f t e r the f i r s t source stop t r a n s m i t i n g f o r time time_start:time_step:(time_end+duration/2) amp = zero_matrix; f o r i = 1: number_of_source rowstart = (i-1)*y_mapsize+l; j rowend = i*y_mapsize; d = dist(rowstart:rowend, : ) ; % f o r each source %we o b t a i n i t s d i s t a n c e %matrix (d) back 124 mask_upper = d - (time - t i m e _ s t a r t ( i ) ) * v e l o c i t y + d e l t a ; mask_upper = mask_upper ./ abs(mask_upper) ; mask_upper = (l-mask_upper) / 2; % 1 • s _ 0 ' s % we obtain a t r a v e l l i n g |_ ( d i r e c t i o n -> i e outward % from the source toward the edges of the matrix) % The p a t t e r n i s c i r c u l a r s y m e t r i c a l % mask_lower = d - (time - time_end(i) ) * v e l o c i t y + d e l t a ; mask_lower = mask_lower ./ abs(mask_lower); mask_lower = (l+mask_lower) / 2; % 0 ' s _ 1' s % we obtain a t r a v e l l i n g _| ( d i r e c t i o n -> i e outward % from the source toward the edges of the matrix) % The p a t t e r n i s c i r c u l a r s y m e t r i c a l % mask = mask_upper .* mask_lower; % by m u l t i p i n g the two masks we ob t a i n a mask % so that we can mask out the part of wave % obtained i n the c a l c u l a t i o n which i s b e f o r e / a f t e r % the c h i r p pulse i s sent % NOTE: There w i l l be a mask f o r each source per frame space_eff_time = time - ( d / v e l o c i t y ) ; e f f _ t i m e = space_eff_time - t i m e _ s t a r t ( i ) ; arg = 1/2 * w_rate * eff_time."2 + wO * e f f _ t i m e + i n i t _ p h a s e ; % see sim3.doc f o r more d e t a i l amplitude = sin(arg) .* mask; %mask out unwanted p a r t amp = amplitude + amp; %add c o n t r i b u t i o n of sources end amp(y_mapsize,x_mapsize ) = number_of_source; %max amplitude amp(y_mapsize,x_mapsize-l) = -1 * number_of_source; %min amplitude % w i t h each frame garuntee to have the same max and % min amplitude, we have set the gray s c a l e %amp(l:5,63:86) = zeros(5,24); % f o r the map s i z e from -5 :80 & -5 :80 %amp(1:10,120:161)= zeros(10,42); % f o r the map s i z e from -80:80 & -80:80 amp(l:7,120:161) = zeros { 1 , 4 2 ) ; % c l e a r space f o r d i s p l a y % f o r the map s i z e from % f o r the map s i z e from -80:80 & -60:60 -20:140 & -20:100 surf(X_axis,Y_axis,amp); view(0,90) shading f l a t %contour(X_axis,Y_axis,amp); s = s p r i n t f ( ' T : % 5 . 2 e F:%d',time,frame); %text(2.9,-0.125,s); % f o r the map s i z e from %text(2,-3.75,s); % f o r the map s i z e from %text(5,-0.85,s); % f o r the map s i z e from text(2,-2.85,s); % f o r the map s i z e from -80:80 & x l a b e l ( ' x (meter)'); y l a b e l ( ' y (meter) ') ; M(:,frame) = getframe; frame = frame + 1 ; end movie(M,5,10); pmm.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % FILE: pm.m % To simulate the i n t e r f e r e n c e p a t t e r n w i t h phase modulated % waveforms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% c l g ; c l e a r ; colormap(gray); % PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FreqO = 4000 ; %(Hz) i n i t i a l frequency of c h i r p Freqf = 4000 ; %(Hz) f i n a l frequency of c h i r p pulse_code = [ 0 0 1 1]; %phase toggle p a t t e r n % do not toggle f o r 0 toggle f o r 1 -5 :80 & -5 :80 -80:80 & -80:80 -20:140 & -20:100 -60:60 % each toggle / non-toggle happen i n the % beginning of each lambda v e l o c i t y = 1500 ; %(m/s) v e l o c i t y of c h i r p wave % use v e l o c i t y to c a l . lambda min map_unit = 0.05 ; %(meter) and get map_unit (see note) i n i t _ p h a s e =0 ; %(radian) i n t i a l phase num_o_fra = 20 ; %(frames) minimum = 2 samples % % important note: % the min lambda i s at 4000Hz which i s % 1500(m/s) / 4000(Hz) = 0.375(m) % we have set the map u n i t to be 0.05(m) % i n that case we w i l l have about 8 data % poi n t s f o r the minimum lambda % X_axis = -80:80; % * map_unit (meter) Y_axis = -60:60; % * map_unit (meter) % % When the "X/Y_axis range i s change % make sure the d i s p l a y space i s changed % i f X_axis i s -80:80, and the,map_unit % i s 0.05, the range of the graph to be % di s p l a y e d i s -4(meter) to 4(meter) % source_d =7.5; % not normalized x_source = [0 source_d 2*source_d 3*source_d]; % * map_unit (meter) y_source = [ 0 0 0 0 ]; % * map_unit (meter) % % x/y_source are not normalized % To get t h e i r l o c a t i o n i n meter, the % v a r i a b l e i s m u l t i p i e d w i t h map_unit % thetha = 0 /180*pi; %Angle of beam % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % END PARAMETERS [ i num_of_pulse] .= si z e ( p u l s e _ c o d e ) ; % i i s temperary v a r i a b l e d u r a t i o n = 1/Freq0 * num_of_pulse; % c a l c u l a t e the d u r a t i o n % of the pm waveform time_at_phase_change = ( find(pulse_code>0) -1 ) * 1/Freq0; % c a l c u l a t e the time at which the toggle occurs [ i num_of_phase_change] = size(time_at_phase_change); % c a l c u l a t e the t o t a l number of toggle per pm s i g n a l [ i number_of_source] = s i z e ( x _ s o u r c e ) ; % i i s temperary v a r i a b l e wf wO = Freqf * 2 * p i ; = FreqO * 2 * p i ; % i n i t i a l angular f r e q % f i n a l angular f r e q w_rate (wf - wO) / durat i o n ; % c h i r p - r a t e dvcosthetha = source_d*map_unit/velocity*cos(thetha); % time f o r wave to t r a v e l the distance % between p a r a l l e l ray from adjcent source t i m e _ s t a r t = [0 dvcosthetha 2*dvcosthetha 3*dvcosthetha]; time_end = t i m e _ s t a r t + durat i o n ; % s t a r t and end time of each source % please see sim3.doc f o r d e t a i l %(s) %(s) x_mapsize = l e n g t h ( X _ a x i s ) ; y_mapsize = l e n g t h ( Y _ a x i s ) ; %number or element i n x d i %number or element i n y d i x_vector_ones = ones([1,x_mapsize]); y_vector_ones = ones([1,y_mapsize]); % a l l ones of length x % a l l ones of length y f o r s = 1:number_of_source dx = ( X_axis - x_source(s) ).*2; x = y_vector_ones' * dx; dy = ( Y_axis' - y_source(s) ).^2; y = dy * x_vector_ones; d = sqrt(x+y); d i s t = [ d i s t ; d ] ; end % |-distance from each % | source i s c a l c u l a t e d % | and put i n t o a mat r i x % -% cascade a l l matrixes d i s t = d i s t * map_unit; X_axis = X_axis * map_unit; Y_axis = Y_axis * map_unit; ^normalize by multipy fcwith map_unit = moviein(num_o_fra) ^ i n i t i a l i z e movie frame = 1; d e l t a = 1/lelO; % d e l t a (to avoid d i v by 0) zero_matrix= zeros([y_mapsize,x_mapsize] ) ; % f o r i n i t i a l i z a t i o n one_matrix = ones([y_mapsize,x_mapsize]); time_step = ((time_end(1)+duration/2)/(num_o_fra-1)) ; % time step i s set so that 2/3 of the frames f o r % the f i r s t source to transmit and 1/3 of the frames % a f t e r the f i r s t source stop t r a n s m i t i n g f o r time = time_start(1):time_step:(time_end(1)+duration/2); amp = zero_matrix; f o r i = 1:number_of_source % f o r each source rowstart = (i-1)*y_mapsize+l; %we o b t a i n i t s d i s t a n c e rowend = i*y_mapsize; %matrix (d) back d = dist(rowstart:rowend,:); mask_upper = d - (time - t i m e _ s t a r t ( i ) ) * v e l o c i t y + d e l t a ; mask_upper = mask_upper ./ abs(mask_upper); mask_upper = (l-mask_upper) / 2; % 1' s _ 0 ' s % we obtain a t r a v e l l i n g |_ ( d i r e c t i o n -> i e outward % from the source toward the edges of the matrix) % The p a t t e r n i s c i r c u l a r s y m e t r i c a l % mask_lower = d - (time - time_end(i) ) * v e l o c i t y + d e l t a ; mask_lower = mask_lower ./ abs(mask_lower); mask_lower = (l+mask_lower) / 2; % 0 ' s _ 1' s % we obtain a t r a v e l l i n g _| ( d i r e c t i o n -> i e outward % from the source toward the edges of the matrix) % The p a t t e r n i s c i r c u l a r s y m e t r i c a l mask = mask_upper .* mask_lower; by m u l t i p i n g the two masks we o b t a i n a mask so that we can mask out the part of wave obtained i n the c a l c u l a t i o n which i s b e f o r e / a f t e r the c h i r p pulse i s sent NOTE: There w i l l be a mask f o r each source per frame pmask f o r i i tpmask tpmask pmask end one_matrix; 1:num_of_phase_change d - (time - time_at_phase_change(ii) - t i m e _ s t a r t ( i ) tpmask ./ abs(tpmask); pmask .* tpmask; * v e l o c i t y + d e l t a ; 129 % 0 ' s _ 1' s % we o b t a i n a t r a v e l l i n g _| ( d i r e c t i o n -> i e outward % from the source toward the edges of the matrix) % The p a t t e r n i s c i r c u l a r s y m e t r i c a l % at each "time_at_phase_change" we multipy two % 0 1 s _ 1' s % _| together to achieve the phase change at % the "time_at_phase_change" space_eff_time = time - ( d / v e l o c i t y ) ; e f f _ t i m e = space_eff_time - t i m e _ s t a r t ( i ) ; arg = 1/2 * w_rate * e f f _ t i m e . A 2 + wO * e f f _ t i m e + i n i t _ p h a s e ; % see sim3.doc f o r more d e t a i l amplitude = sin(arg) .* mask .* pmask; %mask out and toggle wave amp = amplitude + amp; %add c o n t r i b u t i o n of sources end amp(y_mapsize,x_mapsize ) = number_of_source; %max amplitude amp(y_mapsize,x_mapsize-l) = -1 * number_of_source; %min amplitude % w i t h each frame garuntee to have the same max and % min amplitude, we have set the gray s c a l e % amp(1:5,63:86) = zeros(5,24); % f o r the map s i z e from -5 :80 & -5 :80 %amp(l:10,120:161)= zeros(10,42); % f o r the map s i z e from -80:80 & -80:80 amp(1:7,120:161) = zeros(7,42); % c l e a r space f o r d i s p l a y % f o r the map s i z e from -80:80 & -60:60 % f o r the map s i z e from -20:140 & -20:100 surf(X_axis,Y_axis,amp); view(0,90) shading f l a t %contour(X_axis,Y_axis,amp); s = s p r i n t f ( ' T : % 5 . 2 e F:%d',time,frame); %text(2.9,-0.125,s); % f o r the map s i z e from -5 :80 & -5 :80 %text(2,-3.75,s); % f o r the map s i z e from -80:80 & -80:80 %text(5,-0.85,s); 130 % f o r the map s i z e from -20:140 & -20:100 text(2,-2.85,s); % f o r the map s i z e from -80:80 & -60:60 x l a b e l ( ' x (meter)'); y l a b e l ( ' y (meter) ' ) ; M(:,frame) = getframe; frame = frame + 1; end movie(M,5,10); t2.c #include <stdlib.h> #include <math.h> #define INTERVAL 0.0000500 #define SIG_DURATION 0.004 #define PRE_DEAD_AIR 0.0005 #define POS DEAD AIR 0.0255 #define. SOURCE_D 0.05 #define ANGLE 90.0 #define VELOCITY 330.0 #define FreqO 1000.0 #define Freqf 4000.0 #define P i 3.1415926535 /*second (time between i n t e r r u p t ) */ /•second ( s i g n a l duration) */ /•second (dead a i r between s i g n a l ) */ /•second (dead a i r between s i g n a l ) */ /*make sure you set the end c o n d i t i o n f o r j i n the i n t e r u p t f u n c t i o n and w i l l not overflow i n t o c o l l e c t i o n area*/ /•meter (distance between sources) */ /•degree (maximum energy path at) */ /•r a e t e r / s ( v e l o c i t y of the wave) */ /•Hertz ( i n i t i a l f r e q of s i g n a l ) •/ /•Hertz ( f i n a l f r e q of s i g n a l ) •/ #define SAM P CH (in t ) ((PRE_DEAD_AIR+SIG_DURATION+PO S_DEAD_AIR)/INTERVAL) /• number of i n t e r r u p t req. to gen. •/ /• the waveform */ f l o a t G_TIME; /•main counter f o r output wave c a l c . •/ f l o a t w_rate, wO, wf; f l o a t l _ t i m e 0 , l _ t i m e l , l _ t i m e 2 , l _ t i m e 3 ; f l o a t l _ f a c t O , l _ f a c t l , l _ f a c t 2 , l _ f a c t 3 ; / • f r e q r a t e , i n i t and f i n a l f r e q * / / • l o c a l counter f o r each source */ / * d i f f . % l o c a l and main counter*/ i n t •outp; /•array f o r output waveform 4/ 131 i n t *inp; /*array for input waveform */ i n t i ; /*dummy v a r i a b l e */ i n t j=0; /* i n t e r r u p t counter */ voi d c _ i n t l O ( v o i d ) ; v o i d main(void) { *( (unsigned i n t *) Oxa ) = (int) * c _ i n t l O ; / * i n s t a l l i n t e r r u p t vector*/ /*0xa i s TINT1 */ /* tmsbus i n i t ( ) ; * / *( ( v o l a t i l e int*) 0x808064) = 0x800; ^ i n i t i a l i z a t i o n s */ *( ( v o l a t i l e int*) 0x808060) = 0x0; ^ i n i t i a l i z a t i o n s */ /*tmschannelinit();*/ *( ( v o l a t i l e int*) 0x800004) = 0x0; / i n i t i a l i z a t i o n s */ *( ( v o l a t i l e int*) 0x800004) = 0x200000; ^ i n i t i a l i z a t i o n s */ *( ( v o l a t i l e int*) 0x800004) = 0x0; ^ i n i t i a l i z a t i o n s */ while( !( * ( ( v o l a t i l e int*)0x800004) & 0x200000 ) ); *( ( v o l a t i l e int*) 0x30000 ) = 5; outp = (int*) 0x500; inp = (int*) 0x1000; wf = Freqf * 2.0 * p i ; wO = FreqO * 2.0 * p i ; w_rate = (wf-wO) / SIG_DURATION; l _ f a c t 0 = 0; /* c a l c u l a t e o f f s e t s */ l _ f a c t l = SOURCE_D/VELOCITY*cos(ANGLE/180.0*pi)*(1); l _ f a c t 2 = SOURCE_D/VELOCITY*cos(ANGLE/180.0*pi)* (2) ; l _ f a c t 3 = SOURCE_D/VELOCITY*cos(ANGLE/180.0*pi)*(3); G_TIME=(-PRE_DEAD_AIR) ; G_TIME<= (SIG_DURATION+POS_DEAD_AIR-INTERVAL) ; G_TIME+=INTERVAL) { l_time0 = G_TIME - l _ f a c t 0 l _ t i m e l = G_TIME - l _ f a c t l l_time2 = G_TIME - l_ f a c t 2 1 time3 = G TIME - 1 fact3 / * c a l c u l a t e l o c a l time 132 / * c a l c . / store waveform */ i f ((l_timeO>=0) && (l_timeO<=SIG_DURATION)) *outp++ = (int)(2047.0*sin(0.5*w_rate*l_time0*l_time0 + wO*l_time0))<<20; e l s e *outp++ = 0; i f ((l_timel>=0) && (l_timel<=SIG_DURATION)) *outp++ = ( i n t ) ( 2 0 4 7 . 0 * s i n ( 0 . 5 * w _ r a t e * l _ t i m e l * l _ t i m e l + w0*l_timel) ) « 2 0; e l s e *outp++ = 0; i f ((l_time2>=0) && (l_time2<=SIG_DURATION)) *outp++ = (int)(2047.0*sin(0.5*w_rate*l_time2*l_time2 + w0*l_time2 ) ) « 2 0 ; e l s e *outp++ = 0; i f ((l_time3>=0) && (l_time3<=SIG_DURATION)) *outp++ = (int)(2047.0*sin(0.5*w_rate*l_time3*l_time3 + w0*l_time3 ) ) « 2 0 ; e l s e *outp++ = 0; ) /*tmstimmerinit(INTERVAL*1000.0);*/ / * u n i t i s i n m i l i s e c o n d * / *( ( v o l a t i l e i n t * ) 0x808030 ) = 0x601; /* *( ( v o l a t i l e unsigned i n t * ) 0x808038 ) = 415; f o r PN experiment*/ *( ( v o l a t i l e unsigned i n t * ) 0x808038 ) = (int)(INTERVAL*8333333.333333333); *( ( v o l a t i l e i n t * ) 0x808030 ) = 0x6cl; *( ( v o l a t i l e i n t * ) 0x30000 ) = 0; whil e (1) { w h i l e ( * ( ( v o l a t i l e int*)0x30000) != 100 ); j = 1; / * i n i t i n t e r r u p t conunter */ * ( ( v o l a t i l e int*)0x30001) = j ; outp = ( i n t * ) 0x500; inp = ( i n t * ) 0x1000; asm( " OR 0200h,IE " ); /*tmstimmerinit(INTERVAL*1000.0);*/ asm( " OR 2000h,ST " ); / * u n i t i s i n m i l i s e c o n d * / w h i l e ( * ( ( v o l a t i l e int*)0x30000) != 0 ); }; } /*asm( " .data " ) ; * / v o i d c _ i n t l O ( v o i d ) { r e g i s t e r v o l a t i l e unsigned i n t r e g i s t e r v o l a t i l e i n t r e g i s t e r v o l a t i l e unsigned i n t r e g i s t e r v o l a t i l e i n t /* i n t e r u p t d r i v e n f u n c t i o n */ * i n c t r = (unsigned *)0x800004; *inadc = ( i n t *)0x800005; * o u t c t r = (unsigned *)0x800006; *out = ( i n t *)0x800007; i f (j > SAM_P_CH) { * ( ( v o l a t i l e int*)0x30001) = j - l ; asm( " ANDN 0200h,IE " ); /*tmstimmerstop();*/ asm( " ANDN 0200h,IF " ); *( ( v o l a t i l e i n t * ) 0x30000 ) = 0; r e t u r n ; } * i n c t r = 0x00000000; /* s e l e c t channel */ i = *inadc; /* dummy read c l e a r ST */ while( !( * i n c t r & 0x00080000 ) ) { } / * wait f o r mux delay */ *inadc = ( i n t ) 0x0; * o u t c t r = 0x100000; *out = *outp++; while( !( * i n c t r & 0x00800000 ) ) { } / * wait f o r end of conversion */ *inp++ = *inadc; * i n c t r = 0x00010000; /* s e l e c t channel */ * o u t c t r = 0x110000; *out = *outp++; whi l e ( !( * i n c t r & 0x00800000 ) ) { } / * wait f o r end of conversion */ *inp++ = *inadc; * i n c t r = 0x00020000; /* s e l e c t channel */ * o u t c t r = 0x120000; *out = *outp++; while( !( * i n c t r & 0x00800000 ) ) { } / * wait f o r end of conversion */ *inp++ = *inadc; * i n c t r = 0x00430000; /* s e l e c t channel */ * o u t c t r = 0x130000; *out = *outp++; while( !( * i n c t r & 0x00800000 ) ) { } / * wait f o r end of conversion */ *inp++ = *inadc; 134 * i n c t r = 0x00040000; /* s e l e c t channel */ i = *inadc; /* dummy read c l e a r ST */ while( !( * i n c t r & 0x00080000 ) ) { } / * wait f o r mux delay */ *inadc = ( i n t ) 0x0; i = *out; w h i l e ( !( * i n c t r & 0x00800000 ) ) { } / * wait f o r end of conversion */ *inp++ = *inadc; * i n c t r = 0x00050000; /* s e l e c t channel */ while( !( * i n c t r & 0x00800000 ) ) { } / * wait f o r end of conversion */ *inp++ = *inadc; * i n c t r = 0x00460000; /* s e l e c t channel */ while( !( * i n c t r & 0x00800000 ) ) { } / * wait f o r end of conversion */ *inp++ = *inadc; #if 0 * i n c t r = 0x00470000; /* s e l e c t channel */ while( !( * i n c t r & 0x00800000 ) ) { } / * wait f o r end of conversion */ *inp++ = *inadc; #endif tms.c #define PRIMWD 0x000800 #define EXPWD 0x000000 #define PRIMCTL_REG ((unsigned i n t *) 0x808064) #define EXPCTL_REG ((unsigned i n t *) 0x808060) #define RSTCTRL 0x000601 #define SETCTRL 0x0006cl #define TIMER_CTRL_REG ((unsigned i n t *) 0x808030) #define ADC_COUNT_REG ((unsigned i n t *) 0x808038) #define CH_A ( ( i n t *) 0x804000) #define CH_B ( ( i n t *) 0x804001) #define TRIGGER 0x804008 #define OUTPUT_CTR 0x800006 #define OUTPUT DAC 0x800007 #define INPUT_CTR #define INPUT ADC 0x800004 0x800005 v o l a t i l e s t a t i c i n t *channela, *channelb, *conversion; v o l a t i l e s t a t i c i n t * o u t c t r , *outdac, i ; v o l a t i l e s t a t i c i n t * i n c t r , *inadc; i n t hello_how; v o i d t m s e o c i n i t ( f l o a t PERIOD) { v o l a t i l e i n t * t i m e r _ c o n f i g , *timer_period; t i m e r _ c o n f i g = ( i n t *) TIMER_CTRL_REG; time r _ p e r i o d = ( i n t *).ADC_COUNT_REG; PERIOD *t i m e r _ c o n f i g * t i m e r _ p e r i o d * t i m e r _ c o n f i g = ( i n t ) (8333.333333333*PERIOD); = RSTCTRL;/* re s e t timer before set p e r i o d = PERIOD; /* set p e r i o d = SETCTRL;/* set timer (cf example echo.c) } asm( " OR 0002h,IE " ); asm( " OR 2000h,ST " ); v o i d t m s t i m m e r i n i t ( f l o a t PERIOD) { /* enable c l o c k i n t u r u p t ( i n t 1) /* enable master i n t u r u p t v o l a t i l e i n t * t i m e r _ c o n f i g , *timer_period; t i m e r _ c o n f i g = ( i n t *) TIMER_CTRL_REG; tim e r _ p e r i o d = ( i n t *) ADC_COUNT_REG; PERIOD *t i m e r _ c o n f i g * t i m e r _ p e r i o d * t i m e r _ c o n f i g = ( i n t ) (8333. 333333333*PERI0D); = RSTCTRL;/* re s e t timer before set p e r i o d = PERIOD; /* set p e r i o d = SETCTRL;/* set timer (cf example echo.c) asm( " OR 02 00h,IE " ); asm( " OR 2000h,ST " ); /* enable c l o c k i n t u r u p t ( i n t 1) /* enable master i n t u r u p t v o i d tmseocstop( v o i d ) { 136 asm( " ANDN 02h, IE " ) ; asm( " ANDN 02h, IF " ) ; } v o i d tmstimmerstop( v o i d ) { asm( " ANDN 0200h, IE " ); asm( " ANDN 0200h, IF " ); } v o i d t m s b u s i n i t ( v o i d ) { v o l a t i l e i n t *pri_bus_wait, *exp_bus_wait; p r i _ b u s _ w a i t = ( i n t *) PRIMCTL_REG; exp_bus_wait = ( i n t *) EXPCTL_REG; *pri_bus_wait = PRIMWD; /* set up primary and expansion bus */ *exp_bus_wait = EXPWD; /* wait s t a t e , pgl5 tech. r e f . menu */ } v o i d t m s c h a n n e l i n i t ( v o i d ) ' { channela = ( i n t *) CH_A; channelb = ( i n t *) CH_B; conversion = ( i n t *) TRIGGER; o u t c t r = ( i n t *) OUTPUT_CTR; outdac = ( i n t *) OUTPUT_DAC; i n c t r = ( i n t *) INPUT_CTR; inadc = ( i n t *) INPUT_ADC; * i n c t r = 0x0; /* c a l i b r a t e of ad converter (see example */ * i n c t r = 0x00200000; /* tms32p.asm) */ * i n c t r = 0x0; while( !( * i n c t r & 0x00200000 ) ) {}; /* wait f o r end of c a l . */ v o i d t m s i n i t ( v o i d ) { t m s b u s i n i t ( ) ; t m s c h a n n e l i n i t ( ) ; t m s e o c i n i t ( 2 e - 3 ) ; 137 } v o i d tmszero(void) { *channela=*channelb=0; } v o i d t m s p o s i t i v e ( v o i d ) { *channela=*channelb=0x7fff0000; /* max p o s i t i v e voltage */ } v o i d tmsnegative(void) { *channela=*channelb=0x80000000; /* max negative v o l t a g e */ } v o i d tmstoggle(void) { /* ISR f o r c l o c k ( i n t l ) i n t e r u p t */ ' s t a t i c i n t f l i p f l o p = 0 ; i f ( f l i p f l o p ) { tmsnegative() ; f l i p f l o p = ! f l i p f l o p ; } e l s e { tmszero(); f l i p f l o p = ! f l i p f l o p ; } } v o i d tmsconvert() { i = 'conversion ; } v o i d tmsout(int number) { *channela = (number << 16) ; *channelb = (number << 16) ; } v o i d delay(void) { i n t i , j , k ; f o r (i=0;i<10000;i++) { j = j + i ; } } v o i d d i g i t a l _ 2 _ a n a l o g ( i n t channel, i n t value) { v o l a t i l e s t a t i c i n t channel_control[] = { OxOOf00000,OxOOf10000, 0x00f20000,0x00f30000, 0x00f40000,0x00f50000, 0x00f60000,0x00f70000, OxOOf80000,OxOOf90000, OxOOfaOOOO,OxOOfbOOOO, OxOOfcOOOO,OxOOfdOOOO, OxOOfeOOOO,OxOOffOOOO }; 1234567 89012345678901234567 89012345678901234567890 /* assumption : a l l 16 channel i s used to output d/a s i g n a l /* i f l e s s than 16 channel i s used, change ? i n the 0x007*0000 /* above according to page 13 of the 16 channel d/a handbook /* a l l 16 channel w i l l be convert to analog but since the /* conversion i s done p a r a l l e l l y , i t does not matter /* a l s o assume channel input i s v a l i d (0-15); system w i l l /* crash i f other value inputed * o u t c t r = channel_control[channel] ; *outdac = value<<20; } v o i d d i g i t a l _ 2 _ a n a l o g _ c o n v e r t ( v o i d ) { i = *outdac; } i n t a n a l o g _ 2 _ d i g i t a l ( i n t channel ) { v o l a t i l e s t a t i c i n t channel_control[] = { 0x00400000, 0x00410000, 0x00420000, 0x00430000, 0x00440000, 0x00450000, 0x00460000, 0x00470000, 0x00480000, 0x00490000, 0x004a0000, 0x004b0000, 0x004c0000, 0x004d0000, 0x004e0000, Ox004fOOOO, 0x00500000, 0x00510000, 0x00520000, 0x00530000, 0x00540000, 0x00550000, 0x00560000, 0x00570000, 0x00580000, 0x00590000, 0x005a0000, 0x005b0000, 0x005c0000, 0x005d0000, 0x005e0000, Ox005fOOOO }; * i n c t r = channel_control[channel]; /* s e l e c t channel */ i = * inadc; w h i l e ( !( * i n c t r & 0x00080000 ) ) {} /* dummy read c l e a r ST */ /* wait f o r mux delay */ 139 * i n c t r = channel_control[channel]; /* s e l e c t channel */ i = *inadc; /* dummy read c l e a r ST */ while( !( * i n c t r & 0x00080000 ) ) { } / * wait f o r mux delay */ /* nowhere i n the mannual mention that the status r e g i s t e r has to */ /* be c l e a r before s t a r t conversion, t h i s i s found out only a f t e r */ /* three day of experiment t r y i n g to input m u l t i p l e channel i n a */ /* s i n g l e i n t e r u p t generated by the clock. The mux delay checking */ /* i s again necessary to make sure the mux has s e t t l e ; again i t i s */ /* not mention i n any mannual. I f the dummy read i s remove, the */ /* r o u t i n e simple won't work. I f the mux delay checking i s remove */ /* channel 0 cannont input any data i f channel 4 i s used i n the */ /* same i n t e r u p t . */ *inadc = ( i n t ) 0x0; /* s t a r t c o n vertion */ while( ! ( . * i n c t r & 0x00800000 ) ) { } / * wait f o r end of conversion */ r e t u r n ( *inadc >> 20 ); } v o i d a n a l o g _ 2 _ d i g i t a l 4 ( i n t group,int * o l , i n t *o2,int *o3,int *o4) { v o l a t i l e s t a t i c i n t channel_control[] = { 0x00000000, 0x00010000, 0x00020000, 0x00430000, 0x00040000, 0x00050000, 0x00060000, 0x00470000, 0x00080000, 0x00090000, OxOOOaOOOO, 0x004b0000, OxOOOcOOOO, OxOOOdOOOO, OxOOOeOOOO, 0x004f0000, 0x00100000, 0x00110000, 0x00120000, 0x00530000, 0x00140000, 0x00150000, 0x00160000, 0x00570000, 0x00180000, 0x00190000, OxOOlaOOOO, 0x005b0000, OxOOlcOOOO, OxOOldOOOO, OxOOleOOOO, 0x005f0000 } ; * i n c t r = channel_control[group*4]; /* s e l e c t channel */ i = *inadc; /* dummy read c l e a r ST */ while( !( * i n c t r & 0x00080000 ) ) { } / * wait f o r mux delay */ *inadc = ( i n t ) 0x0; while( !( * i n c t r & 0x00800000 ) ) { } / * wait f o r end of conversion */ * o l = *inadc » 20; * i n c t r = channel_control[group*4+l]; /* s e l e c t channel */ 140 #if 0 i = *inadc; /* dummy read c l e a r ST */ *inadc = ( i n t ) 0x0; /* s t a r t convertion */ #endif while( !( * i n c t r & 0x00800000 ) ) ( } / * wait f o r end of conversion */ *o2 = *inadc » 20; * i n c t r = channel_control[group*4+2]; /* s e l e c t channel */ #if 0 i = *inadc; /* dummy read c l e a r ST */ *inadc = ( i n t ) 0x0; /* s t a r t convertion */ #endif while( !( • i n c t r & 0x00800000 ) ) { ) / * wait f o r end of conversion •/ *o3 = *inadc » 20; * i n c t r = channel_control[group*4+3]; /* s e l e c t channel •/ #if 0 i = *inadc; /* dummy read c l e a r ST */ *inadc = ( i n t ) 0x0; /• s t a r t convertion */ #endif while( !( * i n c t r & 0x00800000 ) ) { } / * wait f o r end of conversion */ *o4 = *inadc >> 20; pci.c #include<conio.h> #include<math.h> #include<stdlib.h> #include<process.h> #include<ctype.h> # include"tms 3 0.h" #define INTERVAL 0 0000500 #define SIG_DURATION 0 004 #define P RE_DEAD_AIR 0 0005 #define POS_DEAD_AIR 0 0255 #define VELOCITY 330.0 #define P i 3 1415926535 #define INPUT_CH 7 #define OUTPUT_CH 4 /•second (time between i n t e r r u p t ) */ /•second ( s i g n a l duration) */ /•second (dead a i r between s i g n a l ) •/ /•second (dead a i r between s i g n a l ) •/ /•m e t e r / s ( v e l o c i t y of the wave) •/ #define NUM_S ((int)((SIG_DURATION+PRE_DEAD_AIR+POS_DEAD_AIR)/INTERVAL) #define IN_SAM (NUM_S*INPUT_CH) #define OUT_SAM (NUM_S*OUTPUT_CH) v o i d SendandRecord(void); i n t Downloaddata(void); v o i d C r e a t d a t a ( v o i d ) ; i n t Readdata(void); v o i d Uploaddata(void); long ToBeSend[OUT_SAM]; char f i l e l o a d e d [ 4 0 ] ; main(void) { i n t temp; char key; c l r s c r ( ) ; strcpy(fileloaded,"DEFAULT") ; p r i n t f ( " d i e here\n"); SelectBoard(0x290) ; switch (LoadObjectFile("t2.out") ) { case 0: p r i n t f ( " L o a d i n g of ' t2.out' s u c c e s s f u l \ n " ) ; break; case 1: p r i n t f ( " U n a b l e to open f i l e 't2.out'\n"); e x i t ( l ) ; case 2: printf("Unexpected ending of 't2.out'\n"); e x i t ( 2 ) ; } c l r s c r ( ) ; / * p r i n t f ( " % d %d %d",NUM_S, IN_SAM, OUT_SAM);*/ Res e t ( ) ; do { p r i n t f ( " P r e s s c 1 to creat data\n"); p r i n t f ( " P r e s s 's' to send Chirp\n"); p r i n t f ( " P r e s s ' r ' to read data\n"); p r i n t f ( " P r e s s 'd' to download data\n"); / * p r i n t f ( " P r e s s 'p' to s t a r t dos prompt\n");*/ p r i n t f ( " P r e s s 'q' to q u i t \ n " ) ; p r i n t f ( " i n sam->%d,out sam->%d\n",IN_SAM,OUT_SAM); key = g e t c h ( ) ; switch (key) { d e f a u l t : break; case 's': SendandRecord(); break; case 'd': Downloaddata(); break; case 'c': C r e a t d a t a ( ) ; Uploaddata(); break; case ' r ' : i f (Readdata()!=-1) Uploaddata(); break; /* case 'p': p r i n t f ( " E x e c r e s u l t i s %d\n", system("c:\autoexec.bat") p r i n t f ( " d o n e \ n " ) ; break; */ case 'q': p r i n t f ( " Q u i t i n g Program"); } } w h i l e (key != 'q'); r e t u r n ( 0 ) ; } v o i d SendandRecord( v o i d ) { unsigned i n t i=0,j=0,k=0; c l r s c r ( ) ; p r i n t f ( " W a i t i n g f o r keyboard noise to d i e down Chir p \ n " ) ; /* f o r (k=0;k<3 0 ;k++) f o r (j=0;j<50000;j++) i = 0; j=0; */ p r i n t f ( " S e n d i n g and Recording Chirp\n"); while((Getlnt(0x30000,DUAL) != 0)&&(i++<2000)); PutInt(0x30000,DUAL,100) ; p r i n t f ( " \ n S t a r t Send and Record Data, j i s %d\n",Getlnt(0x30001,DUAL)) while((GetInt(0x30000,DUAL) != 0)&&(j++<2000)); i f (i!=2001 && j !=2001) { p r i n t f ( " F i n i s h Send and Record Data, j i s %d\n",Getlnt(0x30001,DUAL)) p r i n t f ( " D o n e Recording %d % d \ n \ n " , i , j ) ; } e l s e p r i n t f ( " E r r o r i n Recording %d % d \ n \ n " , i , j ) ; } 143 i n t Downloaddata( v o i d ) { i n t i , j ; i n t Received[INPUT_CH][NUM_S]; i n t Sent[OUT_SAM]; char d a t a f i l e [ 2 0 ] , r f i l e n a m e [ 4 8 ] , s f i l e n a m e [ 4 8 ] ; FILE *Rstream, *Sstream; c l r s c r ( ) ; p r i n t f ( " \ n \ n L a s t f i l e loaded i s : % s " , f i l e l o a d e d ) ; p r i n t f ( " \ n \ n P l e a s e input filename to be download : " ) ; sc a n f ( " % s " , & d a t a f i l e ) ; i f (strcmp(datafile,"q")==0) r e t u r n ( 0 ) ; s p r i n t f ( r f i l e n a m e , " e : \ \ d a t a \ \ d e c o v \ \ % s r . f i l " , d a t a f i l e ) ; p r intf("Openning Data f i l e : % s \ n " , r f i l e n a m e ) ; i f ((Rstream = fopen(rfilename, "wt")) == NULL) { p r i n t f ( " E r r o r opening data f i l e \ n \ n " ) ; r e t u r n ( 0 ) ; } e l s e p r i n t f ( " D o n e opening data f i l e \ n \ n " ) ; s p r i n t f ( s f i l e n a m e , " e : \ \ d a t a \ \ d e c o v \ \ % s s . f i l " , d a t a f i l e ) ; p r i n t f ( " O p e n n i n g Data f i l e : % s \ n " , s f i l e n a m e ) ; i f ((Sstream = fopen(sfilename, "wt")) == NULL) p r i n t f ( " E r r o r opening data f i l e \ n \ n " ) ; e l s e p r i n t f ( " D o n e opening data f i l e \ n \ n " ) ; printf("Downloading S i g n a l \ n " ) ; p r i n t f ( " H o l d i n g TMS Processor\n"); HoldAndWait(); f o r ( i = 0 ; i < IN_SAM ; i++) Received[i%INPUT_CH][i/INPUT_CH] = (int)(Getlnt((OxlOOO+i),ALL)>>20); f o r ( i = 0 ; i < OUT_SAM ; i++) S e n t f i ] = ( i n t ) ( G e t l n t ( ( 0x500+i),ALL)»20); UnHoldAndWait(); printf("\nDownloading Completed\n"); p r i n t f ( " \ n S a v i n g Data i n t o F i l e : % s \ n " , r f i l e n a m e ) ; f o r ( i = 0 ; i < INPUT_CH ; i++) { f o r (j = 1 ; j < (NUM_S+1) ; j++) f p r i n t f ( R s t r e a m , (j !=0 && j%10==0)? "%6d\n" : "%6d",Received[i][j-1] f p r i n t f ( R s t r e a m , " \ n \ n " ) ; } fclose(Rstream); p r i n t f ( " \ n S a v i n g Data i n t o F i l e : %s\n",sfilename); f o r ( i = 0 ; i < OUTPUT_CH ; i++) { f o r (j = 1 ; j <= NUM_S ; j++) f p r i n t f ( S s t r e a m , (j%10==0)? "%6d\n" f p r i n t f ( S s t r e a m , " \ n \ n " ) ; } f c l o s e ( S s t r e a m ) ; p r i n t f ( " \ n S a v i n g Completed\n"); return(0) ; } v o i d Creatdata(void) { double double double double double "%6d",Sent[(j-1)*4 + i ] ) G_TIME; w_rate, wO, wf; l _ t i m e O , l _ t i m e l , l _ t i m e 2 , l _ t i m e 3 ; l _ f a c t O , l _ f a c t l , l _ f a c t 2 , l _ f a c t 3 ; FreqO,Freqf,SOURCE_D,ANGLE; /*main counter f o r output wave c a l c . */ / * f r e q r a t e , i n i t and f i n a l f r e q * / / * l o c a l counter f o r each source */ / * d i f f . % l o c a l and main counter*/ i n t i , j ; FILE *stream; f o r ( i = 0;i<OUT_SAM;i++) ToBeSend[i] = 0; /*dummy v a r i a b l e p r i n t f ( " \ n \ n P l e a s e input s t a r t f r e q (Hz) scanf ( " % l f 1 1 , &FreqO); ") p r i n t f ( " \ n \ n P l e a s e input f i n a l f r e q (Hz) s c a n f ( " % l f " , &Freqf); p r i n t f ( " \ n \ n P l e a s e input distance between elements (cm) s c a n f ( " % l f " , &SOURCE_D); p r i n t f ( " \ n \ n P l e a s e input maximum beam angle (degree) s c a n f ( " % l f " , &ANGLE); 1 4 5 strcpy(fileloaded,"CUSTOM"); wf = Freqf * 2.0 * p i ; wO = FreqO * 2.0 * p i ; w_rate = (wf-wO) / SIG_DURATION; / * c a l c u l a t e o f f s e t s * / l _ f a c t 0 = SOURCE_D/VELOCITY*cos(ANGLE/180.0*pi)*(-1. 5)/100 l _ f a c t l = SOURCE_D/VELOCITY*cos(ANGLE/180.0*pi)*(-0.5)/100 l _ f a c t 2 = SOURCE_D/VELOCITY*cos(ANGLE/180.0*pi)*( 0.5)/100 l _ f a c t 3 = SOURCE_D/VELOCITY*cos(ANGLE/180.0*pi)*( 1.5)/100 f o r ( i = 0, G_TIME=(-PRE_DEAD_AIR) ; G_TIME<= ( SI G_DURAT I ON+PO S_DEAD_A IR -1NTERVAL) G_TIME+=INTERVAL) { l_time0 = G_TIME - l _ f a c t 0 l _ t i m e l = G_TIME - l _ f a c t l l_time2 = G_TIME - l _ f a c t 2 1 time3 = G TIME - l _ f a c t 3 / * c a l c u l a t e l o c a l time / * c a l c . / s t o r e waveform */ i f ((l_time0>=0) && (l_time0<=SIG_DURATION)) ToBeSend[i++] = (long)(2047.0*sin(0.5*w_rate*l_time0*l_time0 + w0*l_time0 ) ) « 2 0 ; e l s e ToBeSend[i++] = 0; i f ((l_timel>=0) && (l_timel<=SIG_DURATION)) ToBeSend[i++] = ( l o n g ) ( 2 0 4 7 . 0 * s i n ( 0 . 5 * w _ r a t e * l _ t i m e l * l _ t i m e l + w0*l_timel) ) «20; e l s e ToBeSend[i + +] = 0 ; i f ((l_time2>=0) && (l_time2<=SIG_DURATION)) ToBeSend[i++] = (long)(2047.0*sin(0.5*w_rate*l_time2*l_time2 + w0*l_time2))<<20; e l s e ToBeSend[i++] = 0; i f ((l_time3>=0) && (l_time3<=SIG_DURATION)) 146 ToBeSend[i++] = (long)(2047.0*sin(0.5*w_rate*l_time3*l_time3 + w0*l_time3))<<2 0; e l s e T o B e S e n d [ = 0; } i f ((stream = f o p e n ( " e : \ \ d a t a \ \ o u t . f i l " , "wt")) == NULL) p r i n t f ( " E r r o r opening data f i l e \ n " ) ; f o r ( i = 0 ; i < OUTPUT_CH ; i++) { f o r (j = 1 ; j <= NUM_S ; j++) f p r i n t f ( s t r e a m , (j%10==0)? "%61d\n" : "%61d",ToBeSend[(j-1)*4 + i]>>20) ; f p r i n t f ( s t r e a m , " \ n \ n " ) ; } f c l o s e ( s t r e a m ) ; i n t Readdata(void) { FILE *stream; i n t i , j = 0,data[IN_SAM] ; char ch, datafilename[20], f u l l f i l e n a m e [ 4 0 ] , token[10] ; fo r ( i = 0;i<OUT_SAM;i++) ToBeSend[i] = 0; p r i n t f ( " \ n \ n P l e a s e input filename to be upload : " ) ; sc a n f ( " % s " , &datafilename); s t r c p y ( f i l e l o a d e d , d a t a f i l e n a m e ) ; s p r i n t f ( f u l l f i l e n a m e , " e : \ \ d a t a \ \ d e c o v \ \ % s . f i l " , datafilename); p r i n t f ( " \ n O p e n i n g f i l e : % s \ n " , f u l l f i l e n a m e ) ; i f ((stream = f o p e n ( f u l l f i l e n a m e , " r t " ) ) == NULL) { p r i n t f ( " \ n E r r o r opening data f i l e \ n " ) ; r e t u r n ( - 1 ) ; } e l s e ch=fgetc(stream); do f o r (;!isdigit(ch)&&ch!='-'&&ch!=EOF;ch=fgetc(stream)); 147 f o r (i=0; is d i g i t ( c h ) | | c h = = ' - ' ; token[i++]=ch,ch=fgetc(stream)); i f ( i != 0) { tok e n [ i ] = 0; data[j++] = a t o i ( t o k e n ) ; } } w h i l e (ch != EOF) ; f c l o s e ( s t r e a m ) ; i f (j!=OUT_SAM ) { p r i n t f ( " E r r o r i n f i l e , there i s %d data p o i n t i n f i l e not %d\n\n\n",j,OUT_SAM); / * f o r (i=0;i<j;i++) p r i n t f ( " T h e %dth data i s %d \ n " , i + 1 , d a t a [ i ] ) ; * / r e t u r n ( - 1 ) ; } e l s e { p r i n t f ( " C o n v e r t i n g format of s i n g a l \ n " ) ; f o r (i=0;i<OUTPUT_CH;i++) fo r (j=0;j<=NUM_S-l;j++) ToBeSend[j*OUTPUT_CH+i] = ((long)data[i*NUM_S+j])«20; r e t u r n ( 0 ) ; } } v o i d Uploaddata(void) { i n t i ; p r i n t f ( " \ n U p l o a d Data\n"); p r i n t f ( " \ n H o l d i n g TMS Processor\n") ; HoldAndWait(); p r i n t f ( " U p l o a d i n g S i g n a l \ n " ) ; WrBlkInt(0x500,ALL,OUT_SAM,ToBeSend); /* we have assumed the s i g n a l i s 10ms max at 50us i n t e r v a l w i t h 4 channels t h e r e f o r e we have 800 samples */ UnHoldAndWait(); } 148 fmda.m c l e a r NUM_PER_CH = 600; NUM_PER_ROW = 10; INPUT_CH = 7; OUTPUT_CH = 4; time_step = 50e-6; g l o b a l range g l o b a l rangel load d e l t a s . f i l load y e s r . f i l % l o a d i i i 5 r . f i l l oad d d 9 0 r . f i l load d d 9 0 s . f i l load . .\. . \ o f f s e t d e l t a r = yesr; % d e l t a r = i i i 5 r ; c h i r p r = dd90r; c h i r p s = dd90s; c l e a r yesr dd90r dd90s i n _ f i l e _ r o w = NUM_PER_CH* INPUT_CH/NUM_PER_ROW; o u t _ f i l e _ r o w = NUM_PER_CH*OUTPUT_CH/NUM_PER_ROW; fo r i = l : o u t _ f i l e _ r o w f o r j = 1:NUM_PER_ROW impout(floor(((i-1)*NUM_PER_ROW+j-1)/NUM_PER_CH) + 1 ((((i-1)*NUM_PER_ROW+j-1)/NUM_PER_CH)- ... floor(((i-1)*NUM_PER_ROW+j-l)/NUM_PER_CH))*NUM_PER_CH + 1) = d e l t a s ( i , j ) ; chirpout(floor(((i-1)*NUM_PER_ROW+j-1)/NUM_PER_CH) + 1 ((((i-1)*NUM_PER_ROW+j-l)/NUM_PER_CH)- ... f l o o r ( ( (i-1)*NUM_PER_ROW+j-l)/NUM_PER_CH) )*NUM_PER_CH + 1) = c h i r p s ( i , j ) ; end end f o r i = l : i n _ f i l e _ r o w f o r j =1:NUM_PER_ROW impin(floor(((i-1)*NUM_PER_ROW+j-1)/NUM_PER_CH) + 1 149 (( f l o o r ( c h i r p i n ( f l o o r ( ( ( f l o o r ( end end (i-1)*NUM_PER_ROW+j-1)/NUM_PER_CH)- ... (i-1)*NUM_PER_ROW+j-l)/NUM_PER_CH))*NUM_PER_CH + 1) (i-1)*NUM_PER_ROW+j-l)/NUM_PER_CH) + 1 (i-1)*NUM_PER_ROW+j-l)/NUM_PER_CH)- ... (i-1)*NUM_PER_ROW+j-l)/NUM_PER_CH))*NUM_PER_CH + 1) = d e l t a r ( i , j ) = c h i r p r ( i , j ) offsetmat = o f f s e t . ' * o n e s ( 1 , l e n g t h ( i m p i n ) ) ; impin = impin-offsetmat; c h i r p i n = c h i r p i n - o f f s e t m a t ; c l e a r i j d e l t a s d e l t a r NUM_PER_ROW offsetmat o f f s e t c h i r p r c h i r p s impout = impout * 3.5 / 2 048; impin = impin * 2.5 / 2048; impin = impin * (1+3300/560) / (1+82000/560); chirp o u t = chirp o u t * 3.5 / 2 04 8; c h i r p i n = c h i r p i n * 2.5 / 2048; %PEDDING_LEN = 600 %impout = [impout zeros(4,PEDDING_LEN)] %impin = [impin zeros(7,PEDDING_LEN)] %chirpout = [chirpout zeros(4,PEDDING_LEN)] % c h i r p i n = [ c h i r p i n zeros(7,PEDDING_LEN)] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %using the same impulse response f o r a l l channels %with the magnitude adjusted impinold = impin; s c a l e = max(impin.')/max(max(impin)); impin = s c a l e . ' * impin(4,:); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PROCESS_LEN =600 time_axis = (1:PROCESS_LEN)*time_step; discard_sam = floor(42*2.54/100/330/0.00005); impulse_b4_ref = floor(4.3e-3/0.00005); %impulse_b4_ref = 90; e s p i l o n = 0; impintruc = [impin(:,discard_sam:discard_sam-l+impulse_b4_ref) .. zeros(7,PROCESS_LEN-impulse_b4_ref)].'; impintruco= [impinold(:,discard_sam:discard_sam-l+impulse_b4_ref) zeros(7,PR0CESS_LEN-impulse_b4_ref)] i m p i n f f t = f f t ( i m p i n t r u c ) ; i m p o u t f f t = fft(impout(3,1:PROCESS_LEN) ); c h i r p o u t f f t = fft(chirpout(3,l:PR0CESS_LEN) ) ; c h i r p i n f f t = f f t ( chirpin(:,1:PROCESS_LEN).'); T x f c n f f t = i m p i n f f t . / ( i m p o u t f f t . ' * o n e s ( 1 , 7 ) ) ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % a l t approaches to c a l c u l a t e tx fen i n one shot, % T x f c n f f t = (abs(impinfft).^2+espilon) ./... % ( ( i m p o u t f f t . ' * o n e s ( 1 , 7 ) ) . * c o n j ( i m p i n f f t ) ) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% t x f e n = i f f t ( T x f c n f f t ) ; a b s t x f c n f f t = a b s ( T x f c n f f t ) ; c h i r p f f t = c h i r p i n f f t . / T x f c n f f t ; f i l t e r = c h i r p o u t f f t . ' * o n e s ( 1 , 7 ) ; r e s u l t = i f f t ( c h i r p f f t . * c o n j ( f i l t e r ) ) ; r e s u l t = r e a l ( r e s u l t ) .'; xrange =0.0078; range = max(max(result))*1.1; rangel = max(max(result))*1.1; f u l l _ f i g = 0; fig u r e ( 1 ) i f f u l l _ f i g f i g u r e ( 4 ) ; e l s e subplot(426); end; p l o t ( t i m e _ a x i s , r e s u l t ( 1 , : ) ) a x i s ( [ 0 xrange -range rangel]) t i t l e ( ' c h i r p response f o r channel l(150deg)') g r i d i f f u l l _ f i g f i g u r e ( 5 ) ; e l s e subplot(424); end; p l o t ( t i m e _ a x i s , r e s u l t ( 2 , : ) ) a x i s ( [ 0 xrange -range rangel]) t i t l e ( ' c h i r p response f o r channel 2(135deg)') g r i d i f f u l l _ f i g f i g u r e ( 6 ) ; e l s e subplot(422); end; p l o t ( t i m e _ a x i s , r e s u l t ( 3 , : ) ) a x i s ( [ 0 xrange -range rangel]) t i t l e ( ' c h i r p response f o r channel 3(120deg)') 151 g r i d i f f u l l _ f i g f i g u r e ( 7 ) ; e l s e subplot(427); end; p l o t ( t i m e _ a x i s , r e s u l t ( 4 , : )) a x i s ( [ 0 xrange -range rangel]) t i t l e ( ' c h i r p response f o r channel 4(90deg)') g r i d i f f u l l _ f i g f i g u r e ( 8 ) ; e i s e subplot(425); end; p l o t ( t i m e _ a x i s , r e s u l t ( 5 , : ) ) a x i s ( [ 0 xrange -range rangel]) t i t l e ( ' c h i r p response f o r channel 5(60deg)') g r i d i f f u l l _ f i g f i g u r e ( 9 ) ; e l s e subplot(423); end; p l o t ( t i m e _ a x i s , r e s u l t ( 6 , : ) ) a x i s ( [ 0 xrange -range rangel]) t i t l e ( ' c h i r p response f o r channel 6(45deg)') g r i d i f f u l l _ f i g f i g u r e ( l O ) ; e l s e subplot(421); end; p l o t ( t i m e _ a x i s , r e s u l t ( 7 , : ) ) a x i s ( [ 0 xrange -range rangel]) t i t l e ( ' c h i r p response f o r channel 7(30deg)') g r i d % o r i e n t p o r t r a i t o r i e n t t a l l p r i n t -deps \nel\thesis\pcx\dd90.eps fmanal.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % FILE: fmanal.m % To pulse compress the i n t e r f e r e n c e p a t t e r n % f o r FM s i g n a l % and 180 degree d i s p l a y (5x oversample) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% c l g ; c l e a r ; colormap(gray); % PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FreqO = 1500 Freqf = 4500 du r a t i o n = 4e-3 %(Hz) i n i t i a l frequency of c h i r p %(Hz) f i n a l frequency of c h i r p %(s) time_step = 0 . 00005 ;%(s) time-step chosen f o r 5.8x % oversampling at 4000Hz v e l o c i t y = 330 ; %(m/s) v e l o c i t y of the wave source_d = 0.06; % (m) distance between array element % i n the x d i r e c t i o n %x_separ = [ -0.5 0.5 ]; %(number of source_d) x_separ = [-1.5 -0.5 0.5 1.5 ]; %(number of source_d) x _ o f f s e t = 0; %the array must be l i n e a r and must be i n i n c r e a s i n g order O r i g = [0 0]; %(m) O r i g i n [X Y] co-ordinate thetha = 13 5; ; %degree Angle at which Max beam occurs radius = 1.066800 ; %(m) the s i g n a l i s recorded i n % "radius" meter away %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % END PARAMETERS x_source = x_separ * source_d + x _ o f f s e t ; %(m) y_source = [ z e r o s ( s i z e ( x _ s o u r c e ) ) ] ; %(m) % MAKE UP ARC angle = 30:15:150; %range of angle to be di s p l a y e d angler = angle / 180 * p i ; %convert the angle to rad i a n arc_X = O r i g ( l ) + cos(angler) * ra d i u s ; arc_Y = O r i g ( l ) + si n ( a n g l e r ) * ra d i u s ; [ i number_of_source] = s i z e ( x _ s o u r c e ) ; % i i s temperary v a r i a b l e % END MAKE UP ARC % DISTANCE CALCULATION one_vector_3 60 = o n e s ( s i z e ( a n g l e ) ) ; one_vector_NoS = ones(number_of_source,1); dx = (one_vector_NoS * arc_X - x_source.' * one_vector_360)."2; dy = (one_vector_NoS * arc_Y - y_source.' * one_vector_360). A2; d = sqrt(dx+dy); % c a l c u l a t e the distance between each source and %each p o i n t i n the arc. % END DISTANCE CALCULATION % p l o t ( a n g l e , d ) ; % g r i d ; % t i t l e ( ' D i s t a n c e from Each Source to the A r c ' ) ; % x l a b e l ( ' A n g l e from Center of array (degree)'); % y l a b e l ( ' D i s t a n c e (meter)'); %pause; % FIRING TIME FOR ANGLE STEERING thethar = thetha / 180 * p i ; ^convert to r a d i a n t r a v e l _ t i m e = d / v e l o c i t y ; %convert the distance d i f f e r e n c e to time d i f f e r e n c e dvcosthetha = source_d / v e l o c i t y * c o s ( t h e t h a r ) ; t r a v e l _ t i m e = t r a v e l _ t i m e + dvcosthetha * x_separ.' * one_vector_360; %angle compensation here % n o t i c e the +dvcos.... here : x_separ i s -ve a l r e a d y % END FIRING TIME FOR ANGLE STEERING % p l o t ( a n g l e , t r a v e l _ t i m e ) % g r i d ; % t i t l e ( ' A r r i v i a l Time w i t h Compensation'); % x l a b e l ( ' A n g l e from Center of Array (degree)'); % y l a b e l ( ' A r r i v i a l Time (second) ') ; %s = s p r i n t f ( ' A n g l e = %d degree, %dm',thetha,radius); matime = max(max(travel_time)); mitime = min(min(travel_time)) ; %text(200,(matime-mitime)/5+mitime,s); % p r i n t %pause; % o r i g i n compresation to be i n s e r t here wf = Freqf * 2 * p i ; % i n i t i a l angular f r e q wO = FreqO * 2 * p i ; % f i n a l angular f r e q w_rate = (wf - wO) / d u r a t i o n ; % c h i r p - r a t e 1 154 % MAKE UP THE INTEFERENCE MARTIX ph_m_x_axis = angle; ph_m_x_size = l e n g t h ( a n g l e ) ; %180 degrees % t h i s defines the range of the d i s p l a y of x a x i s ph_m_y_size = f i x ( ( matime+l*duration - (mitime-duration) )/time_step + 4) % c a l c u l a t e the proper s i z e of the phase matrix; %the s i z e includes zero padding to avoid wrap around % e r r o r when doing match f i l t e r i n g . ph_m_start = mitime-duration-2*time_step; %corresponding to the s t a r t i n g time of the f i r s t %element (each column) of the phase matrix. ph_m_y_axis = ph_m_start:time_step:ph_m_start+(ph_m_y_size-l)*time_step; % d e f i n i n g the a x i s : time (y) against angle (x) t r a v e l _ t i m e _ n o _ o f f s e t = t r a v e l _ t i m e - ph_m_start; ph_m_pos = t r a v e l _ t i m e _ n o _ o f f s e t ./ time_step; % f i n d i n g where the s i n g a l begin to appear i n the 1 %phase matrix num_of_step = (duration/time_step); %number of step of the c h i r p zero_ph__m = zeros(ph_m_y_size,ph_m_x_size) ; % f o r i n i t i a l i z a t i o n amp = zero_ph_m; %set the t o t a l response to be zero f o r i = 1:number_of_source ph_m_temp = zero_ph_m; %set the phase matrix f o r a source to be zero f o r ( i i = 1:length(angle)) ph_start_pos = c e i l ( p h _ m _ p o s ( i , i i ) )+l; ph_end_pos = floor(ph_m_pos(i,ii)+num_of_step)+1; % f i n d where the s i g n a l appears i n the matrix i n %a p a r t i c u l a r angle ph_m_temp(ph_start_pos:ph_end_pos , i i ) = . . . ((0:(ph_end__pos-ph_start_pos)).'+ph_start_pos-ph_m_pos(i,ii))*time_step; %puting the s i n g a l ( i n time form) i n t o the matrix end arg =1/2 * w_rate * ph_m_temp.^2 + wO * ph_m_temp; %convert the s i g n a l i n t o phase angle amplitude = s i n ( a r g ) ; amp = amplitude + amp; %adding the t o t a l respond from each source end % END MAKE UP THE INTEFERENCE MARTIX % MATCH FILTERING time_span = [(0:floor(num_of_step)).' ; ... zeros (ph_m_y_size-f l o o r (num_of_step)-1, 1) ] ,-time_span = time_span * time_step; arg = 1/2 * w_rate * time_span.^2 + wO * time_span; f i l t e r = s i n ( a r g ) ; %make up a matched f i l t e r i n time domain. % f f t _ f i l t e r = kaiser(ph__m_y_size,2.5) .* c o n j ( f f t ( f i l t e r ) ) * one_vector_360 f f t _ f i l t e r = c o n j ( f f t ( f i l t e r ) ) * one_vector_360; %make up a matched f i l t e r i n f r e q domain. fft_amp = fft(amp); f l t _ r e s u l t = i f f t ( f f t _ f i l t e r .* fft_amp); % END MATCH FILTERING time_range_plot=0.0078; range = m a x ( m a x ( r e a l ( f l t _ r e s u l t ) ) ) *1.1; rangel = m a x ( m a x ( r e a l ( f l t _ r e s u l t ) ) ) *1.1; fig u r e ( 1 ) subplot(421) p l o t ( p h _ m _ y _ a x i s , r e a l ( f l t _ r e s u l t ( : , 1) ) ) a x i s ( [ 0 time_range_plot -range rangel]) g r i d t i t l e ( ' S i m u l a t i o n at 30 deg'); subplot(423) p l o t ( p h _ m _ y _ a x i s , r e a l ( f l t _ r e s u l t ( : , 2) ) ) a x i s ( [ 0 time_range_plot -range rangel]) g r i d t i t l e ( ' S i m u l a t i o n at 45 deg'); subplot(425) p l o t ( p h _ m _ y _ a x i s , r e a l ( f l t _ r e s u l t ( : , 3)) ) a x i s ( [ 0 time_range_plot -range rangel]) g r i d t i t l e ( 1 S i m u l a t i o n at 60 deg'); subplot(427) p l o t ( p h _ m _ y _ a x i s , r e a l ( f l t _ r e s u l t ( : , 5) ) ) a x i s ( [ 0 time_range_plot -range rangel]) g r i d t i t l e ( ' S i m u l a t i o n at 90 deg'); subplot(422) p l o t ( p h _ m _ y _ a x i s , r e a l ( f l t _ r e s u l t ( : , 7))) a x i s ( [ 0 time_range_plot -range rangel]) g r i d t i t l e ( ' S i m u l a t i o n at 12 0 deg'); subplot(424) p l o t ( p h _ m _ y _ a x i s , r e a l ( f l t _ r e s u l t ( : , 8))) a x i s ( [ 0 time_range_plot -range rangel]) g r i d t i t l e ( ' S i m u l a t i o n at 135 deg'); subplot(426) plot(ph_m_y_axis, r e a l ( f l t _ r e s u l t ( : , 9 ) ) ) a x i s ( [ 0 time_range_plot -range rangel]) g r i d t i t l e ( ' S i m u l a t i o n at 150 deg'); % o r i e n t p o r t r a i t o r i e n t t a l l p r i n t -deps \nel\thesis\pcx\ddsl35.eps cmpsnd.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % FILE: cpmsnd.m % to create pm data to be used i n the experiment % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% c l e a r ; % PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% need__plot = 0 ; sample_length = 3 0e-3; % t o t a l _ l e n g t h of s i g n a l %sample_length = 5e-3; % t o t a l _ l e n g t h of s i g n a l pre_dead_air = -0. 5e-3;% al l o w f o r s i g n a l to go i n t o -ve time time_step = 5 0e-6; %(s) to match the experimental r a t e v e l o c i t y = 330 ; %(m/s) v e l o c i t y of the wave FreqO = 3000 ; % (Hz) i n i t i a l frequency of c h i r p Freqf 3000 ; % (Hz) f i n a l frequency of c h i r p pulse_code = [ 1 1 - 1 1 1 1 1 -1 ]; % each d i g i t of the element % represent a length of lambda % the phase i s reversed f o r -1's % and i s normal f o r 1's pulse_code2= [ 1 1 -1 1 -1 -1 -1 1 ]; % complementary of the above s i n g a l source_d = 0.06 ; %(m) distance between a r r a y element % i n the x d i r e c t i o n x_separ = [-1.5 -0.5 0.5 1.5 0] ; %(number of source_d) % l a s t one i s reference x _ o f f s e t = 0; %the array must be l i n e a r and must be i n i n c r e a s i n g order thetha =90 ; %degree Angle at which Max beam occurs % "radius" meter away Orig = [0 0]; % (m) O r i g i n [X Y] co-ordinate %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % END PARAMETERS % PARAMETERS CALCULATION x_source = x_separ * source_d + x _ o f f s e t ; %(m) [ i number_of_source] = s i z e ( x _ s o u r c e ) ; % i i s temperary v a r i a b l e y_source = zeros(1,number_of_source); %(m) lambda_duration = 1/FreqO; %(s) [ i num_of_lambda] = si z e ( p u l s e _ c o d e ) ; d u r a t i o n = num_of_lambda * lambda_duration; num_of_step= (duration/time_step); %number of step of the c h i r p sam__per_lambda = time_at_change : time_at_change2 : [ i num_of_change ]= [ i num_of_change2]: 1ambda_durat i on/1 ime_s t ep ; ( f i n d ( - l * ( pulse_code - 1)) ( f i n d ( - l * ( pulse_code2 - 1)) size(time_at_change ); size(time_at_change2); 1)*lambda_duration; l)*lambda d u r a t i o n ; num_of_change = [num_of_change; num_of_change2]; num_of_ch_max = max(num_of_change); sam_at_change = [time_at_change zeros(1,num_of_ch_max-num_of_change(1)); time_at_change2 zeros(1,num_of_ch_max-num_of_change(2)) ]/ time_step; % i n case the change po i n t at lambda end %sam_at_change r e q u i r e adding one wf = Freqf * 2 * p i ; % i n i t i a l angular f r e q wO = FreqO * 2 * p i ; % f i n a l angular f r e q w_rate = (wf - wO) / durat i o n ; % c h i r p - r a t e % END PARAMETERS CALCULATION % FIRING TIME FOR ANGLE STEERING thethar = thetha / 180 * p i ; %convert to ra d i a n t r a v e l _ t i m e = 0; ^convert the distance d i f f e r e n c e to time d i f f e r e n c e dvcosthetha = source_d / v e l o c i t y * c o s ( t h e t h a r ) ; t r a v e l _ t i m e = t r a v e l _ t i m e + dvcosthetha * x_separ; %angle compensation here % n o t i c e the +dvcos.... here : x_separ i s -ve already % END FIRING TIME FOR ANGLE STEERING % o r i g i n compresation to be i n s e r t here % — SIGNAL CALCULATION ph_m_start = pre_dead_air; ph_m_x_axis = x_separ; ph_m_x_size = number_of_source; %360 degrees ph_m_y_size = sample_length/time_step; ph_m_y_axis = ph_m_start:time_step:ph_m_start+(ph_m_y_size-l)*time_step; % d e f i n i n g the a x i s : time (y) against angle (x) t r a v e l _ t i m e _ n o _ o f f s e t = t r a v e l _ t i m e - ph_m_start; ph_m_pos = t r a v e l _ t i m e _ n o _ o f f s e t ./ time_step; % f i n d i n g where the s i n g a l begin to appear i n the %phase matrix zero_ph_m = zeros(ph_m_y_size,ph_m_x_size); % f o r i n i t i a l i z a t i o n %set the t o t a l response to be zero amp = [zero_ph_m,zero_ph_m] ; ph_end_pos ph_start_pos = c e i l ( p h m pos) +1; = floor(ph_m_pos +num_of_step)+1; % f i n d where the signal appears i n the matrix i n %a p a r t i c u l a r angle for ccc =1:2 ph_m_temp = zero_ph_m; for i = 1:ph_m_x_size ph_m_temp(ph_start_pos(i):ph_end_pos(i),i)=... (0:(ph_end_pos(i)-ph_start_pos(i))).' + ph_start_pos(i) - ph_m__pos( %the above l i n e i s double checked on Jan 24 96 to %ensure the s t a r t i n g p o s i t i o n i s correct and that %the time s h i f t i s correct %the num_of_step cannot decide the number of points % i n the matris as the s t a r t i n g point i s not c e r t a i n %therefore we have to use ph_end...-ph_start for(k = 1:num_of_change(ccc)) f l i p _ s t a r t _ p o s = ceil(ph_m_pos(i)+sam_at_change(ccc,k) ) + 1; flip_end_pos = floor(ph_m_pos(i)+sam_at_change(ccc,k) + 1 +.. sam_per_lambda); ph_m_temp(flip_start_pos:flip_end_pos,i)=... ph_m_pos(i) + sam_at_change(ccc,k) - f l i p _ s t a r t _ p o s + 1 + ... (0 : ( f l i p _ e n d _ p o s - f l i p _ s t a r t _ p o s ) ) . ' * (-1) ; end end ph_m ph_m_temp amplitude ph_m_temp * t ime_s tep; %puting the singal (in time form) into the matrix = 1/2 * w_rate * ph_m_temp.~2 + wO * ph_m_temp; ^convert the si g n a l into phase angle = round(2047*sin(ph_m)); 160 amp(:,((ccc-1)*number_of_source+l):(ccc*number_of_source)) %adding the t o t a l respond from each source end % END SIGNAL CALCULATION sb = s p r i n t f ( ' p m b % d s . f i l 1 ,thetha) sc = s p r i n t f ( ' p m c % d s . f i l ' ,thetha) sbr = s p r i n t f ( ' p m b r % d s . f i l ' , t h e t h a ) s c r = s p r i n t f ( ' p m c r % d s . f i l ' , t h e t h a ) = amplitude; FIDb = fopen(sb ,'w') FIDc = fopen(sc ,'w') FIDbr= fopen(sbr,'w') FIDcr= fopen(scr,'w') f o r ( i =1:(number_of_source-l)) f o r (ii=l:ph_m_y_size) i f (round(ii/10)-ii/10)==0 f p r i n t f ( F I D b , ' % 6 d \ n 1 , a m p ( i i , i ) ) ; f p r i n t f ( F I D c , '%6d\n 1,amp(ii,i+number_of_source)) f p r i n t f ( F I D b r , ' % 6 d \ n ' , a m p ( i i , number_of_source)) fprintf(FIDcr,'%6d\n',amp(ii,2*number_of_source)) e l s e 1%6d' , a m p ( i i , i ) ) ; 1%6d' ,amp(ii,i+number_of_source)) '%6d' ,amp(ii, number_of_source)) f p r i n t f ( F I D b , f p r i n t f ( F I D c , f p r i n t f ( F I D b r , f p r i n t f ( F I D c r , ' % 6 d ' end end f p r i n t f ( F I D b ,'\n') f p r i n t f ( F I D c ,'\n') f p r i n t f ( F I D b r , ' \ n ' ) f p r i n t f ( F I D c r , ' \ n ' ) end , amp(ii,2*number_of_source)) f c l o s e ( ' a l l ' ) ; i f need__plot range = 2 048 fig u r e ( 1 ) subplot(111); plot(amp(:,1)) a x i s ( [ 0 100 -range range]) ho l d plot(amp(:,6),'r') hold figure(2) subplot (111) ,-plot(amp(:,2)) axis([0 100 -range range]) hold plot(amp(:,7) , 'r ' ) hold figure(3) subplot(111); plot(amp(:,3)) axis([0 100 -range range]) hold plot(amp(:,8),'r') hold figure(4) subplot(111); plot(amp(:,4)) axis([0 100 -range range]) hold plot(amp(:,9) , 'r ' ) hold f i g u r e (5) subplot(111); plot(amp(:,5)) axis([0 100 -range range]) hold plot(amp(:,10),'r') hold end cmpda.m c l e a r INPUT_CH = 7; NUM_PER_CH = 600; NUM_PER_ROW = 10; 162 OUTPUT_CH = 4; TIME_STEP = 50e-6; load pmb45r.fil load p m c 4 5 r . f i l load pmbr45s.fil load p m c r 4 5 s . f i l load . . \ y e s r . f i l load . . \ d e l t a s . f i l l o a d ..\ . . \ o f f s e t d e l t a r = yesr; pmbs = pmbr45s; pmcs = pmcr45s; pmcr = pmc45r; pmbr = pmb45r; c l e a r yesr pmbr45r pmbr45s pmc45r pmc45s IN_FILE_ROW = NUM_PER_CH* INPUT_CH/NUM_PER_ROW; OUT_FILE_ROW = NUM_PER_CH*OUTPUT_CH/NUM_PER_ROW; f o r i=l:OUT_FILE_ROW f o r j =1:NUM_PER_ROW impout(fl o o r ( ( i - 1) *NUM_ _PER_ _ROW+j -1) /NUM. .PER. .CH) + 1 , ( ( ( i - 1) *NUM_ .PER. _ROW+j -1) /NUM. .PER. .CH) -f l o o r ( ( i - 1) *NUM_ .PER. .ROW+j -1) /NUM. .PER. .CH) )*NUM_ .PER. .CH + 1) = d e l t a s ( i , j pmbout(floor( ( i - 1) *NUM_ .PER. .ROW+j -1) /NUM. .PER. .CH) + 1 , ( ( ( i - 1) *NUM_ .PER. .ROW+j -1) /NUM. .PER. .CH) - . . . f l o o r ( ( i - 1) *NUM_ .PER. .ROW+j -1) /NUM. .PER. .CH) )*NUM_ .PER. _CH + 1) =pmbs(i,j); pmcout(floor( ( i - 1) *NUM_ .PER. _ROW+j -1)/NUM. _PER_ .CH) + 1 , ( ( ( i - 1) *NUM_ .PER. .ROW+j -1)/NUM. .PER. .CH) - . . . f l o o r ( ( i - 1) *NUM_ _PER_ _ROW+j -1)/NUM. .PER. .CH) )*NUM_ .PER. .CH + 1) =pmcs(i,j); end end f o r i=l:IN_FILE_ROW f o r j=l:NUM_PER_ROW impin(floor(((i-1)*NUM_PER_ROW+j-1)/NUM_PER_CH) + 1 ((((i-1)*NUM_PER_ROW+j-1)/NUM_PER_CH)- ... floor(((i-1)*NUM_PER_ROW+j-1)/NUM_PER_CH))*NUM_PER_CH + 1 ) = d e l t a r ( i , j ) ; pmbin(floor(((i-1)*NUM_PER_ROW+j-1)/NUM_PER_CH) + 1 ((((i-1)*NUM_PER_ROW+j-l)/NUM_PER_CH)- ... 163 floor(((i-1)*NUM_PER_ROW+j-l)/NUM_PER_CH))*NUM_PER_CH + l ) = p m b r ( i , j ) ; pmcin(floor(((i-1)*NUM_PER_ROW+j-1)/NUM_PER_CH) + 1 ((((i-1)*NUM_PER_ROW+j-1)/NUM_PER_CH)- ... floor(((i-1)*NUM_PER_ROW+j-l)/NUM_PER_CH))*NUM_PER_CH + 1)=pmcr(i,j); end end offsetmat = o f f s e t . ' * o n e s ( 1 , l e n g t h ( i m p i n ) ) ; impin = impin-offsetmat; pmbin = pmbin-offsetmat; pmcin = pmcin-offsetmat; c l e a r IN_FILE_ROW OUT_FILE_ROW NUM_PER_ROW i j . . . d e l t a s d e l t a r offsetmat o f f s e t pmbs pmcs pmbr pmcr impout = impout * 2.5 / 2 048; impin = impin * 2.5 / 2048 * (1+3300/560) / (1+82000/560); pmbout = pmbout * 2.5 / 2048; pmcout = pmcout * 2.5 / 2048; pmbin = pmbin * 2.5 / 2048; pmcin = pmcin * 2.5 / 2048; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % f i l t e r i n g done here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% f l t b = c o n j ( f f t ( pmbout(1,:).'*ones(1,INPUT_CH) ) ) ; f l t c = c o n j ( f f t ( pmcout(1,:).'*ones(1,INPUT_CH) ) ) ; f l t _ r s t _ f f t = f f t ( p m b i n . ' ) . * f l t b + f f t ( p m c i n . ' ) . * f l t c ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %deconv done here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %using the same impulse response f o r a l l channels %with the magnitude adjusted impinold = impin; s c a l e = max(impin.')/max(max(impin)); impin = s c a l e . ' * impin(4,:); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PROCESS_LEN = 600 164 time_axis = (1:PROCESS_LEN)*TIME_STEP; discard_sam = floor(42*2.54/100/330/0.00005); impulse_b4_ref = floor(4.3e-3/0.00005); e s p i l o n = 0; impintruc = [impin(:,discard_sam:discard_sam-l+impulse_b4_ref) ... zeros(7,PROCESS_LEN-impulse_b4_ref)] . ' ; impintruco= [impinold(:,discard_sam:discard_sam-l+impulse_b4_ref) ... zeros(7,PROCESS_LEN-impulse_b4_ref)].'; impinfft- = f f t ( i m p i n t r u c ) ; i m p o u t f f t = fft(impout(3,1:PROCESS_LEN) ); T x f c n f f t = i m p i n f f t . / ( i m p o u t f f t . ' * o n e s ( 1 , 7 ) ) ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % a l t approaches to c a l c u l a t e tx fen i n one shot % T x f c n f f t = (abs(impinfft).^2+espilon) ./... % ( ( i m p o u t f f t . ' * o n e s ( 1 , 7 ) ) . * c o n j ( i m p i n f f t ) ) ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pmfft = f l t _ r s t _ f f t . / T x f c n f f t ; r e s u l t = i f f t ( p m f f t ) ; r e s u l t = r e a l ( r e s u l t ) .'; xrange = 0.007 8; range = max(max(result))*1.1; rangel = max(max(result))*1.1; f u l l _ f i g = 0; fig u r e ( 2 ) i f f u l l _ f i g f i g u r e ( 4 ) ; e l s e subplot(421); end; p l o t ( t i m e _ a x i s , r e s u l t ( 1 , : ) ) a x i s ( [ 0 xrange -range rangel]) t i t l e ( ' P M response f o r channel 7(30deg)') g r i d i f f u l l _ f i g f i g u r e ( 5 ) ; e l s e subplot(42 3); end; p l o t ( t i m e _ a x i s , r e s u l t ( 2 , : ) ) a x i s ( [ 0 xrange -range rangel]) t i t l e ( ' P M response f o r channel 6(45deg)') g r i d i f f u l l _ f i g f i g u r e ( 6 ) ; e l s e subplot(425); end; p l o t ( t i m e _ a x i s , r e s u l t ( 3 , : ) ) a x i s ( [ 0 xrange -range rangel]) 165 t i t l e ( ' P M response f o r channel 5(60deg)') g r i d i f f u l l _ f i g f i g u r e ( 7 ) ; e l s e subplot(427); end; p l o t ( t i m e _ a x i s , r e s u l t ( 4 , : ) ) a x i s ( [ 0 xrange -range rangel]) t i t l e ( ' P M response f o r channel 4(90deg)') g r i d i f f u l l _ f i g f i g u r e ( 8 ) ; e l s e subplot(422); end; p l o t ( t i m e _ a x i s , r e s u l t ( 5 , : ) ) a x i s ( [ 0 xrange -range rangel]) t i t l e ( ' P M response f o r channel 3(120deg)') g r i d i f f u l l _ f i g f i g u r e ( 9 ) ; e l s e subplot(424); end; p l o t ( t i m e _ a x i s , r e s u l t ( 6 , : ) ) a x i s ( [ 0 xrange -range rangel]) t i t l e ( ' P M response f o r channel 2(135deg)') g r i d i f f u l l _ f i g f i g u r e ( l O ) ; e l s e subplot(426); end; p l o t ( t i m e _ a x i s , r e s u l t ( 7 , : ) ) a x i s ( [ 0 xrange -range rangel]) t i t l e ( ' P M response f o r channel l(150deg)') g r i d o r i e n t t a l l p r i n t -deps \nel\thesis\pcx\pml3 5.eps cpmanal.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % FILE: cpmanal.m % To pulse compress the i n t e r f e r e n c e p a t t e r n % f o r phase modulation (with complementary code) % and 360 degree d i s p l a y (8x oversample) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% c l g ; c l e a r ; colormap(gray); % _ PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FreqO = 3 000 ; %(Hz) i n i t i a l frequency of c h i r p Freqf = 3000 ; %(Hz) f i n a l frequency of c h i r p pulse_code = [ 1 pulse_code2= [ 1 1-1 1-1 -1 ]; % each d i g i t of the element represent a length of lambda the phase i s reversed for - l ' s and i s normal for 1's 1 ]; % complementary of the above s i n g a l time_step v e l o c i t y source_d x_separ %x_separ x o f f s e t = 50e-6; %(s) to match the experimental rate = 330 ; %(m/s) v e l o c i t y of the wave = 0.06 ; % (m) distance between array element % i n the x d i r e c t i o n = [-1.5 -0.5 0.5 1.5 ]; %(number of source_d) = [-0.5 0.5 ]; %(number of source_d) 0; %the array must be l i n e a r and must be i n increasing order Orig = [0 0]; %(m) O r i g i n [X Y] co-ordinate thetha =13 5 ; %degree Angle at which Max beam occurs radius = 1.06680 ; %(m) the s i g n a l i s recorded i n % "radius" meter away %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % END PARAMETERS % PARAMETERS CALCULATION x_source = x_separ * source_d + x_offse t ; %(m) [ i number_of_source] = size(x_source); % i i s temperary v a r i a b l e y_source = zeros(1,number_of_source); %(m) lambda_duration = 1/FreqO; %(s) [ i num_of_lambda] = size(pulse_code); duration = num_of_lambda * lambda_duration; num_of_step= (duration/time_step); %number of step of the chirp sam__per_lambda : time_at_change • time_at_change2 [ i num_of_change ]= [ i num_of_change2]: 1ambda_durat i on/1 ime_s t ep; ( f i n d ( - l * ( pulse_code - 1) ( f i n d ( - l * ( pulse_code2 - 1) size(time_at_change ); size(time_at_change2); 1)*lambda_duration; l)*lambda duration; num_of_change = [num_of_change; num_of_change2]; num_of_ch_max = max(num_of_change) ; sam_at_change = [time_at_change zeros(1,num_of_ch_max-num_of_change(1)); time_at_change2 zeros(1,num_of_ch_max-num_of_change(2)) ]/ time_step; % i n case the change p o i n t at lambda end %sam_at_change r e q u i r e adding one wf = Freqf * 2 * p i ; % i n i t i a l angular f r e q wO = FreqO * 2 * p i ; % f i n a l angular f r e q w_rate = (wf - wO) / durati o n ; % c h i r p - r a t e % END PARAMETERS CALCULATION % MAKE UP ARC angle = 30:15:150; %range of angle to be d i s p l a y e d angler = angle / 180 * p i ; %convert the angle to radian arc_X = O r i g ( l ) + cos(angler) * ra d i u s ; arc_Y = Orig(2) + si n ( a n g l e r ) * ra d i u s ; % END MAKE UP ARC % DISTANCE CALCULATION one_vector_3 60 = o n e s ( s i z e ( a n g l e ) ) ; one_vector_NoS = ones(number_of_source,1); dx = (one_vector_NoS * arc_X - x_source.' * one_vector_360).^2; dy = (one_vector_NoS * arc_Y - y_source.' * one_vector_360).^2; d = sqrt(dx+dy); % c a l c u l a t e the distance between each source and %each p o i n t i n the arc. % END DISTANCE CALCULATION % FIRING TIME FOR ANGLE STEERING thethar = thetha / 180 * p i ; ^convert to rad i a n t r a v e l _ t i m e = d / v e l o c i t y ; %convert the distance d i f f e r e n c e to time d i f f e r e n c e %angle compensation here 168 % n o t i c e the +dvcos.... here x_separ i s -ve already % END FIRING TIME FOR ANGLE STEERING matime = max(max(travel_time)); mitime = m i n ( m i n ( t r a v e l _ t i m e ) ) ; % p l o t ( a n g l e , t r a v e l _ t i m e ) % g r i d ; % t i t l e ( ' A r r i v i a l Time w i t h Compensation'); % x l a b e l ( ' A n g l e from Center of Array (degree)'); % y l a b e l ( ' A r r i v i a l Time (second)'); %s = s p r i n t f ( ' A n g l e = %d degree, %dm',thetha,radius); %text(225,(matime-mitime)/5+mitime,s); %pause; % o r i g i n compresation to be i n s e r t here % INTEFERENCE MART IX PARAMETER ph_m_x_axis = angle; ph_m_x_size = l e n g t h ( a n g l e ) ; %360 degrees ph_m_y_size = f i x ( ( matime+l*duration - (mitime-duration) )/time_step + 60); ph_m_start = mitime-duration-20*time_step; %corresponding to the s t a r t i n g time of the f i r s t %element (each column) of the phase matrix. . ph_m_y_axis = ph_m_start:time_step:ph_m_start+(ph_m_y_size-l)*time_step; % d e f i n i n g the a x i s : time (y) against angle (x) t r a v e l _ t i m e _ n o _ o f f s e t = t r a v e l _ t i m e - ph_m_start; ph_m_pos = t r a v e l _ t i m e _ n o _ o f f s e t ./ time_step; % c a l c u l a t e the proper s i z e of the phase matrix; %the s i z e includes zero padding to avoid wrap around % e r r o r when doing match f i l t e r i n g . % f i n d i n g where the s i n g a l begin to appear i n the %phase matrix %plot(angle,ph_m_pos(1,:)); zero_ph_m = zeros(ph_m_y_size,ph_m_x_size); % f o r i n i t i a l i z a t i o n • 169 %set the t o t a l response to be zero % END INTEFERENCE MARTIX PARAMETER % MAKING THE MATCH FILTERING f i l t e r = [ ] ; fo r ccc = 1:2 time_span = [(0:floor(num_of_step)).';... zeros(ph_m_y_size-floor(num_of_step)-1,1)]; f o r ( k = 1:num_of_change(ccc)) f l i p _ s t a r t _ p o s = c e i l ( sam_at_change(ccc,k) ) + 1; flip_end_pos = f l o o r ( sam_at_change(ccc,k) + sam_per_lambda) + 1; %add 1 to compensate the f a c t that a r r a y s t a r t at 0 % f l o o r ( ) + 1 != c e i l ! ! ! ! ! ! ! ! t i m e _ s p a n ( f l i p _ s t a r t _ p o s : f l i p _ e n d _ p o s ) = ... sam_at_change(ccc,k) - f l i p _ s t a r t _ p o s + 1 + ... ( 0 : ( f l i p _ e n d _ p o s - f l i p _ s t a r t _ p o s ) ).' * (-1) ; end time_span = time_span * time_step; arg = 1/2 * w_rate * time_span."2 + wO * time_span; t m p _ f i l t e r = s i n ( a r g ) ; %make up a matched f i l t e r i n time domain, f i l t e r = [ f i l t e r t m p _ f i l t e r ] ; end % p l o t ( f i l t e r ) ; % g r i d ; %pause; % END MAKING THE MATCH FILTERING % COMPLEMENTARY RESPONSE GENERATION % MAKE UP THE INTEFERENCE MARTIX t o t a l _ f l t _ r e s u l t = zero_ph_m; f o r ccc = 1:2 amp = zero_ph_m; fo r i = 1:number_of_source ph_m_temp = zero_ph_m; %set the phase matrix f o r a source to be zero f o r ( i i = 1:length(angle)) ph_start_pos = c e i l ( p h _ m _ p o s ( i , i i ) )+l; ph_end_pos = floor(ph_m_pos(i,ii)+num__of_step)+1 ; % f i n d where the s i g n a l appears i n the matrix i n %a p a r t i c u l a r angle ph_ra_temp(ph_start_pos:ph_end_pos,ii)=... (0:(ph_end_pos-ph_start_pos)).' + ph_start_pos - ph_m_pos(i,ii) -%the num_of_step cannot decide the number of p o i n t s % i n the matris as the s t a r t i n g p o i n t i s not c e r t a i n % t h e r e f o r e we have to use ph_end...-ph_start %tpl=ph_m_temp(:,ii); f o r ( k = 1:num_of_change(ccc)) f l i p _ s t a r t _ p o s = ceil(ph_m_pos(i,ii)+sam_at_change(ccc,k) ) + 1; flip_end_pos = floor(ph_m_pos(i,ii)+sam_at_change(ccc,k) + 1 + sam_per_lambda); p h _ m _ t e m p ( f l i p _ s t a r t _ p o s : f l i p _ e n d _ p o s , i i ) = . . . ph_m_pos(i,ii) + sam_at_change(ccc,k) - f l i p _ s t a r t _ p o s + 1 + ( 0 : ( f l i p _ e n d _ p o s - f l i p _ s t a r t _ p o s ) ) . ' * (-1) ; end % p l o t ( [ s i n ( t p l * t i m e _ s t e p * w O ) sin(wO *time_step*ph_m_temp(:,ii))]) % g r i d %pause end ph_m_temp = ph_m_temp*time_step; %puting the s i n g a l ( i n time form) i n t o the matrix ph_m = 1/2 * w_rate * ph_m_temp.^2 + wO * ph_m_temp; %convert the s i g n a l i n t o phase angle amplitude = sin(ph_m); amp = amplitude + amp; %adding the t o t a l respond from each source end %surf(ph_m_x_axis,ph_m_y_axis,amp); %view(0,90) %shading f l a t %pause % _ END MAKE UP THE INTEFERENCE MARTIX % MATCH FILTERING % f f t _ f i l t e r = kaiser(ph_m_y_size,2.5) .* c o n j ( f f t ( f i l t e r ( : , c c c ) ) ) * . f f t _ f i l t e r = c o n j ( f f t ( f i l t e r ( : , c c c ) ) ) * one_vector_360; %make up a matched f i l t e r i n freq domain. fft_amp = fft(amp); f l t _ r e s u l t = i f f t ( f f t _ f i l t e r .* fft_amp); t o t a l _ f l t _ r e s u l t = t o t a l _ f l t _ r e s u l t + f l t _ r e s u l t ; end % END MATCH FILTERING % END COMPLEMENTARY RESPONSE GENERATION % p l o t ( p h _ m _ y _ a x i s , r e a l ( t o t a l _ f l t _ r e s u l t ( : ,270) ) ) ; %pause; %mesh(ph_m_x_axis,ph_m_y_axis,real(total_flt_result)); %total_flt_result(1:8,187:360) = zeros(8,174); %surf(ph_m_x_axis,ph_m_y_axis,real(total_flt_result)) ; %view(0,90) %shading f l a t %s = sprintf('CPM, %d degree, %dm, %5.2f',thetha,radius , %max(max(real(total_flt_result) ) ) ) ; %text(187.5, (mitime-duration+O.00005) , s) ; time_range_plot=0.0078; %time_range_plot=87*49.8e-6; range = max(max(real(total_flt_result)))*1.1; rangel = max(max(real(total_flt_result)))*1.1; figure(1) subplot(421) p l o t ( p h _ m _ y _ a x i s , r e a l ( t o t a l _ f l t _ r e s u l t ( : , 1 ) ) ) axis([0 time_range_plot -range rangel]) g r i d t i t l e ( ' S i m u l a t i o n at 30 deg') subplot(423) p l o t ( p h _ m _ y _ a x i s , r e a l ( t o t a l _ f l t _ r e s u l t ( : , 2 ) ) ) axis([0 time_range_plot -range rangel]) g r i d t i t l e ( ' S i m u l a t i o n at 45 deg') subplot(425) p l o t ( p h _ m _ y _ a x i s , r e a l ( t o t a l _ f l t _ r e s u l t ( : , 3) ) ) axis([0 time_range_plot -range rangel]) g r i d t i t l e ( ' S i m u l a t i o n at 60 deg') subplot(427) p l o t ( p h _ m _ y _ a x i s , r e a l ( t o t a l _ f l t _ r e s u l t ( : , 5 ) ) ) a x i s ( [ 0 time_range_plot -range rangel]) g r i d t i t l e ( ' S i m u l a t i o n at 90 deg 1) subplot(422) p l o t ( p h _ m _ y _ a x i s , r e a l ( t o t a l _ f l t _ r e s u l t ( : , 7 ) ) ) a x i s ( [ 0 time_range_plot -range rangel]) g r i d t i t l e ( ' S i m u l a t i o n at 120 deg') subplot(424) p l o t ( p h _ m _ y _ a x i s , r e a l ( t o t a l _ f l t _ r e s u l t ( : , 8))) a x i s ( [ 0 time_range_plot -range rangel]) g r i d t i t l e ( ' S i m u l a t i o n at 135 deg') subplot(426) plot(ph_m_y_axis, r e a l ( t o t a l _ f l t _ r e s u l t ( : , 9 ) ) ) a x i s ( [ 0 time_range_plot -range rangel]) g r i d t i t l e ( ' S i m u l a t i o n at 150 deg') o r i e n t t a l l p r i n t -deps \nel\thesis\pcx\pmsl35.eps pnsnd.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % FILE: pnsnd.m % to create pn data to be used i n the experiment % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% c l e a r ; % PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% need_plot = 1; sample_length = 29.88e-3; % t o t a l _ l e n g t h of s i g n a l %not 30ms as each sample i s shorten pre_dead_air = -0.5e-3; %allow f o r s i g n a l to go i n t o -ve time OFFSET_SCALAR = [(sqrt(13-1)-1)/13 (sqrt(13-1)+1)/13]; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % important note: % si n c e c i r c u l a r c o n v u l a t i o n i s r e q u i r e d i n the PN % s i g n a l the sample r a t e must be set i n a way such % that there i s an i n t e g r a l number of sample f o r the % s i g n a l d u r a t i o n . i n t h i s case % there i s 87 samples %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% time_step v e l o c i t y FreqO Freqf pulse_code = 49.8e-6; %(s) 330 3000 3000 [ 1 % (m/s) % (Hz) % (Hz) 1 -1 pulse_code2= [-1 1 - 1 1 1 to match the experimental r a t e v e l o c i t y of the wave i n i t i a l frequency of c h i r p f i n a l frequency of c h i r p -1 - 1 - 1 - 1 1 1 - 1 1 ] ; each d i g i t of the element represent a length of lambda the phase i s reversed f o r -1's and i s normal f o r l ' s -1 - 1 - 1 - 1 1 1 - 1 1 ] ; complementary of the above s i n g a l source_d = 0.06 ; %(m) distance between array element % i n the x d i r e c t i o n x_separ = [-1.5 -0.5 0.5 1.5 0]; %(number of source_d) % l a s t one i s reference x _ o f f s e t = 0; %the array must be l i n e a r and must be i n i n c r e a s i n g order thetha = 90 ; %degree Angle at which Max beam occurs % "radius" meter away Ori g = [0 0]; %(m) O r i g i n [X Y] co-ordinate %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % END PARAMETERS % PARAMETERS CALCULATION x_source = x_separ * source_d + x _ o f f s e t ; %(m) [ i number_of_source] = s i z e ( x _ s o u r c e ) ; % i i s temperary v a r i a b l e y_source = zeros(1,number_of_source); %(m) lambda_duration = 1/Freq0; %(s) [ i num_of_lambda] = si z e ( p u l s e _ c o d e ) ; d u r a t i o n = num_of_lambda * lambda_duration; num_of_step= (duration/time_step); %number of step of the c h i r p sam__per_lambda = lambda_duration/time_step; time_at_change = ( f i n d ( - l * ( pulse_code time_at_change2 = ( f i n d ( - l * ( pulse_code2 [ i num_of_change ]= size(time_at_change ); [ i num_of_change2]= size(time_at_change2); 1)) - 1)*lambda_duration; 1)) - 1)*lambda_duration; num_of_change = [num_of_change; num_of_change2]; num_of_ch_max = max(num_of_change); s am_a t_c hange [time_at_change zeros(1,num_of_ch_max-num_of_change(1)); time_at_change2 zeros(1,num_of_ch_max-num_of_change(2)) ]/ time_step; % i n case the change p o i n t at lambda end %sam_at_change r e q u i r e adding one wf wO Freqf * 2 * p i ; FreqO * 2 * p i ; ^ i n i t i a l angular f r e q fefinal angular f r e q w r a t e (wf wO) / durat i o n ; % c h i r p - r a t e -END PARAMETERS CALCULATION-% FIRING TIME FOR ANGLE STEERING thethar = thetha / 180 * p i ; %convert to ra d i a n t r a v e l _ t i m e = 0; %convert the distance d i f f e r e n c e to time d i f f e r e n c e dvcosthetha = source_d / v e l o c i t y * c o s ( t h e t h a r ) ; t r a v e l _ t i m e = t r a v e l _ t i m e + dvcosthetha * x_separ; %angle compensation here % n o t i c e the +dvcos.... here : x_separ i s -ve already % END FIRING TIME FOR ANGLE STEERING % o r i g i n compresation to be i n s e r t here % SIGNAL CALCULATION ph_m_start = pre_dead_air; ph_m_x_axis = x_separ; ph_m_x_size = number_of_source; %360 degrees ph_m_y_size = sample_length/time_step; ph_m_y_axis = ph_m_start:time_step:ph_m_start+(ph_m_y_size-l)*time_step; % d e f i n i n g the a x i s : time (y) against angle (x) 175 t r a v e l _ t i m e _ n o _ o f f s e t = t r a v e l _ t i m e - ph_m_start; ph_m__pos = t r a v e l _ t i m e _ n o _ o f f s e t ./ time_step; % f i n d i n g where the s i n g a l begin to appear i n the %phase matrix zero_ph_m = zeros(ph_m_y_size,ph_m_x_size); % f o r i n i t i a l i z a t i o n %set the t o t a l response to be zero amp = [ zero_ph_m, zero_ph_m] ; ph_start_pos = ceil(ph_m_pos) +1; ph_end_pos = floor(ph_m_pos +num_of_step)+1; % f i n d where the s i g n a l appears i n the matrix i n %a p a r t i c u l a r angle f o r ccc = 1:2 ph_m_temp = zero_ph_m; ph_m_mag = ones(size(zero_ph_m))+OFFSET_SCALAR(ccc); f o r i = 1:ph_m_x_size ph_m_temp(ph_start_pos(i) :ph_end_pos(i) , i ) = . . . ( 0 : ( p h _ e n d _ p o s ( i ) - p h _ s t a r t _ p o s ( i ) ) ) . ' + p h _ s t a r t _ p o s ( i ) - ph_m_pos(i) - 1; %the above l i n e i s double checked on Jan 24 96 to %ensure the s t a r t i n g p o s i t i o n i s c o r r e c t and that %the time s h i f t i s c o r r e c t %the num_of_step cannot decide the number of p o i n t s % i n the matris as the s t a r t i n g p o i n t i s not c e r t a i n % t h e r e f o r e we have to use ph_end...-ph_start f o r ( k = 1:num_of_change(ccc)) f l i p _ s t a r t _ p o s = ceil(ph_m_pos(i)+sam_at_change(ccc, k) ) + 1; flip_end_pos = floor(ph_m_pos(i)+sam_at_change(ccc,k) + 1 +... sam_per_lambda); ph_m_temp(flip_start_pos:flip_end_pos,i)=... ph_m_pos(i) + sam_at_change(ccc,k) - f l i p _ s t a r t _ p o s + 1 + ... ( 0 : ( f l i p _ e n d _ p o s - f l i p _ s t a r t _ p o s ) ) . ' * (-1) ; ph_m_mag(flip_start_pos:flip_end_pos , i ) =... o n e s ( f l i p _ e n d _ p o s - f l i p _ s t a r t _ p o s + l , 1 ) * (l-OFFSET_SCALAR(ccc)); end end ph_m_mag = (ph_m_mag * 2047 / (l+OFFSET_SCALAR(ccc))); ph_m_temp = ph_m_temp*time_step; %puting the s i n g a l ( i n time form) i n t o the matrix ph_m = 1/2 * w_rate * ph_m_temp."2 + wO * ph_m_temp; %convert the s i g n a l i n t o phase angle amplitude = round(ph_m_mag.*sin(ph_m)); amp(:,((ccc-1)*number_of_source+l):(ccc*number_of_source)) = amplitude %adding the t o t a l respond from each source end % END SIGNAL CALCULATION sb = s p r i n t f ( ' p n % d s . f i l ' ,thetha); sbr = s p r i n t f ( ' p n r % d s . f i l ' , t h e t h a ) ; FIDb = fopen(sb ,'w'); FIDbr= fopen(sbr,'w'); f o r ( i =1:(number_of_source-l)) f o r (ii=l:ph_m_y_size) i f (round(ii/10)-ii/10)==0 f p r i n t f ( F I D b , ' % 6d\n',amp(ii,i)); f p r i n t f ( F I D b r , '%6d\n',amp(ii,2 *number_of_source)); e l s e f p r i n t f ( F I D b , '%6d' , a m p ( i i , i ) ) ; f p r i n t f ( F I D b r , ' % 6 d ' ,amp(ii,2*number_of_source)); end end. f p r i n t f ( F I D b ,'\n'); f p r i n t f ( F I D b r , '\n') ; end ' f c l o s e ( ' a l l 1) ; i f need_plot range = 2 048 f i g u r e ( 1 ) subplot(111); plot(amp(:,1)) a x i s ( [ 0 100 -range range]) 177 f i g u r e ( 2 ) subplot(111); plot(amp(:,2)) a x i s ( [ 0 100 -range range]) f i g u r e ( 3 ) subplot(111) ; plot(amp(:,3)) a x i s ( [ 0 100 -range range]) f i g u r e ( 4 ) subplot(111); plot(amp(:,4)) a x i s ( [ 0 100 -range range]) f i g u r e ( 5 ) subplot(111); plot(amp(:,10),'r') a x i s ( [ 0 100 -range range]) one_graph = [amp(:,1:4) amp( :,10)] ; fig u r e ( 6 ) subplot(111) plot(one_graph) a x i s ( [ 0 100 -range range]) end pnda.m c l e a r INPUT_CH = 7; NUM_PER_CH = 600; SAM_PER_DUR = 87; NUM_PER_ROW = 10; 0UTPUT_CH = 4; TIME_STEP = 49.8e-6;%chosen such that the s i g n a l has i n t e r g e r # of sam 87 NUM_OF_REPEAT =2; load p n 9 0 r . f i l load p n r 9 0 s . f i l load . . \ y e s r . f i l % l o a d p n d l r . f i l 178 load . . \ d e l t a s . f i l load . . \ . . \ o f f s e t d e l t a r = yesr; pns = pnr90s; pnr = pn90r; c l e a r p n d l r pn90r pnr90s IN_FILE_ROW = NUM_PER_CH* INPUT_CH/NUM_PER_ROW; OUT_FILE_ROW = NUM_PER_CH*OUTPUT_CH/NUM_PER_ROW; fo r i=l:OUT_FILE_ROW f o r j = 1:NUM_PER_ROW impout(floor(((i-1)*NUM_PER_ROW+j-1)/NUM_PER_CH) + 1 ((((i-1)*NUM_PER_ROW+j-l)/NUM_PER_CH)- ... floor(((i-1)*NUM_PER_ROW+j-l)/NUM_PER__CH))*NUM_PER_CH + 1 ) = d e l t a s ( i , j ) ; pnout(floor(((i-1)*NUM_PER_ROW+j-1)/NUM_PER_CH) + 1 ((((i-1)*NUM_PER_ROW+j-l)/NUM_PER_CH)- ... f1oor(((i-1)*NUM_PER_ROW+j-1)/NUM_PER_CH))*NUM_PER_CH + 1)=pns(i,j) ; end end f o r i=l:IN_FILE_ROW f o r j =1:NUM_PER_ROW impinffloor(((i-1)*NUM_PER_ROW+j-1)/NUM_PER_CH) + 1 ((((i-1)*NUM_PER_ROW+j-l)/NUM_PER_CH)- ... floor(((i-1)*NUM_PER_ROW+j-l)/NUM_PER_CH))*NUM_PER_CH + 1 ) = d e l t a r ( i , j ) ; pninffloor(((i-1)*NUM_PER_ROW+j-l)/NUM_PER_CH) + 1 ((((i-1)*NUM_PER_ROW+j-l)/NUM_PER_CH)- ... floor(((i-1)*NUM_PER_ROW+j-l)/NUM_PER_CH))*NUM_PER_CH + 1 ) = p n r ( i , j ) ; end end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %input channel o f f s e t c o r r e c t i o n here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% offsetmat = o f f s e t . 1 * o n e s ( 1 , l e n g t h ( i m p i n ) ) ; impin = impin-offsetmat; pnin = pnin -offsetmat; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% c l e a r IN_FILE_ROW OUT_FILE_ROW NUM_PER_ROW i j . . . 179 d e l t a s d e l t a r offsetmat o f f s e t pns pnr impout = impout * 2.5 / 2048; impin = impin * 2.5 / 2048 * (1+3300/560) / (1+82000/560); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %deconv done here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %using the same impulse response f o r a l l channels %with the magnitude adjusted impinold = impin; s c a l e = max(impin.')/max(max(impin)); impin = s c a l e . ' * impin(4,:); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PROCESS_LEN = 60 0 time_axis = (1:PROCESS_LEN)*TIME_STEP; discard_sam = floor(42*2.54/100/330/0.00005); impulse_b4_ref = floor(4.3e-3/0.00005); e s p i l o n = 0; impintruc = [impin(:,discard_sam:discard_sam-l+impulse_b4_ref) ... zeros(7,PROCESS_LEN-impulse_b4_ref)].'; %impintruco= [impinold(:,discard_sam:discard_sam-l+impulse_b4_ref) %zeros(7,PROCESS_LEN-impulse_b4_ref)].'; i m p i n f f t = f f t ( i m p i n t r u c ) ; i m p o u t f f t = fft(impout(3,1:PROCESS_LEN) ); T x f c n f f t = i m p i n f f t . / ( i m p o u t f f t . ' * o n e s ( 1 , 7 ) ) ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % a l t approaches to c a l c u l a t e t x fen i n one shot % T x f c n f f t = (abs(impinfft)."2+espilon) ./... % ( ( i m p o u t f f t . ' * o n e s ( 1 , 7 ) ) . * c o n j ( i m p i n f f t ) ) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pnin_decov = i f f t ( f f t ( p n i n . 1 ) ./ T x f c n f f t ) ; pnin_decov = real(pnin_decov).'; e l s e pnin_decov = pnin; 180 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % c i r c u l a r i z e here and tur n to voltage l e v e l %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% p n i n _ c i r = zeros(INPUT_CH,SAM_PER_DUR); p n o u t _ c i r = zeros(1,SAM_PER_DUR); f o r i=l:NUM_OF_REPEAT p n i n _ c i r = p n i n _ c i r + pnin_decov(:,1+(i-1)*SAM_PER_DUR:i*SAM_PER_DUR); p n o u t _ c i r = p n o u t _ c i r + pnout(1,1+(i-1)*SAM_PER_DUR:i*SAM_PER_DUR); end c i r _ t i m e _ a x i s = (0:(SAM_PER_DUR-1)) * TIME_STEP; p n o u t _ c i r = p n o u t _ c i r * 2.5 / 2048; p n i n _ c i r = p n i n _ c i r * 2.5 / 2048; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % f i l t e r i n g done here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% f i t = c o n j ( f f t ( pnout_cir.'*ones(l,INPUT_CH) ) ) ; f l t _ r s t _ f f t = f f t ( p n i n _ c i r . ' ) . * f I t ; r e s u l t = r e a l ( i f f t ( f l t _ r s t _ f f t ) ) . ' ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% xrange = TIME_STEP * SAM_PER_DUR; range = max(max(result))*1.1; rangel = max(max(result))*1.1 ; f u l l _ f i g = 0; fi g u r e ( 1 ) i f f u l l _ f i g f i g u r e ( 1 ) ; s u b p l o t ( 1 1 1 ) ; e l s e subplot(426); end; p l o t ( c i r _ t i m e _ a x i s , r e s u l t ( 1 , : ) ) a x i s ( [ 0 xrange -range rangel]) t i t l e ( ' p n response f o r channel l(150deg)') g r i d i f f u l l _ f i g f i g u r e ( 2 ) ; s u b p l o t ( 1 1 1 ) ; e l s e subplot(424); end; p l o t ( c i r _ t i m e _ a x i s , r e s u l t ( 2 , : ) ) a x i s ( [ 0 xrange -range rangel]) t i t l e ( ' p n response f o r channel 2(135deg)') g r i d i f f u l l _ f i g f i g u r e ( 3 ) ; s u b p l o t ( 1 1 1 ) ; e l s e subplot(422); end; p l o t ( c i r _ t i m e _ a x i s , r e s u l t ( 3 , : ) ) a x i s ( [ 0 xrange -range rangel]) t i t l e ( ' p n response f o r channel 3(120deg)') 181 g r i d i f f u l l _ f i g figure(4);subplot(111); else subplot(427); end; p l o t ( c i r _ t i m e _ a x i s , r e s u l t ( 4 , : ) ) axis([0 xrange -range rangel]) t i t l e ( ' p n response for channel 4(90deg)') g r i d i f f u l l _ f i g figure(5);subplot(111); else subplot(425); end; p l o t ( c i r _ t i m e _ a x i s , r e s u l t ( 5 , : ) ) axis([0 xrange -range rangel]) t i t l e ( ' p n response for channel 5(60deg)') g r i d i f f u l l _ f i g figure(6);subplot(111); else subplot(423); end; p l o t ( c i r _ t i m e _ a x i s , r e s u l t ( 6 , : ) ) axis([0 xrange -range rangel]) t i t l e ( ' p n response for channel 6(45deg)') g r i d i f f u l l _ f i g figure(7);subplot(111); else subplot(421); end; p l o t ( c i r _ t i m e _ a x i s , r e s u l t ( 7 , : ) ) axis([0 xrange -range rangel]) t i t l e ( ' p n response for channel 7(30deg)') g r i d o r i e n t t a l l p r i n t -deps \nel\thesis\pcx\pn90.eps pnanal.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % FILE: pnanal.m % To pulse compress the interference pattern % for phase modulation (with complementary code) % and 3 60 degree displa y (8x oversample) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% c l g ; c l e a r ; colormap(gray); % PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OFFSET_SCALAR = [(sqrt(13-1)-1)/13 (sqrt(13-1)+1)/13]; FreqO = 3000 ; %(Hz) i n i t i a l frequency of chir p Freqf = 3000 ; %(Hz) f i n a l frequency of chir p pulse_code = [ 1 1-1 1 1 - 1 - 1 - 1 - 1 1 1-1 1] %pulse_code = [ 1 1-1 1 1 1 1 -1 ]; % each d i g i t of the element % represent a length of lambda % the phase i s reversed f o r - l ' s % and i s normal f o r 1's pulse_code2 = [-1 1-1 1 1 -1 -1 - 1 - 1 1 1 -1 1] %pulse_code2= [ 1 1-1 1 - 1 - 1 - 1 1 ]; % complementary of the above s i n g a l time_step = 49.8e-6; %(s) to match the experimental r a t e v e l o c i t y = 330 ; %(m/s) v e l o c i t y of the wave source_d = 0.06 ; %(m) distance between array element % i n the x d i r e c t i o n x_separ = [-1.5 -0.5 0.5 1.5 ]; %(number of source_d) %x_separ = [-0.5 0.5 ]; %(number of source_d) x _ o f f s e t = 0; %the array must be l i n e a r and must be i n i n c r e a s i n g order O r i g = [0 0]; %(m) O r i g i n [X Y] co-ordinate thetha = 90 ; %degree Angle at which Max beam occurs radius = 1.06680 ; %(m) the s i g n a l i s recorded i n % "radius" meter away %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % END PARAMETERS % PARAMETERS CALCULATION x_source '= x_separ * source_d + x _ o f f s e t ; %(m) [ i number_of_source] = s i z e ( x _ s o u r c e ) ; % i i s temperary v a r i a b l e y_source = zeros(1,number_of_source); % (m) lambda_duration = 1/FreqO; %(s) [ i num_of_lambda] = s i z e ( p u l s e _ c o d e ) ; d u r a t i o n = num_of_lambda * lambda_duration; num_of_step= (duration/time_step); %number of step of the c h i r p sam_per_lambda = time_at_change : time_at_change2 : [ i num_of_change ]= [ i num_of_change2]= 1ambda_dura t i on/1 ime_s tep; ( f i n d ( - l * ( pulse_code - 1)) ( f i n d ( - l * ( pulse_code2 - 1)) size(time_at_change ); size(time_at_change2); 1)*lambda_duration; 1)*lambda_duration; num_o f_change [num_of_change; num_of_change2]; num_of_ch_max = max(num_of_change); sam_at_change = [time_at_change zeros(1,num_of_ch_max-num_of_change(1)); time_at_change2 zeros(1,num_of_ch_max-num_of_change(2)) ]/ time_step; • % i n case the change p o i n t at lambda end %sam_at_change r e q u i r e adding one wf = Freqf * 2 * p i ; % i n i t i a l angular f r e q wO = FreqO * 2 * p i ; % f i n a l angular f r e q w_rate = (wf - wO) / durati o n ; % c h i r p - r a t e % END PARAMETERS CALCULATION % MAKE UP ARC angle = 30:15:150; %range of angle to be di s p l a y e d angler = angle / 180 * p i ; %convert the angle to radian arc_X = O r i g ( l ) + cos(angler) * ra d i u s ; arc_Y = Orig(2) + si n ( a n g l e r ) * ra d i u s ; % END MAKE UP ARC % DISTANCE CALCULATION one_vector_3 60 = o n e s ( s i z e ( a n g l e ) ) ; one_vector_NoS = ones(number_of_source,1); dx = (one_vector_NoS * arc_X - x_source.' * one_vector_360) . " 2 ; dy = (one_vector_NoS * arc_Y - y_source.' * one_vector_360). A2; d = sqrt(dx+dy); % c a l c u l a t e the distance between each source and %each p o i n t i n the arc. % END DISTANCE CALCULATION % FIRING TIME FOR ANGLE STEERING thethar = thetha / 180 * p i ; %convert to ra d i a n t r a v e l _ t i m e = d / v e l o c i t y ; %convert the distance d i f f e r e n c e to time d i f f e r e n c e dvcosthetha = source_d / v e l o c i t y * c o s ( t h e t h a r ) ; t r a v e l _ t i m e = t r a v e l _ t i m e + dvcosthetha * x_separ.' * one_vector_3 60; %angle compensation here % n o t i c e the +dvcos.... here : x_separ i s -ve already % END FIRING TIME FOR ANGLE STEERING matime = max(max(travel_time)) ; mitime = m i n ( m i n ( t r a v e l _ t i m e ) ) ; % p l o t ( a n g l e , t r a v e l _ t i m e ) % g r i d ; % t i t l e ( ' A r r i v i a l Time w i t h Compensation'); % x l a b e l ( ' A n g l e from Center of Array (degree)'); % y l a b e l ( ' A r r i v i a l Time (second)'); %s = s p r i n t f ( ' A n g l e = %d degree, %dm',thetha,radius) ; %text(22 5,(matime-mitime)/5+mitime,s); %pause; % o r i g i n compresation to be i n s e r t here % INTEFERENCE MARTIX PARAMETER ph_m_x_axis = angle; ph_m_x_size = l e n g t h ( a n g l e ) ; %360 degrees %ph_m_y_size = f i x ( ( matime+l*duration - (mitime-duration) )/time_step + 4); ph_m_y_size = 3 * num_of_step; % c a l c u l a t e the proper s i z e of the phase matrix; %the s i z e includes zero padding to avoid wrap around % e r r o r when doing match f i l t e r i n g . mitime-duration-2 *time_step; -1 * num_of_step * time_step; %corresponding to the s t a r t i n g time of the f i r s t %element (each column) of the phase matrix. ph_m_y_axis = ph_m_start:time_step:ph_m_start+(ph_m_y_size-l)*time_step; % d e f i n i n g the a x i s : time (y) against angle (x) t r a v e l _ t i m e _ n o _ o f f s e t = t r a v e l _ t i m e - ph_m_start; ph_m_pos = t r a v e l _ t i m e _ n o _ o f f s e t ./ time_step; % f i n d i n g where the s i n g a l begin to appear i n the %phase matrix %plot(angle,ph_m_pos(1,:)); %ph_m_start = ph_m_start zero_ph_m = zeros(ph_m_y_size,ph_m_x_size); % f o r i n i t i a l i z a t i o n %set the t o t a l response to be zero % END INTEFERENCE MARTIX PARAMETER % MAKING THE MATCH FILTERING f i l t e r = [ ] ; f i l t e r _ m a g = ones(floor(num_of_step),1)+OFFSET_SCALAR(2); %time_span = [(0:floor(num_of_step)).';... % zeros(ph_m_y_size-floor(num_of_step)-1,1)]; time_span = [ ( 0 : f l o o r ( n u m _ o f _ s t e p - l ) ) . ' ] ; f o r ( k = 1:num_of_change(2)) f l i p _ s t a r t _ p o s = c e i l ( sam_at_change(2,k) ) + 1; flip_end_pos = f l o o r ( sam_at_change(2,k) + sam_per_lambda) + 1; %add 1 to compensate the f a c t that array s t a r t at 0 % f l o o r ( ) + 1 != c e i l ! !!!!!!! ti m e _ s p a n ( f l i p _ s t a r t _ p o s : f l i p _ e n d _ p o s ) = ... sam_at_change(2,k) - f l i p _ s t a r t _ p o s + 1 + ... ( 0 : ( f l i p _ e n d _ p o s - f l i p _ s t a r t _ p o s ) ) . 1 * (-1) ; f i l t e r _ m a g ( f l i p _ s t a r t _ p o s : f l i p _ e n d _ p o s ) =... o n e s ( f l i p _ e n d _ p o s - f l i p _ s t a r t _ p o s + l , 1 ) * (l-OFFSET_SCALAR(2)) end time_span = time_span * time_step; arg = 1/2 * w_rate * time_span."2 + wO * time_span; t m p _ f i l t e r = s i n ( a r g ) . * f i l t e r _ m a g ; %make up a matched f i l t e r i n time domain, f i l t e r = t m p _ f i l t e r ; % f i l t e r = [ f i l t e r t m p _ f i l t e r ] ; % p l o t ( f i l t e r ) ; % g r i d ; %pause; % END MAKING THE MATCH FILTERING % COMPLEMENTARY RESPONSE GENERATION % MAKE UP THE INTEFERENCE MARTIX t o t a l _ f l t _ r e s u l t = zero_ph_m; ph_m_mag = ones(size(zero_ph_m))+OFFSET_SCALAR(1);-% f o r ccc = 1:2 amp = zero_ph_m; f o r i = 1:number_of_source ph_m_temp = zero_ph_m; %set the phase matrix f o r a source to be zero f o r ( i i = 1:length(angle)) ph_start_pos = c e i l ( p h _ m _ p o s ( i , i i ) )+l; ph end pos = f l o o r ( p h m pos(i,ii)+num of step)+l; % f i n d where the s i g n a l appears i n the matrix i n %a p a r t i c u l a r angle ph_m_temp(ph_start_pos:ph_end_pos,ii)=... (0:(ph_end_pos-ph_start_pos)).' + ph_start_pos - ph_m_pos(i,ii) - 1 %the num_of_step cannot decide the number of p o i n t s % i n the matris as the s t a r t i n g p o i n t i s not c e r t a i n % t h e r e f o r e we have to use ph_end...-ph_start f o r ( k = 1:num_of_change(1)) f l i p _ s t a r t _ p o s = ceil(ph_m_pos(i,ii)+sam_at_change(1,k) ) + 1; flip_end_pos = floor(ph_m_pos(i,ii)+sam_at_change(1,k) + 1 +... sam_per_lambda); ph_m_temp(flip_start_pos:flip_end_pos , i i ) = . . . ph_m_pos(i,ii) + sam_at_change(1,k) - f l i p _ s t a r t _ p o s + 1 + ... ( 0 : ( f l i p _ e n d _ p o s - f l i p _ s t a r t _ p o s ) ) . ' * (-1) ; ph_ m _ m a g ( f l i p _ s t a r t _ p o s : f l i p _ e n d _ p o s , i i ) =... o n e s ( f l i p _ e n d _ p o s - f l i p _ s t a r t _ p o s + l , 1 ) * (1-OFFSET_SCALAR(1)) end end ph_m_temp = ph_m_temp*time_step; %puting the s i n g a l ( i n time form) i n t o the matrix ph_m =1/2 * w_rate * ph_m_temp.^2 + wO * ph_m_temp; %convert the s i g n a l i n t o phase angle amplitude = sin(ph_m).*ph_m_mag; amp = amplitude + amp; %adding the t o t a l respond from each source end %surf(ph_m_x_axis,ph_m__y_axis,amp); %view(0,90) %shading f l a t %pause % END MAKE UP THE INTEFERENCE MART IX % MATCH FILTERING %wrap things around wrap_amp = zeros(num_of_step,ph_m_x_size); f o r i = 1:floor(num_of_step):ph_m_y_size i f ((i+floor(num_of_step)) < ph_m_y_size) j=i+floor(num_of_step-l) e l s e j = floor(ph_m_y_size) end wrap_amp = wrap_amp + amp(i : j , : ) ; end % f f t _ f i l t e r = kaiser(ph_m_y_size,2.5) .* c o n j ( f f t ( f i l t e r ( : , c c c ) ) ) f f t _ f i l t e r = c o n j ( f f t ( f i l t e r ) ) * one_vector_360; %make up a matched f i l t e r i n f r e q domain. fft_amp = fft(wrap_amp); f l t _ r e s u l t = i f f t ( f f t _ f i l t e r .* fft_amp); t o t a l _ f l t _ r e s u l t = f l t _ r e s u l t ; % t o t a l _ f l t _ r e s u l t = t o t a l _ f l t _ r e s u l t + f l t _ r e s u l t ; %end % END MATCH FILTERING % END COMPLEMENTARY RESPONSE GENERATION % p l o t ( p h _ m _ y _ a x i s , r e a l ( t o t a l _ f l t _ r e s u l t ( : , 2 7 0 ) ) ) ; %pause; % m e s h ( p h _ m _ x _ a x i s , p h _ m _ y _ a x i s , r e a l ( t o t a l _ f l t _ r e s u l t ) ) ; % t o t a l _ f l t _ r e s u l t ( 1 : 8 , 1 8 7 : 3 6 0 ) = zeros(8,174); % s u r f ( p h _ m _ x _ a x i s , p h _ m _ y _ a x i s , r e a l ( t o t a l _ f l t _ r e s u l t ) ) ; %view(0,90) %shading f l a t %s = sprintf('CPM, %d degree, %dm, %5.2f',thetha,radius , % m a x ( m a x ( r e a l ( t o t a l _ f l t _ r e s u l t ) ) ) ); %text(187.5,(mitime-duration+O.00005),s); %time_range_plot=0.0078; time_range_plot=87*49.8e-6; 188 range = m a x ( m a x ( r e a l ( t o t a l _ f l t _ r e s u l t ) ) ) * 1 . 1 ; rangel = m a x ( m a x ( r e a l ( t o t a l _ f l t _ r e s u l t ) ) ) * 1 . 1 ; plot_time_span = t i m e _ s t e p * ( 0 : f l o o r ( n u m _ o f _ s t e p - l ) ) ; f i g u r e ( 1 ) subplot(421) p l o t ( p l o t _ t i m e _ s p a n , r e a l ( t o t a l _ f l t _ r e s u l t ( : , 1))) a x i s ( [ 0 time_range_plot -range rangel]) g r i d t i t l e ( ' S i m u l a t i o n at 30 deg') subplot(423) p l o t ( p l o t _ t i m e _ s p a n , r e a l ( t o t a l _ f l t _ r e s u l t ( : , 2))) a x i s ( [ 0 time_range_plot -range rangel]) g r i d t i t l e ( ' S i m u l a t i o n at 45 deg') subplot(425) p l o t ( p l o t _ t i m e _ s p a n , r e a l ( t o t a l _ f l t _ r e s u l t ( : , 3 ) ) ) a x i s ( [ 0 time_range_plot -range rangel]) g r i d t i t l e ( ' S i m u l a t i o n at 60 deg') subplot(427) p l o t ( p l o t _ t i m e _ s p a n , r e a l ( t o t a l _ f l t _ r e s u l t ( : , 5 ) ) ) a x i s ( [ 0 time_range_plot -range rangel]) g r i d t i t l e ( ' S i m u l a t i o n at 90 deg') subplot(422) p l o t ( p l o t _ t i m e _ s p a n , r e a l ( t o t a l _ f l t _ r e s u l t ( : , 7 ) ) ) a x i s ( [ 0 time_range_plot -range rangel]) g r i d t i t l e ( ' S i m u l a t i o n at 120 deg') subplot(424) p l o t ( p l o t _ t i m e _ s p a n , r e a l ( t o t a l _ f l t _ r e s u l t ( : , 8 ) ) ) a x i s ( [ 0 time_range_plot -range rangel]) g r i d t i t l e ( ' S i m u l a t i o n at 135 deg') subplot(426) p l o t ( p l o t _ t i m e _ s p a n , r e a l ( t o t a l _ f l t _ r e s u l t ( : , 9 ) ) ) a x i s ( [ 0 time_range_plot -range rangel]) g r i d t i t l e ( ' S i m u l a t i o n at 150 deg') o r i e n t t a l l p r i n t -deps \nel\thesis\pcx\pns90.eps 

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
https://iiif.library.ubc.ca/presentation/dsp.831.1-0064848/manifest

Comment

Related Items