Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
RADAR PLANT AND MEASUREMENT TECHNIQUE FOR DETERMINATION OF THE ORIENTATION AND THE DEPTH OF BURIED OBJECTS
Document Type and Number:
WIPO Patent Application WO/1999/001781
Kind Code:
A1
Abstract:
A plant for generation of information indicative of the depth and the orientation of an object positioned below the surface of the ground is adapted to use electromagnetic radiation emitted from and received by an antenna system associated with the plant. The plant has a transmitter and a receiver for generation of the electromagnetic radiation in cooperation with the antenna system mentioned and for reception of the electromagnetic radiation reflected by the object in cooperation with the antenna system, respectively. The antenna system comprises a plurality of individual antenna elements having substantially linear polarization, especially dipole antennas, which are positioned in relation to the geometric center of the antenna system with the various centers of the antenna element displaced in relation to the geometric sensor of the antenna system as the plant has means for rotation, either mechanically or electrically, of the antenna system and thus polarization of the electromagnetic field around or in relation to the geometric center of the antenna system.

Inventors:
GREGERSEN OLE (DK)
JENSEN OLE KIEL (DK)
Application Number:
PCT/DK1998/000296
Publication Date:
January 14, 1999
Filing Date:
July 01, 1998
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
EKKO DANE PRODUCTION A S (DK)
GREGERSEN OLE (DK)
JENSEN OLE KIEL (DK)
International Classes:
G01S7/03; G01S13/02; G01S13/04; G01S13/32; G01S13/88; G01V3/12; H01Q3/04; H01Q3/24; H01Q21/20; H01Q21/26; G01S7/02; G01S7/41; (IPC1-7): G01S13/04; G01S13/88; G01V3/12
Foreign References:
US4728897A1988-03-01
US5499029A1996-03-12
Other References:
PATENT ABSTRACTS OF JAPAN, Vol. 8, No. 192, (P-298); & JP,A,59 079 871 (HIDEO MIYAMOTO) 9 May 1984.
Attorney, Agent or Firm:
Ostenfeld, Patentbureau A/s (Bredgade 41 P.O. Box 1183 Copenhagen K, DK)
Download PDF:
Claims:
PATENT CLAIMS
1. Plant for generation of information indicative of the depth and the orientation of an object positioned below the surface of the ground which plant is adapted to use elec tromagnetic radiation emitted from and received by an antenna system associated with the plant and having a transmitter and a receiver for generation of the electromagnetic radiation in cooperation with the antenna system and for reception of an electromagnetic radiation reflected from the object in cooperation with the antenna system, respectively, characterized in that the antenna system comprises a plurality of individual antenna elements having sub stantially linear polarization, especially dipole antennas, which are positioned in relation to the geometrical center of the antenna system with each of the centers of the antenna ele ments displaced in relation to the geometrical center of the antenna system and that the plant has means for rotation, either mechanically or electrically, of the antenna system and thus polarization of the electromagnetic field around or in relation to the geometric center of the antenna system.
2. Plant according to claim 1, characterized in that the individual antenna ele ments of the antenna system, especially dipole antennas, are positioned radially relative to the geometric center of the antenna system.
3. Plant according to claim 1 or 2, characterized in that the individual antenna elements of the antenna system form polygonal structures symmetrically or alternatively asymmetrically around the geometric center of the antenna system.
4. Plant according to any of the claims 13, characterized in that the individual antenna elements, especially dipole antennas, form orthogonally oriented, alternatively in parallel oriented, sets of transmitter and receiver antennas.
5. Plant according to any of the claims 14, characterized in that the transmitter and receiver antennas of the antenna system are copolar or alternatively crosspolar.
6. Plant according to any of the claims 15, characterized in that the means for providing rotation of the antenna system are arranged to provide the rotation of the antenna system mechanically or electrically and thus provide polarization of the electromagnetic field around the geometric center in angular increments, typically in the order of 22.5°, 30°, 36° or divisions of or multiples of such angles.
7. Plant according to any of the claims 16, characterized in that the transmitter and the receiver of the plant are arranged to perform generation and reception, respectively, of electromagnetic radiation at several individual frequencies, typically within the range 100MHz to 1GHz in steps of 5MHz.
8. Plant according to any of the claims 17, characterized in that the plant com prises signal processing means for measuring a transfer function, for example a voltage transfer function, a current transfer function or combinations thereof or a power transfer function between signals between the emitted and the received radiation.
9. Plant according to any of the claims 18, characterized in that the signal pro cessing means are arranged for measuring the transfer function for associated values of an gular rotation and frequency.
10. Plant according to claim 9, characterized in that the signal processing means are arranged to perform a transformation from frequency to time by Fourier transformation or by using a mathematical exponential model with corresponding rational transfer function on the transfer function associated with that angle, for generation of a time dependent function continuous in time for each angle, calculated at a predetermined number of discrete times using identical calculation times for all the angles.
11. Plant according to claim 10, characterized in that the signal processing means are adapted to perform a signal analysis by Fourier transformation for each of the times in the time dependent function continuous in time associated with each angle, with the time as a constant and the angle as independent variable, for generation of a representation in the angle domain.
12. Plant according to claim 9, characterized in that the signal processing means are adapted to perform a signal analysis by Fourier transformation for each frequency ha ving the frequency as a constant and the angle as an independent variable, for generation of a set of numbers having the angle harmonic and the measuring frequency as independent variables.
13. Plant according to claim 12, characterized in that the signal processing means furthermore are adapted to perform a transformation from frequency to time by Fourier transformation or by applying a mathematical exponential model with corresponding ratio nal transfer function deriving for each angle harmonic a time dependent, in time continuous function at a predetermined number of discrete times, using identical calculation times for every angle harmonic, generating a set of numbers corresponding to a mathematical functi on having the angle harmonic in discrete form and the time in discrete form as independent variables.
14. Plant according to any of the claims 11 13, characterized in that the signal processing means furthermore are adapted to perform a scanning for local and global maxi ma indicating angle periodical reflections from objects, in the representation in the angle domain, and where the peak value indicates the time delays of associated reflections from an object.
15. Plant according to any of the claims 1014, characterized in that the signal processing means furthermore are adapted to perform a calculation of angle position relative to the antenna system for the angle periodical reflections.
16. Plant according to any of the claims 1015, characterized in that the plant comprises signal processing means for utilizing, during horizontal movement above the ground, collocated measurements for the suppression of clutter.
17. Method for generation of information indicative of the depth and the orientati on of an object positioned below the surface of the ground which method comprises the use of electromagnetic radiation emitted from and received by an antenna system by means of a transmitter and a receiver for the generation of the electromagnetic radiation in cooperation with the antenna system and for reception of an electromagnetic radiation reflected from the object in cooperation with the antenna system, respectively, characterized in that for trans mission and reception of the electromagnetic radiation a plurality of individual antenna ele ments is used having substantially linear polarization, especially dipole antennas, which are positioned in relation to the geometrical center of the antenna system with each of the cen ters of the antenna elements displaced in relation to the geometrical center of the antenna system and that the antenna system is rotated, either mechanically or electrically, around or in relation to the geometric center of the antenna system.
18. Method according to claim 17, characterized in that for transmission and re ception of the electromagnetic radiation said antenna system is used having the individual antenna elements, especially the dipole antenna, positioned radially from the geometric center of the antenna system.
19. Method according to claim 17 or 18, characterized in that for transmission and reception of the electromagnetic radiation said antenna system is used having the individual antenna elements, especially the dipole antenna, forming polygonal structures positioned symmetrically or alternatively asymmetrically around the geometric center of the antenna system.
20. Method according to any of the claims 1719, characterized in that for trans mission and reception of the electromagnetic radiation the individual antenna elements of said antenna system mentioned are used, especially the dipole antennas, forming orthogo nally oriented, alternatively in parallel oriented sets of transmitter and receiver.
21. Method according to any of the claims 1720, characterized in that for trans mission and reception of the electromagnetic radiation transmitter and receiver antennas are used, which are copolar or alternatively crosspolar.
22. Method according to any of the claims 1721, characterized in that the rotation of the antenna system is produced by rotating, mechanically or electrically, the antenna sy stem and thus achieving polarization of the electromagnetic field around the geometric cen ter in angular increments, typically in the order of 22.5°, 300, 36° or divisions of or multi ples of such angles.
23. Method according to any of the claims 1722, characterized in that the genera tion and the reception of electromagnetic radiation are performed at several individual fre quencies, typically within the range 100MHz to 1 GHz in steps of SMHz.
24. Method according to any of the claims 1723, characterized in that, in said method, signal processing is performed for measurement of a transfer function, for example a voltage transfer function, a current transfer function or combinations thereof or a power transfer function between signals between the emitted and the received radiation.
25. Method according to any of the claims 1724, characterized in that, in said signal processing, a measurement of the transfer function for associated values of angular change and frequency is performed.
26. Method according to claim 25, characterized in that, in said signal processing, a transformation from frequency to time is performed by Fourier transformation or by the use of a mathematical exponential model with corresponding rational transfer function of said transfer function associated with that angle, for generation of a time dependent functi on, continuous in time for each angle, calculated at a predetermined number of discrete ti mes using identical calculation times for all the angles.
27. Method according to claim 26, characterized in that, in said signal processing, a signal analysis by Fourier transformation for each of said times is performed on said time dependent function, continuous in time and associated with each angle, with the time as a constant and the angle as independent variable, for the generation of a representation in the angle domain.
28. Method according to claim 25, characterized in that, in said signal processing, a signal analysis by Fourier transformation for each of the frequencies is performed with the frequency as a constant and the angle as independent variable, for generation of a set of numbers having the angle harmonic and the measuring frequency as independent variables.
29. Method according to claim 28, characterized in that, in said signal processing, a transformation from frequency to time is furthermore performed by Fourier transformation or by the use of a mathematical exponential model with corresponding rational transfer function deriving for each angle harmonic a time dependent, in time continuous function at a predetermined number of discrete times, using identical calculation times for every angle harmonic, generating a set of numbers corresponding to a mathematical function having the angle harmonic in discrete form and the time in discrete form as independent variables.
30. Method according to claims 2729, characterized in that, in said signal proces sing, a scanning for local and global maxima is performed indicating angle periodical re flections from objects, in representation in the angle domain, and where the peak value indi cates the time delays of associated reflections from an object.
31. Method according to any of the claims 2630, characterized in that, in said signal processing, a calculation of the angular position relative to the antenna system for the angle periodical reflections is furthermore performed.
32. Method according to any of the claims 2631, characterized in that the signal processing utilizes, during horizontal movement above the ground, collocated measurements for the suppression of clutter.
Description:
Radar plant and measurement technique for determination of the orientation and the depth of buried objects.

The present invention generally relates to a technique for detection of objects in the ground by means of ground radars. More specifically, the invention relates to a plant for generation of information indicative of the depth and the orientation of an object positioned below the surface of the ground which plant is adapted to use electromagnetic radiation emitted from and received by an antenna system associated with the plant and which plant has a transmitter and a receiver for generation of the electromagnetic radiation in cooperation with the antenna system mentioned and for reception of an electromagnetic radiation reflected from the object in cooperation with the antenna system, respectively. Various technical solutions and embodiments of such ground radar plants and various embodiments of methods for generation of information about the depth and position of the object in question from a detection by means of ground radars are known. Examples of such technical solutions are described in the following publications: US-patents Nos. 5,339,080, 5,192,952, 5,499,029, 4,504,033, 5,325,095, 4,430,653, 4,698,634, 4,062,010, 4,839,654 and 5,130,711. These US patents are referred to and they are hereby incorporated in the present specification by reference. Especially US-patent No. 4,728,897 describes a technique which is relevant in the present context as this US patent discloses an antenna construction in which a number of dipoles are positioned symmectically around a common centre and are brought to pivot either mechanically or electrically for generation of and reception of electromagnetic radiation. This technology enables to a large extent achievement of relevant information about the position and orientation of the object in question, but the technique is still open to improvements and modifications rendering it possible to obtain an even substantially improved generation of information and thus a safer and more reliable identification of the depth and orientation of the object to be identified.

It is an object of the present invention to provide an ground radar plant, i.e. a plant of the type described in the introduction, which plant provides an improved functionality regarding identification of the object in question, compared to technical solutions of the prior art, and consequently provides an improved measuring technique, compared to technical solutions of the prior art.

This object together with numerous other objects, advantages and special features of the present invention which will be evident from the following detailed description is obtained by means of a plant of the type mentioned in the introduction, which plant is characterized by being adapted to use electromagnetic radiation emitted from and received by an antenna system associated with the plant and having a transmitter and a receiver for generation of the electromagnetic radiation in cooperation with the antenna system mentioned, and for reception of an electromagnetic radiation reflected from the object in cooperation with the antenna system, respectively, characterized in that the antenna system comprises a plurality of individual dipole antennas, which are positioned in relation to the geometrical centres of the antenna system with the centres of the various dipole antennas displaced in relation to the geometrical centre of the antenna system and that the plant has means for rotation, either mechanically or electrically, of the antenna system around or in relation to the geometric centre of the antenna system. The embodiment of the antenna system characteristic of the present invention with the various dipole antenna displaced in relation to the geometric centre of the antenna system enables a substantially more complex radiation of electromagnetic radiation and at the same time a more precise and subtle reception of electromagnetic radiation which makes the obtaining of a substantial improvement of the measuring technique possible.

The antenna system characteristic of the present invention may in accordance with two alternative embodiments be produced in a manner so that the individual dipole antenna are positioned radially from the geometric centre of the antenna system, still with the centres of the various dipole antenna positioned displaced in relation to the geometric centre of the antenna system and especially with the centres of the various dipole antennas positioned on a circle or on several circles with different radii and with the geometric centre of the antenna system coincident with the centres of the circles in question, or the various dipole antenna may alternatively form a triangle structure positioned symmetrically around the geometric centre of the antenna system, i.e. with dipoles positioned in a triangle and with the vertex of a triangle positioned in the geometric centre of the antenna system or with composite triangle structures forming a configuration positioned symmetrically around the geometric centre of the antenna system. Alternatively, these two dipole antenna embodiments may be combined, similarly provision of another radiation pattern, other geometric configurations

than triangle structures may also be used, e.g. quadrangle or polygonal structures or combinations of several different multiangle structures.

The individual antenna elements of the antenna system of the plant according to the present invention, being characteristic of the present invention, forming parallel orientered sets of transmitter and receiver, or alternatively the individual antenna elements forming orthogonally oriented transmitter and receiver pairs. Furthermore, the individual antenna elements of the antenna system may be co-polar or alternatively cross-polar. These special features enable the use of a broad variety of embodiments.

The plant according to the present invention may comprise means for production of rotation of the antenna system and thus produce a rotation, either mechanically or electrically of the antenna system. Preferably, in the present invention electronic rotation is applied in order to obtain a thorough control of the roation and a substantial reduction of the total weight of the plant. The electronic rotation may be produced by shifting between the individual antenna elements of the antenna system and thus providing polarization of the electromagnetic field around the geometric centre in angular increments which typically may be in the order of 22.5°, 30°, 36° or divisions or multiples of such angles.

The antenna system of the plant according to the present invention may in accordance with one embodiment generate electromagnetic radiation and receive electromagnetic radiation at several individual frequences, preferably in the range of 100MHz to 1 GHz in steps of 5MHZ. The obtained advantage is the provision of a broad spectrum of reflections.

The plant according to the invention may comprise signal processing means for measurement of a transferring function, e.g. a voltage transfer function, current transfer function or combinations thereof or power transfer functions between signals between the radiation emitted by the antenna system and the radiation received by the antenna system. In the present invention a voltage transfer function for connected values of the angular change of the antenna system and the frequency of the signal emitted by the antenna system and the signal received by the antenna system is preferably measured.

The signal processing means of the plant according to the present invention may perform the transformation from frequency to time by Fourier transformation or by application of a mathematic exponential model with corresponding rational transfer function on the transfer function associated with a specific angle, for generation of a continuous-in-time function for each angle which is calculated at a predetermined number of discrete times with identical calculation moments for each angle. Furthermore, the signal processing means may perform a transformation from frequency to time by Fourier transformation or by use of a mathematic exponential model with corresponding rational transfer function for each angular harmonic a time dependent, in-time-continuous function at a predetermined number of discrete times, with identical calculation moments for every angular harmonic, generating a set of numbers corresponding to a mathematic function having the angular harmonic discreted and the time discreted as independent variables. This enables a reliable determination of the strength and time delays of substantial reflectors even though ideal circumstances are not present.

The signal processing means of the plant according to the present invention may perform signal analysis by Fourier transformation on the for each of the employed moments associated with each angle, continuous in time, function having the time as a constant and the angle as independent variable for generation of a representation in the angle domain.

Furthermore, the signal processing means may perform a signal analysis by Fourier transformation for each frequency having the frequency as a constant and the angle as independent variable for generation of a set of numbers having the angular harmonic and the measuring frequency as independent variables. The purpose of applying Fourier transformation is to emphasize the angular harmonic content of the signal at various time delays (and depths).

In the plant according to the present invention, the signal processing means may perform various operations on the processed signals. The signal processing means may preferably perform a scanning of local and global maxima indicating angular periodic reflections of objects, in representation in the angular domain, and where the peak value indicates the time delay of associated reflections from an object. Moreover, the signal processing means may perform calculations of angular position in relation to the antenna system for the angular

periodic reflections and the signal processing means may furthermore perform a utilization of collated measurements, made during horizontal movement, for damping of clutter.

The present invention furthermore relates to a method for generation of information indicative of the depth and the orientation of an object positioned below the surface of the ground which method is characterized by comprising the application of electromagnetic radiation emitted from and received by an antenna system by means of a transmitter and a receiver for the generation of the electromagnetic radiation in cooperation with the antenna system, and for the reception of an electromagnetic radiation reflected from the object in cooperation with the antenna system, respectively, characterized in that for transmission and reception of the electromagnetic radiation a plurality of individual dipole antennas are employed which are positioned in relation to the geometrical centre of the antenna system with each of the centres of the antenna elements displaced in relation to the geometrical centre of the antenna system and that the antenna system is rotated, either mechanically or electrically, around or in relation to the geometric centre of the antenna system. The method characteristic of the present invention has an embodiment of the antenna system with the various dipole antennas displaced in relation to the geometric centre of the antenna system, enabling a substantially more complex generation of electromagnetic radiation and at the same time a more precise and subtle reception of electromagnetic radiation which makes the obtaining of a substantial improvement of the measuring technique possible.

In the method according to the present invention, in accordance with two alternative embodiments of the antenna system, embodiments of the antenna system may be applied so that the individual dipole antennas are positioned radially from the geometric centre of the antenna system, still with the centres of the various dipole antennas in a displaced position in relation to the geometric centre of the antenna system and especially with the centres of the various dipole antennas positioned on a circle or on serveral circles having different radii and with the geometric centre of the antenna system coincident with the centres of the circles in question, or the various dipole antennas may alternatively form triangle structure positioned symmetrically around the geometric centre of the antenna system, i.e. with dipoles positioned in triangle configuration and with the vertex of a triangular positioned in the geometric centre of the antenna system or with composite triangle structures forming a configuration symmetrically positioned around the geometric centre of the antenna system.

Alternatively, these two dipole antenna embodiments may be combined. Similarly, for provision of another radiation pattern other geometrical configurations than triangle structures may also be used, e g quadrangle or polygonal structures or combinations of several different multiangle structures.

In the method according to the present invention, the individual antenna elements of the antenna system, especially the dipole antennas forming orthogonally sets of transmitter and receiver, alternatively oriented in parallel, may be used for transmission and reception of the electromagnetic radiation. Furthermore, transmitter and receiver antennas which are co- polar or alternatively cross-polar may be used for transmisstion and reception of the electromagnetic radiation. These special features enable the use of a broad variety of embodiments.

In the method according to the present invention, means for provision of rotation of the antenna system may be used, thus providing a turning either mechanically or electrically of the antenna system. Preferably, in the present invention electronic rotation is applied, in order to obtain a thorough control of the rotation and a substantial reduction of the total weight of the plant. The electronic rotation may be provided by shifting between the individual antenna elements of the antenna system and thus providing polarization of the electromagnetic field around the geometric centre in angular increments which typically may be in the order of 22.5°, 30°, 36° or divisions or multiples of such angles.

In the method according to the present invention, an antenna system in accordance with the above mentioned embodiment may be used for generation of electromagnetic radiation and reception of electromagnetic radiation at several individual frequences, the typical order of which may be within the area 100MHz to 1 GHz in steps of 5MHZ. The advantage obtained is a broad specter of reflections.

In the method according to the present invention, signal processing means may be used for measuring a transfer function, e.g. a voltage transfer function, current transfer function or combinations thereof or power transfer function between signals between the radiation emitted by the antenna system and the radiation received by the antenna system. In the present invention a voltage transfer function for connected values of the angular change of

the antenna system and the frequency of the signal emitted by the antenna system and the signal received by the antenna system is preferably measured.

In the method according to the present invention the signal processing means may be used for transformation from frequency to time by Fourier transformation or by application of a mathematic exponential model with corresponding rational transfer function on the transfer function associated with the specific angle, for generation of a function continuous in time and time dependent for each angle which is calculated at a predetermined number of discrete times with identical calculation moments for all the angles. Furthermore, the signal processing means may be used for transformation from frequency to time by Fourier transformation or by use of a mathemathical exponential model with corresponding rational transfer function for each angular harmonic a time dependent function, continuous in time, at a predetermined number of discrete times, with identical calculation moments for all angular harmonic, generating a set of numbers corresponding to a mathematical function having the angular harmonic in discrete form and the time in discrete form as independent variables. This enables a reliable determination of the strength and time delays of important reflectors even though ideal circumstances are not present.

In the method according to the present invention, the signal processing means may be used for signal analysis by Fourier transformation for each of the used employed moments associated with each angle, continuous in time function having the time as a constant and the angle as independent variable for generation of a representation in the angle domain.

Furthermore, the signal processing means may perform a signal analysis by Fourier transformation for each frequency having the frequency as a constant and the angle as independent variable for generation of a set of numbers having the angular harmonic and the measuring frequency as independent variables. The purpose of applying Fourier transformation is to emphasize the angular harmonic content of the signal at various time delays (and thus depths).

In the method according to the invention the signal processing means may be used for several operations on the processed signals. The signal processing means may be used for search of local and global maxima indicating angular periodic reflections of objects, in representation in the angular domain, and where the peak value indicates the time delay of

associated reflections from an object. Moreover, the signal processing means may be used for calculations of the angular position in relation to the antenna system, for the angular periodic reflections, and the signal processing means may furthermore be used for a utilization of collocated measurements made during horizontal movement, for damping of clutter.

In the following, the invention will be described in further detail with reference to the figures.

The figures 1 to 12 refer to the above description of prior art.

Fig. 1 illustrates how the antennas are moved along an arbitrary path along the surface of the ground during rotation of the antennas or by rotation of the polarization by means of constant electric shifting between the antenna elements.

Fig. 2 illustrates a possible configuration of two-terminal antennas symbolized by thin electric dipoles having the centres displaced. By an electric shifting between the 8 antennas a rotating polarization may be provided.

Fig. 3. Fig. 3a illustrates a single pair of co-linear two-terminal antennas one of which is used as a transmitter and the other as a receiver and fig. 3b illustrates 4 such pairs. Fig. 3c illustrates a single pair of parallel two-terminal antennas and fig. 3d illustrates 4 such pairs.

By electric shifting between the antennas in figs. 3b and 3d, a polarization may be provided rotating in increments of 450.

Fig. 4. Fig. 4a illustrates a single pair of two-terminal antennas having displaced centres and orthogonal polarization one of which is used as a transmitter and the other as a receiver. Fig.

4b illustrates 8 such pairs. By electric shifting between the antennas in 4b, a polarization may be provided rotating in increments of 450 during measuring having pairs as in fig. 4a.

Fig. 4c illustrates a single pair of two-terminal antennas having displaced centres and orthogonal polarization and asymmetric mutual coupling one of which is used as a transmitter and the other is used as a receiver. Fig. 4d illustrates 4 such pairs. By electric

shifting between the antennas in fig. 4d, a polarization may be provided rotating in increments of 450 during measuring having pairs as in fig. 4c.

Fig. 5. Fig. 5a illustrates a single dipole that may be used as a transmitter as well as a receiver antenna corresponding to the measuring of the s-parameter S 1 l, representing a measurement of reflection (contrary to a transmission measurement which is used in all cases where transmitter and receiver antenna are separated). Fig. 5b illustrates 8 such dipoles. By electric shifting between the antennas in fig. 5b, a polarization may be provided rotating in increments of 450 during measuring having pairs in fig. 5a.

Fig. 6. Fig. 6a illustrates two orthogonal dipoles, one of which is used as a transmitter and the other as a receiver. Fig. 6b illustrates two such pairs. A theoretical application of the configuration in fig. 6b is measurement of reflection (S ") during application of only one dipole at a time.

Fig. 7. Fig. 7a illustrates the angle of elongated objects in relation to a set of type-2 antennas. Fig. 7b illustrates the angle of elongated objects in relation to a set of type-l antennas.

Fig. 8 illustrates a set of antennas in two positions in relation to an object. For clarity purposes only 4 dipoles are included in the set. Fig. 8a illustrates a side-view of the set in the two positions, fig. 8b is a corresponding top view.

Fig. 9 illustrates configurations of dipoles in which the sides are not parallel. Such embodiment of a single dipole may be an advantage with regard to the frequency band width of the dipole.

Fig. 10 is a schematic view of a possible construction of dipoles in which splitted metal sheets 1 are applied being electrically connected by means of resistive coupling elements a.

Fig. 1 0a illustrates the half of such a dipole. The number of elements may be varied. Fig. lOb illustrates two such halfs with feeding balun 2.

Fig. 11 is a schematic view of a possible construction of dipoles in which splitted metal sheets 1..5 are applied being electrically connected by means of resistive coupling elements a. The sides are not parallel and the width of the dipole increases at increasing distance from the centre. Fig. 11 a corresponds to the half of such dipole. The number of elements may be varied. Fig. 1 lb illustrates two such halfs with feeding balun 2.

Fig. 12 illustrates the fundamental construction of the antenna in its entirety in a cross section along a line corresponding to a diameter in fig. 9a or 9b. The antenna elements e lies on a supporting plate d of a suitable dielectric material. The entire construction is carried by an uppermost plate a which may be of any material in regard to electricity. Below the supporting plate a a shielding foil or metal plate b is situated preventing inward and outward radiation upwardly. c is a suppressing materiale, for instance of the types $$ECCOSORB ls$$ or ls$$ of the brand Emerson Cuming or combinations thereof. Below the active elements a plate of a dielectric material exists. The antenna elements e consist of plane metal parts connected by resistive coupling elements as indicated in fig. 10 or in fig.

11. fis a dielectric materiale which protects the active elements mechanically as well as provides electric adjustment. The relative permittivity of such material will typically be between 3 and 10.

The figures 13 to 19 relate to measurements made by the preferred embodiment.

Fig. 13 illustrates the result of procedure No. 1 up to and including step 1.6. Fig. 13a illustrates signal strength as a function of angle index n and time ns in the form of a 3D-plot.

Fig. 1 3b illustrates signal strength as a function of angle index n and time in ns as contour plot. Figs. 1 3c and 1 3d illustrate the result ofthe described procedure No. 1 up to step 1.5 inclusive. Fig. 1 3c illustrates measured signal strength as function of angle index n and frequency in GHz in a 3D-plot. Fig. 13d illustrates measured signal strength as function of angle index n and frequency in GHz in a contour plot. Figs. 13e and 1 3f illustrate the result of the described procedure No. 2 up to step 2.2 inclusive. Fig. 13e illustrates calculated signal strength as function of angular harmonic index k and time in ns in a contour plot.

Figs. 13g and 13h illustrate detection curves as the result of procedure No. 6 up to step 6.3 inclusive. Fig. 13g illustrates D in absolute values, 13h illustrates D in dB. Figs. 13i and 13j

illustrate detection curves as the result of procedure No. 2 up to step 2.3 inclusive. Fig. 13i illustrates D in absolute values, Fig. 1 3j illustrates D in db.

Fig. 14 illustrates the result of the described procedure No. 1 up to step 1.6 inclusive. Fig.

1 4a illustrates a signal strength as function of angle index n and time ns in the form of a 3D- plot. Fig. 1 4b illustrates signal strength as function of angle index n and time in ns as a contour plot. Figs. 14c and 14d illustrate the result of described procedure No. 1 up to step 1.5 inclusive. Fig. 14c illustrates measured signal strength as function of angle index n and frequency in GHz in a 3D-plot. Fig. 14d illustrates measured signal strength as a function of the angle index n and frequency in GHz in a contour plot. Figs. 14e and 14f illustrate the result of the described procedure No. 2 up to step 2.2, inclusive. Fig. 14e illustrates calculated signal strength as a function of angular harmonic index k and time in ns in a 3d- plot. Fig. 1 4f illustrates calculated signal strength as a function of angular harmonic index k and time in ns in a contour plot. Fig. 14g and 14h illustrate detection curves as the result of procedure No. 6 up to step 6.3 inclusive. Fig. 14g illustrate D in absoute values, 14h illustrates D in dB. Figs. 14i and 14j illustrate detection curves as the result of procedure No. 2 up to step 2.3 inclusive. Fig. 14i illustrate D in absolute values, 14j illustrates D in dB.

Fig. 15 illustrates the result of the described procedure No. 1 up to step 1.6 inclusive. Fig.

1 5a illustrates signal strength as a function of angle index n and time ns i the form of 3D plot. Fig. 15b illustrates signal strength as a function of angle index n and time in ns as a contour plot. Figs. 1 sic and 15d illustrate the result of described procedure No. 1 up to step 1.5 inclusive. Fig. 1 sic illustrates signal strength as a function of angle index n and frequency in GHz in a 3D plot. Fig. 15d illustrates measured signal strength as a function of angle index n and frequency in GHz in a contour plot. Figs. 15e and 15f illustrate the result of described procedure No. 2 up to step 2.2 inclusive. Fig. 15e illustrates calculated signal strength as function of angular harmonic index k and time ns in a 3D plot. Fig. 15f illustrates calculated signal strength as a function of angular harmonic index k and time in ns in 3D plot. Fig. 15g and 15h illustrate detection curves as the result of procedure No. 6 up to step 6.3 inclusive. Fig. 15g illustrates D in absolute values, fig. 15h illustrates D in dB.

Fig. 15i through 150 illustrate detection curves as a result of procedure No. 2 up to step 2.3, inclusive. Fig. 15i illustrates D in absolute values, fig. 1 5j illustrates D in dB, fig. 15k and 151 illustrate calculation results comprised by the described procedure 3.

Fig. 16 illustrates the result of the described procedure No. 1 up to step 1.6 inclusive. Fig.

1 6a illustrates signal strength as a function of angle index n and time ns in the form of a 3D plot. Fig. 1 6b illustrates signal strength as a function of angle index n and time ns in a contour plot. Figs. 1 6c and 1 6d illustrate the result of the described procedure No. 1 up to step 1. inclusive. Fig. 1 6c illustrates measured signal strength as a function of angle index n and frequency in GHz in a 3D plot. Fig. 1 6d illustrates measured signal strength as a function of angle index n and frequency GHz in a contour plot. Figs. 1 6e and 1 6f illustrate the result of the described procedure No. 2 up to step 2.2 inclusive. Fig. 16e illustrates calculated signal strength as a function of angular harmonic index k and time ns in a 3D- plot. Fig. 1 6f illustrates calculated signal strength as function of angular harmonic index k and time in ns in a contour plot. Figs. 1 6g and 1 6h illustrate detection curves as the result of procedure No. 6 up to step 6.3 inclusive. Fig. 16g illustrate D in absolute values, fig. 16h illustrates D in dB. Figs. 1 6i and 1 6j illustrate detection curves as the result of procedure No. 2 up to step 2.3 inclusive. Fig. 16i illustrates D in absolute values, fig. 16j illustrates D indB.

Figs. 17, 17a and 17b illustrate the result of the described procedure No. 1 up to step 1.6 inclusive. Fig. 1 7a illustrates signal strength as a function of angle index n and time in ns as a contour plot. Figs. 1 7c and 1 7d illustrate the result of described procedure No. 1 up to step 1.5 inclusive. Fig. 1 7c illustrates measured signal strength as a function of angle index n and frequency in UHz in a 3D-plot. Fig. 1 7d illustrates measured signal strength as a function of angle index n and frequency in GHz in a 3D plot. Fig. 1 7d illustrates measured signal strength as a function of angle index n and frequency in GHz in a contour plot. Fig. 1 7e og 17f illustrate the result of described procedure No. 2 up to step 2.2 inclusive. Fig. 1 7e illustrates calculated signal strength as a function of angular harmonic index k and time in ns in a 3D plot. Fig. 17f illustrates calculated signal strength as a function of angular harmonic index k and time in ns in a contour plot. Figs. 1 7g and 1 7h illustrate detection curves as the result of procedure No. 6 to step 6.3 inclusive. Fig. 17g illustrates D in absolute values, fig. 17h illustrates D in dB. Figs. 17i og 17j illustrate detection curves as the result of procedure No. 2 up to step 2.3 inclusive. Fig. 17i illustrates D in absolute values, Fig. 17j illustrates D in dB.

Fig. 18 illustrates a collection of detection curves each being taken from the prototype and thereafter positioned in the figure - it is seen how the detection curve alters when passing above an object. The object indicated in the figures 18, 19a and 19b is known and is a tube made of a plastics PVC material and being filled with water and having a diamter of 110 mm and being burried in a depth of approx. 140 cm.

In fig. 18, time delay is converted to estimated depth under the assumption of an estimated average value for the propagation velocity of the radio waves in the earth.

Fig. 1 9a illustrates a typical detection curve from the display of the proto type. A clear indication is seen in a depth corresponding to the time delay approx. 31 ns.

Fig. 1 9b illustrates a detection curve indicating no cable or tube.

The figures 20-44 illustrate the present embodiment of the invention.

Fig. 20 illustrates the entire plant comprising transmitter and receiver antennas mounted on a circular disc, battery case, transmitter and receiver electronics and data processing plant, including monitor.

Fig. 21 illustrates a system diagram for the hardware of the prototype. The system consists of three main parts: Antenna array, RTVA (Real Time Vector Analyzer) electronics and a PC provided with a signal processing module.

Fig. 22 illustrates an action chart of the RTVA electronic part.

Fig. 23 illustrates an action chart of the receiver electronic part (Receiver).

Fig. 24 illustrates a circuit diagram of receiver 2 (Receiver: Board 'a').

Fig. 25 illustrates a circuit diagram of receiver 3 (Receiver: Board 'b').

Fig. 26 illustrates a circuit diagram of receiver 4 (Receiver: Board 'c').

Fig. 27 illustrates a circuit diagram of receiver 5 (Receiver: Board 'd').

Fig. 28 illustrates a circuit diagram of a transmitter.

Fig. 29 illustrates a circuit diagram of a synthesis unit.

Fig. 30 illustrages a circuit diagram of the supply unit of the synthesis unit.

Fig. 31 illustrates a circuit diagram of a permanent (quick) synthesis unit.

Fig. 32 illustrates a circuit diagram of a variable synthesis unit.

Fig. 33 illustrates a circuit diagram of a reference unit for the synthesis unit.

Fig. 34 illustrate a circuit diagram of a switch unit for the synthesis unit.

Fig. 35 illustrates a circuit diagram of a detection circuit consisting of logic digital inlet/outlet lines for control of the synthesis unit, antenna unit and supporting units.

Fig. 36 illustrates a circuit diagram of a detection circuit consisting of analog-to-digital converters.

Fig. 37 illustrates a circuit diagram of an antenna switch board.

Fig. 38 illustrates a circuit diagram of an antenna switch decode/level switch.

Fig. 39 illustrates a circuit diagram of a dipol antenna.

Fig. 40 is an illustration of the top part of a two-sided printed circuit board layout of a dipole antenna circuit.

Fig. 41 is an illustration of the lower part of a two-sided printed circuit board layout of a dipole antenna circuit.

Fig. 42 illustrates a serial cable interface.

Fig. 43 illustrates a serial interface (SHARC).

Fig. 44 illustrates a serial interface (EZLITE).

Figs. 45-47 illustrate alternative configurations of the antenna elements.

Fig. 45 illustrates an arrangement comprising four pairs of antennas, all the dipole centres are displaced from the geometric center. The elements are of the butterfly type which construction almost corresponds to the one shown in fig. 11 and the total arrangement corresponds to the configuration shown in fig. 12.

Fig. 46 illustrates an arrangement including five pairs of antennas, all the dipole centres are displaced from the geometric center. The elements are of the butterfly type which construction almost corresponds to the one shown in fig. 11 and the total arrangement corresponds to the configuration shown in fig. 12.

Fig. 47 illustrates an arrangement including five pairs of antennas, all the dipole centres are displaced from the geometric center. The elements are of the butterfly type the construction of which almost corresponds to the one shown in fig. 11 and the total arrangement corresponds to the configuration shown in fig. 12.

For a more detailed explanation of the invention, the following tables are presented.

The tables 1-8 contain information about the present embodiment of the invention.

Table 1 contains terminal indications and list of components for the receiver electronics.

Table 2 contains terminal indications and list of components for the transmitter electronics.

Table 3 contains terminal indications and list of components for the synthesis unit.

Table 4 contains terminal indications and list of components for the detection unit.

Table 5 contains terminal indications and list of components for the antenna switch unit.

Table 6 contains terminal indications and list of components for the antenna switch decode/level switch.

Table 7 contains list of components for serial interfaces for figs. 42-44.

Table 8 contains list of components for dipole antenna element.

The tables 9- 11 contain information about possible embodiments of the invention.

Table 9 contains a summary of a number of possible antenna configurations.

Table 10 contains examples of number of rotations of the antenna system.

AO is the angle of rotation between each measurement, N is number of measurements.

Table 11 contains examples of k-indexes corresponding to two periods per rotation. K- <BR> <BR> <BR> values indicated in pairs (,k2), A° 118 is the angle of rotation between each measurement, N is number of measurements.

Table 12 contains measuring information from a present embodiment of the invention.

Table 12 contains a summary of objects illustrated in the examples 1 to 5.

Referring to fig. 20 a preferred embodiment 10 of the invention is illustrated. The embodiment 10 consists of a body for mobilization comprising a set of wheels 32, a support 26 and a U-shaped handle 30 to which the support 26 is fixed to the open end of the U, and the wheels 32 are fixed to a shaft carried by a number of projections from the handle 30 in the open end of the U. A house 12 is mounted on the platform 26 containing the individual antenna elements designed as described in the following. The individual antenna elements are fixed to the top side of the house 12 by retainers 18 comprising a frame connection.

Metal screws 24 provide further fixation of the individual antenna elements. Bolts 22 of a plastics material keep the topplate and the bottom plate of the house 12 together.

Transmitted signals are applied and received signals are received as described in the following, to and from the individual antenna elements through conduits 20 to switch cases 16 comprising, in combination with an electronic logic unit 14, the control of the switching between the transmitting and receiving function of the individual antenna elements. The electronic logic unit 14 is positioned beneath the switch boxes 16. The communication

between the individual antenna elements and the electronics 34 of the plant, comprising synthesis electronics, frequency measuring electronics and transmitter-receiver electronics as described in the following is maintained through a set of conduits 28. The signal processing means comprises a computer 38 coupled to a monitor 42 and a keyboard 40. For current supply of the computer 38, the monitor 42, the keyboard 40 and to the electronics 34 of the plant a power supply 36 is positioned on the opposite side of the handle 30 in relation to the computer 38.

A further description of the invention will follow.

1.Background of the invention The present invention relates to methods and apparatuses for detection of objects in the ground by means of a ground radar. Ground radars or raders "looking" into the ground or into other materials have been known and used for centuries and are also known as georadars, ground penetrating radars and subsurface radars. For a long time it has been attempted to use ground radars to find buried objects in the ground, such as cables, tubes and optical fibres. However, prior art embodiments of ground radars are not especially useful for this purpose which may be considered the reason why no commercial break- through for radar based cable and pile detectors has taken place - in spite of a recognized requirement and many experiments. Under favorable conditions, commercially available ground radar systems enables detection of cables and pipes, but only in case the radar antenna is carried forward in one or more straight lines transversely to the objects to be found - and only by interpretation of the registered measurements which require a high level of qualification of the interpreter. Radio waves have a polarization connected to the spatial orientation of the associated electromagnetic fields. Utilization of the polarization adds a further dimension to ground radars and thus to the manner in which objects may be distinguished from the surroundings - in addition to the traditional time resolution.

Use of polarization as a means for discriminating objects, especially elongated objects, has not led to easily operated radar equipment for detection of cables and pipes. In fact, previous patents and publications used polarization - not least the early work by Young et al. from Ohio State University, vide example [8]. Others have followed in these footsteps, including

the group comprising Gunton et al. In Great Britain, vide example [1], [2] and [10].

Furthermore, at number of tests have been made to transfer the methods known as synthetic aperture or synthetic array and used as air and satelite borne radar systems to ground radars.

The application of polarization is also known from these systems - often designated polarimetry. It is common features of the polarimetry and the synthetic aperture methods that they require a fairly homegeneous medium, that the illuminated objects are positioned in the far field of the antenna and that the mutual phase of the radar signals is not substantially influenced by contingencies in the propagation medium.

When an antenna is positioned close to the ground or by wave propagation in soil altogether, a strong influence of the phase and amplitude of the waves from contingenties in the form of stones, metal objects, uneven surface, moisture and such, will almost always be present. The influence of such contingencies may result in significant variations when moving the antenna just a few centimeters. Methods for utilization of polarization as described in [1] and [2] fail in relation to the inevitable contingencies in the signals mentioned above. The periodicity applying to radar signals from thin, elongated objects in the ground under ideal circumstances as described in [1] og [2] is in practice (most) often hidden behind incidental variations of substantial strength. The noise introduced as a result of the contingencies makes it too unsafe in practice to base detection on simple algebraic combinations of measured radar signals. Rotation of polarization is a useful and powerful means for improving the characteristics of ground radars. In [1] the following mathematic model for the dependency of the polarization angle for long thin objects Gunton et al indicates: F(t) = A(t) + B(t)sin(X) + C(t)cos(X) +D(t)sin(2X) +E(t)cos(2X) Where X is the angle of rotation of the antenna system. It is not totally clear how the phases of A(t) ...E(t) are associated in this equation. In any case it may be concluded that mathematical equations as this one which may be considered as a first part in a Fourier series cannot in practice be used to describe the signals measured in an ground radar with any usable approximation. We find that proper Fourier analysis of the angular dependencyr together with other matematical operations is a very useful tool for detection of objects.

Regarding the othogonal two-terminal antennas with coincident electrical centers which are used in the patents [8], [1] og [2] we have observed that these are not the most suitable for detection of objects such as cables and pipes. The argument for using co-located two- terminal antennas which are mutually perpendicular (eg crossed dipoles) is according to the patent specifications mentioned that the mutual electromagnetic coupling between these are theoretically zero - and that thus no direct signal coupling takes place from transmitter to receiver (called "breakthrough"). We find that antennas with displaced centers are preferred in most cases. The reason for this is that the symmetry which is necessary in a construction with crossed dipoles is in practice disturbed by the surroundings, especially by roughness in the surface of the ground. As the near fields of co-located antennas to a great extent are coincident, small deviations from the symmetry are destroying and result in substantial mutual coupling. Therefore separation of the centres of the antennas is better. Our preferred antenna configuation is co-linear or parallel dipoles with displaced centres contrary to the patent speficiations [1] and[8] where antennas as well as detection methods are based on orthogonality. But it has to be emphasized that our detection method, including signal processing, is extremely useful together with orthogonal antennas. Our preferred signal form corresponds to the so-called "stepped-frequency CW radar" in which sinusodial wave signals are emitted having the frequency altered stepwise. CW means "continuous wave" and indicates that the sinusodial wave is emitted for as long as during each measurement transient phenomenons may be considered to have disappeared. In an ground radar presented by the inventors, frequencies in the interval 100 MHz to 1,000 MHz with frequency increments of 5 MHz are emitted (but the methods of the invention may be used in any frequency range). This signal form requires a method for transformation into the time domain.

We have observed that the electromagnetic attenuation in the ground is substantially an exponential function of the frequency in the relevant frequency range. Based thereon we have constructed an exponential signal model to be used as basis for estimating the time delays of the radar signal. The method has certain similarities to the methods called Prony methods, vide e.g. [7]. Methods derived from the original Prony method are already known in analysis of radar signals. A new feature in the present method is that in a mathematically coherent manner it takes the dispersive characteristics of earth materials into account. In principle, it is possible by means of this method to determine the strength of a reflector

regardless of the reflector being buried in strongly attenuating material. Furthermore it provides a better time resolution than the Fourier transformation which is often performed by means of FFT algorithms. The classical relation between band width and time resolution saying that the smallest time difference detectable is inversely proportional to the band width of the signal does apply, as known, when Fourier-based method are used. Under certain circumstances a better resolution is obtained by the Prony method.

We have observed that it is a completely necessary condition for satisfactory detection of objects that the polarization determined angular dependencyr is investigated separately at different time delays - or in other words: reflectors appearing in different distances from the antennas with respect to time are investigated for polarization separately. Consequently a two-dimensional signal analysis is necessary in which the two dimensions correspond to the angle and time domain.

Moreover we have observed that a translational movement of the antennas during rotation has the useful effect of destroying the periodicity in the angular dependencyr of the very close object, whereas the periodic dependency of more distant (and possibly larger) objects is maintained. Therefore, Fourier analysis in the angle of rotation of a signal measured under such circumstances will show that signals from objects near the surface will have the energy distributed over a broad spectrum of harmonics whereas for instance cables and pipes will result in a considerably more concentrated spectrum around the harmonics corresponding to 2 periods per rotation. Thus a damping of the undesired reflections from objects and roughness in the surface is obtained. This suits perfectly to the practical use of an ground radar for scanning which is carried forward manually or mounted on a vehicle or a machine during mechanical or electrical rotation of the polarization.

The analysis of the signals and thus the detection method as described in [1] and [2] are based on comparison with reference measurements - in [2] in the form of 'matched filters', which is equivalent to the correlation with known curves. The problem with use of reference measurements is that two objects with associated surroundings and giving the same reflection do not exist. Therefore, a method based on reference measurements is difficult to use in practice.

This invention seeks to solve these problems by means of existing methods and apparatuses.

As it is evident from some attached examples illustrating processed data from measurements made under realistic circumstances, a signal/noise relation of 20 dB or more under general conditions may be obtained by means of the methods as described here. For comparison, an ground radar scan over a cable or pipe transversely hereto by means of a prior art apparatus typically presents an echo of approximately the same strength as those from various objects in the surroundings - i.e. approximately a signal/noise relation of O dB under the same circumstances.

Use of the Prony method for transformation from frequency to time together with the angle Fourier analysis and polarization rotation gives a detection reliability which have not been seen previously.

2.Introduction The present invention is demonstrated in an embodiment which purpose it is to find and determine the direction of elongated objects in earth which in practice comprise pipes of all materials, cables containing metallic conductors and optical fibres.

However, the method described, including the mathematical parts and the application of electromagnetic waves with rotating polarization may be used for other purposes. For instance detection of anti-personnel mines. The method described for determination of direction is however limited to elongated objects. When in the following earth and detection of objects in earth are mentioned this is for the sake of convenience. The invention is also suitable for detection of objects hidden in other materials, for instance in concrete, other building materials or rocks which may all be considered earth materials with respect to electromagnetism. Also objects in the air may advantageously be detected by means of the methods described.

The invention is based on use of electromagnetic waves (in the following called EM-waves) which are transmitted into the material into which one or more objects are hidden. Thus, the invention is based on a RADAR-like principle. The electromagnetic waves may also according to general language usage be called radio waves. The invention is based on

emission of EM-waves by means of an antenna for this purpose and measurement, registration and further processing of the electromagnetic responses or reflections which the objects give rise to.

A radar as known from airports and from many other places is often situated at a rather large distance to the reflecting objects, seen in relation to the wave length of the EM-waves used and/or the duration of the pulses emitted.

In the immediate neighbourhood of the antenna of a radar of the presently relevant type objects will often be present - often the surface of the ground will be present in what according to present language usage is called the near field of the antenna. The electromagnetic influence of objects this close is often not construed as reflections because so-called reactive fields are prevailing. In the following the designation "reflections" is used - without detailed differentiation - about all the registered influences made by objects outside the antenna - close or distant.

The present invention is based on a utilization of a combination of a time resolution of electromagnetic responses and on the polarization dependency thereof. It is of no importance whether time delays and polarization dependency originate from elements designated transmission, reflection, near fields or far fields, inductive coupling, capacitive coupling or "real" radar reflections. A preferred embodiment of the invention is arranged so that the objects to be detectet are present outside the near field of the antenna, but it is a substantial advantage of the invention that it is able to suppress near field phenomenons even though they present a larger strength than "desired" reflections.

In a radar system in connection with the present invention one antenna is used for emitting EM-waves and one antenna is used for receiving the responses on the emissions, or a multiple of such antennas are used. A possible embodiment may very well comprise one or more antennas which are used for transmission and reception - possibly on the same time.

In the following the transfer function between transmitter and receiver is used regardless of the construction of the antenna. The important point is that in the system a distinction is made between emitted and received signal and that these are compared. The comparison is

made indirectly by the emitted signal - or just the AC voltage - is determined and known and that the received signal is measured and registered.

In the following a signal means an electromagnetic response or a connection between the emitted and the received signal. In the following objects may - apart from well defined objects such as pipes, cables etc - also mean differences in material characteristics, i.e. inhomogenieties in the medium in which EM-waves are propagating. By rotation of antennas, rotation of polarization derived by physical (mechanical) rotation as well as entirely electrical means, including electrical shifting between a number of antenna elements, is meant. Measurements mean manual as well as automatic determination of physical sizes by means of suitable equipment. Registration and storing may likewise be manual or automatic.

The invention utilizes analysis of electromagnetic response signals for the polarization dependency and time delays (or one of them) of the electromagnetic response signals.

Analysis means calculations based on measured sizes. In practice, possible embodiments of this invention are best realized by means of digital equipment and certain physical elements such as the frequency of the emitted EM-waves are often altered at intervals.

Therefore, to a great extent set of numbers will in the following be utilized for representation of physical elements which may by nature be considered continuous. In the following are mentioned two-dimensioned set of numbers which are concentrations of discrete values. These sets of numbers may also be construed elements in a matrix and each of the rows or colums herein may be construed series of numbers. Synonymously herewith equations such as curves or functions and function values are used. Possible embodiments demonstrated by the inventors are based on discrete frequencies, angles, angular harmonic and times which is motivated by the use of digital store units and calculation units. - Even though the presented examples come forward as continuous images.

The principles of the invention apply for continuous frequencies, angle rotations, angular harmonic and times as well as for discrete corresponding features. The precise embodiment of mathematical formulas given in the following is not the only one possible. For instance, formulas exist for continuous as well as discrete Fourier transformation, but according to well-reputable text-books, Fourier transformations and Fourier sequences may be calculated

in various ways. The indicated formulas are used by the inventors to demonstrate possible embodiments of the new principles of the invention in practice. The illustrated examples of curves and calculations based on measured, physical elements are also only possible illustrations of the principles of the invention.

Numbers of references (vide list) are indicated in square brackets: [ ] Numbers of equations in the document are indicated in common parentheses: ( ) 3. Rotating polarization If during propagation an electromagnetic wave hits an object the electrical characteristics of which diverge from those of the surroundings some of the energy of the wave is deflected or reflected when hitting the object. It is a well-known fact that under certain circumstances this reflection (scattering) depends on the polarization of the wave in relation to the spatial orientation of the object. By the polarization of the electromagnetic wave, the direction of the electrical field vector is understood. This polarization may be varying, diffuse or it may be approximately linear in a given direction, or it may be circular which means that it turns around an axis.

A possible embodiment of the present invention which is demonstrated by the inventors, utilizes linear polarization. Furthermore, other types of polarization, including circular and elliptical, may be generated physically and may be analysed as linear combinations of linear polarized parts - therefore linear polarization is dealt with separately in the following.

3.1 Linear polarization By linear polarized waves, electromagnetic waves are understood which are intendedly made as linearly polarized in a (most often) horizontal direction as practically possible. It is part of the method that the approximately linear, (often) horizontal polarization of the waves is rotated around an (most often) perpendicular axis. A possible embodiment of the method applies waves which are to as great an extent as possibly characterized by: Linear polarization in several directions which is parallel to a level parallel with the longitudinal axis of the elongated object(s) to be detected and located.

Rotation of the linear polarization direction around an axis perpendicular to the level mentioned (and perpendicular to the longitudinal axis of the object), but not necessarily crossing the longitudinal axis of the object.

Since detection and location of cables, optic fibres or pipes burried in the ground are substantial purposes of this invention, the designed linear polarization directions will often be horizontal and be rotated around a vertical axis. When in this context such electromagnetic waves are not described as circularly polarized waves it is due to the fact that in this method it is not necessary that the linear polarization is in all possible angles or that the rotation is continuous. A further reason for this is that the invention is based on the substantial realization that in practice it is very hard to obtain a well-defined circular or elliptical polarization under propagation in earth due to the often very important inhomogeneous composition of the soil medium.

The EM-waves mentioned here are produced by applying a high frequent electrical voltage to an antenna with an appropriate construction.

Often electrical dipoles or two-element antennas are used for obtaining an EM-wave which is almost linearly polarized. Then one or more dipoles are positoned for instance above the surface of the ground with a horizontal orientation of its or their longitudinal axis. Vide Fig.

2, 3 and 4. In the following description, two-element dipole antennas are dealt with for convenience, but other types of antennas may also be used, for instance so-called slot- antennas.

For the purpose of detection of cables and pipes in the ground, horizontally oriented dipole antennas are often applied because cables and pipes normally lie horizontally in the ground.

It is not a condition for the present method that the objects lie precisely horitontally in the ground - and it is not necessary, either, that the antennas applied are kept precisely horizontally above the ground.

It is a well-known fact that if an elongated object such as a cable or a pipe in the ground is hit by an electromagnetic wave the polarization of which is almost horizontal, the strength of the signal reflected from the object will be a periodic function of the angle O between the

polarization direction of the wave and the longitudinal direction of the object. This is described in [3] and in other textbooks and is also described in [1].

Finally, it is also a well-known fact that when a linear polarized antenna such as a dipole is hit by a linear polarized EM-wave, the size of the voltage induced on the terminals of the antenna is proportionate to cosine of the angle between the polarization directions of the antenna and the wave, respectively.

The generally known facts mentioned here are utilized in the present invention to enable detection, location and direction determination ofelongated objects in the earth without use of reference measurements of the type described in Jil.

An embodiment of the present method applying linear polirization does not require the use entirely linearly polarized EM-waves or require that the antennas used, when used for the emission of EM-waves, only emit such totally polarized waves or that the antennas when they are used for reception of reflections only are sensitive to waves having a certain polarization. Nor is it necessary that the objects to be detected only reflect waves having a certain polarization. It is sufficient for the application of the method that these conditions to some extent are met.

3.2. Other forms of polarization Circular and elliptisk polarization may be produced physically and may as a matter of fact be considered linear combinations of linear polarizations. For instance, circular polarization may be obtained by applying AC voltage to orthogonal, linearly polarized antennas with a mutual phase displacement of 900.

4.1 Antenna configurations for linear polarization Linear rotating polarization is appied in an embodiment of the present invention which is demonstrated by the inventors - in the following some possible configurations of antennas for linear polarization will be described schematically. The antennas determine the polarizations to be used. The angle between the polarization of the transmitter and receiver antennas is important - the following is based on two basic configurations for linear polarization:

TYPE 1 measurement: Co-polar: Same polarization of transmitter and receiver antenna TYPE 2 measurement: Cross-polar: The polarization of transmitter and receiver antennas are mutually perpendicular Figs. 3 and fig 4 illustrate the fundamental construction of some possible combinations of antennas in the form of outlines of combinations of dipole antennas of type 1 and type 2, respectively.

Reference is made to S-parameters as they are well-defined. S21 indicates a measurement of the type transmission measurement between two sets of terminals (even though reflections in the transmission medium are the important factors) and Sll indicates a reflection measurement at a single connection. The use of S-parameters is symbolic, other definitions may be used.

Table 9 is an outline of some possible antenna configurations.

All the combinations in figs. 3 and 4 constructed from dipole pairs: one dipole for transmission, one for reception. Fig. 5 illustrates a measurement with one single antenna which means that a circuitry based measurement of a reflection which may be Sll as the emitted and received signal exist on the same terminals.

The configuration in figs. 6a and 6b corresponds to the one used in [1] and [8] and in practice this configuration has turned out to be less useful for detection of objects in the ground, among other things because the direct electromagnetic coupling between transmitter and receiver antenna will have a large size compared to the EM-waves reflected from objects in the ground. The electrical centres of the antennas are coincident in figs. 6a and 6b.

In spite of its practical limitations such a configuration is suitable for an approximate theoretical analysis of the relations regarding polarization-based detection of objects in the ground.

If, as illustrated in fig. 7a, two crossed dipoles are positioned so that their mutual center is on the axis crossing perpendicularly between an elongated and thin object and the dipoles lie in a plane which is parallel to the linear object the following mathematically relations for the amplitude of the electrical AC voltage on the terminals of the receiver antenna apply.

The angle between one of the dipoles and the object is 0.

We assume that a high frequent AC voltage is applied to the transmitter antenna with a constant amplitude so that the applied voltage may be represented by the mathematical equation: Vtx(t) = Atxcos(2#ft) (1) where VbÇ is the applied, time dependent voltage, t is the time, Atx and fare the amplitude and the frequency of the applied signal, respectively. Given this electrical signal on the terminals of the transmitter antenna the following approximate equation for the voltage over the terminals of the receiver antenna applies: Vrl(t,O) = Atsin(2#)Atxcos(2#ft +(PI) (2) <BR> <BR> <BR> <BR> <BR> Where Al is a constant amplitude factor determined by the physical conditions and #1 1 is a starting phase.

If two co-linear dipoles are positioned as in fig. 7b and the length of the dipoles and the distance between their centres are small enough in relation to the distance between the dipoles and the object, the following relation applies: Vr2(t,O) = A2(1+cos(20))Aacos(2xft +(P2) (3) Where A2 and #2 are constants.

It should be noted that the voltage of the receiver antenna is dependent on both the time t and on the angle of rotation 0 of the antenna in relation to the object and that the variation as a result of 0 will normally happen much slower than the variation in time.

Similar mathematical equations apply to types of antennas other than electrical dipoles, if these only have a linear polarization characteristic.

The two mathematic cohesions (2) and (3) are based on a number of assumptions: - that there are no reflection from the receiver antenna to the transmitter antenna.

- that the antennas as well as the objects are very thin in relation to the length of the EM- waves applied which is a condition for antennas as well as objects being considered linearly polarized.

- that the thicknesses of antennas and objects are small in relation to the distance between antennas and object.

- that all media surrounding antennas and object are homogenious in all directions which also may be expressed as the medium in which the electromagnetic fields and waves propagate is homogenious.

The present invention enables safe detection of cables and pipes in the ground by means of polarization analysis without the fulfilment of the above ideal preconditions.

4.2. Equations for angular dependency at linear polarization In the following we will focus on the voltage transfer function between transmitter and receiver as it contains the important information rather than the voltage of the terminals of the receiver antenna.

If we remove the time dependent parts from the equations (2) and (3) in order to emphasize the importance of the angle rotation 0 we get the following equation for the angular dependencyr of the voltage transfer function: He(0) = Also(20) (4)

for the angular dependencyr in a cross-plar antenna arrangement (type 2) and for the angular dependencyr in a cross-polar antenna arrangement (type 2) and H2(O) = A2(1+cos(20)) (5) for the angular dependencyr in a co-polar arrangement (type 1).

However, the above mathematical equation with the preconditions mentioned never applies precisely. In practice we will - when measuring the relation between the AC voltage applied on the transmitter antenna and the existing voltage on the receiver antenna - get a more complex context.

4.3. Equations for angular dependencyr at circular polarization Circularly polarized waves may be obtained by means of a linear combination of two linearly polarized waves. Antenna with circular polarization may be constructed by means of combination of linearly polarized antennas. For example the schematic configurations may be used - each of the combinations shown may be doubled so that one is included in the transmitter antenna and one in the receiver.

If the transmitter antenna and the receiver antenna are both circularly polarized and if, as mentioned, we assume that an object is thin and elongated and thus show linear polarization sensitivity, the result is a voltage transfer function which does not vary in size.

Under ideal circumstances corresponding to the circumstances mentioned above, we get a transfer function of the form: He(0) = Acexp(j20) (5al) or: HC(O) = Acexp(j20) (5a2)

Under certain circumstances the response of two circularly polarized antennas on a linear object will be constant, i.e.: Hc(O) = Ac Here j is the imaginary operator in complex numbers, j2 = 1. Ac is an amplitude factor.

He(0) is now complex and expresses (ideally) the rotation-angle dependent phase rotation in the voltage transfer function.

As the polarization of the emitted wave at circular (or elliptical) polarization rotates continuously during the propagation, O is not, similar to at linear polarization, equation for a polarization condition which is maintained as long as the antenna system is in a given consition or position. Instead O is in (5al) and (5a2) equation for a starting rotation of the polarization of the wave. Such a starting rotation may vary with corresponding means like the above mentioned linear polarization.

An angular dependencyr as in (5al) or (5a2) may be obtained by combinations of orthogonal antennas with 900 mutual phase rotation. It should be noted that it is not necessary for such phase rotation network to exist physically - or that electrical signals are expressed to the orthogonal antennas at the same time. Linear combinations of linear polarizations - including circular - may be formed by activating sets of for instance dipoles in arbitrary order, store the measured signals and thereafter combine them algebraicly. The phase rotation of signals is obtained by multiplication with suitable complex constants before summation.

If circular or elliptical polarization is obtained by means of a combination of linearly polarized antennas the starting rotation of the resulting (approximate) circular polarization follow a mechanical or electrical (electronic) rotation of the applied linearly polarized elements.

If emission of elliptical or circularly polarized waves is utilized then the measured signals may be used for detection of objects during application of the methods stated in the present patent for utilization of linear polarization.

A practical utilization of circular or elliptical polarization may be based on splitting of the measured, complex angular dependencyr in a real part and an imaginary part, corresponding to what is often called quadrature splitting in an I and a Q part (In-phase Quadrature part, respectively).

By way of example the equation in (5a2) may be written as: HC(O) = A exp(j20) = A cos(20) jAcsin(20), where it will be seen that the imaginary part corresponds to the equation for linear polarization (4).

5. Fourier analysis and rotation based measurements The above expression H1(O) and H2(O) for the angular dependencyr of the transfer function (at linear polarization) are both characterized by running through two periods when the antenna system is rotated one turn. If we place any combination of transmitter and receiver antennas above the ground and rotate it around a vertical axis there will often be a substantial variation in the transfer function during rotation, especially if the antenna is positioned close to the ground, due to inhomogeneities in the ground such as stones, varying types of soil and humitity, waste material etc. Also roughness in the surface of the ground often has a substantial influence. Besides variations in the magnitude of the transfer function variations of the phase in a much more complex manner than the shift of polarity sign implied in the above expression for Hl(O) and H2(0) will apply. The phase difference between the AC voltage applied on the transmitter antenna and the voltage measured on the receiver antenna is the phase of the transfer function. If we rotate the antennas precisely one turn, i.e. 3600, we will measure exactly the same transfer funtion prior to and after the rotation , there for it is obvious that a periodical angular dependencyr exits. But besides functions experiencing two periods per rotation dependencies of 0 with higher periodicity are often examined, and a dependency corresponding to one period per rotation.

As part of the present invention it has been discovered that the angular dependencyr of the voltage transfer function between two entirely or partly linear polarized antennas emitting and receiving electromagnetic fields or waves, respectively, propagating down into the ground and entirely or partly reflected from objects in or on the ground may with a good approximation be described by means of a Fourier series, and that this may be used for

substantially improved detection of elongated objects compared to other known methods.

Such a Fourier series may be expressed mathematically as follows: where: n= O, +1 +2.., +N/2 which is a Fourier series with N+1 elements. CO represents a mean value which is constant during rotation.

The Fourier constants Cn in the equation (6) are complex and may be calculated in the form of integrals by means of the following equation where: n= O, fl, f2.., +N/2 Ois the rotation of the antenna system based on an arbitrary starting position Q is a variable designated the angular harmonic variabel j2 = -1, j iS the imaginary operator in complex numbers (6) describes the variation of the voltage transfer function during rotation of the antenna system as a function of the rotation angle 0.

The variable Q now introduced is analogous to the frequency variable o, which is often used for representing (angle)frequency by Fourier transformation of time harmonic functions. Please note that in (6) a final number of elements exists - practice has revealed that only a smal number of harmonics are necessary for a useful representation of H(O).

H(0) is complex and contains amplitude as well as phase information about the transfer function. The mathematical way of writing of complex numbers employed in this connection is in accordance with the way of writing employed by electrical engineers and others for representation of periodical alternating quantity and is described in many textbooks such as [3] og [4].

Comments concerning Fourier constants: C0 in the above equation (6) describes a mean value which typically originates from reflections in the ground which are independent of the polarization rotation.

C2 and C2 are two constants corresponding to two periods of a rotation of the antenna system.

By linear polarized antennas C2 and C 2 are under ideal conditions conjugated in a mutually complex manner, i.e.: C 2 = C2 ( means complex conjugation) By circular polarized antennas either C2 or C2 iS under ideal conditions zero.

H(0) is in its nature a continous function of the angle (0) and has so far been regarded as such, but it will often be of great practical value to measure H(0) only at a smaller number of finite values of 0, for instance 8 or 16 values during one rotation corresponding to a rotation of the antenna system of 450 or 22.50, respectively, between each measurement.

If H(O) is measured as described at some discrete values of 0, exclusively, the angle may be written mathematically as: 0 = nAO, where n= O..N-1 and AO is the smallest angle rotation, for instance 450 or 22.5 Based on such measurements of H(O) complex Fourier components may be calculated by means of the formula: Ck is periodical in k. Ck constitutes a discrete function the independent variable of which

may be considered a quantified copy of the above mentioned angular harmonic variable Q, but for practical use by detection of objects it is useful to consider it a function in the index k.

Therefore we define: N may for instance be 8, 16, 32 or 64. The number of measurements in (8) is equal to the number of calculation points for the function Vf(k). Thus the equation (8) may effectively be calculated by means of a Fast Fourier Transformation method, know as FFT, vide for instance [4].

Vf(k) as defined in the equation (8) is in the present invention called an angular harmonic function as it appears in a Fourier transformation of the angle dependent transfer function and thus a solution of the angular dependencyr in harmonic components. Vf is marked f, as H in (8) is a frequency dependent variable. In a step-frequency radar, where H(naO) is <BR> <BR> <BR> measured at M frequencies for each n, Vf becomes a two-dimensional function with MxN points, i.e. Vn,m), n= O..N-1 and m=O..M-l. k is used as in dex for the angular harmonic variable in discrete form If the radar system measures signals as a function of time - as in an impulse radar which is the most common in commercial ground radar systems - the angle-Fourier-transformation of the data measured will result in a function which is dependent of the angular harmonic and time. The calculation is conducted according to (8), but often the measured result will not be complex, but real. Corresponding to (8) we can define:

where ht is a measured time function, most often an impulse response - again at different angles nAO. If the measurements takes place at N angles and I, points in time, Vt becomes a function with ItxN points, i.e. Vt(n,i), n=O..N-1, i=1..It It has turned out that such a solution on the basis of equation (8), (8a) or the like with subsequent selection of suitable harmonic components is extremely effective in emphasizing electromagnetic reflections from objects as cables and pipes in the ground when these appear together with other reflections from soil etc.

The preferred embodiment of the present invention uses discrete rotation angles of the polarization (the antenna system), and the preferred values of N in (8) and (8a) is suitable for FFT calculation. Reference is made to table 10 indicating number of rotations of the antenna system at different N and at two generally existing values of AO.

AO is the angle distance between each measurement.

The discrete index k for the angular harmonic, as Vf(k) or Vt(k) is calculated according to (8), (8a) or equivalent is dependent of the applied angle increments AO and the number of measurements N, which is included in a calculation (and thus the number of physical rotations of the polarization/the antennas). There are no negative index values in (8) and (8a). The two k-values corresponding to the above mentioned C2 and C 2, corresponding to two periods per rotation, is for some typical values illustrated in table 11. Examples of k- indexes corresponding to two periods per rotation. K-values stated in pairs (k2,k 2), A9 is the rotation angle between each measurement, N is the number of measurements.

6.Rotating and translational movement.

The present invention takes advantage of the fact that electromagnetic waves are emitted into the ground during rotation of the polarization of the waves. If an area of the soil is to be investigated for e.g. cables and pipes it is necessary that the antenna system is moved forwardly above the ground. Prior art georadar methods requires the antenna system to be moved according to a predetermined pattern, for instance in straight, parallel paths.

The present invention allows the antenna system to be brought forward in an arbitrary path above the ground and the method described here ensures an increased reliability for correct detection and locating ofelongated objects in the ground due to the movement.

If, as illustrated in figs. 8 and 9, we perform two rotations of the polarization plane of the antenna system, both around centers lying near - but not necessarily exactly above - a burried, elongated object and if we measure the voltage transfer function during rotation in the two cases we often see that certain similarities between the two sets of measurements exist, and that certain differences exist. The differences may be caused by variations in the composition of the upper parts of the soil and by an uneven surface. Variations in the composition of the soil, humidity, occurence of stones, garbage, metal parts and the like may exist - often resulting in considerable variations in a movement ofjust a few centimeters. The similarities are often results of reflections from the burried object. The minor movement of the antenna possibly alters a bit in these reflections and in their angular dependencyr, but the periodicity is mainly maintained.

As a whole the periodic sequence of the angle dependent reflections from elongated objects will approximately be maintained during a minor movement whereas the corresponding sequence of inhomogenieties positioned above the object results in considerable changes. If a calculation of Fourier components according to the equation (8) is performed on the basis of repeated measurements during a combination of rotation and suitable movement, V(k) corresponding to these values of k will be emphasized in relation to others. Those which are emphasized will originate from elongated objects whereas those which are damped will originate from the above mentioned other reasons for reflections. This condition being favourable for detection of for instance cables and pipes arises from the fact that calculation of Fourier components in accordance with (8) basically consists of a summation of products which implies determination of mean of sizes measured. The mean determination is also important in connection with objects in the ground causing angle independent reflections.

For instance horizontal soil layers will equally reflect the electromagnetic waves regardless of the horizontal polarization direction - such reflections will during calculation of (8) be summed up in the Fourier component V(O) ,which is conceptually analogous to the direct- current component or the DC value or the mean value by Fourier solution of an AC current.

It should be noted that variations in the measured signal caused by the near field of the antennas and which according to common language usage do not originate from real radar reflections may also be damped or emphasized, respectively, by means of rotation, conveying and Fourier solution. This is a result of the fact that the near fields of the antenna will often have a well-defined orientation.

The method described here for emphasizing elongated objects by means of rotation of the polarization of electromagnetic waves may also be applied for improving location of for instance cables by means of inductive methods employing low frequency magnetic fields generated by coils and currents.

Contrary to other methods for detection of cables and pipes in the ground as for instance described in [11] the present method does not require the antenna system to be moved crosswise in relation to these objects - a movement along such an object will lead to an increased emphasis of the reflections from this object. However, the method may in fact be used during movement along an arbitrary path - if only distance and angle in relation to the detection object is not altered too much between each measurement.

In a possible embodiment of the present invention presented by the inventors, the polarization is rotated so fast that a full rotation of the antennas is achieved for every few centimetres of movement. For each fourth rotation - corresponding to N=32 and AO = 450 - the 32 Fourier components are calculated. Under these circumstances, undesired reflectors and roughnesses positioned between the antenna and the elongated object are smoothed out to such an extent that a good detection is obtained.

7. Measurement in the frequency domain, step-frekvens CW RADAR The present invention also relates to a method enabling the use of electromagnetic fields and waves which are sinusodial shaped and which do not per se contain information about transient wave propagations or transient reflections from objects in the ground. The method allows for application of the so-called step-frequency radar method in which sinusoidal- shaped (or almost sinusoidal-shaped) waves are generated and emitted, generating stationary waves which strength and phase are measured by a receiver antenna which may be the same as the one used for transmitting. The step-frequency radar method comprises transmission of

a number of waves having different frequences, often with equally sized increments in the frequency between each transmission. The frequencies employed in a step-frequency radar may mathematically be expressed by: f(m) =Afm+f , m=O,1..M-l (9) where f(m) is the applied frequency, Af is the frequency interval, i.e. the smallest difference in frequency, m is an integer, and f0 is the smallest frequency.

For ordinary, practical purposes e.g. the following numeric values may be used: Af = 5 MHz, M=201, f0 = 100 MHz, which means that 201 different frequencies in the interval 100 MHz to 1100 MHz, both inclusive, are used. The order in which the frequencies in (9) is emitted is of no importance.

All the frequencies are applied to the transmitting antenna until the transient period coexisting with the sinusoidal-shaped variation in time of the electromagnetic fields may be considered as insignificant compared to the total, time dependent field strength. In practice, this may take 10 microseconds or less.

Measurements with such sinusoidal-shaped fields or waves having transient variations damped result in a frequency dependent measuring of the voltage transfer function between transmitting and receiving antenna. Such a measurement in the frequency domain does not per se provide information about time delays of reflections. The ability to distinguish between different time delays is of crucial importance in a radar system for location of objects in the ground since this differentiation is a substantial means for sorting out for instance reflecting objects on or immediately below the surface of the ground.

In case the radar system is designed as a step-frequency CW system it becomes necessary to provide a measure for the time delays of the radar signal based on the measured, sinusoidal- shaped oscillations. The traditional method for obtaining such measurements is Fourier transformation, often designed as a so-called Fast Fourier Transformation or FFT algorithm.

By means hereof the measured elements of the frequency domain may be transformed into a calculated estimate of the corresponding time delays.

However, the application of Fourier methods for frequency-time transformation is subject to a significant uncertainty fundamenally because all radar measurements only can be performed in a limited frequency interval according to physics. Radar waves in the ground are in practice frequency limited downwardly since the antennas for low frequencies will become too bulky in order to obtain sufficient sensitivity when receiving and sufficient emission when transmitting.

Applicable frequencies of electromagnetic waves in soil are furthermore in practice limited upwardly since these waves are dampered during propagation. The dampering is often in practice increasing at a high rate with frequency at frequencies which according to a total estimation are practically applicable. Therefore, radar waves in soil may often be chosen by consideration of conflicting demands concerning limited size of antennas on the one hand and a failing penetrating power of emission on the other hand.

Frequencies in the interval 100 MHz to 1.0 GHz are often used for practical reasons. The damping of propagation of radio waves between 100 MHz and 1.0 GHz is substantially increasing with the frequency. This is evident partly from measurements on which the present invention is based, and moreover from several sources, among others: [6, Hoesktra m.fl.], [5, Turner], [9, Freundhofer et al.]. In addition, the frequency dependency of the damping at practically applicable frequencies are approximately of exponential form. If the damping is illustrated in logarithmic scale in DB per meter and is illustrated as a function of the frequency in MHz then the result is often with a good approximation a linear function.

The damping measured in dB/m is thus fairly linearly dependent on the frequency which means that the damping may be expressed mathematically as an exponential function of the frequency. This empirical relation is used in the present invention to obtain a resolusion which has not previously been realized at calculation of time delays in step frequency CW signals.

8. Mathematic model for electromagnetic reflections from objects in the ground and other suppressing materials.

When the response of the receiver antenna during transmission of EM waves having sinusoidal-shaped variation in time is measured by means of electronic equipment a value for relative amplitude and phase of the received signal are obtained for each emitted frequency.

For every frequency applied a sinusoidal-shaped response is measured which may mathematically be described as follows: hm (t)= Amcos(#mt+#m), (10) where hm (t) is the sinusoidal-shaped voltage with the amplitude Amn the angle frequency e°m = 27rfm and the initial phase #m; t is time. Each measurement results in a complex number Hm = Axexp(j#m) The receiver antenna is influenced by an incoming EM-wave which may with a good approximation be construed as a total of waves which are all a time delayed and dampened response to the emitted wave. In a step-frequency CW radar those responses have of course the same frequency as the AC voltage of the transmitter antenna. The time delayed parts originate from a number of reflectors. Consequently, mathematically the received response may be expressed as follows: here the measured is Hm with the amplitude Am and the phase #m expressed as a total of L components each with the amplitude ak,m and a phase which is proportional to the measurement frequency fm and a time delay Tk,m applying for the single reflector. Due to the exponential frequency dependency of the damping ak,m may be expressed as follows: ak,m = c'k exp(-rk2#fm) and therefore we obtain:

c k are complex factors representing the frequency independent damping as well as a phase rotation which may among others originate from the effective reflection coefficient for the single reflector. In (13) we have removed index m as in the mathematical model we suppose that c k and rk, Tk are in dependent of the frequency. If we measure at a number of frequencies which are equidistantly positioned in an interval as expressed in (9) it is advantageous to rewrite (13) into: in (15) Ck = C k exp[(rk +j#k)2#f0], and now we have obtained an equation in which the complex exponents are proportional with m since At is constant.

Based on these equations and as a result of a frequency characteristic of the transfer function measured at a number of discrete frequencies as stated in (9) a set of equations of the following form are listed: or: Hm= C1(P1)m+C2(P2)m+... CL(P)m, m=1..M (16b)

i.e.: H1 = C1P1 + C2P2 + ... CLPL H2 = C1(P1)² + C2(P2) + ... CL(PL)2 (16c) HM = C1(P1)M + C2(P2)M + ... CL(PL)M This set consists of M equations with 2L unknown complex components. Normally we will provide more measurements than unknown components, i.e. M > 2L, and thus the equation system becomes in excess solvable. Such an in excess solvable equation system is to be solved by means of a method of least squares. The equation system in (16) based on M measurements may advantageously be solved by means of a modified so-called Prony- method employing either Singular Value Decomposition (SVD) and/or so-called QR- decomposition. Good results are obtained by means of a modified Prony method and by means of Shanks method in combination with QR eller SVD.

The solution of the above mentioned equation system by a least squares method leads to 2L complex numbers: Ck = Bkexp(j#k) og Pk=exp{(-rk +j#k)#f}, k=1..L (17) where: Bk is the amplitude is the phase is is the damping factor Tk is time delay for the k' reflector. Af is the applied sampling interval in the frequency domain.

The mathematic model described here for the measured radar signals is formulated according to the fact that the damping of the soil shows (approximate) exponential frequency dependency. The model enables an improved solution of time delays compared to a Fourier method having identical physical conditions.

To solve the equations comprised in the model practically different approximations and re- writings may be applied some of which are evident from the possible embodiments, including attached computer programs. A practical problem in solving the form of (17) is that the time delay of the reflectors will be different at different rotation angles which is a result of electrical noise and the above mentioned inevitable variations in the soil etc. This is a practical problem because we want to be able to perform angle Fourier anaysis at some time delays chosen by us. For this reason and for other calculation reasons an alternative mathematical formulation ofthe equations (15) to (17) may be used.

Pl..PL i (16) and (17) may be construed as the roots in a so-called characteristic polynomial originating from a homogenous difference equation describing the context between the values of Hm for different m.

Equation (16) may be formulated as a so-called rational polynomial model of the form: <BR> <BR> <BR> <BR> <BR> <BR> H(z) = b, +b,z'+..+b,Z4 B(z)<BR> <BR> 1 + a,z-' +..+a,z A(z) (18) H(Z) is a rational function with the nominator polynomial B(z) and the denominator polynomial A(z) in the variable z representing a frequency shift operator with the frequency shift Af. It should be noted that Hm as expressed in (16) may be considered a series development above the roots in the polymonial A(z).

The form in (18) is also called an ARMA function or Auto Regressiv-Moving Average function. The co-efficients in (18) and thus indirectly the coefficients in (16) may be approximated by means of a number of methods.

A possible embodiment of the invention applies a so-called Prony method in modified form for determination of the denominator polynominal and Shanks method for determination of the nominator polynominal - these are realized in the attached computer programs and are used for calculation of curves enclosed in this description.

The enclosed computer programmes illustrate possible embodiments of algorithms which have turned out to give good results and additionally are possible to perform by means of generally available electronic integrated circuits performing calculation functions - and even having such a small time consumption that it is possible to use the present invention in an apparatus which is moved in a fairly high speed across the ground.

When H(z) described by (18) is determined in the form of the co-efficients b0..bq og a1..aL, and thus a functional equation for an approximation to the frequency dependent transfer funtion (one per angle at which the measuring is made) is obtained an associated time function may easily be calculated. The associated time function is calculated by substituting zin (18) by: Z = exp(j2staf), 0 < t < 1/(2#f) (19) ,and therefore: h(t) = H[exp(j27rtaf)] ,0 < t < 1/(2Af) (20) It must be emphasized that the time function here is not identical to the time function in the equations (2) and (3). The time dependent function h(t), obtained from (19) and (20) is claimed not to exist physically, but it has turned out to be useful for detection of objects in the ground. h(t) is continuous (and periodical in t), but is often in practice calculated for a number of discrete values in the time t.

The mathematical model presented here is based on a number of assumptions about the measured frequency data and thus about the physical realities concerning the surroundings, including:

- that the damping of the electromagnetic waves during propagation has an exponential frequency dependency.

- that time delays are frequency independent.

- that the number of reflectors is final, here determined as L.

In reality none of these preconditions are fully present.

It is a substantial advantage of the present invention that it enables a safe determination of the strength and time delay of substantial reflectors even though the ideal circumstances mentioned are not present.

Please notice: The discussed Hm modelled here is constructed as the measured frequency response in a step frequency CW radar - and is therefore normally complex with both a phase and an amplitude value. Alternatively Hm may be represented by a real and an imaginary part. Apart from noise and other inaccuracies the real part as well as the imaginary part Of Hrn contain the same information, and both are sufficient to perform a calculation of the coefficients in (18) or in (16).

The above mentioned model may very well be used to model of real sequences. (16a) may therefore be modified into: The Pk 's in the above will - in order for the summation to be real - exist in complex conjugated pairs. The corresponding relations apply for the roots in A(z) in (18).

There may be certain practical advantages by only using the real or imaginary part of Hm. In an embodiment of the method presented by the inventors Re(Hm) is used. The advantage is mainly to be found in connection with measuring of HmS which in the embodiment presented takes place in a system using both analogous and digital technique.

9. Signal analysis in two dimensions When CW radar signals are used the above described Fourier solution of the dependency of the measured matter of the rotation angle of the antenna system based on an arbitrary angular position will often not per se be sufficient to obtain a reliable detection of elongated objects in the ground. In many cases the total measured signal will be dominated by reflections undesired in this connection and originating from the surface of the ground and from inhomogenieties in the ground. Therefore, the CW signal will often only to a small extent demonstrate an angular periodicity even though it contains the reflection from e.g. a cable in the ground. In order to obtain best possible emphasis of the angular dependencyr in the polarization conditioned reflections of objects it is useful to resolve the measured signal into both angle and time. If the signal is measured in time and is a result of an impulse or another transient electrical voltage applied to the transmitter antenna then it will be sufficient to perform the angle-Fourier solution for different parts of the signal corresponding to different time delays. But if the signal is a stepped frequency CW signal a combination of the above mentioned two described analysis methods may advantageously be used for angle Fourier resolution and time analysis based on exponential modelling, respectively.

The function H(O) introduced in chapter 3 and 4 representing the complex transfer function is measured at different angles of rotation O and at different frequences and may therefore be considered a function of two variables: the angle O and the frequency f, i.e.: H(O,f).

Since the measuring is performed at discrete angles and at discrete frequencies in practice and if we use: f(m) = Af m + fO, m=O,l..M-l and = n, n=0,1..N-1 then we get H in the form: H(A0n,Afm) or just H(n,m), m=O,1..M-l, n= 0,1 ..N-l (21) The latter compact form in (21) is appli when AO and Af have been determined. H(n,m) is a set of numbers with NxM complex elements.

If a transformation of the frequency variable into time is performed, for instance during application of the method described in chapter 8, for each of the Values, i.e. for each n, we get N time dependent functions in total to be considered a discrete function in two dimensions: 0 and the time t: h(0,t). In practice also h(0,t) will be calculated in discrete points and take the form: h(hOn,Ati) or just h(n,i), i=O,l ..It-1, n= 0,1 ..N-1 (22) V,(k) as defined in equation (8) in chapter 4 is the Fourier transformed of H and does consequently not give direct information about the time dependency of the measured matter.

Therefore, it is in practice a great advantage to Fourier transform h(0,t) or h(n,i) in the angle or in n, respectively, in order to emphasize the angular harmonic content of the signal at different time delays (and thus depths). Consequently, a very useful alternative to (8) is used in practice: where i is the constant during summation in (23) and represent a fixed value of the time delay. If (23) is calculated for a number of values of i then a two-dimensional set of numbers in k,i is obtained, where k corresponds to the angular harmonic and i corresponds to the time delay quantified , i.e.: The number of points in time: = i2 -i1 +1. The time index runs from i1 to i2, both included, corresponding to an appropriate time interval.

Vt(k,i) is produced by Fourier transform It functions with each N points. Real two- dimensional functions are not involved, but rather combinations of functions (series of numbers) being in one dimension. In (24) a frequency to time transformation has been

performed having h(n,i) as result before calculation of the angular harmonic. An alternative method for calculation of a function corresponding to Vt(k,i) is: firstly Fourier transformation of the measured frequency data in the angle, thereafter frequency to time transformation. No functional equation for the Prony based method described in chapter 8 for frequency-time transformation is given. For the sake of convenience the following notation is used here: x(t) =Prony[X(f)] for the total procedure. Hereafter the alternative calculation of Vt(k,i) may be written in a short form: Vt(k,i) = Prony[Vf(k,m)] where: m= 0,1..M-1 (25) Please notice: m, n, k and i are indexes for frequency, angle, angular harmonic and time, respectively.

10. Detection curves The angular dependencyr in different depths in the ground corresponding to different time based distances will most often vary - similarly this applies to the surroundings of the antennas as a whole. For instance, an elongated reflecting object will demonstrate a periodicity approximately similar to the ones described in the equations (4) and (5) whereas the material above the object will often demonstrate another, possibly minor degree of periodicity. By calculating the strength of the angular harmonic corresponding to two periods per rotation at different time delays a useful detection curve is obtained which has a function of the time (depth) and which concentrates the result of the measurements and the associated calculations in a clear way.

Detection curves are calculated by summing the relevant harmonic in Vt(k,i): Examples of formulas for detection curves are: Dl(i) IVt(ki,i)I + lVt(k2i)l, i =iI i2 (26)

where kl and k2 correspond to a selected angular harmonic, for instance the one corresponding to two periods per rotation.

A value of D, is calculated for each selected value of i corresponding to each time delay to be investigated.

PLEASE NOTE: Two values of k are employed because the calculation of the Fourier coefficient in accordance with the formulas (24) or (25) results in calculation of what corresponds to a positive and a negative frequency for each of the harmonic which is a mathematically based consequence of the applied definition of the Fourier coefficients and the fundamental sizes. If the Fourier-resolved sequence fulfills certain requirements one of the two associated coefficients may be disregarded, but generally this is not the case. Under ideal conditions an angular dependency corresponding to the equations in (5al) or (5a2) will be obtained by use of a circular polarization. These angular dependencies only give rise to a certain value of k when resolving the angular harmonics by Fourier.

Other examples of detection curves that may be used are: D2(i) = lVt(kl,i) + Vt (k2,i)l, i =il i2 (27) where * means complex conjugation and: D3(i) = IVt(ki,i) - Vt (k2,i)l, i =iI i2 (28) Generally these detection curves are expressed by: where Wk( } represents a suitable funtion of the selected harmonic. Examples are given in (26), (27) and (28).

A is a set containing the selected harmonics.

Example. We want to detect elongated objects that are supposed to have a relatively large content of harmonics corresponding to two periods per rotation of the antennas which are linearly polarized, i.e. of Type1. The measuring is performed at angular separations 22.50, and we consider 4 rotations at a time, i.e.: AO = 2z/16 (radian) and N=64. In this case the relevant k-values are: kl=8 and k2=56. With reference to the equations (24) and (25).

Since local inhomogenieties near the antennas give rise to propagation of the energy of the signal over a larger number of angular harmonics it makes good sense to weigh the equation in (29) against the energy in the harmonics falling outside the set A which may be implemented as follows: Which is a measurement for the relative strength of the selected harmonics at a time delay given.

Detection curves may generally be produced from functions of v,(k,i) which is the polarization angular harmonic time response from objects. Variations of the time related location of an object in the measured signals may be countered by average determining detection curves over a minor time interval corresponding to more values of in dex i.

Detection curves concentrate an (often) large number of measurements into one single curve expressing a measurement of whether objects having a given periodic or constant angular dependencyr exist in the angle scanned areas of (often) the ground.

In the calculations of D(i) only two harmonics (2 k-values) are typically included which means that the necessary frequency to time transformation by use of the step frequency CW radar method need only to be performed for the two relevant harmonics if the Fourier resolution in angular harmonics is performed before the frequency-time transformation. This corresponds to use of the equation (25) symbolizing a procedure comprising a Prony-

method. Prony methods are rather demanding with respect to calculation. Therefore, the method starting by Fourier resolving in angular harmonics followed by Prony calculation of typically two selected harmonics and finally calculation of a detection curve is the most effective method.

Such a method is demonstrated by the inventors by way of the enclosed examples.

In the above description elongated objects are emphasized, but similar detection curves may also be produced for other types of objects. Rotation symmetrical (with respect to the line of direction from the antennas) objects for example demonstrate a relatively large content of the mean value in the Fourier series corresponding to k=O in the formulas (24) and (25).

Therefore A in (29) might in this case be limited to: A={O}.

11. Determination of the direction of elongated objects The present invention enables determination of the direction of elongated objects without using reference measurements. The direction determination is performed in relation to the known, physical embodiment and orientation of the antennas. The determination of direction takes place by considering the set of curves representing the strength of the reflections measured at associated values of rotation angles and time delays, for example obtained by means of the methods described above in the present specification. The mathematical notation introduced above is employed, but coherent values of angle and time delays obtained by other methods than described here additionally may be employed as a starting point for the determination of the direction. The set of numbers symbolized by ht(n,i) in equation (24) or (25) when containing reflections from an elongated object will show an angular periodicity in a certain time interval where the object is positioned relative to the time - vide for example figure Eks. 1 A showing at about 31 ns a periodic sequence is seen along a perpendicular cross-section and similarly for figure Eks.3A at about 22.5 ns.

Index i in ht(n,i) corresponds to the time, and if lht(n,i)l is plotted as function of n along a fixed value of i=ia close to the time related position of the object a partly periodic sequence is obtained in n, corresponding to the angle. The plotted function may be symbolized mathematically by:

Av(n,ia) = |ht(n,ia)|, i = ia, n = 0..N-1 (30a) Alternatively the following may be used: Av(n,ia) = ht(n,ia)ht*(n,ia), i = ia, n = 0..N-1(* : compl. conjug.) (30b) During the radar measurements the antenna system has been rotated in relation to the elongated object in the ground starting with an unknown starting angle 00. If the applied antenna system is copolar or parallel (type 1) local maxima Av(n,ia) will exist for k-values corresponding to Oo +00,1800.. etc. If the antenna system is crosspolar (type 2) a maxima in the angles 00+450, 90,135 ..etc will exist. Please note that the frequency of Av(n,ia) in the angle is doubled for the type-2 antenna compared to the corresponding type-1. The curves in fig. EkslA..Eks 1E correspond to a type-l antenna system.

In practice the angular dependencyr of ht(n,ia) in (30) will not correspond to simple equations as in the equations (4) and (5). Consequently angular determination is not performed based on Av(n,ia) directly, but based on the Fourier transformation of Av(n,ia).

The scanned maxima for Av(n,ia) are coincident with maxima in the sinusodial-formed curve corresponding to a definite harmonic in the Fourier series of Av(n,ia). The relevant harmonic is the one corresponding to two maxima per rotation at type 1 antennas and 4 maxima per rotation at type 2 antenna. The term rotation is defined as rotation of the polarization, possibly by rotating the antenna system. The phase of the relevant complex Fourier component is directly proportional with the displacement of the maxima mentioned in relation to a position in which the first maximum falls in n=O. Therefore, the value of index n corresponding to the displacement is calculated from the phase for the relevant harmonic.

Harmonic index k2 corresponding to two maxima per rotation is obtained by: k2 = NAO/l 80(AO in degrees) (31a) and corresponding to 4 maxima per rotation:

k4 = 2N##/180 (Ao in degrees) (31b) The relevant Fourier composant is calculated by: when k=k2 and correspondingly when k=k4 Xv(ia) is a complex number from the phase of which the starting angle of the antenna in relation to the elongated object is easily determined by: Type-1 antennas: The displacement of the relevant maxima in relation to n=O is obtained by: n# = #a/(2##) (all angles in degrees), #a = #Xv(ia) = phase of k2. harmonics. (32a) nO is not an integer. Consequently, the angle of the object in relation to the linear polarization of the type- 1 antenna system type-1 is: #0 = #a/2 (all angles in degrees), (Pa = #Xv(ia) = the phase of k2. harmonics.

(32b) It should be noted that the starting angle of the antenna system in relation to the object calculated as 0o in (32) may be provided with a better resolution than corresponding to the angle increment AO between every measurement. The ability of the Fourier resolution to interpole is utilized and #0 may in principle be determined with arbitrary resolution, only limited by noise, inaccuracies of the measurement etc. The meaning of 0o is seen in relation to Fig. 7b.

Type-2 antennas: Here the number of periods in Xv(a) per rotation are doubled in relation to type -1 antennas.

The meaning of Oo is seen in relation to Fig. 7a as it is to be noted that 450 must be added in relation to this figure.

Other types of an tennas Circularly or elliptically polarized antennas may be considered linear combinations of type- 2 antennas and the orientation of objects may be determined by a procedure corresponding to the one described here.

12. Possible methods for locating/detecting cables and pipes in soil.

The above described mathematical methods for analysis of a signal in the angular/angular harmonic and frequency/time domains, respectively, may advantageously be combined in various ways. In the following some combinations which have been shown to be applicable in practice will be described: In the following two-dimensional sets of numbers are described with since most often discrete values are relevant. These sets of numbers may also be construed as elements in a matrix and each of the rows or columns in it may be construed series. Curves or functions and function values are synomymously described. The preferred embodiments presented by the inventors are based on discrete frequencies, angulars, angular harmonics and times which are motivated by the application of digital storing and calculating units - even though the demonstrated examples appear as continuous functions.

The principles of the invention also applies for continuous frequences, angle rotation, angular harmonics and times.

Procedure No. 1 Comprises the following steps: 1.1 An antenna arrangement of type 1 or 2 as described in chapter 3 and 4 is positioned on or above the ground with arbitrary, but approximate horizontal, orientation.

1.2 The voltage transfer function between the transmitter and receiver antenna is measured at a number of frequencies. The measured values are stored.

1.3 The antenna arrangement is rotated mechanically or electrically an integer multiple of an angle AO. Typical values of AO may be 22.50 or 450 corresponding to 1/16 or 1/8 rotation. Simultaneously to rotating the antenna may be moved a bit translatorily which will be the case if the antenna is moved during rotation above the ground.

1.4 The voltage transfer function between transmitter and receiver antennas is measured at a number of frequencies. The measured values are stored.

1.5 Step 1.3 and 1.4 are repeated until an appropriate number of measurements are performed at a corresponding amount of angular positions. The amount depends on the circumstances. Practical amounts of useful angles may for example be: 8, 16, 32 or 64. The result is a set of complex numbers representing measured values of the voltage transfer function for coherent values of angular rotation and frequency. The result may be reduced into a real set of numbers corresponding to the real part of the complex set of numbers just mentioned.

1.6 The measuring results from the latter item are transformed from frequency to time. For this purpose the exponential based mathematical method described in item 8 or the like is applied. The result is a number of estimated reflections, their strength, phase and time delay. Frequency-to-time transformation is performed one by one on the frequency dependent transfer functions (series) associated with each angle. Thus for each angle a time dependent, continuous-in-time and periodic function is obtained which is calculated at a suitable number of discrete times. The same calculation time is used for all the angles. The result so far is a set of complex numbers in two dimensions. The series corresponds to a mathematic function having a discretizied rotation angle and the time discretisized as independent variable.

Comment: Examples of the result of the procedure 1.1 to 1.6 are illustrated in Figs. eks.la, eks.2a, eks.3a, eks.4a and eks.5a. In many cases angle periodic objects may be identified by

inspection. Eks. la illustrates at the time delay of about 31 ns an object known as a 160 mm pipe made of a plastics material and containing water in a depth of 135 cm in soil.

Procedure No. 2 Consists of No. 1 or followed by additional calculations 2.1 Step 1.1 to 1.6 as in procedure No.1 or correspondingly 2.2 For each of the points in time used in step 2.1 a Fourier transformation is performed with the angle as independent variable. The result so far is a set of complex numbers in two dimensions. The set of numbers corresponds to a mathematical function having the angular harmonic and the time as independent variables.

2.3 Based on the two-dimensional set of numbers which is the result af step 2.2 a one-dimensional function in time is calculated, called D(t) by means of one of the methods described above in chapter 10 or correspondingly.

2.4 The discrete time function produced in step 2.3 is scanned for local and globale maxima that demonstrate a significant strength compared to the mean value. Such maxima represent angle periodic reflections from elongated objects. The value of time corresponding to the individual maximum states the time delay of the reflections from the corresponding object. Scanning for maxima may be performed mechanically or by inspection of the curve.

Comment: The time delays thus calculated may together with a knowledge of the speed of propagation of the radar waves in the ground be used for calculating the depth of objects.

Examples of the result of procedure 2 step 2.1 to 2.2 are illustrated in figs. eks.lC, eks.2C, eks.3C, eks.4C and eks.SC.

Examples of the result of procedure 2 step 2.1 to 2.3 are illustrated in figs. eks.lE, eks.2E, eks.3E, eks.4E and eks.SE, where the detection curve is calculated in accordance with (28).

Procedure No. 3 Consists of procedure No. 1 or corresponding chapters followed by additional calculations.

3.1 Step 1.1 to 1.6 as procedure No. 1 or correspondingly 3.2 Based on the result of step 3.1 the angular position in relation to the antenna system is calculated by means of the method described above in item 11. The angular position is calculated for one or more angle periodic objects that may be detected or time determined by visual inspection of the result of step 1.1 to 1.6 under procedure 1 or by use of detection curves as described in procedure 2 above.

Comment. If the antenna system comprises mechanical rotation the angular position in the starting position in relation to the elongated object(s) is hereby determined. If rotation is produced by shifting between the antenna elements with fixed angular position the angular position is determined by the polarization direction corresponding to the first measuring position - and thus the angular position of the total antenna arrangement in relation to the elongated object(s).

Examples of result of this procedure are illustrated in Fig. Eks.3F.

Procedure No. 4 comprises the following steps: 4.1 An antenna of the type 1 or 2 as described in chapter 3 and 4 is positioned on or above the ground with arbitrary, however approximately horizontal orientation.

4.2 The voltage transfer function between transmitter and receiver antenna is measured at a number of frequencies. The measured values are stored.

4.3 The antenna arrangement is mechanically or electrically rotated an integer multiple of an angle AO. Typical values of AO may be 22.5O or 450, corresponding to 1/16 or 1/8 rotation. Simultaneously to rotating the antenna may be moved a bit translatorily which will be the case if the antenna is moved during rotation above the ground.

4.4 The voltage transfer function between transmitter and receiver antennas is measured at a number of frequencies. The measured values are stored.

4.5 Step 4.3 and 4.4 are repeated until an appropriate number of measurements are performed at a corresponding amount of angular positions. The amount depends on the circumstances. Practical amounts of useful angles may for example be: 8, 16, 32 or 64. The result is a set of complex numbers representing measured values of the voltage transfer function for coherent values of the angular rotation and frequency. The result may be reduced into a real set of numbers corresponding to the real part of the complex set of numbers just mentioned.

4.6 The measuring result from step 4.5 is subject to a Fourier transformation in the angle. For each of the frequencies used in step 4.5 a Fourier transformation is performed with the angle as independent variable. The result is a set of complex numbers in two dimensions. The set of numbers corresponds to a mathematical function having the angular harmonic and the measuring frequency as independent variable.

Comment: The set of numbers thus obtained is in two dimensions which may also be construed as a number of frequency dependent curves, one for each angular harmonic or as a number of functions of the harmonic, one for each measuring frequency.

Procedure No. 5 Comprises the steps in procedure No. 4 or corresponding steps and additional calculations.

5.1 The steps 4.1 to 4.6 in procedure No. 4 or corresponding steps.

5.2 The set of numbers obtained in step 5.1 are transformed from frequency to time. The series corresponding to each of the angular harmonics are transformed by means of the exponential based mathematic method or a corresponding method described in chapter 8. The result is a number of estimated reflections, their strength, phase and time delay. Thus for each angular harmonic a time dependent, continuous-in-time and periodical function is obtained which is calculated at a suitable number of discrete times. The identical

calculation points in time are used for every angular harmonics. The result is a set of complex numbers in two dimensions. The set of numbers corresponds to a matematical function having the angular harmonic discretisized and the time discretisized as independent variable.

Comment: Sets of figures in two dimensions are hereby obtained which may also be construed as a number of time dependent curves, one for each angular harmonic, or as s number of curves or functions of the harmonic, one for each point in time. This set of numbers may be illustrated and by inspection objects may be found by identifying global or local maxima for selected harmonics, typically the two harmonics corresponding to two periods per rotation of the polarization.

Procedure No. 6 Comprises the steps in procedure No. 4 or corresponding steps and additional calculations.

6.1 The steps 4.1 to 4.6 in procedure No. 4 or corresponding steps.

6.2 Parts of the set of numbers obtained in step 6.1 are transformed from frequency to time. The series corresponding to selected angular harmonics are transformed by means of the exponential based mathematic method or a corresponding method described in chapter 8. The result is a number of estimated reflections, their strength, phase and time delay. Thus a time dependent, continuous-in-time and periodical function is obtained for each angular harmonic which is calculated at a suitable number of discrete times. The same calculation points in time are used for all angular harmonics. The result is a set of complex numbers in two dimensions. The set of numbers corresponds to a mathematic function having the angular harnomic discretisized and the time discretisized as independent variable, but only for selected angular harmonics.

6.3 Based on the two-dimensional set of numbers which is the result of step 6.2 a one-dimensional function in time is calculated, called D(t), by means of the methods described above in chapter 10.

6.4 The discrete time function produced in step 6.3 is scanned for local and global maxima that demonstrates a significant strength compared to the mean value. Such maxima represent angular periodic reflections from elongated objects. The value of time corresponding to the individual maximum states the time delay of the reflections from the corresponding object. Scanning for maxima may be performed mechanically or by inspection of the curve.

Comment: As described in chapter 10, two of the angular harmonics are often selected corresponding to 2 periods per rotation. If the antenna is of the Type1 described above the two harmonics are often used which correspond to the positive or negative, respectively, frequency corresponding to two periods per rotation. Since only time sequences need calculation for example of two harmonics - and thus only two Prony transformations are applied - then procedure is effective for calculation. The time delays calculated in this manner may together with a knowledge of the speed of propagation of the radar waves in the ground be used for calculating the depth of objects. Examples of the result of procedure 6 step 6.1 to 6.3 are seen in the figures eks.lD, eks.2D, eks.3D, eks.4D and eks.5D in which the detection curve is calculated in accordance with equation (28).

Procedure No. 7 Comprises the following steps: 7.1 An antenna arrangement of type 1 or 2 as described in chapter 3 is positioned on or above the ground with arbitrary, however approximately horizontal, orientation.

7.2 A voltage pulse which should be a short-period pulse is applied to the transmitter antenna. The voltage of the transmitter antenna is then measured at a number of time delays.

7.3 The antenna arrangement is rotated mechanically or electrically an integer multiple of an angle AO. Typical values of AO may be 22.50 or 450, corresponding to 1/16 or 1/8 rotation. Simultaneously to rotating the antenna may be moved a bit translatorily which will be the case if the antenna is moved during rotation above the ground.

7.4 A voltage pulse which should be a short-period pulse is applied to the transmitter antenna. The voltage of the receiver antenna is then measured at a number of time delays.

7.5 Chapter 7.3 and 7.4 are repeated until a suitable number of measurements have been performed at a corresponding amount of angular positions. The amount depends of the circumstances. Practical amount of usable angles may for example be: 8, 16, 32 or 64. The result is a set of numbers representing measured values of the voltage transfer function for coherent values of angle rotation and frequency.

The set of numbers will often be real. If the antenna arrangement is arranged so as to measure two time functions physically which are mutually orthogonal - often called I(t) and Q(t) - the set of numbers is considered complex.

If the measured set of numbers is real a complex corresponding set may be produced - in the form of a so-called Hilbert transformation - either by means of electric filtering or by means of calculations performed on the measured, discrete values.

Procedure No. 8 Consists of procedure No. 7 or corresponding procedure followed by additional calculations.

8.1 Step 7.1 to 7.5 as under procedure No.7 or corresponding chapters.

8.2 For each of the points in time used in item 8.1 (= time delays) a Fourier transformation with the angle as independent variable is performed. The result so far is a set of complex numbers in two dimensions. The set of numbers corresponds to a mathematic function having the angular harmonic and the time as independent variable.

8.3 Based on the two-dimensional set of numbers which is the result of step 8.2 a one-dimensional function in time is calculated, called D(t), by means of the methods described above in chapter 10 or corresponding methods.

8.4 The discrete time function produced in step 8.3 is scanned for local and global maxima that demonstrates a significant strength compared to the mean value. Such maxima represent angle periodical reflections from elongated objects. The value corresponding to the individual maximum states the time delay of the reflections from the corresponding object. Scanning for maxima may be performed mechanically or by inspection of the curve.

Comment: The time delays thus calculated may together with a knowledge of the propagation speed of the radar waves in the ground be used for calculating the depth of objects.

Procedure nr. 9 Consists of procedure No. 7 or corresponding procedure followed by additional calculations.

9.1 step 7.1 to 7.5 as under procedure No.7 or corresponding chapters..

9.2 Based on the result of step 9.1 the angular position is calculated in relation to the antenna system by means of the method described above in chapter 1.1. The angular position is calculated for one or more angle periodic objects which may be detected and time determined by visual inspection of the result of step 9.1 or by use of detection curves as described under procedure 8 above.

Comment: If the antenna system comprises mechanical rotation the angular position in the starting position is hereby determined in relation to the elongated object(s). If rotation takes place by shifting between antenna elements with fixed angular position the angular position is determined by the polarization direction corresponding to the first measuring position - and thus the angular position of the total antenna arrangement in relation to the elongated object(s).

Procedure No. 10 Consists of procedure No. 7 or corresponding procedure followed by further calculations.

10.1 Step 7.1 to 7.5 as under procedure No.7 or corresponding procedure.

10.2 For each of the points in time used in step 10.1 (=time delays) a Fourier transformation is performed with the angle as independent variable. The result so far is a set of complex numbers in two dimensions. The set of numbers corresponds to a mathematic function having the angular harmonic and the time as independent variable.

Comment: The result of Fourier transformation of measured radar signals in the polarization angle may by means of visual inspection give valuable information about objects in the ground.

Procedures for use of circular or elliptical polarization The present invention also comprises use of a circular or elliptical polarization. The procedures described here, i.e. procedures Nos. 1 and 4, use antennas with linear polarization rotated mechanically or electrically for example by electronic shifting between elements. If circular or elliptical polarization is applied the procedures are used in a corresponding manner. Circular or elliptical polarized waves and the associated signals of the antennas may be split into components corresponding to linear polarization.

If the circular or elliptical polarization is obtained by means of linearly polarized antenna elements and their terminals are accessable the methods described here may be applied directly on the individual linear parts - with or without subsequent combination. This applies irrespective of linearly polarized parts being activated at the same time or individually and irrespective of EM-waves with circular or elliptical polarization existing physically during the measurement, or the corresponding signals are produced in the form of linear combinations of measuring results.

The present invention also comprises the circular or elliptical polarization being obtained by means of one or more antennas per se radiating circular or elliptical polarized EM-waves - for instance spiral antennas - the electrical signals of the terminals of such antennas being divided into orthogonal parts and these parts being processed by means of the method described here. Orthogonal signal parts are often designated quadrature components or I and Q, where I and Q in total constitute a complex representation of a signal. Irrespective of the splitting of a signal in orthogonal parts being obtained by means of electrical networks or by means of algebraic manipulation in a (most often) digital computer the processing of the

signals produced is comprised of the present invention by means of the methods described here.

Use of Fourier methods for transformation from frequency to time.

In the procedures Nos. 1, 5 and 6 described here the exponential based method for determination of time delays in the radar signal described in chapter 8 is included. The present invention also comprises procedures corresponding to the ones described where Fourier transformation is used for frequency to time transformation - including use of Fourier solution in the angle as described above in combination with Fourier transformation of the frequency dependent measuring data.

In procedure No. 1, step 1.6, procedure No. 5, step 5.2 and in procedure No. 6, step 6.2 the exponential-based method here described may be replaced by a Fourier method including FFT or Fast Fourier Transform.

Use of other signal forms than Step-frekvens CW radar The present invention also comprises use of the methods described in connection with other signal forms than Step-frekvens CW radar, which is the preferred one, and impulse radar which is comprised of the procedures 7 to 10.

The methods described here in combination with rotating polarization with or without movement above the ground or the like may advantageously be applied irrespective of the signal form used.

Some possible signal forms are: - frequency-sweep or "chirp" or FM-CW, in which the frequency of the signal is altered continuously during an interval.

- correlation radar in which constructed or arbitrary time frequencies are employed and in which time delays of reflections are calculated by means of correlation.

Detection of several objects Detection and determination of direction are described here for individual objects. If several objects exist in the same set of radar measurements the methods described here enable

individual processing of them if their associated time delays are different. Objects in different depths, including crossing cables and pipes, may be determined individually by means of the methods described. The modified Prony-methods will often be a help for separation of closely positioned objects.

Examples with performed calculations: The examples stated are all based on measurements made under ordinary circumstances in Denmark. Thus, the examples are thus fully realistic and correspond to ordinary existing conditions. However, they have not to be considered calculation examples which are arranged with the aim of emphasizing theoretical or principal aspects of the methods of the invention.

Table 12 illustrates a scheme of objects illustrated in the examples 1 to 5.

The figures 13a)-13b), 14a)-14b), 15a)-15b), 16a)-16b) and 17a)-17b) are the result of calculations of the type mentioned in chapter 9 and illustrate calculated signal strength as a function of the angle index n and the time in ns. Are the result of above described procedures No. 1 through step 1.6 13a)-17a) in the form of 3D-plot, 13b)-17b) same in contour plot.

The figures 13c)-13d), 14c)-14d), 15c)-15d), 16c)-16d) and 17c)-17d) measured signal strength as function of the angle index n and the frequency in GHz. Are the result of the above described procedure No. 1 through step 1.5. 13c)-17c) in the form of 3D-plot, 13c)- 17c) same in contour plot.

The figures 13e)-13f), 14e)-14f), 15e)-15f), 16e)-16f) and 17e)-17f) are the result of calculations of the type mentioned in chapter 9 and illustrate calculated signal strength as function of angular harnomic index k and the time in ns. Are the result of above described procedure No. 2 through chapter 2.2. 13e)-17e) in the form of 3D-plot, 13f)-17f) same in contour plot.

The figures 13g)-13h), 14g)-14h), 15g)-15h), 16g)-16h) and 17g)-17h) are the result of calculations of the type mentioned in chapter 10 and illustrate detection curces. Are a result of the above described procedure No. 6 through step 6.3.

The figures 13i)-13j), 14i)-14j), 15i)-15j), 16i)-16j) and 17i)-17j) are the result of calculations of the type mentioned in chapter 10 and illustrate detection curves. Are the result of above described procedure No. 2 through step 2.3.

The figure 15k) through 150) illustrate an example of determination of direction by means of calculations as mentioned in paragraph 11 and illustrate calculation result included in the above described procedure No. 3.

Comments to the examples.

Please notice: All the examples illustrated are measured by means of an antenna system in which the interior time delay and the time for direct coupling from transmitter to receiver in total constitute approx. 11 ns. This included delay is not deducted in the illustrated curves.

Please notice: The illustrated curves in the examples are produced by connecting discrete values with straight lines and are, accordingly, not to be construed continuous functions or curves.

Example No. 1 illustrates in the figures 13a) and 13b) a clear angular harmonic about 31 ns, appearing in the form of clear local maxima in the figures 13e) and 13f) - and gives in the detection curve in fig. 13h) a global maximum lying more than approx. 17 dB above the "noise floor". Consequently, clear detection of a pipe is seen which would by means of a ground radar without polarization rotation and analysis only have given a signal on the same level as many others, without characteristic features. In the figures 13e) and 13f) the example shows that substantial periodicity exists around 15-20 ns and that these are sorted out by the total procedure. The angular harnomic corresponding to the oth order - i.a. a mean value - has a distinctive maximum around approx. 12 ns - this is also filtered away.

Example No. 2 is measured during normal, but advantageous circumstances. Here a safe detection is obtained by means ofjust a single rotation with 16 measurements. If the number

of rotations is halved corresponding results are obtained. It is seen that the raw frequency measurements in the figs. 14c) and 14d) demonstrate a significant degree of periodicity.

Example No. 3 illustrates a measurement with substantial "clutter" in a depth corresponding to approx. 14 ns. It is seen how this clutter in the final detection curve in fig. 15h) is dampened by 20 dB compared to the global maximum, positioned in approx. 22 ns.

The figs. 15k) to 150) demonstrate an example of determination of direction. 15m) is the amplitude of the function corresponding to the function h(k,t) in the figures 15a) and 15b) for t=21,8 ns, which is the position of the global maximum of the detection curve figs. 15g) and 15h). The periodicity is clearly seen. Angle index n is used as horizontal unit.

In the middle 15n) the absolute value of the FFT calculation is illustrated above the before mentioned curve with number of points N=64.

The lower part of fig. 150) illustrates the phase of the two angular harmonic corresponding to two periods per rotation (type- 1 antenna), corresponding to kl=8 and kl=56 during rotation of the antennas. The figure -0.1844 is the calculated angular position calculated in number of angular steps in accordance with the above mentioned formula (32b). From the uppermost curve 15m) and when considering the figures 15a) and 15b) it is seen that the calculated position of the object as being almost coincident with the position of the first measurement (n=O) is correct.

Example No. 5 illustrates how in spite of a very poor degree of periodicity in the frequency measurements (figs. 17c) and 17d)) and in spite of considerable clutter around approx. 12 ns (figs. 17a) and 17b)), a useful detection in the figs. 17g) and 17h) is obtained in which the global maximum in approx. 12 ns may be rejected if we do not accept an object immediately below the surface - likewise in the figures 17i) and 17j).

14. Possible applications The present invention will among other things be appliacable for:

- manually borne detector for locating of cables, pipes and optical fibres. Such a detector will be able to give the operator an inmediate indication of presence, position and orientation of such objects. The detector may be moved above the ground in an arbitrary pattern and enable a burried object to be followed. corresponding detector mounted on vehicles. automatic detector mounted on excavators or other machinery for movement of soil with the aim of avoiding damage of objects.

- mapping of cables, pipes and other underground objects. The detector may be coupled together with positioning equipment and equipment for data collecting. Typically, by means of mapping a scanning in accordance with a predetermined pattern will be performed.

- Instrument for scanning of the structure and condition of materials including concrete. instrument for location of pipes and cables in building constructions: floors, walls e.g. of concrete and other materials.

15. Antenna constructions Stepwise rotation of the polarisation without mechanical means is made in the best manner by shifting between similarly designed antennas positioned in appropriate angles and with displaced centers as illustrated schematically in figs. 3, 4 and 9. In the figures 3 and 4 linear thin dipoles are outlined. In order to obtain sufficient frequency band width it is an advantage to make the arms of the dipole conical as outlined in fig. 9. In order to avoid or at least dampen reflections from the ends of the dipole arms (corresponding to standing waves along the axis of the dipole) a kind of damping is often used. Our preferred damping is a combination of damping material positioned close to the antennas above the antennas as illustrated in fig. 12 and use of serial, resistive coupling elements as illustrated in fig. 10 and 11. The resistive elements mentioned may consist of a resistor in the form of an ordinary resistor for surface mounting and having a varying value so that the highest values are used farthest away from the center of the dipole. Typical values are from 10 ohm to 100 ohm.

The resistive elements may also consist of a series coupling of the above mentioned resistor and a switch diode for instance of the type PIN. By applying a DC voltage between the end points of the dipole and the center a possibility of bringing the PIN diodes in conducting or

cutoff mode is obtained. One of the effects of such an arrangement is that the dipole in cutoff mode will have less electromagnetic coupling to closely positioned similar dipoles than without the diodes. In this way it becomes possible to reduce the size of the total construction without disturbing coupling between the active and passive dipoles. Undesired couplings between the dipoles may cause a deteriorated linearity of the polarisation and undesired ringing in the signal. Only those antennas which are desired to be active have a DC voltage applied - often two at a time - causing the PIN diodes to conduct.

The switch arrangment outlined here having serial PIN diodes allows dipoles to overlap each other without significant mutual coupling.

A dipole with four metal surfaces and three resistive coupling elements with or without PIN diodes of a total length of 24 cm are demonstrated by the inventores and are measured to have a frequency characteristic which is fairly flat in the area 100 MHz to 900 MHz. The rest of the construction was as outlined in figs. 11 and 12.

The present invention comprises application of splitted antennas, coupled together with resistor links with or without switch diodes for use in ground radars.

16. References 1. US-Patent 4,728,897 Gunton et al.

2. US-Patent 4,812,850, Gunton et al.

3. Balanis C.A., Advanced Engineering Electromagnetics, John Wiley & Sons, 1989 4. Oppenheim A.V. & Schafer R.W., Discrete-Time Signal Processing, Prentice Hall, 1989 5. Turner G. & Siggins A.F., Constant Q attennuation ofsubsurface radar pulses, Geophysics, vol 59, No 8, August 1990, p 1192-1200.

6. Hoekstra P. & Delaney A. , Dielectric Properties ofSoils at UHF and Microwave Frequencies, Journal of Geophysical Research, vol.79, no.11, April 1974 pp 1699-1708 7. Therrien C.W. , Discrete Random Signals and Statistical Signal Processing, Prentice Hall, 1992.

8. US-Patent: 4,062,010, Young et al.

9. Lizuka K., Freundorfer A.P. m.fl., Step-frequency radar, J. Appl. Phys. vol.56, No.9, November 1984 10. US-patent 4,967,199 Gunton et al.

11. Chignell R.J. & Dabis H.S., A Pipe Detection Radar with Automatic Three Dimensional Mapping, i Proceedings of the 6th International Conference on Ground Penetrating Radar GPR'96 Sendai Japan, 1996 17.Time filtering of frequency data.

In order to emphasize radar signals originating from a given depth interval it is often an advantage to perform a filtering of the measured frequency signal before it is transformed to the time domain. The filtering takes place by means of a signal filter the function of which may, considered mathematically, be identical to an ordinary filter which is used for time dependent signals - however differing in the effect that what is normally construed in the frequency characteristic of the filter now becomes a time characteristic. If the basis is the frequency representation of a signal a filtering of this is performed so that parts of the signal corresponding to different time intervals are weakened or reinforced - for instance a high pass filtering of the frequency representation will suppress the early parts of the signal.

Since measurements are made in the frequency domain by means of a Step Frequency CW radar it is advantageous to make a filtering before transformation of the time domain. The effect of the filtering in the frequency domain by means of an ordinary filter may the contrued mathematically so that time and frequency in the Fourier transformation are included in a product in a symmetrical manner. Furthermore, it may be construed by watching that the phase in the frequency representation is proportional with the time variable - late parts of the signal correspond to bigger phase variation per frequency unit than early parts.

Ground radar signals are very often characterized by the early parts of the signal - often originating from undesired coupling from transmitter to receiver - contain much more energy that the weaker signals from objects in the ground. By filtering the frequency dependent signal by means of a high pass filter before transformation to the time domain the above mentioned early, undesired parts may be filtered away. High pass as well as band pass filters may advantageously be applied.

Filtering as described here may in a possible embodiment be applied in connection with the procedures Nos. 5 or 6 described in paragraph 12. In this case the filtering will be inserted after chapter 5.1 or 6.1 (corresponding to procedure No. 4).

Corresponding filtering may also advantageouly be applied if inverse Fourier transformation is used for transformation from frequency to time. In this case the filtering is applied before the Fourier transformation.

A functioning prototype step-freqency ground radar has been produced allowing the user to choose between high pass filters designed as ordinary high pass filters allowing signals with time delays above a certain value to pass. The characteristic time constants which may be elected are in one embodiment: 10 ns, 15 ns, 20 ns and 25 ns. If for instance water pipes are searched for by means of the radar it will often be suitable to dampen all signals with time delays less than 20 ns.

18. Other antenna configurations Tests have shown that antenna arrangements as illustrated in figs. 45, 46 and 47 may be applied with a good result.

Fig. 45 illustrates an arrangement containing 4 antenna pairs whereas figs. 46 and 47 illustrate two different arrangements, each of 5 pairs. The elements in these antennas are all of the type butterfly the construction of which correspond approximately to the one illustrated in fig. 11, and the total arrangement corresponds to the construction illustrated in fig. 12. The damping material designated c in fig. 12 is of the brand Emerson & Cuming, the types LS20 and LS24 in combination. The used butterfly elements are produced on ordinary fibre glass print plate, layout is included in the description of the prototype. The elements are supplied with a transformer for impedance adjustment in the feeding point and termination resistors in the ends.

The dipole elements are always engaged in pairs so that two dipoles lying 1800 mutually displaced around the center of the arrangement are engaged at the same time as transmitter

and receiver, respectively. In figs. 45, 46 and 47 one pair is constituted by the elements la and lb, another pair of the elements 2a and 2b etc. All the elements are intended to be similar. A set of measurements following each other with all four or five pairs correspond for the configurations in figs. 45 and 46 to one period of the polarization variation (pipe or cable) of a linear object. - and for the configuration in fig. 47 to two periods.

19. Determination of the type of cables and pipes.

Through measurements with antennas of the type mentioned here it is determined that the linear model for cables and pipes in the ground functions well in connection with the described methods demonstrated by the present prototype. Furthermore it has been discovered that certain types of objects - including pipes of plactic containing water or gas - will often during rotation of the polarization demonstrate a significant periodicity with half the period length. This phenomenon corresponds to the reflection of the object, besides demonstrating maximum at a polarization which is parallel with the longitudinal orientation of the object, also demonstrating a substantial local maximum at a polarization which is perpendicular to the object. Accordingly, by Fourier transformation in the rotation angle an additional component appears corresponding to half the period length in relation to the expected one.

Thin objects, especially cables, will only to a very small extent demonstrate this phenomenon whereas thick pipes especially produced from a plastics material will demonstrate it to a significant extent. This phenomenon may be used for distinguishing between types of cables and pipes and will easily be authomatized by means of a small enlargement of the existing procedure and software.

20. Functioning phototype A prototype is produced which demonstrates a possible embodiment of the invention. The prototype has been applied for detection of cables and pipes under normal circumstances - i.e. outside laboratory environment. Fig. 21 demonstrates a system diagram for the hardware of the prototype. The system consists of three main parts: The antenna arrangement (antenna array), RTVA electronics , (RTVA = Real Time Vector Analyzer) and a PC supplied with a signal processing module. The prototype is mounted on a small vehicle corresponding to a

sack truck and may be pushed across the ground simultaneously with the result of the current measurements with associated calculations being shown on a PC screen.

20.1. System and system block diagram Antenna array: Consists of an antenna arrangment of the type illustrated in figs. 45, 46 or 47 and a double electronic switch shifting transmitter as well as receiver between the antenna elements syncronically.

RTVA electronics: Consists of two main parts: a high frequency part (RF part) and a DSP part with analogous-digital converter.

High frequency part (RF part): Receiver, Transmitter and Frequency Synthesizer DSP1: Analog-digital converter and a fix-point DSP processor of the type ADSP2181 of the brand Analog Devices Inc. Constructed around a turn-key module of the same brand.

Besides analog-to-digital converter a quadrature detection of the interfrequency signal from the receiver takes place. Furthermore control of antenna switch and control of frequency synthesizer.

PC and signal processing module A standard type PC provided with a turn-key plug-in unit, a so-called demo-board of the type ADSP-21062 EZ-LAB Evaluation Board from Analog Devices Inc. comprising a floating point processor of the type ADSP21062 is applied. The signal processing almost entirely takes place in the ADSP21062 processor. The PC is entirely a cabinet comprising the ADSP-2 1062 EZ-LAB Evaluation Board module. Furthermore the display of the PC is used for real time presentation of detection curves.

20.2. Function and use The prototype realizes a procedure corresponding to procesure No. 6 described in paragraph 12 and the above described time filtering inserted between the procedure chapters 6.1 and 6.2 (pkt.6.1 corresponds to procedure No. 4).

The phrase used in procedure step 4.1: "an antenna arrangement of type 1 or 2 as described" means in practice that the antenna is part of the equipment and that the positioning above the ground takes place currently by the equipment in its entirety is moved across the ground.

The types of antennas applied are outlined in figs. 13, 14 and 15.

The total calculation procedure takes place currently so that the user sees the result of currently measured data and associated calculations.

On the screen of the PCs the latest result of a set of calculations are displayed in the form of a detection curve of the type mentioned in chapter 10, equation (26) or detection curves of the form: D4(i)= IVt(ki,i)i Vt(k2,i)l, i i=il..i2 (35) Where the elements included are described in chapter 10. The equation (35) is in a product form and is the one most often applied in the prototype and is included in the attached print- out of the software of the prototype. These detection curves are currently illustrated graphically, vide the below examples.

20.3 Technical specifications The basic specifications of the present prototype are: RADAR system: Frequency range: 50 to 1000 MHz Frequency step size: multiplum of 1.6 MHz, typically 6.4 MHz Amount of frequency steps in a sweep: typical 120 Time consumption per frequency step: 57 msec (equals aprx. 7 msec for 120 steps) Basic dynamic range: 70 dB Dynamic range with automatic gain control: 110 dB Maximum radar signal lag: - with freq. step size=1.6 MHz: 312 nsec corresponding to aprx. depth 13 m - with freq. step size=6.4 MHz: 78 nsec corresponding to aprx. depth 3.5 m

Number of Detection curves calculated pr. sec: - with 4 antenna pairs: 8.9 typically (aprx. 35.7 rotations /sec) - with 5 antenna pairs: 7.1 typically (aprx. 28.5 rotations /sec) Antenna size: Diameter: 85 cm (model a), 65 cm (model b) Height: 7 cm (model a), 7 cm (model b) 20.4. Some results obtained by means of the prototype The above described detection curves are concurrently displayed on the display of the prototype as they are calculated. Typically around 7-8 curves per second are calculated. This makes it possible for the operator to evaluate the calculation results simultaneously with the prototype being pushed across the ground.

Figs. 19a) and 19b) illustrate two typical detection curves from the display of the prototype.

In the graph illustrated in fig. 19a) a clear indication in a depth corresponding to the time delay approx. 31 ns is seen. In fig. 19b) a detection curve is illustrated which does not indicate any cable or pipe. The object which is indicated in figs. 19a) and 19b) is known and is a PVC pipe filled with water and having a diameter of 110 mm and being burried in a depth of approx. 140 cm.

Fig. 18 illustrates a collection of detection curves each one being collected from the prototype and afterwards gathered in the figure - here it is seen how the detection curve alters when being conveyed above an object - here the same pipe as indicated in figs. 19a) and 19b). In fig. 18 time delay is recalculated into estimated depth on the supposition of an estimated average value of the propagation speed of the radio waves in the ground.

Example of embodiment In the following a reproduction of the embodiment of the invention is presented by way of example.

Oversigt over programmer: Program til PC: go4.c. Downloader program og normaliseringsdata til ADSP-21062 Uploader resultater fra ADSP-21062, displayer disse pa skærm, Styrer ADSP-21062 boardet On-line kontrol af normalisering, filtervalg, metodevalg, mm. i program til ADSP-21062 Kan uploade data fra ADSP-2 1062 og gemme disse på harddisk Program til ADSP-21062: a~svd4.c Hovedprogram til ADSP-2 1062.

Modtager data serielt fra ADSP-2181.

Beregber. Foretager normalisering, filtrering samt modeldannelse bsvd4.asm Assembler funktioner der bruges af a~svd4.c Program til ADSP-2181: rot5l.dsp Programmerer synteser Styrer antennevalg Måler rådata Forbehandler rådata,sender forbehandlede data serielt til ADSP-21062 Andet: def~4.h header-fil der bruges af go4.c, a~svd4.c og bsvd4.asm include <asm~sprt.h> # include "def21060.h" # include "def~4.h" .segment /dm seg~dmda; .var sourcelRAWDATAl; ~ .var ~rx~interrupt; .global ~source; .global ~rx~interrupt; endseg; .segment/pm seq~pmco; global tx antenna; tx antenna:leaf entry; rO=OxOOOfOOOO; dm(TDTVl)=rO; r0=0x000070f1; dm(STCTL1)=r0; /* internal TFS = /* TFS required -, /* Serial word length 16 /* Sport enable */ dm(TXl)=r4; leaf exit; /* float searchmax(float V, int n) '/ /' return maximum value in vector v of length n */ /' replaces C-routine findmax */ global ~searchmax: <BR> <BR> <BR> <BR> <BR> searchmax:leaf entry;<BR> ~<BR> <BR> f0=-1.0e99; /* very small */ i4=r4; /* pointer to vector f12=dm(i4,m6); /* get v[0] */ lcntr=r8, do do find until Ice; /* loopcounter is n */ do~find f0=MAX(f0,f12), f12=dm(i4,m6); /* find new max, get next v[k] leaf exit; /float pyth(float a, float b) +/ global pyth; /* required: f11=2.0 input: f0=numerator, f12=denominator output: f0=result affected: f7, f12 */ <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> pyth: leaf entry;<BR> ~<BR> <BR> f10=abs f4; /* abs(a) */ f9=abs f8; /* abs(b) */ f1=0.5; /* used in sqrtf~ph */ f8=3.0; /*used in sqrtf~ph */ comp(f10,f9); <BR> <BR> if lt jump b big (DB); /* if absa<absb<BR> ~<BR> <BR> <BR> f11=2.0; /* used in div~ph */ f15=1.0; /* used in general expression call div~ph (DB); f12=r10; /* denominator is absa */ f0=f9; /* numerator is absb */ call sqrtf~ph (DB); f2=f0*f0; /* quotient squared */ fO-f2+flS; /* input to sqrt~ph t/ f0=f4*f10; /* absa*sqrt(..) leaf~exit; b~big: fl2-pass f9; /* numerator is absa */ <BR> call div~ph (DB); /* r4 and r8 previously set */ - if eq jump iszero; /* both arguments are zero */ fO-flO; /* denominator is absb */ call sqrtf~ph (DB); f2=f0*f0; /* quotient squared */ f0=f2+f15; /* input to sqrtf~ph */ f0=f4*f9; /* absb*sqrt(..) */ leaf exit; iszero: fO-O.O; leaf exit; /* void sum~and~scale(int m, int n, int i, int 1, float lnvh, float "a) '/ for (j=l; j<n j++) /* { /* for (s=0.0, k=i; k<=m-1; k++) s+=a[k][i]*a[k][j]; */ /* f=s*invh; */ /* for (k=i; k<=m-1; k++) a[k][j]+=f*a[k][i]; */ /* } /' inner loops earlier calculated using scalar and svd~3 global sum and~scale; <BR> <BR> <BR> <BR> sum and scale: leaf entry;<BR> ~ ~<BR> r0=reads(1); /* 1, also j "/ r1=r8-r0; /* n-1 */ r2=r4-r12, lcntr=r1; /* m-i loopcounter in both inner loops */ f15=reads(2); /' invh -/ i4-reads(3); /' address of vector of pointers to a */ r1=r8+r12(ssi), r10=dm(i4,m5); /* n*i, point tc a */ r3=r1+r12, m4=r8; /* n*i+i, modify between rows is n */ r3=r3+r10; /* pointer value for a[k][i] */ do for~j until lce; /* outer loop */ r5=r1+r0, i4=r3; /* n*i+j, pointer to a[k][i] */ r5=r5+r10, f7=dm(i4,m4); /* pointer value for a[k][j], get a[k][i] */ f6=f12-f12, i3=r5; /* initialize sum, pointer to a[k][j] '/ f14=dm(i3,m4); /* get a[k][j] */ lcntr=r2, do inner1 until lce; f11=f7+f14, f7=dm(i4,m4); /* a[k][i]*a[k][j], get a[k][i] */ inner1: f6=f6+f11, f14=dm(i3,m4); /* update sum, get a[k][j] */ f6=f6*f15,i4=r3; /* f=s*invh, pointer to a[k][i] */ i3=r5; /* pointer to a[k][j] */ f7=dm(i4,m4); /* get A[k][i] */ lcntr=r2, do inner2 until Ice; f14=f6*f7, f13=dm(i3,m5); /* multiply by f, get A[k][j] */ f11=f14+f13, f7=dm(i4,m4); /* A[k][j] + f*A[k][i], get A[k][i] */ inner2: dm[i3,m4]=f11; /* store in A[k][j] */ for j: rO-rO+l; /* increase j leaf exit; /* void sum2 and scale(int m, int n, int i, int 1, float nvh, float **a) */ ~ ~ /* for (j=1; j<n j++) */ /* { */ /* for (s=0.0, k=1; k<=m-1; k++) s+=a[k][i]*a[k][j]; */ /* f=s*ginvaii; */ /* for (k=i; k<=m-1; k++) a[k][j]+=f*a[k][i]; */ /* } */ /* inner loops earlier calculated using scalar ad svd~3 */ global sum2 and scale; sum2~and~scale: leaf~entry; r0=reads(1); /* 1, also j */ r1=r80r0; /* n-1 */ r2-r4-r12, lcntr=rl; /' m-i loopcounter in second inner loops */ f15=reads(2); /* invh '/ i4=reads(3); /* address of vector of pointers to a */ r1=r8*r12(ssi), r10=dm(i4,m5); /* n*i, point to 1 */ r3=r1+r12, m4=r8; /* n*i+i, modify between rows is n */ r3=r3+r10; /* pointer value for a[k][i] */ r8=r8*r0(ssi); /* n*1 */ r12=r8+r12; /* n*1+i */ r12=r12+rlO; /' pointer to a[1][i] */ do for~j² until Ice; /' do outer loop */ r5=r8+r0, i4=r12; /* n*i+j, pointer to a[k][i] */ r5=r5+r10, f7=dm(i4,m4); /* pointer value for a[k][j], get a[k][i] */ f6=f12-f12, i3=r5; /* initialize sum, pointer to a[k][j] */ r2=r2-1, f14=dm(i3,m4); /* loopcounter is m-1=m-i-1, get a[k][j] */ lcntr=r2, do innerl2 until lce; f11=f7+f14, f7=dm(i4,m4); /* a[k][i]*a[k][j], get a[k][i] */ inner12: f6=f6+fl1, fl4=dm(i3,m4); /* update sum, get a[k][j] */ f6=f6*fl5, i4=r4; /* f=s*invh, pointer to a[k][i] */ r5=r1+r0, f7=dm(i4,m4); /* n*1+j, get A[k][i] */ r5=r5+r10; /* address of a[k][j] */ r2=r2+1, i3=r5; /* loopcounter is m-1=m-1+1, pointer to a[k][j] */ lcntr=r2, do inner22 until lce; f14=f6*f7, f13=dm(i3,m5); /* multiply by f, get A[k][j] */ f11=f14+f13, f7=dm(i4,m4); /* A[k][j] + f*A[k][i], get A[k][i] */ inner22: dm(i3,m4)=fl1; /* store in A[k][j] */ for~j2: r0=r0+1; /* increase j */ leaf exit; /' void sum3~and~scale(int m, int n, int i, int 1, float "v, float **a] */ /* for (j=1; j<n j++) */ /* { */ /* for (s=0.0, k=1; k<=n-1; k++) s+=a[i][k]*v[k][j]; */ for (k=l; k<=n-l; k++) v[k][j]+=s*v[k][i]; */ /* } */ /* inner loops earlier calculated using svd 12 and svd 3 */ global sum3 and scale; ~sum3~and~scale: leaf~entry; r0=reads(1); /* 1, also j */ r1=r8-r0; /* n=1 */ i4=reads(3); /* address of vector of pointers to a '/ i3-reads(2); /' address of vector of pointers to v t/ r2=r8*r12(ssi), r10=dm(i4,m5); /* n*i, point to 1 */ r2=r2+r0, m4=r8; /* n*i+1, modify between rows is n*/ r2=r2+r10, r11=dm(i3,m5); /* pointer value for a[i][l], point to v */ r8=r8*r0(ssi); /* n*1 */ r12=r8+r12; /* n*l+i */ r12=r12+r11; /* pointer to v[l][i] */ i2=r12; /* point to it '/ lcntr=rl .do for 33 until lce; /* loopcounter is n-l, do outer loop */ r5=r8+r0, ii=r2; /' n'i+j, pointer to a[i][l] '/ r5=r5+r11, f7=dm(i4,m6); /* pointer value for v[k][j], get a[i][l] */ f6=f12-f12, 13=r5; /* initialize sum, pointer to v[l][j] */ f14=dm(i3,m4); /* get v[l][j] */ lcntr=r1, do innerl3 until lce; f9=f7*f14, f7=dm(i4,m6); /* a[i][k]*v[k][j], get a[i][k] */ inner13: f6=f6+f9, f14=dm(i3,m4); /* update sum, get v[k][j] */ f7=dm(i2,m4); /* pointer to v[l][j] */ i3-r5; /' point to v[l][j] */ lcntr=r1, do inner23 until lce; f14=f6+f7, f13=dm(i3,m5); /*multiply by sum, get v[k][j] */ f14=f14+f13, f7=dm(i2,m4); /* v[k][j] + sum*v[k][i], get v[k][i] */ inner23: dm(i3,m4)=f14; /* store in v[k][j] */ for~j3: r0=r0+1,i2=r12; /* increase j */ leaf exit; /' void sum4 and scale(int m, int n, int i, float *rv1, oat ++a) '/ /* for (j=l; j<mj++) */ A' 'A /* for (s=0.0, k=1; k<=n-1; k++) s+=a[j][k]*a[i][k ; */ /* for (k=1; k<=n-1; k++) a[j][k]+=s*rv1[k]; */ /* } */ /* inner loops earlier calculated using svd 8 and svd 9 */ .global ~sum4~and~scale: ~sum4~and~scale: leaf~entry; r0=r12+1; /* 1 = i+1 */ r2=r4-r0: /* m-1, loopcount @@ outer loop */ r1=r8-r0,lcntr=r2; /* n-l is loopcount in inner loops, set outer loopcount -/ i4=reads(2); /' address of vector of pointers to a -/ r4=reads(1); /* address of rv1 */ r4=r4+r0; /* address of rv1 -@ */ r2=r8*r12(ssi), r10=dm(i4,m5); /* n*1, point to @ */ r2=r2+r0; /* n*i+1 */ r2=r2+rlO; /' pointer value -:: a[i][l] 'A r5=r2+r8; /* n*l+1 = n*i+1+r is address of a[1][1] */ <BR> <BR> <BR> <BR> <BR> do for~j4 until Ice; /' do outer loop -<BR> ~<BR> <BR> i4=r2; /* pointer to a[i..*] */ f7=dm(i4,m6); /* get a[i][l] */ f6=f12-f12, i3=r5; /* initialize sum, pointer to a[j][l] */ f14=dm(i3,m6); /* get a[j][l] */ lcntr=r1, do inner14 until lce; f9=f7*f14, f7=dm(i4,m6); /* a[j][k]*a[@@@], get a[i][k] */ inner14: f6=f6+f9, f14=dm(i3,m6); /* update sum, get a[j][k] */ i2=r4; /* pointer to rvl:-. */ i3=r5; /* point to a[j][@ */ f7=dm(i2,m6); /* get rvl[l] */ lcntr=r1, do innet24 until lce; f14=f6*f7, f13=dm(i3,m5); /* multiply by sum, get a[j][k] */ f14=f14+f13, f7=dm(i2,m6); /* a[j][k] + sum*rvl(k), get rvl(k) */ inner 24: dm(i3,m6)=f14; /* store in a[j][k] */ for~j4: r5=r5+r8; /* increase j is the same as increasing address of a[j][l] with n '/ leaf~exit; <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> /' void get~div(int indx, int 'source, float pm *uu~r, ,:at pm *uu~i, int in~uu); t/ <BR> <BR> /* fetch complex integer data from source. Perform complex division of measured signal with reference and store in vectors uu r and uu -/ .global ~get~div: ~get~div: leaf~entry; r4=r4+r8, r10=reads(2); /' source(indx], -a: into uu '/ r12=r12+r10, i4=r4; /* uu~r(index), point to source */ r2=dm(i4,m6); /* m r */ r2=float r2; r1=dm(i4,m6); /* m~i */ f1=float r1; r3=dm(i4,m6); /* r~r */ f3=float r3, r6=dm(i4,m5); /* r~i */ f6=float r6, i11=r12; /* point to address of uu~r[index] */ r4=reads(1): /* address of uu~i */ r4=r4=r10; /* indx */ f5=f3*f3, i12=r4; /* r~r*r~r, point to uu~i[indx] */ f13=f6*f6; /* r~i*r~i */ f12-f5+f13; /* complex denominator '/ r13=0x2edbe6ff; /* 1e-10 */ comp(f12,f13); if lt jump less; /* if smaller than 1e-10 don't divide */ call divph (DB); f11=2.0; fO-l.O; /* numerator */ /* r4=0x3f800000; r8=0x40000000; */ jump done div; less: r0=0x501502f9; /' set inv den=1e10 if den was small '/ ~ done~div: f4=f2*f3; /* m~r*r~r */ f8=f1*f6; /* m~i*r~i */ f4=f4+f8; /* add +/ f4=f4*f0; /* times inv~den */ f4=fl-f3, pm(i11,m13)=f4; /' m 1*r~ r, store real part of prev result '/ f8=f2*f6; /* m~r*r~i */ f4=f4-f8; /' subtract '/ f4=f4=f0; /* times inv~den */ pm(i12,m13)=f4; /' store imaq part -/ leaf~exit; /* void norm~div(int indx, int jj, float *n~r, float *n~l, float pm *uu~r, float pm *uu~i) */ /' Normalize complex data and store in vectors uu~r and use i t/ .global ~norm~div; norm div:leaf entry; r12=r12+r8; /* n~r(jj) */ i4=rl2; /* point to it -/ rl2=reads(l); /- address of n I -/ ~ r12=r12+r8, f3=dm(i4,m5); /* n~i(jj), get r~r */ i4=r12; /* point to it */ r12=reads(2); /* address of uu~r */ r12=r12+r4, f6=dm(i4,m5); /* uu~r[indx], get r~i */ ill-r12; /' point to it */ r12=reads(3); /* address of uu~i */ r12=r12+r4; /* uu~i[indx] */ i12=r12; /* point to it */ f5=f3*f3, f2=pm(i11,m13); /* r~r*r~r, get m~r */ f11=f6*f6, f1=pm(i12,m13); /* r~i*r~i, get m~i */ f12=f5+fll; /' complex denominator */ r13=0x2edbe6ff; /* 1e-10 */ comp(f12,f13); if lt jump less~n; /* if smaller than 1e-10 don't divide */ call div~ph (DB); f11=2.0; fO"l.O; /* r4=0x3f800000; r8=0x40000000;*/ jump done~norm; less~n: r0=0x501502f9; /* set inv~den=1e10 if den was small */ done~norm:f4=f2*f3; /* m~r*r~r */ f8=f1*f6; /* m~i*r~i */ f4=f4+f8; /* add */ f4=f4@f0; /* times inv~den */ f4=f1@f3, pm(i11,m13)=f4; /* m~i*r~r, store real part or prev result */ f8=f2@f6; /* m~r*r~i */ f4=f4-f8; /* subtract */ f4=f0-f4; /*times inv~den */ pm(i12,m13)=f4; /* store imag part */ leaf~exit; /' void mk~Xa(int m, int 1, int index, int row, float *x, float **Xa) t/ /' implementation of "for (col=0; col<l col++) Xa(indx)[col]=x[row-col-1]" '/ global mk Xa: ~mk~Xa: leaf~entry; r2)r4*r12(ssi), lcntr=r8; /* startindex is m*indx, loop 1 times */ i4=reads(3); /t address of vector of pointers to Xa */ r0=dm(i4,m5); /* point to the real address of Xa */ rO-rO+r2; / address of first element / i4-rO; /* point to it -/ r4=reads(2); /* address of x */ r0=reads(1); /* row */ rO-rO-l; /' start in row- */ r0=r4+r0; i3=r0; /* point to it */ do do xa until Ice; f4=dm(i3,m7); /* get x[row-col-1] */ do~xa: dm(i4,m6)=f4; /* update Xa[indx][col] */ leaf exit; /* void impuls(int ii, int 1, float *ha, float *a) */ /* implementation of "for (jj=1; jj<=1; jj**) ha[ii]-=a(@@)*ha(ii-jj)" */ .global ~impuls; <BR> <BR> <BR> <BR> <BR> impuls: leaf entry;<BR> ~<BR> r0=r4+r12, lcntr=r8; /* address of ha(--, loop 1 times */ i4=r0; /* point to it */ r0=reads(1): /* address of a */ r0=r0+1, f2=dm(i4,m7); /* start in jj=1, get ha[ii] and point to ha[ii-1] */ i3=rO; /' point to it -/ f8=dm(i3,m6); /* get a[jj] */ f0=dm[i4,m7); /* get ha(ii-jj); do do~imp until lce; ~ f6=f0*f8, f0=dm(i4,m7); /* do multiply, get ha[ii-jj] */ do~imp: f2=f2-f6, f8=dm(i3,m6); /* update ha[ii], get a[jj] */ r0=r4+r12; /* address of ha[ii@ */ i4-rO; / point to it */ dm(i4,m5)=f2, / really update '/ leaf exit; /* void mk Ha(int m, ine 1, int row, float *ha float **Ha) '/ /* implementation of "for (col=O; col<l col++) Ha[row][col]=ha[row-col]' */ global mk Ha; mk Ha: leaf entry; r2=r4*r12(ssi); lcntr-r8; /' startindex is m-row, loop 1 times '/ i4-reads(2); /* address of vector of pointers to Ha */ r0=dm(i4,m5); /* point to the real address of Ha */ rO-rO+r2; /t address of first element t/ r4-reads(l); /* address of ha r0=r4+r12, i4=r0; /* start in ha[row], point to Ha[row] [0] */ i3-rO; / point to it '/ do do~ha until lce; f4=dm(i3,m7); /* get x[cow=col] */ do~ha: dm(i4,m6)=f4; /* update Xa[indx][cel] */ leaf~exit; /* float f~abs(float x) */ /* implementation of "y=fabs(x)" */ global f abs; f abs : leaf entry; f0=ABS f4; leaf~exit; / * float svd~l(int m, int k, dm float "A, int 1@ '/ ~ /* impementation of "for(i=j;i<1i++) scale+=fabs(A[i][k])" */ .global ~svd~1; svd 1 : leaf entry; r1=r4*r8(ssi), i4=rl2; /* mtj, get address of vector of pointers to A */ r2=r8+rl, r0=dm(i4,m5); / startindex is :'m+k, point to the real address of A z rl=rO+r2, m4=r4; /* address of first element, modify = fO=f12-f12, i4-rl; / initialize scale, point to A / r4=reads(1); r12=reads(2); r0=r4-r12, f4=dm(i4,m4); /*loop counter: 1-j, get A[i][k] */ lcntr=r0, do calc until lce; f8=ABS f4; /* fabs */ calc: f0=f0+f8, f4=dm(i4,m4); /* update scale, get A[i][k] */ leaf exit; /* void svd~2(float invscale, int k, int m, float pm 'sum, float **A, int 1) */ /' implementation of "for (i=k;i<1i++) [A[i][k]*=invscale; sum+=A[i][k]*A[i][k]} */ .global ~svd~2: svd 2: leaf entry; i4=reads (2); /* address of vector of pointers to A '/ r2=reads(3); /* 1 */ r2=r2-r8, r0=dm(14,m5); /' 1-k, point to the real caress of A -/ r1=r12+1, Icntr"r2; / m+l, loopcounter is i-k '/ r2=r8*r1(ssi); /* startindex is k*(m+1) */ rl=rO+r2, m4=r12; /' address of first element, modify a is m -/ i4=rl; /* point to it 'I i3=rl; /* once again, looses line in loop */ il2=reads(l); /' initialize sum -/ f3=dm(i3,m4), f12=pm(i12,m13);/* get A[i][k] and sum */ f2=f3*f4, f3=dm(i3,m4); /* A[i][k]*invscale, get next A */ <BR> <BR> <BR> <BR> do do~sp until lice; <BR> ~<BR> f8=f2*f2, dm(i4,m4)=f2; /* A[i][k]*A[i][k], store prev in A[i][k] */ do~sp: f2=f3*f4, f12=f8+f12, f3=dm(i3,m4); /* A[i][k]*invscale, update sum, get next A */ pm(i12,m13)=f12; /* store sum */ leaf exit; /* svd~3(int m, int i, int j, int 1, float f, dm float "A, int st) */ /* implementation of "for(k=st;k<1k++) A[k][j] += f*A[k][i]" */ <BR> <BR> global ~svd~3; <BR> ~<BR> <BR> <BR> <BR> ~svd~3: leaf~entry: r2=reads(1); /* 1 */ r1=reads(4); /* st */ r2=r2-r1; /* 1-st */ r0=r4*r1(ssi); lcntr=r2; /* m*st, loopcounter is 1-st */ i4=reads(3); /* address of vector of pointers to A */ r2=r0+r8, r10=dm(i4,m5); /' startindes is m*st+i, point to the real address of A '/ r3=r0+r12; /* m*st+j */ r1=r10+r2, m4=r4; /* address of A[k][i], modify is m */ r2=rlO+ri, i4=rl; /' address of A[k][j], point to A]k] I] '/ i3=r2; /* point to A[k][j] */ f0=reads(2): /* f */ f4=dm(i4,m4); /* get A[k][i] */ do do 3 until lce; f8=f0*f4, f12=dm(i3,m5); /* multiply by f, get A[k][j] */ f2=f12+f8, f4=dm(i4,m4); /* A[k][j] + f*A[k][i], get A[k][i] */ do~3: dm(i3,m4)=f2; /* store in A[k][j] */ leaf~Exit; @ - /* svd~4(int m, int i, int 1, float scale, dm float **A) */ /t implementation of "for(k=i;k<lk++) A[k][i] *= scale" '/ .global ~svd~4; svd 4: leaf entry; r2=r12-r8; /* 1-i */ i4-reads(2); /* address of vector of pointers to A */ r1=r4+1, r0=dm(i4,m5); /* m+1, point to the real address of A */ r2=r8*r1(ssi), lcntr=r2; /* startindex is i*(m+1); loopcounter is 1-i */ r1=r0+r2, m4=r4; /' address of element, modify between rows = m '/ i4=r1; /* point to it */ i3=rl; /' again, loose line in loop '/ f0=reads(1); /* scale */ f4=dm(i3,m4); /* get A[k][i] */ do do 4 until lce; f8=fO'f4, f4=dm(i3,m4); /' multiply by f, get net A 'I do~4: dm(i4,m4)=f8; /* store in A[k][i] */ leaf~exit: /' svd S(int m, int k, int j, dm float **A) '/ /* implementation of "for(i=j;i<1i++) scale+=fabs(A[k][i]" */ global ~svd~5; svd 5 leaf entrv; ~ r1=r4*r8(ssi); /* m*k */ r2=r12+r1; /* startindex is k*m + j */ i4=reads(1); /* address of vector of pointers to A 'A r0=dm(i4,m5); /' point to the real address of A */ r1=r0+r2; /* address of first element */ f0=f12-f12, i4=rl; /' initialize scale, point to A */ r2=r4-r12, f4=dm(i4,m6); /+ loop counter = 1-j, get A[k][i] */ lcntr=r2, do do~S until lce; ~ f8=ABS f4; /* fabs */ do~5: f0~f0+f8, f4=dm(i4,m6) /* update scale, get A[k][i] */ <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> leaf~exit;<BR> <BR> /* void svd 6(float invscale, int i, int m, float pm 'sum, float "A, int j) t/ <BR> <BR> <BR> <BR> <BR> /* implementation of "for (k=j;k<lk++) <BR> [A[i][k]*=invscale; sum+=A[i][k]*A[i][k]} */ global svd 6; ~svd~6: leaf entry; i4=reads(2); /* address of vector of pointers to A '/ r1=reads(3); /* j */ r0=r12-r1; /* 1-j */ r2=r12*r8(ssi), lcntr=rO; /* m'i, set loop counter t/ r2=r2+rl, rO=dm(i4,mS); /' startindex is i'm+j, point to the real address of A +/ rl=rO+r2; /' address of first element /* i4=rl; /' point to it +/ i3=rl; /' again, loose line in loop '/ i12=reads(1); /* initialize sum */ f3=dm(i3,m6), f12=pm(i12,m13);/* get A[i][k], get sum */ f2=f3*f4, f3=dm(i3,m6); /* A[i][k]*invscale, get next A */ do do 6 until Ice; ~ f8=f2*f2, dm(i4,m6)=f2; /* A[i][k]*A[i][k], store A[i][k] */ do~6: f2=f3*f4, f12=f8+f12, f3=dm(i3,m6); /* A[i][k]invscale, update sum, get A[i][k] */ pm(il2,ml3)-fl2; leaf exit; <BR> <BR> <BR> <BR> <BR> <BR> /* void svd 7(int m, int i, float invh, float *rv1, float **A, int j} / <BR> ~<BR> <BR> /* implementation of "for (k=j;k<1k++) rv1[k]=invh*A[i][k]" */ .global ~svd~7; ~svd~7: leaf~entry: r1=reads(3); /* j */ r0=r4-r1; /* 1-j */ r2=r4*r8(ssi), lcntr=r0; /* m*i, set loopcount */ i4=reads(2); /* address of vector of pointers to A '/ r2=r2+rl, r0=dm(i4,m5); /' startindex is m-i+j, point to the real address of A */ rO"rO+r2; /t address of first element */ i4-rO; /* point to it */ r4=reads(1): /' address of b '/ r0=r4+r1, f4=dm(i4,m6): /* address+j, get A[i][j] */ i3=ro: /* point to b[j] */ <BR> <BR> <BR> <BR> <BR> <BR> do do upd until Ice;<BR> ~<BR> <BR> <BR> f8=f12*f4 .f4=dm(i4,m6); /* A[i][j] = invh, ge- A[i][j] */ do~upd dm(i3,m6)=f8; /* update b[i] */ leaf~exit; <BR> <BR> <BR> <BR> <BR> <BR> /' float svd~8(int m, int j, int i, float "A, int st) */ <BR> ~<BR> <BR> <BR> /* implementation of "for (sum=0.0,k=st:k<1k++) sum+=A[j][k]" */ .global ~svd~8; <BR> <BR> <BR> <BR> <BR> svd 8: leaf entry;<BR> ~<BR> <BR> <BR> r1=reads(2); /* st */ r0=r4-r1; /* 1-st */ r0=r4*r8(ssi), lcntr=rO; /' mcj, set loop outer */ i4=reads[1]; /' address of vector of pointers to A 'A r0=r1+r0,r2=dm(i4,m5); /* m*j+st, point to the real address of A */ r0=r0+r2; /* address of first element */ r0=r8-r12, i4=rO; /* j-i, point to A 'A r0=r0*r4(ssi); /* (j-i) * m */ r1=r0+1; r0=r12-r8, m4=r1, /* (i-j), modify between A[j][k] and A[i][k] */ r0=r0*r4(ssi); /* (i-j) * m */ m0=r0; /* modify between A[i][k] and A[j][k] */ f0=f12-f12, f4=dm(i4,m0): /* initialize sum, get A[j][k] */ f8=dm(i4,m4); /* get A[i][k] */ do do E until lce; ~ f2=f4*f8,f4=dm(i4,m0); /* A[j][k]*A[i][k], get A[i][k] */ do~8: f0=f0+f2,f8=dm(i4,m4); /* update sum, get A[j][k] */ leaf~exit; /* void svd~9(int m, int j, float s, float *rvl, float **A, int st) */ /* implementation of "for (k=st;k<1k++) A[j][k] += s*rvl [k]" */ global svd 9; ~svd~9: leaf~entry; r1=reads(3); /* st */ r0=r4-r1; /* 1-st */ r2=r4*r8(ssi); lcntr=r0; /* m*j, set loop counter */ 14=reads(2); /* address of vector of pointers to A */ r2=r2+r1, r0=dm(i4,m5); /* startindex is m*j+st, point to the real address of A t' rO-rO+r2; /* address of first element in A */ r2=reads(1) /* address of rv1 */ r0=r2+r1, i4=r0; /* address + st. point to A */ i3=r0; /* point to b[st] */ f4=dm(i3,m6); /* get rv1[k] */ do do 9 until Ice; ~ f8=f12*f4, f0=dm(i4,m5); /* rv1[k]*s, get A[j][k] */ f8=f8+f0, f4=dm(i3,m6); /* do sum, get rv1[k] */ do~9 dm(i4,m6)=f8; /* update A[j][k] */ leaf exit; /' svd~10(int m, int i, float scale, dm float "A, int st) '/ /* implementation of "for(k=st;k<1k++) A[i][k] *= scale" */ global svd 10; ~svd~10: leaf~entry; r1=reads(2); /* st */ rO=r4-rl; / l-st */ r0=r4*r8(ssi), lcntr=r0; /' mi, set loop counter '/ i4=reads(1); /' address of vector of pointers to A '/ r2=rO+rl, r0=dm(i4,m5); /- startindex is m*i+st, point to the real address of A */ rl=rO+r2; /* address of element A i4=rl; /' point to it '/ i3=rl; /' again, loose line in loop '/ f4=dm(i3,m6): /* get A[i][k] */ do do 10 until Ice; ~ f8=f12*f4, f4=dm(i3,m6); /* multiply by scale, get next A[i][k] */ co~10: dm(i4,m6)=f8; /* store in A[i][k] */ leaf exit; /* svd~11(int m, int i, float s, dm float **V, dm float **A, int st) */ /* implementation of "for(j=st; j<1 j++) v[j][i]=a[i][j]*s" */ .global ~svd~11; <BR> <BR> <BR> <BR> <BR> svd 11: leaf entry;<BR> ~<BR> <BR> r1=reads(3); /* st */ r0=r4-r1; /* 1-st */ r0=r4*r8(ssi), lcntr*r0; /* m*i, set loopcounter */ i4=reads(2); /* address of vector of pointers to A */ r2=rO+rl, r0=dm(i4,m5); /' startindex is m*i+st in a, point to the real address<BR> <BR> <BR> '/ of A r0=r0+2; /* address of element */ r0=r4*r1(ssi), i4=rO; /t m'st, point to element '/ 1,3=reads(1); /* address of vector of pointers to v */ r2=r0+r8, r0=dm(i3,m5); /* startindex is m*st+i in v, point to the real address of of v rO=rO+r2, m4-r4; /* address of element, modify between rows in v is m i3-rO; /* point to it '/ f4=dm(i4,m6); /* get A[i][j] */ do do 11 until lce; ~ f8=f12*f4, f4=dm(i4,m6); /* A[i][j]*s, get next A[i][j] */ do~11: dm(i3,m4)=f8; /* store in v[j][i] */ leaf~exit; /* float svd~12(int m, int i, int j, float **A, float **V, int st) */ /* implementation of "for (sum=0.0,k=st;k<1k++) sum+=A[i][k]*V[k][j]" */<BR> global svd 12; svd~12: leaf~entry; r1=reads(3); /* st */ r0=r4-r1; /* 1-st */ rO-r4 r8(ssi), lcntr-rO; /* m*i, set loop counter +/ i4=reads(1); /* address of vector of pointers to A / r0=r1+r0,r2=dm(i4,m5); /* start in a is m*i+st, point to the real address of A */ r0=r0+r2; /* address of first element */ r0=r4*r1(ssi),i4=r0; /* m*st, point to A, modify is 1 */ i3=reads(2); /* address of vector of pointers to V '/ r0=r12+r0,r2=dm(i3,m5); /* start in v is m*st+j, point to the real address of V */ r0=r0+r2, m4=r4; /* address of first element, modify between rows is m*/ fO=f12-f12, i3=rO; /* point to v, initialize sum '/ f4=dm(i4,m6); /* get A[i][k] */ f8=dm(i3,m4); /* get V[k][j] */ do do 12 until lce; ~ f2=f4*f8,f4=dm(i4,m6); /* A[i][k]*v[k][j], get A[i][k] */ do~12: f0=f0+f2,f8=dm(i3,m4); /* update sum, get V[k][j] */ leaf~exit; /* svd~13(int m, int i, dm float **v, int st) */ /* implementation of "for(k=st;k<1k++) v[i][k] = v[k][i] = 0.0" */ global svd 13; ~svd~13: leaf~entry; r1=reads(1): /* st */ r0=r4-r1, i4=r12: /* 1-st, address of vector of pointers to v */ r0=r4*r8(ssi), lcntr=r0; /* m*i, set loop counter */ r2=r0+r1, r10=dm(i4,m5); /* startindex is m*i+st in v[i][k], point to the real of v t/ address r0=r10+r2; /* address of element */ r0=r4*r1(ssi), i4=r0; /* m*st, point to v*/ r2=r0+r8; /+ startindex is m*st+i in v[k][i]*/ rl=rlO+r2, m4"r4; /* address of element, modify between rows is m */ f12=f12-f12, i3=rl; /t point to v t/ do do 13 until lce; ~ dm(i4,m6)=f12; /* v[i][k]=0.0 */ do~13: dm[i3,m4]=f12; /* v[k][i]=0.0 */ leaf~exit; /* svd 14(int m, int 1, int n, int i, float c, float s, dm float "a) */ /* implementation of " for (j=O; j<=1: j++) ( v=a[j][n]; z-a(j] [il; a[j][nm]=y*c+z*s; a[j][i]=z*c-y*s; } global svd 14; <BR> <BR> <BR> <BR> svd 14: leaf entry;<BR> ~<BR> i4=reads(4); /* address of vector of pointers to a[j][n] */ r0=dm(i4,m5); /* point to the real address of v */ r0=r0+r12, lcntr=r8; /* address of element a[0][n], loop 1 times */ i4-rO; /* point to it / r0=reads(1); /* i */ i3=reads(4); /* address of vector of pointers to a[j][i] */ r2=dm(i3,m5); /* point to the real address of v t/ r0=r0+r2, m4=r4; /* address of element a[0][i], modify between rows is m */ i3=r0; /* point to it */ i2-rO; /' again, loose line in loop '/ f3=reads(2); /* c*/ f0=reads(3); /* s */ f2=dm(i4,m5); /* y=a[j][n] */ f10=f2*f3, f4=dm(i2,m4); /* y*c, z=a[j][i] */ do do~14 until lce; f15=f0*f4; /* z*s */ f12=f3*f4, f10=f10+f15, f4=dm(i2,m4); /* z*c, y*c+z*s, get next z */ f1=f2*f0, dm(i4,m4)=f10; /* y*s, store y*c+z*s in a[j][n] */ f12=f12-f1, f2=dm(i4,m5); /* z*c-y*s, get y */ do~14: f10-f2*f3, dm(i3,m4)=f12; /* y*c, store z*c-y*s in a[j][i] */ leaf~exit <BR> <BR> <BR> <BR> <BR> <BR> <BR> /' float svd~15(int m, int j, int st, float *b, float **A, int 1) '/<BR> ~<BR> <BR> /* implementation of "for (sum=0.0,i=st;i<1i++) sum+=A[i][j]*b[i]" */ .global ~svd~15; <BR> <BR> <BR> <BR> svd 15: leaf entry;<BR> ~<BR> r0=reads(3); /* 1 */ r0=r0-r12; /* 1-st */ r0=r4*r12(ssi), lcntr=rO; /' m'st, set loop counter */ i4=reads(2); /' address of vector of pointers to A '/ r2=rO+r8, r0=dm(i4,m6); /' startindex is m*st+j, point to the real address of A */ rO=rO+r2, m4=r4; /' address of first element, modify for A[i][j] = m -/ r4=reads(l); /' address of b 'A r0=r4+r12, i4=r0; /* b[st], point to A fO=f12-f12, i3=rO; /- initialize sum. point to f4=dm(i4,m4); /* get A[i][j] */ f8=dm(i3,m6); /* get b[i] */ do do~15 until lce; ~ f2=f4*f8, f4=dm(i4,m4); /* A[i][j]*b[i], get A[i][j] */ do~15: f0=f0+f2, f8=dm(i3,m6); /* update sum, get b[i] */ leaf~exit; /+ float svd~16(int j, float *b, float **A) */ /* implementation of "for (jj=0; jj<1 jj++) s+=A[j][jj]*b[jj]" */ .global ~svd~16; ~svd~16: leaf~entry; i4=reads(1); /* address of vector of pointers to A '/ r8=r4*r8(ssi), r0=dm(i4,m5); /* (m*j), point to the real address of A */ r2-rO+r8, i3-rl2; /* address of first element, address of b[0] '/ fO-fl2-fl2, i4-r2; /* initialize sum, point to b /* f12=dm(i4,m6); /* get A[i][j] */ f8=dm(i3,m6); /* get b[j] */ lcntr=r4, do do~16 until lce;/* loop 1 times */ f2=f12*f8, f12=dm(i4,m6); /* b[j]*A[i][j], get A[i][j] */ do~16: f0=f0+f2, f8=dm(i3,m6); /* update sum, get b[j] */ leaf exit; /+ float scalar(int n, int m, int k, int j, bat **A, In 1! /* implementation of "for (sum=0.0,i=1;i<ni++) sum+=A[i][k]*A[i][j]" */ global scalar; ~scalar:: leaf~entry; r0=reads(3); /* 1 */ r4=r4=r0; /* n=1 */ r1=r8*r0(ssi), lcntr=r4; /* m'l, set loop counter = n '/ i4-reads(2); /* address or vector of pointers to A */ r2=r1+r12, r0=dm(i4,m5); /* m'l+k, point to the real address of A */ r1=r0+r2; /* address of first element */ r4=reads(1); /* j */ r4=r4-r12, i4=r1; /* j-k, point to A */ r0=r8-r4, m4=r4; /* m-(j-k), modify between A[i][k] and A[i][j] is j-k */ f0=f12-f12, m0=r0; /* initialize sum, modify between A[i][j] and A[i][k] */ f4=dm(i4,m4); /* get A[i][k] */ f8=dm(i4,mO); /* get A[i][j] */ do do s until lce; ~ f2=f4*f8, f4=dm(i4,m4); /* A[i][j]*A[i][k], get A[i][k] */ do~s: f0=f0+f2, f8=dm(i4,mO); /* update sum, get A[i][j] */ leaf exit; /' void evalhx(int ii, int np, float 'a, complex float p. -s, complex float (ha) */ /* implementation of "for (jj=0:jj<npjj++) ha[jj]=ha[jj "s[jj]+a[ii]" */ global evalhx; evalhx: leaf entry; r0=r12+r4; /* address of a[@@ */ i3=rO; i12=reads(1); /* address of s@@ */ i4=reads(2); /* address of ha@ */ f15=dm(i3,m5); /* a[ii] */ lcntr=r8, do upd~ha until lce; f0=dm(i4,m6), f2=pm[i12,m14); /* ha~r, point to ha~i; s~r, point to s~i */ f8=f0*f2, f1-dm(i4,m7), f4=pm/i12,m14); /* @a~c@@~r, ha~i, point to ha~r; s~1, pointo next s r '/ ~ f12=f1*f4, f8=f8+f15; /* ha~i*s~i, ha~r*s~r + a[ii] */ f8=f0*f4, f3=f8-f12; /* ha~r*s~i, ha~r*s~r-ha~i*s~i */ f12=f1*f2, dm(i4,m6)=f3; /* ha~i*s~r, update real(ha[jj]) point to imag */ f8=f8+f12; /* ha~r*s~i+ha~i*@~r */ upd~ha: dm(i4,m6)=f8; /* update imag(ha @@]) point to next real */ leaf exit; <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> /* float cal dft(int k, int k~u, int N s, float u, float @@ *uu~real, float pm *uu~imag, complex<BR> ~ ~ ~ ~<BR> <BR> <BR> float *twid~px) */ /* implementation of "for (n=0;n<kun++) u[k]+=UU[k][n]*twid~px[n]" */ .global ~cal~dft; <BR> <BR> <BR> <BR> <BR> cal dft: leaf~entry;<BR> ~<BR> <BR> <BR> f9=f12-f12; /* u[k] */ r1=reads(1); /* address of uu~real[0] */ r2-r4+rl, ml2-rl2; /* plus k, modify to next column in uu '/ r1=reads(2); /* address of uu~imag[0] */ r2=r4+r1,il2=r2; /* plus k, point to uu~real[k] */ i14=r2; /* point to uu~imag[k] */ i4=reads(3); /* point to twid~px[0] */ f10=f12-f12, f1=dm(i4,m6), f5=pm(i12,m12); /* init f10, twid~r, UU-r*/ f12=f12-f12, f4=dm(i4,m6), f2=pm(i14,m12); /* init f12, twid~i, UU~i */ lcntr=r8, do do dft until Ice; f10=f1*f5, f15=f10-f12, f1=dm(i4,m6), f5=pm(i12,m12); /* UU~r*twid-r, calc diff, get twid~r, UU~r */ do~dft: f12=f2*f4, f9=f9+f15, f4=dm(i4,m6), f2=ppm(i14,m12); /* UU~i*twid~i, update u[k],get twid i, UU i t/ f8-f10-f12; /* calculate lastz difference */ f0=f8+f9; /* return updated @@@] */ leaf exit; <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> /* float dm dft(int k~u, float dm 'uu~real, float dm *uu~imag, complex float *twid~px) / <BR> ~ ~ ~ ~<BR> <BR> <BR> /* implementation of "for (n=0;n<kun++) u[k]+=UU[k][n]**twid~px[n]" */ .global ~dm~dft; dm dft: leaf entry; lcntr=r4; f9=f12-f12; /* u[k]=0 */ i3=r8; /* point to uu~real[0] */ i4=r12; /* point to uu~imag[0] */ i2=reads(1); /* point to twid~px[0] *7 flO=f12-f12, fl=dm(i2,m6); /' init flO, twid~r */ ~ f5=dm(i3,m6); /* UU r */ f12=f12-f12, f4=dm(i2,m6); /* init f12, twid~i */ f2=dm(i4,m6); /* UU~i */ do do dmdft until Ice; ~ f10=f1*f5, f15=f10-f12, f1=dm(12,m6); /* UU~r*twid~r, calc diff, get twid~r */ f5=dm(i3,m6); /* UU~r */ f12=f2*f4, f9=f9+f15, f4=dm(i2,m6); /* UU~i*twid~i, update u[k], get twid~i */ do~dmdft: f2=dm(i4,m6); /* UU~i */ f8=f10-f12; /* calculate last difference */ f0=f8+f9; /' return updated until +/ leaf exist; /' void fr~resp(int 1, complex float 'H, complex float 'a, complex float "hb, float pm 'w) A /* implementation of "for (ii=0; ii<1, ii++) H[i]=w[ii]@@p[ii]/ha[ii];" */ global fr resp; fr resp: leaf entry; i4=r8; /* pointer to H */ i3=r12; /* pointer to ha '/ i2=reads[1]; /* pointer to hb */ i12=reads[2]; /* pointer to w */ fll=2.0; f2=dm(i3,m6); /* ha~r */ f1=dm(i3,m6); /* ha~i */ f3=dm(i2,m6); /* hb~r */ f6=dm(i2,m6), f14=pm(i12,m14); /* hb~i, w */ lcntr=r4, do do~fr until lce; /* loopcounter @@ @ */ f10=f2*f3; /* ha~r*hb~r */ f13=f1*f6; /* ha~i*hb+i */ f9=f2*f6, f10=f10+f13; /* ha~r*hb~i, num~real */ f13=f1*f3; /* ha~i*hb~r */ f9=f9-f13, f3=dm(i2,m6); /* num~imag, get @@~r */ f5=f2*f2, f2=dm(i3,m6); /* ha~r squared, get ha~r */ f6=f1*f1, f1=dm(i3,m6); /* ha~i squared, get ha~i */ call div~ph (DB); f12=f5+f6, f6=dm(i2,m6); /* denominator, get hb i */ fO"l.O; /* numerator is 1.0 / flO-fO'flO; /* num real ' inv den '/ ~ ~ f10=f10*f14; /* times w */ f9=f0*f9; /* num~imag * inv~den */ f9=f9*f14, dm(i4,m6)=f10, f14=pm(i12,m14); /~ times w, store real part, get w '/ do~fr: dm(i4,m6)=f9; /* store imag part */ leaf exit; /* void cal~vdet(int 1, float *vdet, complex float *h0, complex float *h1) */ /* implementation of "for [i]=0; ii<1 ii++) vdet[ii]=0.001*cabs(h0)[ii]*h1[ii];" */ .global ~cal~vdet; ~cal~vdet:leaf~entry; i4=r8; /* point to vdet * i2=r12; /' point to hO */ i3-reads(l); /* point to hl '/ f1=0.5; /* used in sqrtf~ph */ f8=3.0; /* used in sqrt~ph */ f10=0.001; /* scaling factor */ f2-dm(i2,m6); /' hO r '/ ~ f5=dm(i2,m6); /* h0~i */ f3=dm(i3,m6); /* h1~r */ f6=dm(i3,m6); /* h1~i */ lcntr=r4, do do~vd until lce; /*loopcounter is 1 */ <BR> ~<BR> <BR> f9=f2*f3; /* h0=r+h1~r */ f13=f5*f6; /* h0~i*h1~i */ f11=f2*f6, f9=f9-f13; /* real part, h0~r*h1~i */ f13=f3*f5, f2=dm(i2,m6); /* h1~r*h0~i, get h0~r */ f13=f11+f13, f5=dm(i2,m6); /* imag part, get h0~i */ f9=f9*f9, f3=dm(i3,m6); /* real squared, get h1~r */ call sqrtf~ph (DB); f13=f13*f13, f6=dm(i3,m6); /* imag squared, get h1~1 */ f0=f9+f13; /* input to sqrt~ph */ f0=f4*f10; /* scale sqrt */ do~vd: dm(i4,m6)=f0; /* store in vdet */ leaf exit; /' max abs(int n, int m, int k, dm float "A) '/ /* implementation of "for(i=k;i<ni++) scale=FMAX(scale,fabs(A[i][k]))" */ global max abs; max abs: leaf entry; m4=r8; /* modify = m */ i4=reads(1); /' address of vector of pointers to A A r0=dm(i4,m5); /' point to the ea address of A A rl=r8+1; /' m+1 '/ r2=r12*r1(ss1); /* startindex is @(m+1) */ r1=r0+r2; /* address of first element */ i4=r1; /* point to it */ f2=fl2-fl2; /* initiali~e scale: -/ r0=r4-r12; /* calculate loop counter */ lcntr=rO, do calc~qr until Ice; f4=dm(i4,m4); /* A[i][k] */ f8=ABS f4; /' fabs '/ calc~qr: f2=MAX(f2,f8); /* update scale fO=f2; /' return value @@ a leaf exit; /* float scale~pow2(int n, int m, int k, float invscale, flbat sum, float ") / /' implementation of "for (sum=0.0,i=k;i<n:i++) {A[i][k]*=invscale; sum+=POW2(A[i][k])} */ .global ~scale~pow2; <BR> <BR> <BR> <BR> <BR> scale pow2: leaf entry;<BR> ~<BR> <BR> r0=r4-r12; /* n-k */ lcntr=r0; i4=reads(3); /* address of vector of pointers to A */ r0=dm(i4,m5); /* point to the real address of A */ r1=r8+1; /* m+1 */ r2=r12*r1(ssi); /* startindex is s* m-1) */ rl=rO+r2; /* address of first clement '/ i4=r1; /* point to it */ m4=r8; /* m */ fl-reads(l); /' invscale t/ i12=reads(2); /* intialize sum f12=pm(i12,m13); <BR> <BR> do do~sp~qr until lce;<BR> ~ ~<BR> <BR> f4=dm(i4,m5); /* get A[i][k] */ f2=f4*f1; /* times invscale * dm(i4,m4)=f2; /* store in A[i][k] f8=f2*f2; /* A[i][k]*A[i][k] do~sp~qr; f12=f12+f8; /* update sum */ pm(i12,m13)"f12; leaf exit; /' tau A(int n, int m, int k, int j, float pm tau, dm float **A) */ /* implementation of "for(i=k;i<ni++) A[i][j] -= tau*A[i][k]" */ .global ~tau~A: ~tau~A: leaf~entry; rO-r4-rl2; /* n-k */ lcntr=rO; i4=reads(3); /* address of vector of pointers to A */ r0=dm(i4,m5); /* point to the real address of A */ rl-r8+l; /* m+l '/ r2=r12*r1(ssi); /* startindex is k*(m+1) */ rlsrO+r2; /* address of first element +/ i4=r1; /* point to it */ r4=reads(1); /* j */ r4=r4-r12; /* j-k */ m4=r4; /* modify between A[i] [k] and A[i] [j] */ r0=r8-r4; /* m-(j-k] */ m0=r0; /* modify between A[i][j] and A[i][k] */ f0=reads(2); /* tau */ do dot until Ice; f4=dm(i4,m4); /* get A[i][k] */ f8=f0*f4: /' multiply by tau +' f4=dm(i4,mS); /' get A]i] ])] 'A f2=f4-f8; /* A[i][j] = tau*A[i][k] * do~t: dm[i4,m0)=f2; /* store in A[i][j] */ leaf exit; /* float qr~scalar(int n,int m, int k, int j, float **A) */ /* implementation of "for (sum=0.0,i=k;ik;i<n1**) sum+=A[i] k]*A[i][j]" */ global qr scalar; qr~scalar: leaf~entry; r0=r4-r12; /* n-k */ lcntr=rO; i4=reads(2); /' address of vector of p alters to A '/ r0=dm(i4,m5); /* point to the real address of A */ r1=r8+1; /' m+l / r2=r12*r1(ssi); /* startindex is k* (m+1) */ r1=r0+r2; /* address of first element */ i4=rl; /' point to it */ r4=reads(1); /* j */ r4=r4-r12; /* j-k */ m4=r4; /* modify between A[i][k] and A[i][j] */ r0=r8-r4; /* m-(j-k) */ m0=r0; /* modify between A[i][j] and A[i][k] */ f0=f12-f12; /* initialize sum */ do do~s qr util lce; f4=dm(i4,m4); /* get A[i][k] */ f8=dm(i4,m0); /* get A[i][j] */ f2=f4*f8; /* A[i][j]*A[i][k] */ do~s~qr: f0=f0+f2; /* update sum */ leaf~exit; /* float sumaib(int n, int m, int j, float "b, float **A) */ /* implementation of "for (sum)0.0,i=j;i<n1++) sum+=A[i][j]*b[i]" /* .global ~sumaib; sumaib: leaf entry; r0=r4-r12; /* n-j */ lcntrsrO; i4-reads(2); /' address of rector of pointers to A '/ r0=dm(i4,m5); /' point to the real address of A '/ r1=r8+1; /* m+1 */ r2=r12*r1(ssi); /* startindex is j*(m+1) */ rl-rO+r2; /* address of first element */ i4=r1; /* point to it */ m4=r8; /* modify for A[i][j] = m */ r4=reads(1); /* address of b */ r0=r4+r12: i3=r0; f0=f2-f12; /' initialize sum '/ do do~sum until lce; f4=dm(i4,m4); /* get A[i][j] */ f8=dm(i3,m6); /* get b[i] */ f2=f4*f8; /* A[i][j]*b[i] */ do~sum f0=f0+f2; /* update sum */ leaf exit; /* void btauA(int n, int m, int j, float tau, float 'b, float **A) */ /* implementation of "for (i=j;i<ni++) b(i)-=tau*A[i][j]" */ global ~btauA; <BR> <BR> <BR> <BR> btauA: leaf entry;<BR> ~<BR> r0=r4-r12; /* n-j */ lcntr=r0; i4=reads(3); /' address of vector of pointers to A '/ rO'dm(i4,mS); /' point to the real address of A */ rl=r8+1; /* m+l '/ r2=r12*r1(ssi); /* startindex is j*(m+1) */ rl=rO+r2; /* address of first element -/ i4=r1; /* point to it */ m4=r8; /* mocify for A[i][j] = m '/ r4=reads(2); /* address of b */ r0=r4+r12; i3=rO; 2=reads(l); /* tau -/ <BR> <BR> <BR> <BR> <BR> do do~upd~qr until Ice;<BR> ~ ~<BR> f4=dm(14,m4); /* get A[i][j] */ f8=f2*f4; /* times tau */ f4=dm(i3,m5); /* get b[i] */ f0=f4-f8; /* b[i]-tau*A[i][j] */ do upd qr: dm(i3,m6)=f0; /' update b)i] '/ leaf~exit; /* float sumajb[int m, int i, float *b, float **A) */ /* implementation of "for (sum0.0,j=i+1;j<mj++) sum+=A[i][j]*b[j]" */ .global ~sumajb; <BR> <BR> <BR> <BR> sumatb: leaf entry;<BR> ~<BR> r1=r8+1; /* i+1 */ r0=r4-r1; /* m-i-1 */ lcntr-rO; i4=reads(1); /* address of vector of pointers to A */ r0=dm(i4,m5); /* point to the real address of A */ r8=r4*r8(ssi); /* (m+i) */ r8=r1+r8; /* i+1+[m*i] */ r2=r0+r8; /* address of first element */ i4Ur2; /* point to it '/ r0=r1+r12; /* address of b[i+1] */ i3=r0; /* point to it */ fO=f12-f12; /* initialize sum '/ do do~ajb until lce; f4=dm(i4,m6); /* get A[i][j] */ f8=dm(i3,m6); /* get b[j] */ f2=f4*f8; /* b[j]*A[i][j] */ do~ajb: f0=f0+f2; /* update sum */ leaf~exit: /* void rx continue(void) sets up serial port receive, DMA. */ .global ~rx~continue; ~rx~continue:leaf~entry; rO-O; dm(SRCTL1)=r0; rO- source; /* set DMA rx index to start at source */ dm(II1)=r0; rO-l; /' set DMA modify to 1 */ dm(IM1)=r0; r0=@~source; /* set DMA count to length of source +! dm(Ci)=r0; r0=0x000420f3; /* r0=0x000464f3;*/ dm(SRCTL1)=r0; /* Rx DMA enable */ /* external RFS */ /' RFS required '/ /' Serial word length 16 /* Sport enable '/ /' sign extend into unusec MSE's A leaf~exit; /* void set~ints(void) */ /+ Sends interrupt to 2181, enables SPORT1 Ry. interrupt -/ global set ints; set ints:leaf entry; bit set imask SPRII; /* enable sport 1 rx interrupt */ bit set model IRPTEN; /* global interrupt enable -/ bit set mode2 FLG2O; /* set flag2 to output bit set astat FLG2; /* set flag2 =1 */ bit clr astat FLG2; /' send interrupt */ /* r0=0x000f0005; dm(RDIV1)=r0;*/ leaf~exit; /* serial rx service routine */ global rx svc; rx~svc: leaf~entry; rO=l; dm(~rx~interrupt)=r0; leaf exit; /* ---------------------- S ü B R O U T I N E S -------------------------- */ /' floating point division, page B-39 in SHARC user's manual */ /* required: f11=2.0 input: f0=numerator, f12=denominator output: f0=result affected: f0, f7, f12 */ div ph: fO=recips f12, f7=f0; f12=fO'f12; f7=f0*f7, f0=f11-f12; f12=f0*f12; f7=f0*f7, f0=f11-f12; fl2=fO*fl2; -ts (DB); f7=f0*f7, f0=f11-f12; f0=f0*f7; /* inverse of float required: r4=0x3f800000, r8=0x40000000 input: f5 output: f2 affected: f4, f12 */ inv~ph: f2=recips f5; f12=f2*f5; f4=f2*f4; f2=f8-f12; f12=f2*f12; f4=f2*f4, f2=f8-f12; f12=f2*f12; f4=f2*f4, f2=f8-f12; f4=f2*f4; f2=f2-f12; rts (DB); f2=f2*f4; f2=f2+f4; /' inverse of denominator '/ /' sqrtf~ph is taken from page 8-40 in the SHARC user's manual required: fl=O.5 , f8=3.0 input: f0 output: f4 affected: f12 */ sqrtf ph: f4=RSQRTS fO; f12=f4*f4; f12=f12*f0; f4=f1*f4, f12=f8-f12; f4=f4*f12; f12=f4*f4; f12=f12*f0; f4=fl'f4, f12=f8-f12; f4=f4*f12; f12=f4*f4; f12=f12*f0; f4=f1*f4, f12=f8-f12; rts(DB); f4=f4*f12; f4=f0*f4; .endseg; /* ----------------------------- a~svd4.c --------------------------------- This program includes routines which can be used in the analysis of data obtained from a Ground Penetrating Radar system with a rotating antenna.

The measured data is read into the program from a serial port.

@@ The calculations involve a rotational analysis based on the Discrete Fourier Transform with respect to angle via the function "dft", and the development of an ARMA model in the "time" range using Shank's extension to the basic Prony method via the functions "shank" and "prony". The sets of n linear equations which are parts of Shank's method are solved by QR-decomposition and back substitution via the functions "qr" and "qrsolv". The discrete frequenzy response of the ARMA model is obtained by the function "'reqz". A detection on two frequency responses is carried out by the function "detect".

Functions for allocating and deallocating memory for vectors dad matrices of floats and complex floats are included.

The program runs on a SHARC ADSP-21062 processor, and is compiled by the Gnu g21k compiler.

Written by : Peter Hazell, Ekko Dane Production A/S Last modified : 240698 by : PH mod from a mean.c : svd solver implemented. uses bsvd4.asm <BR> <BR> A <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> include <stoio.h> include <math.h> include <dspc.h> # include <complex.h> include <stddef.h> include <stdlib.h> include <signal.h> include "def 4.h" include <21060.h> static float maxargl, maxarg2, pow2arg; stacic int minargl, minarg2; # define FMAX(a,b) (maxarg1=(a),maxarg2=(b),(maxarg1) > maxarg2) ? (maxarg1) (maxarg2)) # define FMIN(a,b) (maxarg1=(a),maxarg2=(b),(maxarg1) > maxarg2) ? (maxarg2) : (maxarg1)) # define SIGN(a,b) ((b)>=0.0 ? (a) : -(a)) # define IMIN(a,b) (minarg1=(a),minarg2=(b),(minarg1) > minarg2) ? (minarg2) : (minarg1)) # define SQR(a) (pow2arg=(a), pow2arg*pow2arg) # define TIMEOUT lelO /' constants and globals */ static float pm uu~real[Nr*ku]; static float pm uu~imag[Nr*ku]; /' vectors for data matrix download */ static float dm norm real(Nr'NO ANTENNASI; static float dm norm~imag[Nr*NO~ANTENNAS]; extern int source[RAWDATA]; extern int rx interrupt; /*float vdet(np), 1det[np];*/ A' output '/ static float dm vdet(npi; A' output '/ int done=0; /' done flag to interface program */ int got here-l; int normal; int subtract=0; int do~filter=0; int do shank-l; int do smoothe-0; ~ int done~normalizing=0; int done-detecting=0; int no~converge=0; int done~initialization=1; <BR> <BR> int angledetcrmined=O; <BR> ~<BR> <BR> float angle~pos=0.0; float phase=90.0; /* prototypes for functions managing memory */ float *vector cal(int n); complex float *c~vector~cal(int n); float *vector(int n); complex float -c vector(int n); float **matrix~cal(int row, int col); float **matrix(int row, int col); complex float **c~matrix(int row, int col); void free~vector(float vv); <BR> <BR> void free c vector(complex float *v); <BR> ~ ~<BR> <BR> <BR> void free~matrix(float **m); void free~c~matrix(complex float **m); { /* prototypes for calculation functions */ void make index(int 'index); ~ void indata(int *source, float pm *uu~real, float pm *uu~imag, int *index, int*serial~check); void normalize(float *norm~r, float *norm~i); void twiddle(complex float twid~px[ku], int px); void dft(float *u, float pm *uu~real, float pm *uu~imag, complex float twid~px[ku]); void filter(float pm "b, float pm 'a, float *x, int N, int 1); void filtfilt(float *x, float pm *b, float pm *a, float *zi, int 1); float pythag(float a, float b); void svdcmp(float "a, int m, int n, float *w, float void svdsmoothe(float *w, int n); float findmax(float *v, int n); void svdsolve(float **u, float *w, float **v, int m, int n, float *b, float *x); void prony(float 'x, int Q, int P, float *a); void prony~pade(float *x, int Q, int P, float *b, float *a); void shank)float *x, int Q, int P, float -b, float *a); <BR> <BR> void mk~s~and~w(complex float pm s[np], float pm w[np]);<BR> <BR> void freqz(int na, float *a, float *b, complex float *H, complex float pm s[np], float pm void detect(complex float *HO, complex float *H1, float vdet[np], float 1det[np]); void qr(int n, int m, float "A, float *c, float *d); void qrsolv(int n, int m, float "A, float 'c, float -c, float *b); void prony~qr(float *x, int Q, int P, float *a); <BR> void prony pade qr(float 'x, int Q, Inc P, float -b, flat a); <BR> ~ ~<BR> <BR> <BR> <BR> void shank~qr(float *x, int Q, int P, float *b, float *a); float determine~angle(float pm *uu~real, int position, complex float pm s[np], float pm w[np], complex float *twid~px); /' prototypes for assembly functions */ float searchmax(float 'v, int n); float pyth(float a, float b); void sum and scale(int m, int n, int i, int 1, float invt, float "a); ~ ~ void sum2~and~scale(int m, int n, int i, int 1, float invn, float **a); void sum3~and~scale(int m, int n, int i, int 1, float **v, float **a); void sum4~and~scale(int m, int n, int i, float *rv1, float **a); void get div(int indx, int'source, float pm *uu~r, float pm 'uu I, int in uu); void norm~div(int indx, int jj, float *n~r, float *n~i, float pm *uu~r, float pm *uu~ void mk~Xa(int m, int 1, int indx, int row, float 'x, fltat **Xa); void mk~Ha(int m, int 1, int row, float 'ha, float **Ha); void impuls(int ii, int 1, float 'ha, float 'a,'; float f abs(float x); float svd~1(int m, int k, float "A, int 1); void svd 2(float invscale, int k, int m, float pm 'sumpo., float "A, int 1); void svd~3(int m, int i, int j, int 1, float f, float "A, int st); void svd 4(int m, int i, int 1, float scale, dm float **A); float svd~5(int m, int k, int j, float **A); void svd~6(float invscale, int i, int m, float pm *sum, float **A, int j); void svd~7(int m, int i, float invh, float *rv1, float "A, int j); float svd~8(int m, int j, int i, float "A, int st); void svd 9(int m, int j, float s, float *rv1, float **A, int stj; void svd~10(int m, int i, float scale, dm float **A, int st); void svd~11(int m, int I, float s, dm float t*V, dm float "A, int st); float svd-12(int m, int i, int j, float "A, float **V, int st; void svd 13(int m, int i, dm float **V, int st); void svd~14(int m, int 1, int n, int i, float c, float s, dm float **a); float svd~15(int m, int j, int st, float *b, float **A, int 1); float svd~16(int m, int j, float 'b, float "A); float scalar(int n, int m, int k, int j, float A, int 1); void evalhx(int ii, int n, float *a, complex float pm *s, complex float *ha); /*float cal~dft(int k, int k u, int N s, float u, float pn. real, float pm *uu~imag, complex float *twid~px);*/ float cal dft(int k, int k~u, int N s, float p,; *uu~rea real, float pm *uu~imag, complex float ~ ~ ~ ~ ~<BR> *twid~px); float dm~dft(int k~u, float *uu~real, float *uu~imag, complex float *twid~px); void rx~continue(void); void rx~svc(void); void set ints(void); void tx antenna(int pos); float max~abs(int n, int m, int k, float "A.'; void scale-pow2(int n, int m, int k, float invscale, float pm *sumpow, float **A); void tau~A(int n, int m, int k, int j, float tau, float **A); float qr scalar(int n, int m, int k, int j, float "A); float sumaib(int n, int m, int j, float 'b, float "A); void btauA(int n, int m, int 3, float tau, float 'b, float ''A); float sumajb(int m, int i, float 'b, float "A); void fr~resp(int 1, complex float *H, complex float *ha, complex float *hb, float pm *w); void cal~vdet(int 1, float *vdet, complex float *h0, complex float *h1); main() { int counters; int ii, jj; /* counters */ static int index[NS], serial~check(1)=[1]; complex float *H0, *H1, twid~p2[ku], twid~p8[ku]; float *a, 'b, 'utO, 'utl; /* static float pm b~hp1[4]={0.8175824, -2.4527472, 2.4527472, -0.8175824}; static floatpm a~hpl[4]={1.0, -2.5985328, 2.2736861, -0.6684403); */ /*5ns*/ static float pm b~hpl[4]={0.6670312, -2.0010937, 2.0010937, -0.6670312); static float pm a~hpl[4]={1.0, -2.2006360, 1.6907151, -0.4489881}; /*10ns*/ static float pm b~hp2[4]={0.5417662, -1.6230000, 1.6263000, -0.5417665}; static float pm a~hp2[4]={1.0, -1.8085834, 1.223038, -0.2932450); /*15ns*/ static float pm b~hp3[4]={0.436202, -1.308606, -0.436202}; static float pm a~hp3[4]=[1.0, -1.420727, 0.879754. -0.189134}; /*20ns*/ static float pm b~f1[3]=[0.7520041, -1.5040082, 0.7520041}; static float pm a~f1[3]={1.0, -1.4415303, 0.5664861); float zi~1[2]={0.1230402, 0.1855181); static float pm b~f2[3]=[0.6507412, -1.3014624, 0.6507412}; static float pm a~f2[3]={1.0, -1.1755349, 0.4274298); float zi~2[2]={0.0973640, 0.2233114); static float pm b~f3[3]=[0.5610593, -1.1221186, 0.5616593}; static float pm a~f3[3]={1.0, -0.9191507, 0.3250865}; float zi~3[2]={0.0330048, 0.2359728) static complex float pm s|np|; static float pm w[np]; void *svc~ptr; /' pointer to IRQ service routine */ /' ------------------- I N I T I A L R O U T N E S ----------------------- */ svc~ptr=(int*)rx~svc; interrupts(SIG~SPR1I, svc~ptr); /' set up service routine for SPORT1 Rx interrupt '/ /* interrupts(SIG~TM2, svc ptr);*/ /' set up timer interrupt '/ for (ii=O; ii<10 ii++) asm("nop;"); tx~antenna(ku); for (ii=O; ii<np ii++i { vdet[ii]=0.0; /* ldet[ii]=0.0;*/ } for (ii=0; ii<RAWDATA ii++) source[ii]=i; /* timer~set(0,TIMEOUT);*/ /' calculate twiddle factors for tracks p2 and pe */ twiddle(twid~p2, p2); twiddle(twid~p8, p8); /' calculate tie vectors for freqz '/ mk s and w(s, w); /* make vector of indices into received data 4 make index ( inde:.:); /' send 'ready' interrupt to 2181, setup SPORT1 for RX of first 4 words '/ set~ints(); rx~interrupt=0; rx continue ( ); asm("bit clr astat 0x002000000;"); /' send interrupt to IRQLO */ for (ii=0;ii<10ii**) asm("nop;"); asm("bit set astat 0x002000000;"); /* reset interrupt to IRQLO t/ tx~antenna(ku); /' ------------ M A I N C A L C U L A T I O N P R O G R A M --------------- */ while(1) /* forever */ while(got~here==1); wait for interface to set got~here=0 */ got~here=1; /* ready for next time... */ done"O; done~normalizing=0; /' read measured data into uu~real and uu imag A indata(source, uu real, uu imag, index, serial check@@ if (norm==1) normalize(norm~real, norm~imag); done~normalizing=l; angle~determined=0; if (angle~pos!=0.0) { phase=determine~angle(uu~real, angle~pos, s, w, angle determined=l; <BR> <BR> <BR> <BR> angle pos=O.O; counter=0; } /* calculate DFT-coeficients of tracks p8 and p2.

/* ut0=vector~cal(Nr); ut1=vector~cal(Nr);*/ /* DFT vectors ut0=vector(Nr); ut1=vector(Nr); /* DFT vectors */ dft(utO, uu real, uu~imag, twid p2); dft(ut1, uu~real, uu~imag, twid~p8); if (do filter==l) filtfilt(utO,b fl,a fl,zi~l,Nr); ~ ~ ~ filtfilt(ut1,b~fl,a~f1, zi~1,Nr); } if (do~filter==2) { filtfilt(ut0,b~f2,a~f2,zi~2,Nr); filtfilt(ut1,b~f2,a~f2,zi~2,Nr); } if (do~filter==3) { filtfilt(ut0,b~f3,a~f3,zi~3,Nr); filtfilt(ut1,b~f3,a~f3,zi~3,Nr); } /* estimate poles and zeros from DFT-coeffs. */ a=vector(ma+1); /* estimated denominator coeffs */ b=vector~cal(mb+1); /*estimated numerator coeffs */ if (counter==1) { if (do~shank==0) prony~pade(ut0, mb, ma, b, a); else shank(utO, mb, ma, b, a); else if (do~shank==0) prony~pade~gr(ut0, mb, ma, b, a : else shank~gr(ut0, mb, ma, b, a); free~vector(ut0); /' calculate frequency response of estimated filter HO=c vector(np); /' frequency response of estimated filter / freqz(ma+l, a, b, HO, s, w); H estimate poles and zeros from DFT-coeffs. */ if (counter==1) <BR> <BR> <BR> <BR> <BR> if (do shank==O) prony~pade(ut1, mb, ma, b, a);<BR> <BR> else shank(ut1, mb, ma, b, a);<BR> } <BR> <BR> <BR> <BR> <BR> else if (do~shank==0) prony~pade~qr(ut1, mb, ma, b, a); else shank~gr(ut1, mb, ma, b, a); free~vector(ut1); /* calculate frequency response of estimated filter 'A H1=c~vector(np); /* frequency response of estimated filter '/ freqz(ma+l, a, b, H1, s, w); /* carry out detection */ done~detecting=O; /* detect(HO, H1, vdet, ldet);+! cal~vdet(np,vdet,H0,H1); done detecting=l; free vector(a); /* clean up mess */ free~vector(b); free c vector(HO); free c vector(Hl); if (no~converge==1) { serial~check(0)=123; no converge=O; counter"l; /' looping done, @rogram is running properly '/ done = serial~check[0]; return flag t interface program t/ } return(0); } /* ---------------------------- make~index ------------------------------- Make vector of indices corresponding to the measurement series in the 2181.

The index of index (!) is the measurement number. The value at that point is the frequency placement of the measurement, e.g index[1]=60 means the second measurement is the 61st frequency.

--------------------------------------------------------- --------------- */ void <BR> <BR> make~index(int *index)<BR> { <BR> <BR> <BR> <BR> int ii; for (ii=0; ii<(Ns/2); ii++) { index[2*ii]=ii; index[2*ii+1]=ii+(Ns/2); } } /* ----------------------------- indata --------------------------------- Indata reads measured data from files predata.re and predata.im containing real and imaginary parts of data from one rotation. Data a toted in complex form in matrix UU. Each column of UU contains data from one frequency sweep for one antenna posItion.

The file handling functions require the DSP host program inllk.exe This function can be interchanged with an interrupt service routine, which reads data from a serial port.

--------------------------------------------------------- --------------- */ void indata(int *source, float pm 'uu~real, float pm *uu~imag, int index, int serial check) int ii, jj; /* counters */ int indx, indx~ii; /* temp index variable */ float den, inv~den, m~r, m~i, r~r, r~i; while (rx~interrupt==0); rx~continue(); asm("bit clr astat Ox00200000;"); for (ii=0;ii<10ii++) asm("nop;"); asm("bit set astat 0x00200000;"); rx interrupt=O; for (ii=0; ii<ku ii++) { indx~ii=4*Ns*ii; for (jj=0; jj<Ns jj++) { if ((index(jj)<Nr+STARTPOINT)&&(index[jj]>=STARTPOINT)) { indx=4*jj+indx~ii; get~div(4*jj+indx~ii,source,uu~real,uu~imag,ii*Nr+index[jj]- STARTPOINT); /* indx=4*jj+4*Ns*ii;*/ /* index into source +/ /* indx=4*jj+indx~ii; m~r=(float)(source[indx]); m~i=(float)(source[indx+1]); r~r=(float)(source[indx+2]); r~i=(float)(source[indx+3]); den=r r-r r+r isr i; if (cen>=l.Oe-10) inv den=l.O/den; else inv den=l.OelO; indx=ii Nr+index[jj]-STARTPOINT; uu~real[indx]=(m~r*r~r+m~i*r~i)*inv~den; uu~imag[indx]=(m~i*r~r-m~r*r~i)*inv~den; */ /' check serial transmission and MAC overflow in 2181 t/ if (source[RAWDATA-1]==0x1234) serial~check[0]=1; /* transfer OK, no overflow */ if (source[RAWDATA-1]==0x4321) serial~check[0]=2; /* MAC overflow */ if (source[RAWDATA-1]==0x9876) serial~check[0]=3; /* ADC OTR */ if ((source[RAWDATA-1)!=0x9876)&&(source[RAWDATA-1]!=0x4321)&&( source[RAWDATA-1]!=0x1234)) serIal~check]O)=4; /* ----------------------------- normalize --------------------------------- Normalize complex data with normalization vectors ------------------------------------------------------------ ---------------- */ void normalize(float norm r, float *norm~i) int ii, jj, index, indx~ii; float den, inv den, num r, num i, den r, den i; for (ii=O; ii<NO~ROT; ii++) indx ii=ii'Nr'NO~ANTtNNAS; ~ ~ for (jj=0; jj<Nr*NO~ANTENNAS; jj++) { norm~div(indx~ii+jj,jj,norm~r,norm~i,uu~real,uu~imag); /* num~r=uu~real[indx]; num~i=uu~imag[indx]; den~r=norm~r[jj]; den~i=norm~i[jj]; den=den r'den r+den i'den~i; if (den>=1e-10) inv~den=1.0/den;<BR> <BR> else inv den=1.0e10;*/ /' 1 over denominator of complex division */ /* uu~real (indx)=(num~r*den~r*num~i*den~i)*inv~den;*/ /*real part of result */ /* uu~imag (indx)=(num~i*den~r-num~r*den~i)*inv~den;*/ /*imaginary part of result */ /' ----------------------------- twiddle -------------------------------- Function twiddle calculates the twiddle factors for DFT calculation. The factors are calculated for column no. px and returned in the vector twld~px.

--------------------------------------------------------- -------------- */ void twiddle (complex float twid~px (ku), int px) iat ii; for (ii=O; ii<ku ii++) twid~px (ii)=cexpf (-1.0)*2*pi*px*1i/ku); /* ----------------------------- dft Function dft calculates the DFT-coefficient specified by k on each row in data-matrix UU. The function overwrites vector udft with the DFT-coeffs. corresponding to k. The size of the DFT's is specified by ku.

--------------------------------------------------------- --------------- */ void dft (float *u, float pm *uu~real, float pm *uu~imag, complex float twid~px (ku|) Inc k; i' indices -! for (k=0; k<Nr k++) /* cal dft (k,ku,Nr,u,uu~real, uu~imag,twid~px);*/ /* u(k)=cal~dft (k,ku,Nr,u(k), uu~real,uu~imag,twid~px);*/ u(k)=cal~dft (k,ku,Nr,uu~real, uu~imag,twid~px; /* ---------------------------- filter -------------------- Filter the data in ut with the filter specified in pre~filt ------------------------------------------------------------ ----------- */ void filter(float pm *b, float pm *a, float *x, int N, int 1) { int n,K,ii; float 'y; float vxx; <BR> <BR> <BR> <BR> <BR> <BR> y"vector~cal(l+N); <BR> ~<BR> <BR> <BR> xx=vector~cal (1+N); for (ii=N; ii<1+N; ii++) xx(ii)=x(ii-N); for (n=N; n<N+1; n++) { for (k=0; k<=N; k++) y[n] +=b(k) *xx (n-k); for (k=1; k<=N; k++) y[n] -=a(k) *y (n-k); } for (ii=0; ii<1 ii++) x(ii)=y(ii+N); free~vector(xx); free~vector(y); } /* -------------------------- filtfilt --- Filter the data in ut with the filter specified In pre~filt ------------------------------------------------------------ ---------- */ void filtfilt(floaW -x, float pm *b, float pm -3, float -=1, int 1) int ii, indx; float 'y, 'xx; y=vector(1+12); xx=vector(1+12); for (ii=6; ii>0 ii--) y[-ii+6]=2*x[0]-x[ii]; for (ii=6; ii<1+6; ii**) y[ii]=x[ii-6]; /' filter in the forward direction '/ xx[0]=(zi[0])*y[0]; xx[1]=zi[1]*y[0]+b[0]*y[1]+b[1]*y[0]-a[1]*xx[0]; for (ii=2; ii<1+6; ii++) xx[ii]=b[0]*y[ii-1]+b[2]*y[ii-2] -a[1]*xx[ii-1]-a[2]*xx[ii-2]; for (ii=1+6, indx=1+4; ii<1+12;ii++) xx(ii)=2*xx(1+5)-xx(indx--); /' filter in the backward direction '/ y[1+11]=(zi[0]+b[0])*xx(1+11); y(1+10]=zi[1]*xx[1+11]+b[0]*xx[1+10]+b[1]*xx[1+11]-a[1]*y[1+ 11] for (ii=1+9; ii>=0; ii--) y[ii]=b[0]*xx[ii]+b[1]*xx[ii+1]+b[2]*xx[ii+2]-a[1]*y(ii+1)-a [2]*y(ii+2); /' loose the ends.. */ for (ii=0; ii<1 ii++) x(ii)=y(ii+6); free~vector(y); free~vector(xx); void svdcmp(float **a, int m, int n, float *w, float **v) /' a: m x n U read out in a V not transposed '/ int flag, i, its, j, jj, k, 1, nm; float anorm, c, f, 9, h, s, scale, x, y, z, 'rvl; static float pm s2]l]; float invscale, invh, invginvail, invz, ginvaii; rv1=vector~cal(n); g=scale=anorm=0.0; for (i=0; i<=n-l; i++) l=i+l; rv1[1]=scale*g; g=s=scale=0.0; if (i<m) scale=svd~1(n,i,a,m); if (scale) invscale=1.0/scale; /*reduce divisions*/ s2[0]=s; svd~2(invscale,I,n,s2,a,m); s=s2[0]; f=a(i) [i]; <BR> <BR> g=-SIGN(sqrt)s(, f); <BR> <BR> <BR> <BR> h"f'g-s; invh=1.0/h; a[i][i]=f-g; if (n>1) sum~and~scale(m,n,i,l,invh,a); svd~4(n,i,m,scale,a); } } w(i)=scale*g; g=s=scale=0.0; if (i<m && i!=n-1) { scale=svd~5(nmi,l,a); if (scale) { invscale=1.0/scale; /*reduce divisions*/ a2[0]=s; svd~6(invscale,i,n,s2,a,1); s-s2fO]; f=a[i][l]; g=-SIGN(sqrt(s),f); h=f+g-s; invh-l.O/h; /*reduce divisions/ a[i][l]=f-g; svd 7(n,i,invh,rvl,a,l); if (m<1) sum4~and~scale(m,n,i,rv1,a); svd~10(n,i,scale,a,1); } } anorm=FMAX(anorm,if~abs(w[i])+f~abs(rv1[i]; } for (i=n-1; i>=0; i--) { if (i<n-l) { if (g) { invginvail=1.0/(g*a[i][l]); /*reduce divisions*/ svd~11(n,i,invginvail,v,a,l); if (n>1) sum3~and~scale(m,n,i,l,v,a); s=svd~12(n,i,j,a,v,l); } svd~13(n,i,v,l); } v[i][i]=1.0; g=rv1i]; l=i; } for (i=IMIN(m,n)-1; i>=0; i--) { l=i+1; g=w[i]; for (j=l; j<n j++) a[i][j]=0.0; if (q) g=l.O/g; ginvaii=g/a[i][i]; if (n>1) sum2~and~scale(m,n,i,l,ginvaii,a;: svd~4(n,i,m,g,a); } else for (j=i; j>m j++) a[j][i]=0.0; ++a[i][i]; } for (k=n-1; k>=0; k--) { for (its=0; its<30 its++) flag-l; for (l=k; 1>=0; 1--) { nm=1-1; if ((float)(f~abs(rv1[l])+anorm) == anorm) { flag-O; break; } if ((float)(f~abs(w[nm])+anorm) == anorm) break; } if (flag) { c=0.0; s=l.O; for (i=l; i<=k; i++) f=s*rv1[i]; rv1[i]=c*rv1[i]; if ((float)(f~abs(f)+anorm) == anorm) break; g=w[i]; h=pyth(f,g); w[i]=h; h=1.0/h; c=g*h; s=-f+h; svd~14(n,m,nm,i,c,s,a); } } z=w[k]; if (l==k) { if (z<0.0) { w[k]=-z; for (j=0; j<=n-1; j++) v[j][k]+=-1.0; /* reduce pointer op*/ } break; { if (its==29) no~converge=1; x=w[1]; nm-k-l; y=w[nm]; g=rv1[nm]; h=rv1[k]; f=((y-z)*(y+z)+(g-h)*(g+h))/(2.0*h*y); g=pyth(f,1.0); f=((x-z)*(x+z)+h*((y/(f+SIGN(g,f)))-h))/x; c=s=1.0; for (j=1; j<=nm; j++ { i=j+1; g=rv1[i]; y=w[i]; h=s'g; g=c*g; z=pyth(f,h); rv1[j]=z; invz=1.0/z; c=f*invz; s=h*invz; f=x*c+g*s; g-g'c-x's; h=y*s; y*=c; svd~14(n,n,j,i,c,s,v); z=pyth(f,h); w(j ]=z; if (z) z=1.0/z; <BR> <BR> <BR> c=f'z; <BR> <BR> <BR> <BR> <BR> s=h'z; } f=c*g+s*y; x=c*y-s*g; svd~14(n,m,j,i,c,s,a); } rv1[1]=0.0; rv1[k]=f; wlk]-x; free vector(rvll; float pythag(float a, float b) float absa, absb; /* absa=fabs(a);*/ /* absb=fabs(b);*/ absa=f~abs(a); absb=f~abs(b); if (absa>absb) return absa*sqrt(1.0+SQR(absb/absa)); else return (absb--O.O ? 0.0 : absb*sqrt(1.0+SQR(absa/absb))); void svdsmoothe(float 'w, ine n) int ii; float w~max; for (ii=0; ii<n ii++) if (w(ii)<1e-10) w(ii)=1e10; /* w~max=findmax(w,n); */ /* find largest singular value */ w-max=searchmax(w,n); w~max*=0.075; /* scale with appropriate factor */ for (ii=0; ii<n ii++) w(ii)+=w~max; /* add smoothing constant to SV's */ } float findmax(float 'v, Inc n) int ii; float fmax=-1e99; /* very small '/ for (ii=O; ii<n ii++) fmax=FMAX(fmax,v[ii]); return fmax; void svdsolve(float t-u, float 'w, float -. v, int m, int n, float b, float tx) int jj, j, i, hlp=O; float s, 'tmp; tmp=vector(n); for (j=0; j<=n-l; j++) s=0.0; if (w[jl) { for (i=O; i<=m-l; 1++) s+=u[i] [j]*b[i];*/ s=svd~15(n,j,hlp,b,u,m); s/=w[j]; } tmp[j]=s; for (j=O; j<=n-l; j++) s=O.O; /* for [jj=0; jj<=n-1; jj++) s+=v[j] [jj]*tmp[jj];*/ /* s=svd~16(n,j,n,tmp,v);*/ s=svd~16(n,j,tmp,v); x(j]=s; } <BR> <BR> free~vector(tmp);<BR> }<BR> <BR> /* ----------------------------- prony Function prony estimates the denominator A(z) of the system underlying the data given in the vector x, and returns the polynomial coefficients in vector a.

The order of A(s) is P, and the order of the numerator is Q.

Therrien pp 550-553 ------------------------------------------------------------ ----------- */ void prony(float tx, int Q, int P, float 'a) int row, col, indx; A' indices '/ float **Xa, *a1, *w, **v, *sol; Xa=matrix(Nr-Q-1,P); /* matrix and vector for normal equations '/ al-vector (Nr-Q-l); v=matrix(P,P); /* storage vectors for QR-solver */ w=vector(P); sol=vector(P); /* form Xa matrix, and al vector '/ for (row=Q+1, indx=0; row<Nr indx++, row++) { @ a1[indx]= -x[row]; for (col-O; col<P col++) Xa(indxllcolllx(rov-col-ll;'/ mk Xa(P,P,indx,row,x,Xa); /* solve (Xa*a = a1) by QR-decomposition */ /* qr(Nr-Q-1, P, Xa, c, d);*/ /* perform QR-decomposition on Ha '/ A' qrsolv(Nr-Q-l, P, Xa, c, d, a1);*/ /* solve '/ svdcmp(Xa, Nr-Q-l, P, w, v); if (do~smoothe==1) svdmoothe(W,P); svdsolve(Xa, w, v, Nr-Q-l, P, al, sol); /* extract polynomial coefficients from a1 */ a[0]=1.0; for [row=1; row<=P; row++} a[row]=sol[row-1]; free~matrix(Xa); free~vector(al); free~vector(sol); free vector(w); ~ free~matrix(v); /* ----------------------------- prony~pade The function prony pade establishes and solves a least squares problem. in order to esimate an ARMA model of the system by which the data in vector x was obtained.

The system is characterized by the numerator polynomial coefficients given vector b, and the denominator polynomial coefficients given in vector a. The orders of these polynomials are given by Q and P resp.

Prony~pade uses the function prony to estimate denominator coeffs.

--------------------------------------------------------- -------------- */ void prony~pade(float 'x, int Q, int P, float *b, float a) Inc row, col, strt=O, indx; /* indices '/ float "Xb; /* estimate denominator using Prony's method */ prony(x, Q, P, a); Xb=matrix~cal(Q+1,P+1); /* X-matrix, all zeros */ /* form matrix Xb, make multiplication of dot product ti for (col=0; col<=P; col++) indx-O; for (row=strt++; row<=Q; row++) Xb[row] [col]=x[indx++]*a[col]; } for (row=0; row<=Q; row++) { for (col=0; col<=P; col++) b[row]+=Xb[row][col]; } /' alternativ formulering */ for (col=0; col<-P; col++) { indx=0; for (row=strt++; row<=Q; row++) b[row]+=x[indx++]*a[col]; ] */ free matrix(Xb); /* ----------------------------- shank The function shank establishes and solves a least squares problem, in order to esimate an ARMA model of the system by which the data in ector x was obtained.

The system is characterized by the numerator polynomial coefficients given in vector b, and the denominator polynomial coefficients given In vector a. The orders of these polynomials are given by Q and P resp.

Shank uses the function prony to estimate denominator coeffs., and the functions qr and qrsolv to solve a set of normal equations by QR-decomposition.

Therrieb pp 558-559 ------------------------------------------------------------ ----------- */ void shank(float 'x, int Q, int P, float 'b, float a) int row, col; /* indices */ int ii, jj; /* counters */ float **Ha, *ha, *w, **v; /* estimate denominator using Prony's method */ prony(x, Q, P, a); ha=vector~cal(Nr); /* calculate ha, the impulse response of 1/A(z) , Nr long */ ha[0]=a[0]; for (ii=l; ii<Nr ii++) { /* for (jj=1; (jj<=ii)&&(jj<=P); jj++) ha[ii]-=a[jj]*ha[ii-jj];*/ impuls(ii,IMIN(ii,P),ha,a); /* { if (jj<=P) ha[ii]-=a[jj]*ha[ii-jj]; }*/ } HA=matrix~cal(Nr,Q+1); /* matrix for normal equations */ /' form matrix Ha */ for (row=O; row<Nr row++) { /* for (col=0; (col<=row)&&(col<=Q); col++) { if (row>=col) Ha[row][col]=ha[row-col]; else Ha[row][col]=0.0; }*/ /* for (col=0; col<=Q; col++) Ha[row][col]=ha(row-col);*/ mk~Ha(Q+1,IMIN(Q,row)+1,row,ha,Ha); } free~vector(ha); v-matrix(Nr,Q+l); w=vector(Q+1); /* a1=vector(Q+1);* /* solve (Ha*b = x) by QR-decomposition '/ /* qr(Nr, Q+1, Ha, c, d);*/ /* perform QR-decomposition on Ha */ /* qrsolv(Nr, Q+1, Ha, c, d, x);*/ /* solve */ svdcmp(Ha, Nr, Q+1, w, v); /* svdsolve(Ha, w, v, Nr, Q+1, x, a1);*/ if (do~smoothe==1) svdsmoothe(w,Q+1); svdsolve(Ha, w, v, Nr, Q+1, x, b); free matrix(Ha); free~matrix(v); free vector(w); /* extract polynomial coefficients from a1 */ /* for (ii=0; ii<=Q; ii++) b[ii]=a1[ii];*/ /* free~vector(a1); */ } /* -------------------------------- mk~s~and~w ------------------------------- Make a and w vectors for the function freqz.

--------------------------------------------------------- ---------------------*/ void mk~s~and~w(complex pm s[np], float pm w[np]) { int ii; /* generate "time" vector s at n points equally spaced around the upper half of the unit circle. */ for (ii=0; ii<np ii++) { w[ii]=(t1+ii*(t2-t1)/(np-1)); creal(s[ii])=cosf(pi001*w[ii]); cimag(s[ii])=sinf(pi001*w[ii]); } } /* ----------------------------- freqz --------------------------------- Function freqz calculates the n-point complex frequency response vector H of the filter B/A: -1 -nb jw B(z) b(l) + b(2)z + .... + b(nb+l)z H(e) = ---- = ---------------------------- -1 -na A(z) 1 + a(2)z + .... + a(na+1)z given numerator and denominator coefficients in vectors b and a. The orders of A(z) and B(z) is assumed to be na. The frequency response is evaluated at n points equally spaced around the upper half of the unit circle.

--------------------------------------------------------- --------------- */ void freqz(int na, float 'a, float *b, complex float *H, complex float pm s[np], float pm w(np] Inc ii, jj, kk; t counters A complex float -ha, *hb; ha=c~vector~cal(np); .- @=point frequency response of a anc b - hb=c~vector~cal(np); /' evaluate polynomials at values specified by vector s, using Horner's method */ for (ii=O; ii<na ii++) evalhx(ii,np,a,s,ha); evalhx(ii,np,b,s,hb); /* calculate frequenzy response and weight with time'A /* for (ii=0; ii<np ii++) H[ii]=w[ii]*hb[ii]/ha[ii];*/ fr~resp(np,H,ha,hb,w); Eree c vector(ha); ~ ~ free~c~vector(hb); } /* ----------------------------- detect --------------------------------- This function performs detection on the two freq. responses HO and H1. The result is vdet=abs(HO-conj(H1)) and ldet which is vdet expressed in dB. The calculation of complex absolute value is written out due to a bug in the g21k compiler (new compiler works now, ph 150897).

--------------------------------------------------------- --------------- */ void detect(complex float *H0, complex float *H1, float vdet[np], float ldet[np]) int ii; /* counter -/ float ldet~max=-1000000.0; /* very small */ /* for(ii=0; ii<np ii++) vdet[ii]=0.001*cabsf(H0[ii]*H1[ii]);*/ cal~vdet(np,vdet,H0,H1); /* for(ii=0; ii<np ii++) vdet[ii]*=0.001;*/ /* { vdet[ii]=cabsf(H0[ii])+cabsf(H1[ii]); vdet[ii]=0.001*cabsf(H0[ii])*cabsf(H1[ii]); ldet[ii]=10*log10f(vdet[ii]); ldet~max=FMAX(ldet~max,ldet[ii]);*/ /*calculated @r PC for speed */ /* } for(ii=0; ii<np ii++) ldet[ii]=ldet~max;*/ /* scale */ } /* ----------------------------- *vector~cal --------------------------------- This function allocates memory for a vector of floats, of size n.

--------------------------------------------------------- --------------- */ float *vector cal(int n) { float 'v; v=(float*)calloc((size~t) n, (size~t) sizeof(float)); return v; /* ----------------------------- *c~vector~cal --------------------------------- This function allocates memory for vectors of complex floats, of size n.

--------------------------------------------------------- --------------- */ complex float *c~vector~cal(int n) { complex float *v; v=(complex float*)calloc((size~t) n, (size~t) sizeof(complex float)); return v; /* ----------------------------- *vector --------------------------------- This function allocates memory for a vector of floats, of size n. float *vector(int n) { float 'v; v=(float*)malloc((size~t) n); return v: /* ----------------------------- *c~vector --------------------------------- This function allocates memory for a vector of come floats, of size n. complex float *c~vector(int n; { complex float 'v; v=(complex float*(malloc((size~t) n*2); return v; /* ----------------------------- **matrix~cal --------------------------------- This function allocates memory for a matrix of floats, of size row x col.

--------------------------------------------------------- ---------------- */ float **matrix~cal(int row, int col) int i; float *'m; m=(float **) calloc (size~t) row, (size~t)(sizeof@float )); /*pointers to rows*/ m[0]=(float *) calloc((size~t) (row*col), (size~t,(sizeof(float))); for(i=1, i<=row-1; @@@; m[i]=m[i-1]+col; return m; } /* ----------------------------- **matrix --------------------------------- This function allocates memory for a matrix of floats, of size row x col.

--------------------------------------------------------- ----------------- */ float "matrix(int row, int col) int i; float **m; @ m=(float **) malloc ((size~t) row); /*pointers to rows*/ m(O)-(float ') malloc((size~t) (row'col)); for(i=1; i<=row-1; i++) m[i]=m[i-1]+col; return m; /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **c~matrix --------------------------------- This function allocates memory for a matrix of complex floats, of size row x col.

--------------------------------------------------------- --------------- */ complex float **c~matrix(int row, int col) int i; complex float "m; m=(complex float **) malloc ((size~t) row*2); /*pointers to rows*/ m[0]=(complex float *) malloc((size~t) (row*col)*2); for(i=1; i<=row-1; i++) m[i]=m[i-1]+col; return m; /* ------------------------------ free~vector ---------------------------- Frees memory allocated for vector of floats v. void free~vector(float *v) { free((char') v); /* ------------------------------ free~c~vector ---------------------------- Frees memory allocated for vector of complex floats c.

--------------------------------------------------------- --------------- */ void free~c~vector(complex float *v) free((char') v); /* ------------------------------ free~matrix ---------------------------- Frees memory allocated for matrix of floats m.

--------------------------------------------------------- --------------- */ void free~matrix(float **m) { free((char*) m[0]); free((char') m); /* ------------------------------ free~c~matrix ---------------------------- Frees memory allocated for matrix of complex floats ------------------------------------------------------------ ------------ */ void free~c~matrix(complex float **m) free((char') m(O]); free((char') m); /* ----------------------------- qr This function performs QR-decomposition of the matrix A of size n x m, so that A=Q*R where Q is orthogonal and R is upper triangular. R is stored in the upper triangle of A except the diagonal elements of R which are stored in d.

Q is represented as a product of householder matrices Q(0)...Q(n-2) where Q(j)=1 - u(j) x u(j) /c(j), where the nonzero components of u(j) are returned in A.

--------------------------------------------------------- -------------- */ void qr(int n, int m, float "A, float c, float 'd) int i, 1 float sum; static float pm scale, tau, sigma, invscale, sumpow[3]; for (k=0; k<m k++) scale=max~abs(n,m,k,A); if (scale<1e-10) invscale=1e10; else invscale=1/scale; sumpow[0]=0.0; scale~pow2(n,m,k,invscale,sumpow,A); sigma = SIGN(sqrt(sumpow[0]), A[k][k]); A[k][k] += sigma; c[k] = 1/(sigma*A[k][k]); d[k] = -1/(scale*sigma); for (j=k+l; j<m j++l { sum=qr~scalar(n,m,k,j,A); tau = sum*c[k]; tau~A(n,m,k,j,tau,A); } } } /* ----------------------------- qrsolv --------------------------------- qrsolv solves the set of linear equations Ax=b where A is of size n x m, x of length m, and b of length n. The matrix A is output from the function qr (see above). The solution vector x overwrites the first - elements of b ------------------------------------------------------------ ----------- */ void qrsolv(int n, int m, float "A, float 'c, float *d, floar int i, j; float sum; static float pm tau; /* form Q'*b */ for (j=0;j<mj++) { sum=sumaib(n,m,j,b,A); tau=sum*c[j]; btauA(n,m,j,tau,b,A); } /* solve by back substitution */ b[m-l] '- d[m-l]; /' b[m-l] /= d[m-l] oprindeligt for (i=m-2; i>=0; i--) { sum=sumajb(m,i,b,A); b[i] = (b[i]-sum)*d[i]; /* b[i] = (b[i]-sum)/d@@ oprindeligt */ } /* ----------------------------- prony-qr --------------------------------- Function prony estimates the denominator A(z) of the system underlying the data given in the vector x, and returns the polynomial coefficients in vector a.

The order of A(z) is P, and the order of the numerator is Therrien pp 550-553 ------------------------------------------------------------ ----------- */ void prony~qr(float *x, int Q, int P, float *a) { int row, col, indx; /* indices */ float "Xa, *a1, 'c, 'd; <BR> <BR> <BR> <BR> <BR> Xa=matrix(Nr-Q-1,P); /* matrix and vector for normal equations */<BR> a1=vector(Nr-Q-1); c=vector(P); /* storage vectors for QR-solver */ d=vector(P); /' form Xa matrix, and al vector */ for (row-Q+l, indx-O; row<Nr indx++, row++) { a1[indx]= -x[row]; for (col=0; col<P col++) Xa[indx][col]=x[row-col-1-]; } /* solve (Xa*a = a1) by QR-decomposition */ qr(Nr-Q-l, P, Xa, c, d); /* perform QR-decomposition on Ha '/ qrsolv(Nr-Q-l, P, Xa, c, d, all; /* solve -/ /t extract polynomial coefficients from 1 /* a[0]=1.0; /* by definition */ for (row=1; row<=P; row++) a[row]=al[row-l]; free~matrix(Xa); free~vector(a1); free vector(c); free vector(d); /* ----------------------------- prony~pade~qr -------------------------------- The function prony~pade establishes and solves a least squares problem, in order to estimate an ARMA model of the system by which the data in vector x was obtained.

The system is characterized by the numerator polynomial coefficients given in<BR> <BR> vector b, and the denominator polynomial coefficients given in vector a. The orders of these polynomials are given by Q and P rasp.

Prony~pade uses the function prony to estimate denominator coeffs.

------------------------------------------------------------ ----------- */ void <BR> <BR> prony~pade~qr(float *x, int Q, int P, float *b, float *a)<BR> { <BR> <BR> <BR> <BR> <BR> <BR> int row, col, strt-O, indx; /* indices +/ float **Xb; /* estimate denominator using Prony's method */ prony~qr(x, Q, P, a); Xb=matrix~cal(Q+1,P+1); /* X-matrix, all zeros */ /* form matrix Xb, make multiplication of dot product */ for (col=0; col<=P; col++) { <BR> <BR> indx=0;<BR> for (row=strt++; row<=Q; row++) Xb[row][col]=x[indx++]*a[col];<BR> }<BR> <BR> <BR> <BR> <BR> for (row=O; row<=Q; row++) for (col=O; col<=P; col++) b[row]+=Xb[row][col]; /* alternativ formulering */ for (col=0; col<=P; col++) indx-O; for (row-strt++; row<=Q; row++) b[row]+=x[indx++]*a[col]); */ free~matrix(Xb); /* ----------------------------- shank~qr ---------------------------------- The function shank establishes and solves a least squares problem, in order to esimate an ARMA model of the system by which the data in vector x was obtained.

The system is characterized by the numerator polynomial coefficients given in vector b, and the denominator polynomial coefficients given in vector a. The orders of these polynomials are given by Q and P resp.

Shank uses the function prony to estimate denominator coeffs., and the functions qr and qrsolv to solve a set of normal equations by QR-decomposition.

Therrien pp 558-559 ------------------------------------------------------------ ----------- */ void shank qr(float *x, int Q, int P, float 'b, float *a# int row, col; /' indices '/ int ii, jj; /* counters */ float **Ha, *ha, *c, *d; /* estimate denominator using Prony's method '/ prony~qr(x, Q, P, a); ha=vector~cal(Nr); /' calculate ha, the impulse response of 1/A(z) , Nr long */ ha[0]=a[0]; for (ii=l; ii<Nr ii++) for (jj=l; jj<=ii; jj++) if [jj<=P] ha[ii]-=a[jj]+ha[ii-jj]; Ha=matrix(Nr,Q+1); /' matrix for normal equations t/ /+ form matrix Ha '/ for (row=0; row<Nr row++) [ for (col=0; col<=Q; col++) { if (row>=col) Ha[row][col}=ha[row-col]; else Ha[row][col]=0.0; } } free~vector(ha); c=vector(Q+1); /* storage vectors for QR-solver */ d=vector(Q+1); /' solve (Ha*b = x) by QR-decomposition '/ qr(Nr, Q+1, Ha, c, d); /' perform QR-decomposition on Ha '/ qrsolv(Nr, Q+1, Ha, c, d, x); /' solve */ free matrix(Ha); ~ free~vector(c); free~vector(d); /' extract polynomial coefficients from x tl for (ii=0; ii<=Q; ii++) b[ii]=x[ii]; float determine~angle(float pm real, int position, complex float pm steps, float pm w[np], complex float *twid~px) int ii, jj; float *a, *b, *tmp, u~real, u~imag, ph; complex float 'H; complex float 'valval; float 'Hr pos; float *Hr neg; float *Hi; tmp-vector(Nr); H-c~veccor(np); valval=c~vector~cal(ku); for (ii-O; ii<ku ii++) for (jj=0; ij<Nr jj++) tmpIjjl-uu real(jj+iiNrl; a=vector(ma+1); b=vector~cal(mb+1); shank~qr(tmp, mb, ma, b, a); freqz(ma+l, a, b, H, s, w); free~vector(a); free vector(b); valval[ii]=H[position]*conj(H[position]); } free~c~vector(H); free~vector(tmp); Hr~pos=vector(ku); Hr~neg=vector(ku); Hi=vector(ku); for (ii=O; ii<ku ii++) { Hr~pos[ii]=creal(valval[ii]); Hr~neg[ii]=-creal(valval[ii]); Hi[ii]=cimag(valval[ii]); } free~c~vector(valval); u~real=dm~dft(ku,Hr~pos,Hi,twid~px); u~imag=dm~dft(ku,Hi,Hr~neg,twid~px); if (u~real!=0.0) ph=atan(u~imag/u~real)*180/pi; else ph=90.0; free~vector(Hr~pos); free~vector(Hr~neg); free~vector(Hi); return(ph); /' go4.c runs a~svd4.12k on the ADSP 21062 and displays the results. '/<BR> /* Written by Peter Hazell, modified 240698 by PH '/ /* changes from go a dat: mean values subtracted from measured is a new option*/ /* black on white option */ # include <dos.h> 4 include <math.h> # include <conio.h> # include <stdio.h> I include <stdlib.h> I include <graphics.h> 8 include <string.h> include "dsp2lk.h" # include "\dsp21k\dh21k\def~4.h" static float argl, arg2; #define FMAX(a,b) (arg1=(a),arg2=(b),(arg1) > (arg2) ? arg1) (arg2)) # define FMIN(a,b) (arg1=(a),arg2=(b),(arg1) < (arg2) ? .arg1) . (arg2)) # define N 128 X define N~REM 1 # define LOGIC int n define BOARD~NUM O /' assume board number 0 Ç define ERR 10 # define FILENAME REAL "d:\\data.re" define FILENAME~IMAG "d:\\data.im" &num define FILENAME DUMMY "d:\\dummy" int GraphOriver; /' The Graphics device drive:*/ int GraphMode; /' The Graphics mode value int ErrorCode; /' Reports any graphics errors */ float norm~real[NO~ANTENNAS*Nr], norm~imag[NO~ANTENNAS*Nr.; /*float sub~real[NO~ANTENNAS*Nr], sub~imag[NO~ANTENNAS*Nr.;*/ int been~here~h=0; /* HP- */ int been here 1--1; /' log screen '/ int been~here~m=-1; /* subtract mean */ int been~here~n=1; /* normalize */ int been~here~s=-1; /* shank/prony */ int been~here~v=-1; /' svd smoothing '/ ~ ~ int 1~draw=15; int 1~eras=1; /*prototypes*/ void Initialize(void); <BR> <BR> void in norm(float 'norm real, float *norm~imag); <BR> ~ ~ ~<BR> <BR> <BR> void in~sub(float *sub~real, float *sub~imag); void get~settings(char *txtbuf, char *vmin,char *vmax,char *vfit,char *vgrid,char *lmin,char 'lmax,char 'lfit,char vlgrid, char 'forget it); void draw frame(int x 1, int x r, int y~u, int y~d); void draw~grid(int x 1, int x r, int y u, int y d, int grid~x, float grid~y); void draw~graph(float *ydata, int x~1, int y~u, float y~min, float y~max, LOGIC fit, float gridy, int cursor, float xpos); <BR> <BR> void erase graph(float 'ydata, int x 1, int y u, float y min, float y~max, LOGIC fit); <BR> ~ ~ ~ ~ ~<BR> void erase~cursor(int x~l, int y~u, int cursor, float xpos); void erase~scale(int x~l, int y~u, float y~min, float y~max, float gridy); int posmax(float *v, int n); float findmax(float *v, int n); float findmin(float *v, int n); float vvector(int n); void free~vector(float *v); <BR> <BR> void textxy~float(int x, int y, float a);<BR> ~<BR> <BR> <BR> void show~help(void); void showtime(void); void collect~data(DSP21K *board); void collect means(DSP21K 'board); void collect~dummy(DSP21K *board); void save data(float 'data); ~ void save~means(DSP21K *board); void make~sound(int counter); void make~3~tones(int del); void got~an~error(int s); int count~down(int cnt); void update~screen(int 1~draw, int 1~eras); void change~filter(int new, DSP21K *board); void change~subtract(int new, DSP2IK 'board); void change~normal(int new, DSP21K 'board); void change~method(int new, DSP21K 'board); void change~smoothe(int new, DSP21K 'board); main() { char txtbuf[300], input; char vmin[10], vmax[10], vfit[10], vgrid[10]; char lmin[10], lmax[10], lfit[10], lgrid[10], forget~it[10]; float fvmin, fvmax, flmin, flmax, forget; int do upper-l, got~data=-16, got means-O; float fvgrid, flgrid; LOGIC fvfit, flfit; int del-5O; tnt ii, ii int index, found; int xcrsr=254, xcrsr~old; int serial check-O: int been~here~z=1; /* cursor reading */ int been here f--l; /' fast cursor '/ int been here c=-1; /* collect raw data */ int been~here r=-1; /* record results */ int been~here~S=-1; /* calculate mean values */ int been~here~h~old; int been~here~n~old; int been~here~s~old; int been~here~m~old; int been~here~v~old; int xinc=l; float *ldet, *vdet, *ldet~old, *vdet~old, *fm~r, *fm float xpos, xpos~old, xpos~from=0.0; FILE 'ind; DSP21K ' board; int counter=-15; int err count=O; float lax; float angle; int position=64; int fig2poly[8]={0,240,0,450,640,450,640,240}; pos- (tl+(t2-tl)'crsr/508.0)/ns to m-xpos~from; vdet=vector(N); ldet=vector(N); vdet~old=vector(N); ldet~old=vector(N); Initialize(); setbkcolor(l~eras); setcolor(l draw); outtextxy(220,1,"Press <q> to quit, <F1> for list of hotkeys"); outtextxy(265,225,"x-pos:"); outtextxy(1,455,"Method; Shank"); outtextxy(1,470,"normalization: on"); outtextxy(200,470,"subtraction: off"); outtextxy(400,470,tHP-filter: off"); textxy~float(80,225,tl/ns~to~m); settextjustify(2,2); textxy~float(80+508,225,t2/ns~to~m); settextjustify(0,2); get~settings(textbuf,vmin,vmax,vfit,vgrid,lmin,lmax,lfit,lgr id,forget~it); fvmin=atof(vmin); fvmax=atof(vmax); flmin=atof(lmin); flmax=atof(lmax); fvgrid=atof(vgrid); flgrid-atof(lgridj; fvfit=atoi(vfit); flfit=atoi(lfit); forget=atof(forget~it); board=dsp21k~open(BOARD~NUM); /* open the board */ redo: been~here~h~old=-1; been~here~n~old=0; been~here~s~old=0; been~here~m~old=0; been~here~v~old=0; dsp2lk reset~proc(board); reset bord */ dsp21k~dl~exe(board, "\\dsp21k\\dh21k\\a~svd4.21k"); /* download and start the dsp program */ <BR> <BR> <BR> <BR> <BR> dsp2lk~start)board); <BR> <BR> <BR> <BR> <BR> <BR> <BR> in norm(norm real, norm imag); /* get and create normalization vectors '/<BR> ~ ~ ~<BR> <BR> <BR> /* in~sub(sub~real, sub~imag);*/ /* get and create mean vectors */ while (dsp21k~ul~int(board, dsp21k~get~addr(board, "~done~initialization"))==0); dsp21k~dl~flts(board, dsp21k~get~addr(board, "~norm~real"), NO~ANTENNAS*Nr, norm~real); dsp21k~dl~flts(board, dsp21k~get~addr(board, "~norm~imag"), NO~ANTENNAS*Nr, norm~imag); /* dsp21k~dl~flts(board, dsp21k~get~addr(board, "~sub~real"), NO~ANTENNAS*Nr, sub~real); dsp21k~dl~flts(board, dsp21k~get~addr(board, "~sub~imag"), NO~ANTENNAS*Nr, sub~imag);*/ /* dsp21k~dl~int(board, dsp21k~get~addr(board, "done~downloading"), 1);*/ dsp21k~dl~int(board, dsp21k~get~addr(board, "~got~here"), 01; while(1) { /' wait for done variable to be set true '/ ii=O; while (ii<1e3) { serial~check=dsp21k~ul~int(board, dsp21k~get~addr(board, "done")); if (serial~check!=0) goto go~on; ii++; } goto redo; go~on: dsp21k~dl~int(board, dsp21k~get~addr(board, "~got~here"), 0); settextjustify(0,2); setcolor(l~draw); if (serial~check!=1) { got~an~error(serial~check); err~count=ERR; goto cont; if (err~count>0) err~count=count~down(err~count); if ((input=='a')|!(input=='A')) { setcolor(l eras); textxy~float(450,455,angle); setcolor)l~draw); if (input=='A') position=(int) (xcrsr/4); else position=posmax(vdet,np); dsp21k~dl~flt(board, dsp21k~get~addr(board, "~angle~pos"), position); while (dsp21k ul int(board, dsp21k~get~addr(board, "~angle~determined"))==0); ~ ~ ~ ~ ~ ~ angle=dsp21k~ul~flt(board, dsp21k~get~addr(bcard, "phase")); outtextxy(400,455,"Angle"); textxy~float(450,455,angle); if (input== c ) been c*=-1; if ((been~here~c==1)&&(got~data<100)) { if (got~data>=0) collect~data(board); if (got~data<0) collect~dummy(board); got data++; make~sound(got~data); } if (got~data==100) { make~3~tones(del); been here c--l; ~ ~ got~data++; } if (input=='S') been~here~S*=-1; if ((been~here~S==1)&&(got~means<100)) { if (got~means==0) { dsp21k~dl~int(board, dsp21k~get~addr(board, "~subtract"), 0); /* initialize sub vectors '/ for (ii=O; ii<Nr'NO~ANTENNAS; ii++) sub~real[ii]=0.0; sub~imag[ii]=0.0; }/ if (got~means>=0) collect~means(board); got~means++; make sound(got means); } if (got~means==100) { if (been~here~m==1) dsp21k~dl~int(board, dsp21k~get~addr(board, "~subtract"), 1); save means )board); ~ make~3~tones(del); been~here~S=-1; got~means=0; } /* upload the results */ while (dsp21k~ul~int(board, dsp21k~get~addr(board, "~done~detecting"))==0);<BR> <BR> dsp21k~ul~flts(board, dsp21k~get~addr(board, "~vdet", N, vdet); /* dsp21k~ul~flts(board, dsp21k~get~addr(board, "~ldet"), N, ldet);*/ <BR> <BR> <BR> <BR> /* calculate logdata here, quicker */<BR> for (jj=0;jj<npjj++) { if (vdet[jj]>0) ldet[jj]=10*log10(vdet[jj]); else ldet[jj]=-60.0; } l~max=findmax(ldet,np); for (jj=0;jj<npjj++) ldet[jj]-=1~max; if (been here r--l) save data(vdet); if (input=='f') been~here~f*=-1; /* if (input=='h') been~here~h*=-1;*/ if (input=='h') { if (been~here~h==3) been~here~h=0; else beeñ here h++; if (input=='m') been here~m'--l; if (input=='n') been~here~n*=-1; if (input=='s') been~here~s*=-1; if (input=='r') been~here~r*=-1; if (input=='v') been~here~v*=-1; if (been~here~f==1) xinc=10; else xinc=1; if (been~here~h!=been~here~h~old) change~filter(been here h, board); been here h oldlbeen here h; if (been~here~m!=been~here~m~old) change~subtract(been here m, board); been here m oldlbeen here m; if (been~here~n!=been~here~n~old) change~normal(been~here n, board); been here n old-been here n if (been~here~s!=been~here~s~old) change~method(been~here~s, board); <BR> <BR> <BR> <BR> been~here~s~old=been~here~s;<BR> <BR> if (been~here~v!=been~here~v~old) change~smoothe(been~here~v, board); been~here~v~old=been~here~v; xcrsr~old"xcrsr; xpos~old=xpos; if (input--'z') if (been~here~z==-1) { xpos~from=0.0; been~here~z=1; } else xpos~from-xpos; been~here~z=-1; } xpos=(t1+(t2-t1)+xcrsr/508.0)/ns~to~m-xpos~from; erase~cursor(80,20,xcrsr~old,xpos~old); if (input=='\M') /' arrow right '/ if ((xinc==1)&&(xcrsr!=508; ) ) xcrsr+=xinc; /' move cursor right, slow '/ if ((xinc==10)&&(xcrsr<499)) xcrsr+=xinc; i move cursor right, fast '/ xpos=(t1+(t2-t1)+xcrsr/508.0)/ns~to~m-xpos~from; erase~cursor(80,20,xcrsr~old,xpos~old); <BR> <BR> if (been~here~1==-1) erase~cursor(80,240,xcrsr~old,xpos~old);<BR> }<BR> <BR> <BR> <BR> <BR> if (input=='\K') /* arrow left */ { if ((xinc==1)&&(xcrsr!=0)) xcrsr-=xinc; /* move cursor left, slow */ if ((xinc==10)&&(xcrsr>9)) xcrsr-=xinc; /* move cursor left, fast */ xpos=(t1+(t2-t1)+xcrsr/508.0)/ns~to~m-xpos~from; erase~cursor(80,20,xcrsr~old,xpos~old); if (been~here~1==-1) erase~cursor(80,240,xcrsr~old,xpos~old);<BR> }<BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> for (ii=O; ii<N ii++) vdet[ii]=(vdet[ii]+vdet~old[ii]*forget)/(1+forget); ldet[ii]=(ldet[ii]+ldet~old[ii]*forget)/(1+forget); if (been here 1=-1) erase~graph(ldet~old, 80, 240, flmin, flmax, flfit); erase~graph(vdet~old, 80, 20, fvmin, fvmax, fvfit); if (input--'l') been~here~1*=-1; setcolor(1~eras); fillpoly(4, fig2poly); setcolor(1~draw); } if (input=='u') do~upper=1; if (input=='l') do~upper=0; if (input=='\H') /+ arrow up '/ if (been~here~1==-1) erase scale(80,240,flmin, flmax, flgrid); erase~scale(80,20,fvmin, fvmax, fvgrid); if (doupper=-l) if (fvmax<16384) fvmax'=2.0; fvgrid*=2.0; } } else flmin-=10.0; if (input=='\P') /' arrow down t/ if (been~here~1==-1) erase~scale(80,240,flmin, flmax, flgrid); erase~scale(80,20,fvmin, fvmax, fvgrid); if (do~upper==1) { fvmax/=2.0; fvgrid/=2.0; } else if (flmin<flmax-lO) flmin+-10.0; if (been~here~1==-1) draw graph(ldet, 80, 240, flmin, flmax, flfit, flgrid, xcrsr, xpos); draw~graph(vdet, 80, 20, fvmin, fvmax, fvfit, fvgrid, xcrsr, xpos); counter++; /* if (counter==0) showtime(); if (counter==1000) showtime();*/ showtime(); for (ii=0; ii<N ii++) { vdet~old[ii]=vdet[ii]; ldet~old[ii]=ldet[ii]; } cont: input=' '; /* reset input */ while (kbnit()) input=getch(); if ((input=='q') || (input=='Q')) goto out; if (input=='b') { if (l~craw==15) { l~draw=1; l~eras=15; <BR> <BR> update~screen(1~draw, 1~eras);<BR> } <BR> <BR> <BR> <BR> <BR> <BR> else l~draw=15; l~eras=1; update~screen(1~draw, 1~eras); } been~here~h~old=-1; been~here~m~old=0; been~here~n~old=0; been~here~s~old=0; been~here~v~old=0; } if (input=='\;') show~help(); /* F1 */ serial~check=0; /* reset serial~check */ out: closegraph(); /' close the board '/ dsp21k~reset~proc(board); dsp21k~close(board); free~vector(ldet); free~vector(vdet); free~vector(ldet~old); free~vector(vdet~old); return) 0); void <BR> <BR> Initialize(void)<BR> { <BR> <BR> <BR> <BR> <BR> <BR> <BR> int ii; for (ii-O; ii<Nr*NO~ANTENNAS; ii++) { sub~real[ii]=0.0; sub~imag[ii]=0.0; }*/ GraphDriver = DETECT; /* Request auto~detection */ initgraph( &GraphDriver, &GraphMode, "" ); ErrorCode = graphresult(); /' Read result of initialization'/ if( ErrorCode != grOk ) /* Error occured during init */ { printf(" Graphics System Error: %s\n", grapherrormsg( ErrorCode ) ); exit( 1 ) ; setfillstyle(1,1~eras); /* black-, void in norm(float 'norm real, float *norm~imag) FILE +ind; float a~r[Ns], a~i[Ns]; Inc ii; ind=fopen("\\dsp21k\\bcclib\\a~r.dat", "rb"); fread(a~r, sizeof(float), Ns, ind); fclose(ind); ind=fopen("\\dsp21k\\bcclib\\a~i.dat", "rb"); fread(a~i, sizeof(float), Ns, ind); fclose(ind); for (ii=STARTPOINT; ii<Nr+STARTPOINT; ii++) { norm~ceal[ii-STARTPOINT]=a~r[ii]; norm~imag[ii-STARTPOINT]=a~i[ii]; } ind=fopen("\\dsp21k\\bcclib\\b~r.dat", "rb"); fread(a~r, sizeof(float), Ns, ind); fclose(ind); ind=fopen("\\dsp21k\\bcclib\\b~i.dat", "rb"); fread(a i, sizeof(float), Ns, ind); fclose(ind); for (ii=STARTPOINT; ii<Nr+STARTPOINT; ii++) { norm~real[ii-STARTPOINT+Nr]=a~r[ii]; norm~imag[ii-STARTPOINT+Nr]=a~i[ii]; } ind=fopen("\\dsp21k\\bcclib\\c~r.dat", "rb"); fread(a r, sizeof(float), Ns, ind); fclose(ind); ind=fopen("\\dsp21k\\bcclib\\c~i.dat", "rb"); fread(a i, sizeof(float), Ns, ind); fclose(ind); for (ii=STARTPOINT; ii<Nr+STARTPOINT; ii++) { norm~real[ii-STARTPOINT+Nr*2]=a~r[ii]; norm~imag[ii-STARTPOINT+Nr*2]=a~i[ii]; } ind=fopen("\\dsp21k\\bcclib\\d~r.dat", "rb"); fread(a~r, sizeof(float), Ns, ind); fclose(ind); ind=fopen("\\dsp21k\\bcclib\\d~i.dat", "rb"); fread(a i, sizeof(float), Ns, ind); fclose(ind); for (ii=STARTPOINT; ii<Nr+STARTPOINT; ii++) { norm~real[ii-STARTPOINT+Nr*3]=a~r[ii]; norm~imag[ii-STARTPOINT+Nr*3]=a~i[ii]; } void in~sub(float Xsub real, float 'sub imag) FILE 'ind; /* ind=fopen(SUBMEANS~RE, "rb");*/ ind=fopen("c:\\dsp21k\\bcclib\\sub~mean.re", "rb"); fread(sub~real, sizeof(float), Nr*NO~ANTENNAS, ind); fclose(ind); /* ind=fopen(SUBMEANS~IM, "rb");*/ ind=fopen("c:\\dsp21k\\bcclib\\sub~mean.im", "rb"); fread(sub imag, sizeof(float), Nr*NO~ANTENNAS, ind); fclose(ind); void draw frame(int x 1, int x r, int y~u, int y d) int ii; setlinestyle(0,0,1); /* solid */ setcolor(l~draw); /* white */ moveto(x~l,y~u); lineto(x~l,y~d); lineto(x~r,y~d); lineto(x~r,y~u); lineto(x~l,y~u); void draw~grid (int x~l, int x~r, int y~u, int y~d, int grid~x, float grid~y) int ii; setlinestyle(1,0,1); /* dotted */ <BR> <BR> for (ii=1; ii<grid~x; ii++) line(x~l+ii*(x~r-x~1)/grid~x, y~u, x~l+ii*(x~r-x~l)/grid~x, y~d);<BR> for (ii=1; ii<grid~y; ii++) line(x~l, (int)(y~d-ii*(y~d-y~u)/grid~y), x~r,<BR> <BR> <BR> (int)(y~d-ii*(y~d-y~u)/grid~y)); } void draw~graph(float *ydata, int x 1, int y~u, float y min, float y max, LOGIC fit, float gridy, int cursor, float xpos) int ii; float y; char txt[10]; if (fit==1) { y~min=findmin(ydata,np); y~max)findmax(ydata,np); } y=y~max-y~min; /* y-range */ if (y-O.O) y-l.O; /* Will overflow if y=O '/ <BR> <BR> <BR> <BR> if (ydata[0]>y~max) moveto(x~l,y~u); /* move to top left hand corner */<BR> <BR> else if (ydata[0]<y~min) moveto(x~l,y~u+200); /* move to bottom left hand corner */ else moveto(x~l,y~u+(int)((y~max-ydata[0])*200.0/y)); /* move to first point */ setlinestyle(0,0,1); /' solid '/ setcolor(l~draw); /* white */ <BR> <BR> <BR> for (ii=l; ii<np ii++) /' line to frame top*/ <BR> <BR> [ /* line to frame bottom t! <BR> <BR> /* line to next point */<BR> if (ydata[ii]>y~max) lineto(x~l+ii*(512/np),y~u)<BR> <BR> <BR> <BR> else if (ydata[ii]<y~min) lineto(x~l+ii*(512/np),y~u+200);<BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> else lineto(x~l+ii*(512/np), y~u+(int)((y~max-ydata[ii])*200.0/y));<BR> moveto(x~l+cursor,y~u+200); lineto(x~l+cursor,y~u); /* vertical line at cursor */ settextjustify(2,2); textxy~float(x~l-5, y~u, y~max); textxy~float(380,225,xpos); settextjustify(2,0); textxy~float(x~l-5, y~u+200, y~min); draw~grid(x~l,x~l+508,y~u,y~u+200,6,y/gridy); draw~frame(x~l,x~l+508,y~u,y~u+200); void erase graph(float data, int x 1, int y u, float y~min, float y~max, LOGIC fit) int Ii; float y; char txt[10]; if (fit==1) { y~min=findmin(ydata,np); y~max=findmax(ydata,np); } y=y max-y sin; if (y==0.0) y=1.0; /* will overflow if y=0 */ setlinestyle(0,0,1); /' solid '/ setcolor(1~eras); /' black '/ if (ydata[0]>y~max) moveto(x~l,y~u); else if (ydata[0]<y~min) moveto(x~l,y~u+200); else moveto(x~1,y~u+(int)((y~max-ydata[0])+200.0/y)); <BR> <BR> <BR> <BR> <BR> for (ii=l; ii<np ii++) <BR> {<BR> <BR> <BR> if (ydata[ii]>y~max) lineto(x~l+ii*(512/np),y~u);<BR> <BR> <BR> <BR> <BR> <BR> else if (ydata[ii]<y~min) lineto(x~l+ii+(512/np),y~u+200);<BR> else lineto(x~1+ii*(512/np), y~u+(int)((y~max-ydata[ii])+200.0/y)); } } int posmax(float *v, int n) { int ii, pos; float largest; /' very small '/ largest=v[0]; pos-O; for (ii=1; ii<n ii++) { if (v[ii]>largest) { largest=v[ii]; pOs-ii; return pos; float findmax(float *v, int n) in ii; float fmax=-le99; /* very small - for (ii=0; ii<n ii++) fmax=FMAX(fmax,v[ii]); return fmax; float findmin(float *v, int n) { int ii; float fmin=1e99; /* very big */ for (ii=O; ii<n ii++) fmin=FMIN(fmin,v[ii]); return fmin; } /* ----------------------------- *vector --------------------------------- This function allocates memory for a vector of floats, of size n.

--------------------------------------------------------- --------------- */ float 'vector(int n) float *v; v=(float*)calloc((size~t) n, (size t) sizeof(float)); return v; /* ----------------------------- free~vector ---------------------------- Frees memory allocated for vector of floats v ------------------------------------------------------------ ------------ */ void free vector(float float 'V] free((char*) v); void textxy~float(int x, int y, float a) char whole[5], dec[5], txt[20]=""; int ii; itoa((int)(a),whole,10); itoa((int)(abs((a-(int)(a))*1000)),dec,10); if ((a<0.0)&&(a>-1.0)) strcat(txt,"-"); strcat(txt,whole); strcat(txt,"."); if (((int)(abs((a-(int)(a))*1000))<100)&&((int)(abs((a-(int) (a))*1000))>=10)) strcat(txt,"0"); if (((int)(abs((a-(int)(a))*1000))<10)&&((int)(abs((a-(int)( a))*1000))>=1)) strcat(txt,"00"); strcat(txt,dec); outtextxy(x,y,txt); void get settings(char vtxtbuf,char 'vmin,char tvmax,char *vfit,char 'vgrid,cnar *lmin,char 'lmax,char 'lfit,char 'lgrid,char forget it) FILE 'ind; int flag--l,indx, found, cnt=0; ind=fopen("\\dsp21k\\bcclib\\dat~a.txt", "rt"); fread(txtbuf, 4, 300, ind); fclose(ind); found-O; indx=-1; while (found<2) if (flag==1) vmin[++indx]=txtbuf[cnt]; if [txtbuf[cnt]=='S') flag*=-1, found++; cnt++; found-O; indx=-1; while (found<2) { if (flag==1) vmax[++indx]=txtbuf[cnt]; if (txtbuf[cnt]=='$') flag*=-1,found++; cnt++; } found=0; indx3-l; while (found<2) { if (flag==1) vfit[++indx]=txtbuf[cnt]; if (txtbuf[cnt]=='$') flag*=-1,found++; <BR> <BR> cnt++: <BR> <BR> <BR> <BR> <BR> <BR> found; indx--l; while (found<2) { if (flag==1) vgrid[++indx]=txtbuf[cnt]; if (txtbuf[cnt]=='$') flag*=-1,found++; cnt++; } found=0; indx--l; while (found<2) if (flag==1) lmin[++indx]=txtbuf[cnt]; if (txtbuf[cnt]=='$') flag*=-1,found++; cnt++; found=0; indx=-l; while (found<2) { if (flag==1) lmax[++indx]=txtbuf[cnt]; if (txtbuf[cnt]=='$') flag*=-1,found++; cnt++; } found=0; indx=-l; while (found<2) { if (flag==1) lfit[++indx]=txtbuf[cnt]; if (txtbuf[cnt]=='$') flag*=-1,found++; cnt++; found=O; indx=-l; while (found<2) { if (flag==1) lgrid[++indx]=txtbuf[cnt]; if (txtbuf[cnt]=='$') flag*=-1,found++; cnt++; found; indx=-1; while (found<2) { if (flag==1) forget~it[++indx]=txtbuf[cnt]; if (txtbuf[cnt]=='$') flag*=-1,found++; cnt++; void show help(void) int line=l, l~spc=10; cleardevice(); settextjustify(0,2); line++;line++;outtextxy(50,line*1~spc," Your hockeys are:"); line++;line++;line++;line++;outtextxy(50,line*1 spc," a : Determine angle at maximum"); line++;outtextxy(50,line*1~spc," A : Determine angle at cursor"); line++;outtextxy(50,line*1~spc," b : Black on white or white on black"); line++;outtextxy(50,line*1~spc," c : Collect raw data"); line++;outtextxy(50,line+1~spc," f : Fast cursor movement on/off"); line++;outtextxy(50,line*)~spc," h : High Pass filtering off/10ns/15ns/20ns"); line++;outtextxy(50,line*1~spc," 1 : Change y-range of lower graph"); line++;outtextxy(50,line*1~spc," m : Mean value subtraction on/off"); line++;outtextxy(50,line*1~spc," n : Normalization on/off"); line++;outtextxy(50,line*1~spc," q : Quit"); line++;outtextxy(50,line*1~spc," r : Record results"); line++;outtextxy(50,line*1~spc," s : Solution method: Shank/Prony"); line++;outtextxy(50,line'1 spc," S : Collect mean values for substraction"); line++;outtextxy(50,line*1~spc," u : Change y-range of upper graph"); line++;outtextxy(50,1ine'1 spc," v : SVD smoothing on/off"); line++;outtextxy(50,line*1~spc," z : Set x-position to zero or restore"); line++;outtextxy(50,1ine*1~spc," 1 : Toggle lower graph on/off"); line++;line++;outtextxy(50,line*1~spc," arrows:"); line++;line++;outtextxy(50,line'1 spc," left : Move cursor left"); line++;outtextxy(50,line*1~spc," right: Move cursor right"); line++;outtextxy(50,line*1~spc," up : Increase y-range of selected graph (1 or u)"); line++;outtextxy(50,line*1~spc," down : Decrease y-range of selected graph (1 or u)"); line++;line++;outtextxy(50,line*1~spc," function keys"); line++;line++;outtextxy(50,line*1~spc," F1 : Return to program"); while (getch()!='\;'); cleardevice(i; setbkcolor(l~eras); settextjustify(0,2); if been~here h==l) outtextxy(400,470,"HP-filter: 10 s".; if (been~here~h==2) outtextxy(400,470,"HP-filter: 15 nz"); if (been here h==3) outtextxy(400,470,"HP-filter: 20 if (been~here~h~<1) outtextxy(400,470,"HP-filter: off";; If (been~here~m==1) outtextxy(200,470,"subtraction: or" ~ ~ else outtextxy(200,470,"subtraction: off"); if (been~here~n==1) outtextxy(1,470,"normalization: on" else outtextxy(l,470,"normalization: off"); if (been~here~s==1) outtextxy(1,455,"Method: Prony"); else outtextxy(1,455,"Method: Shank"); if (been~here~v==1) outtextxy(200,455,"Smoothing: on":; else outtextxy(200,455,"Smoothing: off"); outtextxy(220,l,"Press <q> to quit, <F1> for list of @@@@eys"); outtextxy(265,225, x-pos: ); /* textxy~float(80,445,t1/ns~to~m);*/ textxy~float(80,225,t1/ns~to~m); settextjustify(2,2); /* textxy~float(80+512,445,t2/ns~to~m);*/ textxy~float(80+512,025,t2/ns~to~m); settextjusitify(0,2); } void showtime(void) { struct dostime t t; ~ char hour[2], minute[4], second[4], txt[20]=""; int poly[8]={550,455,550,470,640,470,640,455}; dos gettime(&t); itoa(t.hour,hour,10); itoa(t.minute,minute,10); itoa(t.second,second,10); strcat(txt,hour); strcat(txt,":"); if (t.minute<10) strcat(txt,"0"); strcat(txt,minute); strcat(txt,":"); if (t.second<10) strcat(txt,"0"); strcat(txt,second); setcolor(l~eras); fillpoly(4,poly); <BR> <BR> setcolor(l~draw); <BR> <BR> <BR> <BR> outtextxy(630,470,txt);<BR> } <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> void collect means(DSP21K 'board) float *uu~real, *uu~imag; int ii, jj; uu~real=vector(Nr*ku); uu~imag=vector(Nr*ku); while(!dsp21k~ul~int(board, dsp21k~et~addr(board, "~done~normalizing"))); dsp21k~ul~flts(board, dsp21k~get~addr(board, "~uu~real"), Nr*ku, uu~real); dsp21k~ul~flts(board, dsp21k~get~addr(board, "~uu~imag"), Nr*ku, uu~imag); for (ii=0; ii<NO~ROT; ii++) { /* for (jj=0; jj<Nr*NO~ANTENNAS; jj++) { <BR> <BR> sub~real[jj]+=(0.0025*uu~real[jj+ii*Nr*NO~ANTENNAS]);<BR& gt; sub~real[jj]+=(0.0025*uu~imag[jj+ii*Nr*NO~ANTENNAS]); }*/ } free~vector(uu~real); free~vector(uu~imag); ] void collect~data(DSP21K *board) { FILE *ind; float *uu~real, *uu~imag; uu~real=vector(Nr*ku); uu~imag=vector(Nr*ku); while(!dsp21k~ul~int(board, dsp21k~get~addr(board, "~done~normalizing"))); dsp21k~ul~flts(board, dsp21k~get~addr(board, "~uu~real"), Nr*ku, uu~real); dsp21k~ul~flts(board, dsp21k~get~addr(board, "~uu~imag"), Nr*ku, uu~imag); ind=fopen(FILENAME~REAL, "a+b"); fwrite(uu~real, sizeof(float), Nr*ku, ind); fclose(ind); ind=fopen(FILENAME~IMAG, "a+b"); fwrite(uu~imag, sizeof(float), Nr*ku, ind); fclose(ind); free~vector(uu~real); free~vector(uu~imag); } void collect~dummy(DSP21K *board) { FILE *ind; float *uu~real, *uu~imag; uu~real=vector(Nr*ku); uu~imag=vector(Nr*ku); while(!dsp21k~ul~int(board, dsp21k~get~addr(board, "~done~normalizing"))); dsp21k~ul~flts(board, dsp21k~get~addr(board, "~uu~real"), Nr*ku, uu~real); dsp21k~ul~flts(board, dsp21k~get~addr(board, "~uu~imag"), Nr*ku, uu~imag); ind=fopen(FILENAME~DUMMY, "wb"); fwrite(uu~real, sizeof(float), Nr*ku, ind); fclose(ind); ind=fopen(FILENAME~DUMMY, "wb"); fwrite(uu~imag, sizeof(float), Nr*ku, ind); fclose(ind); free~vector(uu~real); free~vector(uu~imag); } void save~data(float *data) FILE 'ind; ind=fopen("d:\\vdet.dat", "a+b"); fwrite(data, sizeof(float), np, ind); fclose(ind); void save~means(DSP21K *board) FILE 'ind; /* ind=fopen(SUBMEANS~RE, "wb");*/ /* ind=fopen("c:\\dsp21k\\bcclib\\sub~mean.re", "wb"); fwrite(sub~real, sizeof(float), Nr+NO ANTENNAS, ind);<BR> ~ ~<BR> <BR> fclose(ind);*/ /* ind=fopen(SUBMEANS~IM, "wb");*/ /* ind=fopen("c:\\dsp21k\\bcclib\\sub~mean.im", "wb"); fwrite(sub~imag, sizeof(float), Nr*NO~ANTENNAS, ind); fclose(ind);'/ /' download new subtraction vectors */ /* dsp21k~dl~flts(board, dsp21k~get~addr(board, "~sub~real"), NO~ANTENNAS*Nr, sub~real); dsp21k~dl~flts(board, dsp21k~get~addr(board, "~sub~imag"), NO~ANTENNAS*Nr, sub~imag); void make sounO(int counter) int fl=500, f2=1000, f3=2000; double res; /* delay(MEAS~DELAY);*/ /* countdown */ if (counter==-10) sound(f3); if (counter-=-8) nosound(); if (counter==-5) sound(f3); if (counter==-3) nosound(); /' measuring '/ if (counter>=0) { res=fmod((double) (counter),10.0); if (res==0.0) sound(f1); if (res==1.0) nosound(); if (res==5.0) sound(f2); if (res==6.0) nosound(); } void <BR> <BR> make~3~tones(int del)<BR> { <BR> <BR> <BR> <BR> <BR> <BR> sound(500);<BR> <BR> <BR> delay(del); <BR> <BR> <BR> <BR> sound(700); delay(del); sound(900); delay(del); sound(1100); delay(del); nosound(); void got~an~error(int s) { if (s==2) outtextxy(1,1,"MAC overflow"); if (s=3) outtextxy(l,l,"ADC out of range"); if (s--4) outtextxy(1,1,"Serial transmission error"); if (s==123) outtextxy(1,1,"SVD did not converge"); int count down(int cnt) int poly[8]={1,1,1,10,200,10,200,1}; cnt--; if (cnt==0) { setcolor(1~eras); fillpoly(4,poly); setcolor(1~draw); } return (cnt); void update~screen(int 1 draw, int 1 eras) { setbkcolor(1~eras); setcolor(1~draw); setfillstyle(1,1~eras); cleardevice(); settextjustify(0,2); outtextxy(220,1,"Press <q> to quit, <F1> for list of hotkey outtextxy(265,225,"x-pos:"); /* textxy~float(80,445,t1/ns~to~m);*/ textxy float(80,225,tl/ns t m); <BR> <BR> <BR> ~ ~ ~<BR> settextjustify(2,2); /* textxy~float(80+512,445,t2/ns~to~m);*/ textxy~float(80+512,225,t2/ns~to~m); settextjustify(0,2); } void change~filter(int ne, DSP21K 'board) if (new==1) { <BR> <BR> dsp21k~dl~int(board, dsp21k~get~addr(board, "~do~filter"), 1);<BR> setcolor(l~eras); outtextxy(400,470,"HP-filter: off"); setcolor(l~draw); outtextxy(400,470,"HP-filter: 10 ns"); } if (new==2) { <BR> <BR> dsp21k~dl~int(board, dsp21k~get~addr(board, "~do~filter"), 2);<BR> <BR> <BR> setcolor(l~eras); outtextxy(400,470,"HP-filter: 10 ns"); setcolor(l draw); outtextxy(400,470,"HP-filter: 15 ns"); if (new-=3) <BR> <BR> <BR> <BR> <BR> dsp21k~dl~int(board, dsp21k~get~addr(board, "~do~filter"), 3);<BR> <BR> setcolor(l~eras); outtextxy(400,470,"HP-filter: 15 ns"); setcolor(l draw); outtextxy(400,470,"HP-filter: 20 ns"); } if (new<1) { <BR> <BR> dsp21k~dl~int(board, dsp21k~get~addr(board, " do~filter"), 0);<BR> <BR> setcolor(l eras); outtextxy(400,470,"HP-filter: 20 ns"); setcolor(l~draw); outtextxy(400,470,"HP-filter: off"); void <BR> <BR> change~subtract(int new, DSP21K *board)<BR> { if (new==1) { dsp21k~dl~int(board, dsp21k~get~addr(board, "~subtract"), 1); setcolor(l~eras); outtextxy(200,470,"subtraction: off"); setcolor(l~draw); outtextxy(200,470,"subtraction: on"); } else { dsp21k~dl~int(board, dsp21k~get~addr(board, "~subtract"), 0); setcolor(l~eras); outtextxy(200,470,"subtraction: on"); setcolor(l~draw); outtextxy(200,470,"subtraction: off"); } } void change~normal(int new, DSP21K *board) { if (new==1) { dsp21k~dl~int(board, dsp21k~get~addr(board, "~norm"), 1); setcolor(l~eras); outtextxy(1,470,"normalization: off"); setcolor(l~draw); outtextxy(1,470,"normalization: on"); } else { dsp21k~dl~int(board, dsp21k~get~addr(board, "~norm"), 0); setcolor(l~eras); outtextxy(1,470,"normalization: on"); setcolor(l~draw); outtextxy(1,470,"normalization: off"); } } void change~method(int new, DSP21K *board) { if (new==1) { dsp21k~dl~int(board, dsp21k~get~addr(board, "~do~shank"), 0); setcolor(l~eras); outtextxy(1,455,"Method: Shank"); setcolor(l~draw); outtextxy(1,455,"Method: Pronyl"); } else { dsp21k~dl~int(board, dsp21k~get~addr(board, "~do~shank"), 1); setcolor(l~eras); outtextxy(1,455,"Method: Prony"); setcolor(l~draw); outtextxy(1,455,"Method: Shank"); } } void change~smoothe(int new, DSP21K *board) { if (new==1) { dsp21k~dl~int(board, dsp21k~get~addr(board, "~do~smoothe"), 1); setcolor(l~eras); outtextxy(200,455,"Smoothing: off"); setcolor(l~draw); outtextxy(200,455,"Smoothing: on"); } else { dsp21k~dl~int(board, dsp21k~get~addr(board, "~do~smoothe"), 0); setcolor(l eras); outtextxy(200,455,"Smoothing: on"); setcolor(l draw); outtextxy(200,455,"Smoothing: off"); } } void erase cursor(int x 1, int y~u, int cursor, float xpos) setlinestyle(0,0,1): /' solid '/ setcolor(1~eras); /' black '/ settextjustify(2,2); textxy~float(380,225,xpos); moveto(x~1+cursor,y~u+200); lineto(x~1+cursor,y~u); void erase~scale(int x~l, int y~u, float y min, float y max, float gridy) float y; y=y~max-y~min; if (y==0.0) y=l.O; /' will overflow if y=O*/ setlinestyle(0,0,1); /' solid '/ setcolor(1~eras); /' black '/ settextjustify(2,2); textxy~float(x 1-5, y u, y max); settextjustify(2,0); textxy~float(x~1-5, y~u+200, y~min); draw~grid(x~l,x~1+508,y~u,y~u+200,6,y/gridy); /* total routine for 21S1, rotation of antenna.

* one waitstate, count on adcrx, no tx interrupts. unsigned data. synth setup.

* Written by Peter Hazell, last modified 310398 by PH */ /' mod from rotll: 5 antennas, 20 measurements in a rotation '/ .module/RAM/ABS=0 rot5; /*================== ASSEMBLE TIME CONSTANTS ========================== */ .const wait read - .const IDMA= 0x3fe0; .const BDMA~BIAD= 0x3fe1; .const BDMA~BEAD= 0x3fe2; .const BDMA~BDMA~Ctr1= 0x3fe3; .const BDMA~BWCOUNT= 0x3fe4; .const PFDATA= 0x3fe5; .const PFTYPE= Ox3fe6; .const SPORT1~Autobuf= 0x3fef; .const SPORT1~RFSDIV= 0x3ff0; .const SPORT1~SCLKDIV= 0x3ff1; .const SPORT1 Control Reg= 0x3ff2; .const SPORT0~Autobuf= 0x3ff3; .const SPORT0~RFSDIV= 0x3ff4; .const SPORT0~SCLKDIV= 0x3ff5; .const SPORT0~Control~Reg= 0x3ff6; .const SPORT0~TX~Channels0= 0x3ff7; .const SPORT0~TX~Channels1= 0x3ff8; .const SPORT0~RX~Channels0= 0x3ff9; .const SPORT0~RX~Channels1= 0x3ffa; .const TSCALE= Ox3ffb; .const TCOUNT= 0x3ffc; .const TPERIOD= 0x3ffd; .const DM~Wait~Reg= 0x3ffe; .const System~Control~Reg= 0x3fff; .const MEAS=0xce; /* IO address of measured signal, m1:0xce, m2:0xae */ .const REF=0x6e; /* IO address of ref-signal */ .const DATA19=0xdb; /* IO address of 19 bit data, clock, and strobe */ .const SYNTH=0xd7; /* IO address of synthesis switch */ .const ANT=0x7b; /* IO address of antenna switch */ .const ATT~IN=0x7d; .const ATT~OUT=0x77; .const GET~ANT=0x0020; /* unmask SPORTO Rx */ .const WAIT~SHARC=0x0080; /* unmask IRQLO */ .const READ-0x0200; /' unmask IRQ2 -/ /*=============== DATA BUFFER DECLARATIONS =============================*/ .var/pm/ram/circ Dcos[120]; /* declare cosine buffer */ .var/pm/ram/circ Dsin[120]; /* declare sine buffer */ .var/pm/ram/circ antenna[5]; /* array of antenna positions */ .var/pm/ram/circ words[240]; /* 19 bit words for low freqs, MSW and LSW */ /' and for high freqs, MSW and LSW */ .var/dm/ram/circ rx~buf~low[80]; /* Rx buffer for low oscillator */ .var/dm/ram/circ rx~buf~high[80]; /* Rx buffer for high oscillator */ .var/dm/ram/circ int~result[3]; /* results for interpolation */ .var/dm/ram control; /* control word, overflow status */ .var/dm/ram rx~done; /* set to one when 40 words have been read */ .var/dm/ram word~init~hilo[2]; .var/dm/ram word~init~txrx[2]; .var/dm/ram word~init~tx[2]; .var/dm/ram word~init~rx[2]; .var/dm/ram ku; .var/dm/ram got new ant: .var/dm/ram dummy; /*================ DATA BUFFER INITIALIZATIONS =========================== */ .init Dcos: <dcos90.txt>,<dcos110.txt>,<dcos100.txt> .init Dsin <dsin90.txt>,<dsin110.txt>,<dsin100.txt> .init words: <words.txt> .init antenna; 0x000100, 0x000200, 0x000300, 0x000400, 0x000500; .init control: 0x1234; .init word init hilo: 0x1006, 0x6000; .init word~init~txrx: 0x1064, 0x2000; .init word~init~tx: 0x3a86, 0x0000; .init word~init~rx: 0x3a86, 0x4000; .init ku: 20; /*================== INTERRUPT VECTOR TABLE ==============================*/ /* Each interrupt vector has 4 PM memory locations. When an interrupt occurs the * DSP will jump to the location of the interrupt vector providing the interrupt * is unmasked. */ jump start; /* address = 0x00: reset interrupt vector */ rti; rti; rti; jump adcrx; /* address = OxO4: IRQ2 interrupt vector '/ rti; rti; rti; rti; rti; rti; rti; /* address = 0x08: IRQL1 interrupt vector '/ jump letsgo; /* address = 0x0c: IRQLO interrupt vector */ rti; rti; rti; rti; rti; rti; rti; /* address = 0x10: SPORTO tx interrupt vector '/ jump sp0~rx; /* address = 0x14: SPORT0 rx interrupt vector */ rti; rti; rti; rti; rti; rti; rti; /* address = 0x18: IRQE interrupt vector. Interrupt vector used by the interrupt switch on the board */ rti; rti; rti; rti; /* address = 0x1c: BDMA interrupt vector */ rti; rti; rti; rti; /* address = 0x20: SPORT1 tx or IRQ1 interrupt vect.

*/ rti; rti; rti; rti; /* address = 0x24: SPORT1 rx or IROO interrupt vect, */ rti; rti; rti; rti; /* address = 0x28: timer interrupt Vector '/ rti; rti; rti; rti; /* address = Ox2c: power down interrupt vector '/ /*---------------- Data Address Generator Initialization ----------------*/ start: imask=0; /*DM*/ i0 = ^rx~buf~low; /* set i0 = start address of rx buf*/ l0 = %rx~buf~low; /* set l0 = length of rx~buf */ i1 = ^word~init~hilo; 11 - 0; i2 - ^rx buf low; /* set i2 = start adddress of rx buf */ 12 = %rx~buf~low; /* set 12 = length of rx~buf */ i3 - ^int result; 13 - Zint result; mO - O; m1 = 1; /* modify registers for dm */ m2 = 2; /*PM*/ i4 = ^Dcos; /* set i4 = start address of Dcos */ l4 = %Dcos; /* set l4 = length of Dcos */ i5 = ^Dsin; /* set i5 = start address of Dsin */ l5 = %Dsin; /* set l5 = length of Dsin */ i6 = ^words; /* set i6 = address of words */ l6 = %words; /* set l6 = length of words */ i7 = ^antenna; /* set i7 = address of antenna */ l7 = %antenna; /* set l7 = length of antenna */ m4 = 0; /* modify registers for pm */ m5 = 1; /*-------------------------- SERIAL PORT #0 STUFF ---------------------------------------*/ axO = 0x7b03; /' set PFO, PF1 to output '/ dm(PFTYPE)=ax0; /* PF0, PF1 for codec disable */ ax0=0x0002; dm(PFDATA)=ax0; /* disable CODEC, enable normal SPORT0 */ ax0 =0x0006; /* SCLK = CLKOUT / (2 (SCLKDIV + 1) */ dm (SPORTO~SCLKDIV) " axO; /* using internal serial clock ( SCLKXinput ) '/ axO a Ox6aOf; /* 0110 1010 0000 1111 '/ dm (SPORTO~Control~Reg) = axO; /' SLEN- 16 bits, right justify, zero-fill unused MSBs, * INVRFS=0, INVTFS=0, IRFS=0, ITFS=1, ISCLK=1, MCE=0 */ /*------------------ S Y S T E M A N D M E M O R Y S T U F F ------------------------*/ ifc - Oxff; /' clear pending interrupt, all */ nop; mstat - 0x40; /' enable go mode '/ axO - OxOOOl; dm (DM~Wait~Reg) = axO; /' one wait state for IO */ axO = OxlOOO; /' PWAIT = O, enable SPORTO '/ dm (System~Control~Reg) = axO; icntl=b400100; /' disable nesting, IRQ2 edge sensitive '/ 1mask=0; se=0x01; /* shift rec = +1 */ myl-OxcOOO; /' -0.5 - far calculation of mean '/ ax0=0; /* send out all zeros */ IO(DATA19)=ax0; il-=word inlt~hilo; ar=32; call il9bit; ar=setbit 2 of axO; call wait2; IO(DATA19)=ar; ar-O; call wait2; IO(DATA19)=ar; i1=^word~init~hilo; ar=16; call il9bit; ar-setbit 2 of axO; call wait2; IO(DATA19)=ar; ar=0; call wait2; IO(DATA19)=ar; i1=^word~init~txrx; ar=8; call il9bit; ar-setbit 2 of axO: call wait2; IO(DATA19)=ar; ar-O; call wait2; IO(DATA19)=ar; i1=^word~init~txrx; ar=64; call il9bit; ar-setbit 2 of axO; call wait2; IO(DATA19)=ar; ar-O; call wait2; IO(DATA19)=ar; i1=^word~init~tx; ar=8; call il9bit; ar=setbit ; of axO; call wait2; IO(DATA19)=ar; ar-O; call wait2; IO(nATAl9)-ar; i1=^word~init~rx; ar=64; call il9bit; ar-setbit 2 of axO; call wait2; IO(DATAl9)-ar; ar-O; call wait2; IO(DATA19)=ar; ax0=700; call waitmicro; /*----------------------- MA I N PRO G R A A 'A DO it all UNTIL forever; ax1=0x1234; dm(control)=ax1; /+ reset control word '/ imask=WAIT~SHARC; idle; /* wait for IRQLO interrupt */ imask=GET ANT; ar-32; CALL sl9bit; ar=setbit 2 of axO; call wait2; IO(DATA19)=ar; ar-O; call wait2; IO(DATA19)=ar; ax0=1; IO(SYNTH)=ax0; /* switch to LO */ cntr=1513; DO initl UNTIL ce; /* wait approx 46 microsecs '/ initl: nop; ar-16; CALL sl9bit; ar=setbit 2 of axO; call wait2; IO(DATA19)=ar; ar-O; call wait2; IO(DATA19)=ar; cntr=183; DO init2 UNTIL ce; /* wait approx 6 microsecs '/ init2: nop; /* cntr=dm(ku);*/ cntr-20; Do loopku UNTIL ce; ax0=pm(i7,m5); IO(ANT)=ax0; /* ax0=1;*/ ax0=10; call waitmicro; ax0=0; dm(rx~done)=ax0; /' reset rx done '/ ifc-OxOOff; A' clear all pending interrupts '/ axl--39; /' set Rx count '/ 12=^rx~buf~low; imask=READ; /' unmask IRQ2 '/ readini: idle; /* wait lor next read '/ ayl=dm(rx~done); ar=pass ay1; if gt jump inidone; /* are we done reading ? '/ jump readini; inidone; imask=0; cntr-60; Do loop60 UNTIL ce; ax0=0; IO(SYNTH)=ax0; /* switch to HI */ ar-32; CALL sl9bit; ar-setbit 2 of axO; call wait2; IO(DATA19)=ar; ar=0; call wait2; IO(DATA19)=ar; /* perform detection on meas LO '/ i0=^rx~buf~low; /* point to meas, LO */ CALL calc~cos; CALL calc~cos; ax0=0; dm(rx~done)=ax0; /' reset r.. one */ ifc=0x00ff; /' clear all pending interrupts '/ ax1=-39; /* set Rx count */ 12 =^rx~buf~high; /* read into HI buffer */ imask=READ; /* unmask IRQ2 */ /' continue detection on meas LO '/ CALL calc~cos; CALL mean; /* calc and Tx meas~real~lo */ CALL calc~sin; CALL calc~sin; CALL calc~sin; /* continue detection*/ CALL mean; /* calc and Tx meas~imag~lo */ /' perform detection on ref LO */ i0=^rx~buf~low+1; /* point @@ ref. LO */ CALL calc~cos; CALL calc~cos; CALL calc~cos; CALL mean; /* calc and Tx ref~real~lo */ ~ ~ CALL calc~sin; CALL calc~sin; CALL calc~sin; CALL mean; /* calc and Tx ref~imag~lo */ readhigh: idle; /' wait fcr next read '/ ayl=cm(rx~done); ar=pass ay1; if gt jump highdone; /' are we cone reading ? '/ jump readhigh; highdone; imask=0; ax0=1; IO(SYNTH)=ax0; /* switch to LO */ ar=lE; CALL sl9bit; ar=setbit 2 of axO; call wait2; IO(DATA19)=ar; ar=0; call ait2; IO(DATA19)=ar; /' perform detection on meas HI '/ i0=^rx~buf~high; /* point to meas, HI */ CALL -alc cos; ~ CALL calc~cos; ax0=0; dm(rx~done)=ax0; /* reset rx done */ ifc=0x00ff; /* clear all pending interrupts */ ax1=-39; /* set Rx count */ i2=^rx~buf~low; imask=READ; /* unmask IRQ2 */ /' continue detection on meas HI */ CALL calc~cos; CALL mean; /' calc and Tx meas real hi '/ CALL calc sin; CALL calc sin; CALL calc sin; CALL mean; /* calc and Tx meas~imag~hi */ /' perform detection on ref HI '/ iO"^rx buf~high+1; /' point to ref, HI '/ CALL calc~cos; CALL calc~cos; CALL calc cos; /* perform detection */ CALL mean; /* calc and Tx ref real hi '/ CALL calc sin; CALL calc sin; CALL calc sin; CALL mean; /' calc and Tx ref imag hi '/ readlow: idle; /' wait for next read */ ayl=dm(rx~done); ar-pass ayl; if gt jump lowdone; /* are we done reading ? '/ jump readlow; lowdone; imask=0; loop60: nop; loopku: nop; cntr=100; do wait cx until ce; /* wait for last Tx to finish 'i wait~tx; nop; ax0=dm(control); tx0=ax0; /* send control word */ cntr=100; do wait tx2 until ce; /* wait for last Tx to finish */ wait tx2: nop; imask=0; /' Don't bother with last reads -/ i6=^words; it all: 12=^rx~buf~low; /' reset pointers to original position */ ax0=0x0001; dm(PFDATA)=ax0; /' disable CODEC, enable normal SPORTO '/ /* ------------------------ S U B R O U T I N E S --------------------------- */ /* subroutine sl9bit shifts out 19 bits to lower oscillator 'i s19bit: call wait22; IO(DATA19)=ar; si=pm(i6,m5); /* load with first 16 bits '/ sr-lshift si (LO); /* do first shift '/ si=pm(i6,m5); /* load with last 3 bits '/ cntr=16; DO sl6 out UNTIL ce; af-pass srl; /* goto 0 or 1 acc to next bit '/ if ne jump sone16; ar-clrbit 0 of ar: nop; IO(DATA19)=ar; /* output bit, clk=0 */ ar=setbit 1 of ar; call wait22; IO(DATA19)=ar; /* output same bit, clk=1 */ jump finsl6; sonel6: ar=setbit 0 of ar; nop; IO(DATA)=ar; /* output bit, clk=0 */ ar=setbit 1 of ar; call wait22; IO(DATAl9)-ar; /* output same bit, clk=1 '/ finsl6: sr-lshift sr0 (LO); s16~out: ar-clrbit 1 of ar; /* shift to next bit '/ sr-lshift si (LO); /' do first shift on last 3 '/ cntr=3; Do s3 out UNTIL ce; af-pass srl; /' goto 0 or 1 ace to next bit /* if ne jump sone3; ar=clrbit O of ar; nop; IO(DATA19)=ar; /' output bit, clk-O '/ ar-setbit 1 of ar; call wait22; IO(DATA19)=ar; /* output same bit, clk=1 */ jump fins3; sone3: ar-setbit 0 of ar; nop; IO(DATA19)=ar; /* output bit, clk=0 */ ar-setbit 1 of at; call wait22; IO(DATA19)=ar; /* output same bit, clk=1 */ fins3: sr-lshift srO (LO); s3 out: ar=clrbit 1 of ar; /' shift to next bit '/ nop; <BR> <BR> IO(DATA19)=ar; <BR> <BR> <BR> axOsar; rts; /* subroutine 119bit shifts out 19 bits to higher oscillator */ il9bit: call wait22; IO(DATA19)=ar; si=dm(i1,m1); /' load wit. first 16 bits */ sr=1shift si (LO); /* do first shift */ si=dm(il, ml); /* load with last 3 bits */ cntr-16; Do ilG out UNTIL ce; af-pass srl; /* gc goti @ or 1 acc co next bit '/ if ne jump ionel6; ar=clrbit 0 of ar; nop; IO(DATA19)=ar; /* output bit, clk=0 */ ar-setbit 1 of ar; call wait22; IO(DATA19)=ar; /* output same bit, clk=1 */ jump finil6; ionel6: ar-setbit 0 of ar; nop; IO(DATA19)=ar; /* output bit, clk=0 */ ar-setbit 1 of ar; call wait22; IO(DATA19)=ar; /* output same bit, clk=1 */ finil6: sr-lshift srO (LO); i16~out: ar-clrbit 1 of ar; /* shift to next bit '/ sr-lshift si (LO); /' do first shift on last 3 */ cntr-3; Do i3~out UNTIL ce; afspass srl; /* goto 0 or 1 acc to next bit '/ if ne jump ione3; ar-clrbit 0 of ar; nop; IO(DATA19)=ar; /* output bit, clk=0 */ ar-setbit 1 of ar; call wait22: IO(DATA19)=ar; /* output same bit, clk=1 */ jump fini3; ione3: ar=setbit 0 of ar; nop; IO(DATA19)=ar; /* output bit, clk=0 */ ar-setbit 1 of ar; call wait22; IO(DATA19)=ar; /* output same bit, clk=1 */ fini3: sr-lshift srO (LO); i3 out: ar-clrbit 1 of ar; /* shift to next bit '/ nop; IO(DATA19)=ar; ax0=ar; rts; /' subroutine calc. Detection on 40 elements of rx buf xxxx '/ calc~cos:CNTR=39; /+ loop counter */ mr=0; /' initialize mult/acc '/ mx0=dm(i0,m2), my0=pm(i4,m5); /* get 1st multiply-pair */ Do c cos UNTIL CE; ~ c~cos mr=mr+mx0*my0 (US), mx0=dm(i0,m2), my0=pm(i4,m5); mr=mr+mx0*my0 (US); srwlshift mrl by -2 (LO); sr-sr or lshift mr2 by 14 (LO); dm(i3,ml)=sr0; /* fill result */ af-tstbit 2 of mr2; if ne jump cos one; af=tstbit 1 of mr2; if ne jump o~flow; rts; cos~one:af=tstbit 1 of mr2; if eq jump o~flow; rts; calc sin:CNTR=39; mr-O; mx0=dm(i0,m2), my0=pm(i5,m5); /* initialize mult/acc, point to dsin */ Do c sin UNTIL CE; ~ c~sin: mr=mr+mx0*my0 (US), mx0=dm(i0,m2), my0=pm(i5,m5); mr=mr+mx0*my0 (US); srwlshift mrl by -2 (LO); sr-sr or lshift mr2 by 14 (LO); dm(i3,ml)=sr0; /' fill result */ af-tstbit 2 of mr2; if ne jump sin one; af-tstbit 1 of mr2; if ne jump o~flow; rts; sin~one:af=tstbit 1 of mr2; if eq jump o~flow; rts; mean: mr=0; mx0=dm(i3,m1); mr=mx0*my1 (SS), mx0=dm(i3,m1); /* -0.5*det3 */ mr=mx=0*my1 (SS), mx0=dm(i3,m1); /* -0.5*det3-0.5*det5 */ mr=mr-mx0*my1 (SS); /* -0.5(det3+det5) + 0.5*det4 */ mr=mr-mx0*my1 (SS); /* -0.5(det3+det5) + det4 */ tx0=mr1; rts; o~flow: ax0=0x4321; dm(control)=axo; rts; wait2: nop; rts; wait22: nop; nop; nap; nop; nop; nop; nop; rts; waitmicro: cntr=ax0; do waitm until ce; cntr-33; do waitmm until ce; waitmm: nop; waitm: nop; its; /*--------- I N T E R R U P T S E R V I C E R O U T I N E S --------------*/ letsgo: rti; adcrx: ar-IO(MEAS); /' read meas '/ ar-clrbit 14 of ar; /' bit 14 is D.C. '/ dm(i2,ml)-ar; /' store in rx buf */ ar-tstbit 15 of ar; /' test for ADC out of range '/ if gt jump adc~of; /* if ADC is out of range modify control word '/ ar-IO(REF); /* read ref */ ar=clrbit 14 of ar; /' bit 14 is D.C. '/ dm(i2,m1)=ar; /* store in rx~buf */ ar-tstbit 15 of ar; /* test for ADC out of range */ if gt jump adc of; /* if ADC is out of range modify control word '/ ar=ax1+1; /' increase Rx counter t/ if gt jump rxdone; /' 40 measurements completed '/ axl-ar; rti; adc of: ayl=0x9876; /' ADC was out of range -/ dm(control)=ay1; ar=ax1+1; /* increase Rx counter */ if gt jump rxdone; /* 40 measurements completed '/ axl-ar; rti; rxdone: ayl-l; dm(rx done)-ayl; /' notify main program that Rx is complete '/ rti; sp0~rx: ax1=rx0; /* get word */ dm(ku)-axl; rti; .endmod; Def~4.h # define pi 3.14159265358979311599793468544185161590576171875 # define DF 6400000 # define pi001 pi*DF*2*le-9 # define NO~ANTENNAS 5 # define NO~ROT 4 # define ma 12 /* model order of denominator */ # define mb 12 /* model order of numerator */ # define np 128 /* number of points in frequency response */ # define tl 1.0 /* time start in ns */ &num define t2 45.0 /* time stop in ns */ # define ku 20 # define Ns 120 /* number of frequencies per antenna position */ # define RAWDATA 4*Ns*ku+1 /* complex siganl and reference, one control word */ # define p2 NO~ROT # define p8 ku-NO~ROT #define ns~to~m 1.0 # define Nr 120 /* Nr = nf2-nf1+1 */ # define STARTPOINT 0 # define SURMEANS~RE "c:\\dsp21k\\bcclib\\sub~mean.re" # define SUBMEANS~IM "c:\\dsp21k\\bcclib\\sub~mean im" # define MEAS~DELAY 0

Table 1. Receiver circuit.

Description: The receiver circuit is divided into 5 separate printed circuit boards: * Board a: LO frequency mixing.

* Board b: LO signal distribution.

* Board c: Receiver reference channel down conversion.

* Board d Receiver test channel down conversion. note: 2 pcs, one for each test channel The input signals are (See receiver block diagram in figure 23): * B1, B2: Receiver inputs (test channels).

* C: Receiver reference input.

* E: 1600-2500 MHz signal from synthesizer.

* G: 1510.1 MHz signal from synthesizer.

The output signals are: * H: 100 kHz IF-signal, reference channel.

* I1, I2: 100 kHz IF-signal, test channels.

The 5 boards are mounted in a metal box with 5 separate rooms. High frequency signals are routed between boards by use of coaxial cables with SMA connectors. Power supplies and low-frequency control signals are decoupled at the walls between the rooms. Power supplies are stabilized by use of ordinary voltage stabilizers.

Circuit diagrams.

Circuit diagrams for the 4 different boards are shown in figures 24, 25, 26 and 27 respectively.

Part list, board a: RA5 ERA-2 (Mini Circuits) RM4 RMS-25MH (Mini Circuits) RF7 Microstrip band-stop filter, 1510 MHz with 2 (edge coupled) resonators (Board material: Rogers R04003).

RF8 1000 MHz "low-pass" filter, implemented as a 5-resonator microstrip band-stop filter (Board material: Rogers RO4003).

La1 33 nH La2 Permax 51 Ca1 = Ca2 = Ca3 33 pF Ca4 1 nF Ra1 110 ohm Ra2 75 ohm 330 ohm Ra4 16 ohm Ra5 330 ohm Part list, board b: RA6 = RA7 = RA8 ERA-1 (Mini Circuits) RA9 = RA10 INA-10386 (Hewlett-Packard) RD1 LRPS-2-4 (Mini Circuits) Lb1 = Lb3 = Lb5 = Lb7 = Lb8 470 nH Lb2 = Lb4 = Lb6 = Lb9 = Lb10 Permax 51 Cb1 = Cb2 Cb3 Cb4 Cb5 = Cb6 = Cb7 = Cb8 = Cb9 = Cb10 150 pF Cb11 = Cb13 = Cb15 = Cb17 = Cb18 150 pF Cb12 = Cb14 = Cb16 = Cb19 = Cb20 1 nF Rb1 = Rb8 100 ohm Rb2 = Rb9 33 ohm Rb6 = Rb10 = Rb11 130 ohm Rb7 = Rb12 = Rb13 82 ohm Rb3 = Rb5 150 ohm

Rb4 36 ohm Rb14 = Rb15 = Rb16 51 ohm Part list, board c: RM3 TUF-2LHSM (Mini Circuits) RF5 1000 MHz "low-pass" filter, implemented as a 5-resonator microstrip band-stop filter (Board material: Rogers RO4003).

Lc1 22 nH Lc2 330 nH Cc1 8.2 pF Cc2 = Cc3 470 pF Rc1 = Rc2 47 ohm Part list, board d (each of 2 boards): RA1 MGA-82563 (Hewlett-Packard) RA3 INA- 10386 (Hewlett-Packard) RMI TUF-2LHSM (Mini Circuits) RS1 = RS3 SW-339 (M/A-COM) RF1 1000 MHz "low-pass" filter, implemented as a 5-resonator microstrip band-stop filter (Board material: Rogers RO4003).

Ld1 = Ld3 470 nH L = Ld4 Permax 51 Ld5 22 nH Ld6 330 nH Cd1 = Cd2 = Cd3 = Cd4 = Cd5 = Cd7 150 pF Cd6 = Cd8 1 nF Cd9 = Cd10 = Cd11 = Cd12 = Cd13 = Cd14 = Cd15 = Cd16 150 pF Cd17 8.2 pF Cd18 = Cd19 470 pF Rd1 = Rd2 = Rd5 = Rd6 100 ohm Rd3 100 ohm Rd4 33 ohm Rd7 = Rd8 47 ohm

Table 2. Transmitter The transmitter circuit diagram is in figure 28.

Input signals: F (see RTVA block diagram): 1500 MHz signal from Synthesizer/reference D (see RTVA block diagram): 1600 -2500 MHz from Synthesizer Output signals: A (see RTVA block diagram): Transmitter output to antenna swich C /REF (see RTVA block diagram): Ateenuated output to REF channel in receiver unit.

Parts list: U4A: Microstrip band-stop filter, 1510 MHz with 2 (edge coupled) resonators (Board material: Rogers R04003).

U9A 1000 MHz "low-pass" filter, implemented as a 5-resonator microstrip band-stop filter (Board material: Rogers R04003).

U5A ERA-2 (Mini Circuits) U8A, U1 1A ERA-5 (Mini Circuits) U3 RMS-25H mixer (Mini Circuits) U20 Step Attenuator Digital controlled (MA-COM AT230) C2,C3,C4,C6,C8,C9,C 10, C11,C13,C14,C15,C1 6,C17,C18: 150 pF SMD capacitor 603 footprint C22 not mounted C12: 180 pF SMD capacitor 805 footprint

R1 91 ohm R2 27 ohm R3 100 ohm R4 27 ohm R5 36 ohm R6 560 ohm R8 150 ohm R9 51 ohm R10 56 ohm R11 51 ohm R12 56 ohm R13 2.2 ohm R14 R15 680 ohm R16 330 ohm R17 56 ohm R18,R19 not mounted R23-R28 680 ohm R81 8.2 ohm R61 8.2 ohm R20 4.7 Kohm x 8 resistor network SMD L2, L6,L5 470 nF inductor SMD 805 footprint LCF1, LCF2, LCF3: L/C PI-section trough coupler (TUSONIX 4101- 008) Table 3. Synthesizer Parts list on the following two pages Circuit diagram in figures 29 to 34.

Table 4. Detector/DSP-1 The detector consists of 3 boards.

One ADDS-21XX-EZLITE Evaluation Board from Analog Devices Inc. This board incorporates the fixed-point DSP Processor ADSP2 181 as well as clock generator and other support circuits.

For description and circuit diagrams refer to the published material from Analog Devices Inc. regarding the ADDS-21XX-EZLITE Evaluation Board.

Two boards comprising of Analog-to-Digital converters and digital logic input/output lines for controlling the synthesizer and the antenna switches plus some auxiliary circuits.

The digital control lines for the Antenna Switch Decoder/Level Shifter and the synthesizer are all standard TTL level.

Circuit diagram for these two boards are the same and shown in figures 35a), 35b) and 36.

NOTE: The lines designated AQO ...AQ13, which are the output signals from the Analog to Digital converter should be reversed in order in figures 35a) and 35b).

List of components on the following pages The analog input signals are the IF-outputs from the receiver unit. Refer to RTVA block diagram in figure 22.

The IF signals of 100 KHz are the REF channel and one test channel.

Software listings for the ADSP2 181 DSP processor is included.

The processor performs a quadrature detection, and the resulting stream of digital data is fed to the ADSP-2 1 06x EZ-LAB Evaluation Board via a serial interface.

Table 5. Antenna switch.

Circuit diagram in figure 37.

2 pcs of this board are used, one for the transmitting antennas and one for the receiving.

The board is constructed using a microstrip technique on a board material material: Rogers R04003.

Control inputs: swa0/swb0... swa6/swb6 are +/- 5V signals generated by the Antenna Switch Controller/Level Shifter.

RF signal ports ANT-1 .. ANT-6 are connected to antenna elements RF signal port Rx or TX is connected to the transmitter output or the receiver input.

RF connectors are all SMA female chassis mounted.

Parts list: R1, R2, R3, R4, R11, R12 51 W R5, R6, R7, R8, R9, R10 10 KW C1,C2,C3 lOnF LCFEED 4101-008 (Tusonix). Pi-section, capacitance 5,5 nF SW1, SW2, SW3, SW4, SW5, SW6, SW7, SW8, SW9, SW10, SW11, SW12 SW-338 (Macom)

Table 6. Antenna Switch Decoder/Level shifter Circuit Diagram: figure 38 2 pcs of this unit is used.

Input signals:Terminals no 1,2,3 and 4 on connector JP3, only 1,2 an3 are used. These TTL level control signals are generated by the Detector/DSP-l unit.

Output signals : Only the +/- 5V signals SWAO/SWBO... SWA6/SWB6 are used. These lines are connected to the Antenna Switch units.

This board converts standard TTL logic signals to +/- 5V signals.

Encoding of the signals is performed by the logic pattern stored in the EPROM U5. The pattern is trivial in the sense that for the fist six of the 16 possible logic state combinations of the inputs AXO..AX3, the SWAO/SWBO ... SWA6/SWB6 are put at a voltage level, that in effect selects one out of the six RF ports on the antenna switch controlled by this unit.

The logic pattern stored in the EPROM U5 is thus deductable from the included diagrams.

Table 7. Serial Interface The serial interface is constructed in accordance with the guidelines given in the ADSP- 2100 family Users Manual under Hardware Examples, published by Analog Devices Inc.

Standard differential RS-485 signaling is used.

Circuit diagrams in figures 42, 43 and 44 Parts lists: EZLITE, (Fig. 44): R1, R2, R3 1 kohm C1, C2, C5 100 nF C3, C4 100 mF D1 1N4001 U1 DS96174 U2 DS96175 U3 LM78L05

Table 8. Dipole Antenna Element Circuit diagram in figure 39 8 or 10 pcs of this unit is used, corresponding to 4 or 5 antenna pairs.

Printed circuit layout is shown in figures 40 and 41.

Parts list: R1, R2, R3, R4 22 ohm R5, R6, R7, R8, R9, R10 33 ohm R11, R12, R13, R14, R15,R16,R17,R18 47 ohm R19, R20, R21, R22, R23, R24 220 ohm TR1 ETC4- 1 T-7 (Macom) P1 SMA jack for pcb mounting.

Table 9. View of some possible antenna configurations.

Basis combination corresponding 8-set type comment S-param.

Fig: 3a 3b 1 co-linear S21 Fig: 3c 3d 1 parallel S21 Fig: 4a 4b 2 symmetrical S21 Fig: 4c 4d 2 symmetrical S21 Fig: 5a 5b 1 coincident S1 1

Table 10. Examples of number of rotations of the antenna system. ## is angle of rotation between each measurement, N is number of measurements.

N= 8 16 32 64 128 ## = 22,5° l l/2 1 2 4 8 ## = 450 I 1 2 4 8 16

Table 11. Examples of k-indexes corresPonding to 2 periods per rotation. k-values stated in pairs (k2,k-2), ## is the angle of rotation between each measurement, N is number of measurements.

N= 16 32 64 128 ## = 22,5° | (2,14) (4,28) (8,56) (16,112) (k2,k-2) A0 = 450 I (4,129 (8,249 (16,48) (32,96) (k2,k 2)

Table 12. view of objects seen in the examples 1 to 5. Designation Object Depth ## No rot. N Eks1A..E 960820a 160 mm plastics pipe with water135 cm+ 22,5 gr. 4 64 Eks2A..E 960823a Electricity-high voltage cable 75 cm? 22,5 gr. 1 16 Eks3A..F 960916b Telephone cable 50 cm? 22,5 gr. 4 64 Eks4A..E 960912a Electricity-high voltage cable 90 an? 2:2,5 gr. 2 32 Eks5A..E 960813a . Electricity-low voltage cable 75 cm + 2:2,5 gr. 4 64 Note: + depth measured when digged up up Note ? depth estimated