PERFECT AND ALMOST PERFECT PULSE COMPRESSION CODES FOR RANGE SPREAD RADAR TARGETS

. It is well known that a matched ﬁlter gives the maximum possible output signal-to-noise ratio ( SNR ) when the input is a scattering signal from a point like radar target in the presence of white noise. However, a matched ﬁlter produces unwanted sidelobes that can mask vital information. Several researchers have presented various methods of dealing with this problem. They have employed diﬀerent kinds of less optimal ﬁlters in terms of the output SNR from a point-like target than that of the matched ﬁlter. In this paper we present a method of designing codes, called perfect and almost perfect pulse compression codes, that do not create unwanted sidelobes when they are convolved with the corresponding matched ﬁlter. We present a method of deriving these types of codes from any binary phase radar codes that do not contain zeros in the frequency domain. Also, we introduce a heuristic algorithm that can be used to design almost perfect codes, which are more suitable for practical implementation in a radar system. The method is demonstrated by deriving some perfect and almost perfect pulse compression codes from some binary codes. A rigorous method of comparing the performance of almost perfect codes (truncated) with that of perfect codes is presented.


(Communicated by Margaret Cheney)
Abstract. It is well known that a matched filter gives the maximum possible output signal-to-noise ratio (SNR) when the input is a scattering signal from a point like radar target in the presence of white noise. However, a matched filter produces unwanted sidelobes that can mask vital information. Several researchers have presented various methods of dealing with this problem. They have employed different kinds of less optimal filters in terms of the output SNR from a point-like target than that of the matched filter. In this paper we present a method of designing codes, called perfect and almost perfect pulse compression codes, that do not create unwanted sidelobes when they are convolved with the corresponding matched filter. We present a method of deriving these types of codes from any binary phase radar codes that do not contain zeros in the frequency domain. Also, we introduce a heuristic algorithm that can be used to design almost perfect codes, which are more suitable for practical implementation in a radar system. The method is demonstrated by deriving some perfect and almost perfect pulse compression codes from some binary codes. A rigorous method of comparing the performance of almost perfect codes (truncated) with that of perfect codes is presented.
1. Introduction. A radar system has emerged as one of the most powerful remote sensing instruments with numerous applications. Typical applications include air traffic control, weather monitoring, military surveillance, land mine detection, probing extraterrestrial objects and et cetera. The development of these diverse applications of a radar system has been accomplished in relatively a short span of time since the system was used mainly for the purpose of ranging and detecting very limited types of targets. The performance of a radar system has been continually enhanced by improving its hardware, the transmission waveform, the impulse response of the receiver filter and the associated data analysis methods. The advent of modern computer and development in digital circuit technology provide unprecedented opportunities to implement different performance optimization techniques. The performance of different radar transmission waveforms, receiving systems and the associated data analysis methods can be easily evaluated.
A radio transmission from a radar system can be continuous or pulsed. Our investigations focus on a radar system that works by transmitting a short pulse of radio wave at specific intervals of time. This kind of radar system very often operates by transmitting a modulated radio wave into a target of interest and receiving the scattered signal. A considerable amount of research effort has been devoted to a radar waveform optimization problem of such kind of a radar system following the widely cited work of [22]. The majority of these investigations have focused on optimizing the transmitter waveform in conjugation with the associated filter in the receiving system [15].
In a radar remote sensing one usually wants to observe a target located over a long distance from the transmitter and also at the same time to be able to differentiate closely located targets within the observational volume. Long distance observations demand very high average radar power, which cannot be increased indefinitely in practice. This means one needs to use a long radar waveform in order to increase the average power of the radar. However, a short pulse is required in order to obtain a very high measurement resolution and thereby enabling the radar system to discern closely placed targets. This is a well known contradicting requirement in a radar system and it has been solved by means of pulse compression techniques [9].
Barker codes [1] are among the most widely used radar transmission waveforms in a pulse compression radar system and normally a matched filter is used in the analysis to enhance the output SNR. However, a matched filter creates unwanted sidelobes. These sidelobes can mask small targets which are illuminated simultaneously with large scatterers. Methods of suppressing these unwanted sidelobes has been developed e.g. [8]; but this method has an associated degradation in the output SNR. One remedy for the signal degradation problem was to carry out an exhaustive search for binary phase code and filter pairs that yield minimum possible SNR losses and these optimal pairs have been found by the present authors [10]. A similar investigation has been conducted for quadriphase codes [3]. So far most of the investigations on optimizing the radar performance in the case of matched filtering seem to concentrate on designing different kinds of filters that can handle the limitations of a matched filter.
In this paper we present a method of designing optimal transmission radar waveforms that can be analyzed by means of a matched filter without creating unwanted sidelobes. In other words instead of looking for an appropriate mismatched filter, which we know from theory cannot yield the maximum possible output SNR attainable by a matched filter, we are searching for a radar transmission waveform with varying amplitude that can be decoded exactly by means of a matched filter. In practice such a waveform is derived from a given binary code by employing the discrete Fourier transform.
2. Radar waveform performance for the case of matched filtering. The performance of a radar system largely depends on the characteristics of the transmitted radar waveform. In general the characteristics of a radar waveform are usually quantified by means of the ambiguity function [12,16]. There are different ways of presenting the ambiguity function depending on the information sought from the radar and also the nature of the measurement scenario. For example, the theory of ambiguity functions, which is suitable for handling the analysis of an incoherent scatter radar measurement, has been formulated in [11] and the presentation is not receiver filter specific. Mathematical expressions for a more general atmospheric radar ambiguity function have been derived by [21]. The performance of a radar waveform in the case of matched filtering is usually quantified in terms of the matched-filter output as a function of the time delay (range) and frequency. The squared magnitude of this output is normally referred as the ambiguity function among the engineering community and we shall use this function in this study. The analysis of a radar waveform performance by means of the ambiguity function is often simplified by considering the carrier frequency and the true time delay to be zero. This means that for the case of high SNR, the output of the matched filter denoted here by χ(τ, f ) can be expressed as [17] (1) where env(t) denotes the radar transmission waveform, τ and f D indicate the time delay and frequency shift and the overhead bar is the complex conjugate. It is easy to see that (1) is basically the response of a point like radar target as a function of range and Doppler shift. In mathematical terms it is simply the correlation of the transmission code with the different frequency shifted version of itself. The relation takes the form of the well known convolution integral equation. The numerical approximation of the integral in (1) can be expressed by The calculation of the convolution sum in (2) can be carried out in practice using the discrete Fourier transform in order to shorten the calculation time. The corresponding ambiguity function is given by |χ(τ, f D )| 2 and its characteristics curve can show the pros and cons associated to a given radar waveform. One usually seeks for |χ(τ, f D )| 2 to have a single peak at the origin where τ and f D have zero values, which is hard to achieve in practice.
For example, FIGURE 1 displays the normalized ambiguity function (top panel), the corresponding contour view (middle panel) and the zero Doppler ambiguity function (bottom panel) of a 5-bit uncoded radar waveform. The well-known sinclike function curve along the zero time delay and the triangular curve along the zero Doppler can be seen clearly from the two-dimensional figure of the ambiguity function. The contour in the middle panel shows the spread in time delay (range ambiguity) and also a relatively narrow distribution in frequency of the ambiguity function of the simple pulse radar waveform. A one dimensional cut of the ambiguity function along the zero Doppler, which is displayed in bottom panel, shows how the different time delays are weighted and essentially there is contributions from all the time delays. This means that there is range ambiguity. It is possible to minimize the range ambiguity associated to a simple pulse radar waveform by shortening its length. However, a short pulse creates poor frequency measurement accuracy. Also, the average radar power will be small and thereby limiting the observation space. Modulated radar waveforms have been used to solve this problem and there are several types of modulation techniques including Barker coding.
The radar ambiguity function of the 5-bit Barker code is portrayed in FIGURE 2. The top panel shows the two-dimensional ambiguity function and the middle panel depicts the corresponding contour view. One can see that the ambiguity function has been narrowed along the direction of the time delay and in other words there is now less range ambiguity than the result obtained from the corresponding simple pulse radar waveform discussed earlier. This can be easily seen from the curve in the bottom panel, which is just a cut of the two-dimensional ambiguity function along the zero Doppler. Normally, one considers the main peak as the only output of the matched filter neglecting the sidelobes. However, in some cases the contributions of the sidelobes can be substantial and thus creating bias in the measurement. In the following section we present a method of designing codes that do not create sidelobes at the corresponding matched-filter output.     Numerical approximations of the Fourier transform are remarkably simple to carry out using the well known discrete fast Fourier transform (DFT) algorithm. The transformed data points then represent the values of the interval [0, 2π] divided into N f f t equidistant points ω p = 2nπ/N f f t . The DFT is defined by and the corresponding inverse DFT becomes The inverse Fourier integral divided by 2π is just replaced by the inverse DFT, which is the same as the forward DFT with negative exponent but divided by N f f t . In the following sections we present different types of radar target models and then methods of constructing different types of perfect and almost perfect pulse compression codes are introduced. 4. A radar target model. A scattered signal from a singly spread radar target is modeled by the Itō integral equation [19] (7) where the structure function x(r) of the measure µ(dr), E(µ(dr)µ(dr ′ )) = x(r)δ(r − r ′ ) is the scattering power of the target that is given as a function of range. The range variable r is considered as the travel time of the signal to the target point and back. ξ(t) and T represent the receiver thermal noise (here it is modeled as white noise) and its power, respectively. In order to simplify our presentation the effects of the radar system parameters and range dependence of the transmitted power are included in the variable x(r). The high frequency carrier signal is not included in (7) and it is not needed for our purpose.
4.1. Discrete radar signal model (general case). It is clear that only the full continuous model in (7) can describe the scattering process completely in an accurate manner. However, in most practical cases all signals need to be sampled and the transmission envelopes are described by a finite number of subpulses. Hence, a more practical model is required, which can be obtained in the following manner. Let us choose a basic time unit ∆t and define the transmission envelope as where Similarly, the discretized signal z n can be defined as samples of the convolution q * z at equidistant points In the simple case the discretization interval for the samples ∆t ′ is the same as the transmission subpulse (baud) length ∆t. However, in order to avoid information loss in the discretization process, it is usually better to have ∆t ′ < ∆t. If the sampling interval is an integer fraction of the baud length of the transmission envelope (∆t ′ = ∆ t /N f rac ), the sampling method is called fractional sampling [6]. Instead of the characteristic function of the sample intervals, some other forms can be used for the basic pulse q(t) and the receiver impulse response p(t) without affecting our conclusions.

4.2.
The simple discretized model. The simple discretized model is derived by setting ∆t ′ = ∆t. Let us define Then the measurement equation (7) reduces to the discrete form where ξ n is the normalized discrete white noise process. Here the values of µ n are considered as the scattering amplitude corresponding to different range gates r n = n∆t and are also treated as the unknowns variable in a radar measurement. In fact they are just Gaussian variables with zero mean and what one usually wants to know is their expectation values (i.e. x n = E|µ n | 2 ). We can simplify (11) further by ignoring the factor in front of the white noise error term to obtain Here we have assumed that the total power of the code is equal to that of a simple single pulse with unit power. This is in accordance with our goal of pulse compression and that is finding a method of spreading a unit power in time. This means that we require less peak power than the simple unit pulse with power 1.

Matched filter estimator.
We have discussed the basic principle of matched filtering using the radar ambiguity function in Section 2. Here we formulate a matched filter estimator in terms of the simple radar target model of equation (12). If we assume x n = E|ξ n | 2 = 0 at only one single range gate n, it is well known and also can easily be shown by simple inversion calculations that the matched filter ê n = e −n gives us the value µ n with the least possible variance caused by the thermal noise term as shown for example in [4]. The notation reflects the fact that flipping the filter coefficients is equivalent to a Fourier transform, followed by conjugation and again followed by the inverse Fourier transform. The matched filter estimator of the signal is thus given by where A e is the transmission envelope autocorrelation function. At range gate n this equation becomes Here the variance of the noise term is equal to 1. Because of its simplicity and long history the matched filter estimator is widely used despite the fact that the sidelobes ( i.e. the values A e (n) = 0, for n = 0) cause bias in the results for all but point targets.

5.2.
Adaptive filter estimator. In adaptive filtering techniques the combination of both bias and variance is minimized by considering the contributions of the unwanted sidelobes as additional noise [2]. The filter coefficients are then found by calculating the optimal filter coefficients for each range gate by taking this additional noise into account [2]. One particular problem with this method is that the variance x n = E|µ n | 2 is not known at the beginning. Thus, these kinds of analyses usually rely on iteration, the first iteration being usually just the matched filter and then using the results of the initial iteration to get some estimates for the variances x n to get optimal filter coefficients for the next iteration and so on. As a result this method seems to remain somewhat heuristic in nature.

Inverse filter estimator.
An inverse filter is based on a very simple application of the Fourier convolution theorem. We define the inverse filter ê −1 to be the inverse Fourier transform of the reciprocal of the Fourier transform of the transmission envelope denoted here by e n and i.e. dω.
It is then clear that the convolution of the inverse filter ê −1 and the original code e n is equal to the unit pulse and that is ( ê −1 * e) n = δ n,0 . By convolving the measurement equation in (12) with ê −1 , we obtain This means that the values of µ n can be directly read from the convolution outputs.
In this solution all values of µ n are independent of each other. However, there is dependence due to the non-white noise; but this is fixed and only dependent on the radar codes used and not on the target. An inverse filter estimator does not contain bias that affects both the matched and adaptive filter estimators [3]. There is one important drawback associated to the inverse filter estimator and that is the transformed noise ( ê −1 * ξ) and it's variance is generally larger than 1. We can state following theorem: Theorem 5.1. For the variance of the filtered noise with an inverse filter we have with equality if and only if |ê(ω)| = 1 ∀ω ∈ [0, 2π).
Proof. First we note that E|( ê −1 * ξ) n | 2 = 1 2π 2π 0 |ê −1 (ω)| 2 dω and then use the Cauchy-Schwartz inequality to see that The inequality follows by noting thatê −1 (ω) andê(ω) are reciprocals making the right side equal to 1 and that the second integral on the left side is also equal to 1. The "only if" part is a consequence of the "only if" part of the Cauchy-Schwartz inequality stating that equality exists only if the two functions (|ê −1 (ω)| and |ê(ω)|) are linearly dependent. Being reciprocals they can only be linearly dependent if they are both equal to 1 (almost) everywhere. The autocorrelation function of the transmission code e n is the inverse Fourier transform of |ê(ω)| 2 , which leads us to the corollary: There is no performance penalty in terms of increased noise when using inverse filters if and only if the autocorrelation of the code has no sidelobes.
Also, we have the following fact: Theorem 5.2. The autocorrelation function of a finitely long code (longer than one pulse) cannot have zero sidelobes.
Proof. Consider the lag corresponding to the separation of the first and last nonzero pulses in the code. Since the corresponding autocorrelation value is the simple product of these first and last pulses, it cannot be zero.
The inverse filter is also called mismatched filter and we have also adopted this term in our earlier publications [3]. However, the term inverse filter is more appropriate, because as a mathematical operation it is the inverse, not just something that is different from a matched filter. 6. Perfect and almost perfect pulse compression codes. Let us assume that we can find codes with desired properties |ê(ω)| ≡ 1 or, equivalently A e (n) = δ 0,n . Then the convolution of our measurement equation with the inverse filter would lead to an equivalent equation where data would be represented by the scattering values µ n directly, with normalized additive white noise and i.e.
This would be the ideal solution to our pulse compression problem. However, the convolved noise ξ ′ n is not sample-wise the same as the original white normalized noise. But it is just another white normalized noise and thus statistically equivalent to the original noise ξ n . In this manner we have been able to get rid of the convolution with the code in the measurement equation and the new equation is the same as the measurement equation of a single pulse experiment with unit power and normalized noise. In order to obtain this result we just need to convolve our measurements with the inverse filter, which in this case is also equal to the matched filter. This is because if |ê(ω)| ≡ 1 the reciprocal in the Fourier side is the same as complex conjugation, which in turn is the same as time-inverse of the filter coefficients.
The question is then whether such optimal codes can be found in practice. We have proved that they do not exist as finitely long. However, it is actually very simple to construct such (infinitely long) codes and also codes with close enough properties to perfectness that are finitely long.
6.1. Infinitely long perfect codes. Let us consider any known pulse compression code, for example a Barker code e n or some of the codes found by the present authors [10] that minimizes the noise associated to the inverse filtering technique. One needs to realize that most probably these kinds of codes (when normalized so that the total power equals one) are already close to becoming perfect codes. This means that we are likely to get |ê n (ω)| ≈ 1, whereê n (ω) is the Fourier transform of the code. We can then define (18) d n = 1 2π e inωê n (ω) |ê n (ω)| dω, in order to obtain a radar code e n with the absolute value of its Fourier transform equals to one and this is basically similar to the code we started with. This code is of course infinitely long, but the subpulses go to zero very rapidly: Theorem 6.1. Assumeê n (ω) = 0 for ω ∈ [0, 2π). The subpulses e n of the code defined above approach zero faster than any (negative) power of n as n → ±∞.
Proof. Let us study the polynomial P (c) = n e n c n along the unit circle of the complex plane c ∈ C. With c = e iw , it is actually the Fourier transformê n (ω) and being a finite polynomial it is infinitely differentiable and the same is true for the Fourier transform of d n because of our assumption. This proves the claim. One may be concerned with the possibility of having zero values for the Fourier transform of these codes. Let us assume that we pick the finite number of coefficients e n in a random manner. From the analysis in [7,13] it follows immediately that the expected number of zeros on the unit circle is zero but as the degree n of the polynomial P (c) approaches infinity then almost all of the zeros (of order n − (2/π) ln n) approaches the unit circle distributed uniformly in angle except at the real points ±1. The number of zeros concentrated to these points is of order (2/π) ln n. Thus, while the probability of having a zero on the unit circle is zero, this also shows that very good codes with all zeroes far away from the unit circle are very hard to find by chance. In practice it is straightforward to check the absence of zeroes by numerical calculations.
Infinitely long codes cannot be used in practice and hence one needs to truncate them. Truncating the codes is not a problem because of the theorem above. Since their amplitude goes to zero rapidly, any numerical accuracy used in the calculations or the analog-to-digital conversion of the signals is reached very fast. This means that the truncation error will be completely lost within these kinds of errors that exist in any practical system. In this manner the perfect codes are in practice as good as the finite codes. The authors feel that a more significant problem is the practical implementation of this kind of amplitude modulation on the outgoing pulses. Since this modulation is not necessary with most of the traditional methods, many existing radars are not capable of handling it. 6.1.1. Examples of (truncated) infinite perfect codes. We use the 11-bit and 13-bit Barker codes for illustration of the pulse compression methods. FIGURE 3 shows the performance of the 11-bit Barker code using matched and inverse filtering methods. One can see that the autocorrelation function of this code contains sidelobes and this means that matched filtering can create bias. These sidelobes disappear when the analysis is carried out by using the corresponding inverse filter as shown in the convolution result at the bottom of the left panel of this figure. One can see from its formulation in (15) that the inverse filter has theoretically infinitely long impulse response. However, in practice it decays rapidly to zero as shown in the middle of the left panel of FIGURE 3 and thus we can consider its length to be finite for practical purpose.
It is easy to see that codes that are close to perfect codes the values of the square of the modulus of their Fourier transform will be close to 1. We denote the minimum and the maximum value of the square of the modulus of the Fourier transform of a code by P min and P max , respectively. As we shall see later these values can be understood as a pair of single-pulse powers, which define an interval for experiment comparison making our code better than a single pulse with power P min and worse than one with power P max . In the case of 11-bit Barker code P min and P max are, respectively, 0.0909 and 1.314 as shown in the bottom of the left panel of  Inverse filtering method degrades the output SNR and the noise enhancement is usually quantified using a factor R, which is defined as the ratio of SNR at the output of an inverse filter to that of the corresponding matched filter. This means that 1/R can be considered as a factor specifying the apparent noise increase associated with inverse filtering and in the case of 11-bit Barker code it has a value of 1.4078 as shown in the top of the right panel of FIGURE 3.
Similarly, the performance of the 13-bit Barker code when different pulse compression methods are employed and other important characteristics of this code is shown in FIGURE 4. One can see that the noise enhancement factor 1/R is close to one and thereby making the 13-bit Barker code a suitable code for inverse filtering without substantial SNR losses. The values of P min and P max are closer to 1 than the corresponding values obtained from 11-bit Barker code. The value of the Fourier transform at DC is greater than 1. The other curves have similar characteristics to that of the 11-bit Barker code including the sidelobes in its autocorrelation and their suppression by means of an inverse filter. Almost perfect codes have been derived from 11-bit and 13-bit Barker codes using equation (18). FIGURE 5 shows characteristics of the perfect code calculated from 11-bit Barker code after truncating the resulting code at 10 −3 (top panel) and 2 × 10 −5 (bottom panel). This means that subpulses with amplitude less than 10 −3 and 2 × 10 −5 , respectively,are left out. One can see that the values of P min and P max are now very close to 1. There is no noise enhancement in this case (the noise enhancement factor is 1 within the numerical accuracy of our calculation) and this is because the impulse response of the inverse filter and that of the associated matched filter become almost the same. Similarly, FIGURE 6 shows the behavior of the perfect code derived from 13-bit Barker code by leaving out subpulses whose amplitude is less than 10 −3 (top panel) and 2 × 10 −5 (bottom panel). In this case as well the values of P min and P max are nearly 1 and also the code converges faster to perfect code than the 11-bit Barker code, which implies that the 13-bit Barker code as such is already close to perfect code. It is clear that the convolution of these almost perfect codes with the correspond matched filter gives a single peak without sidelobes.

7.
A heuristic algorithm for finding almost perfect codes. We have shown that it is possible to derive a perfect code from almost traditional codes such as binary codes or optimized quadripase codes [3] using equation (18) and truncating the resulting sequence in an appropriate manner. Another method of finding optimal radar waveforms has been presented in [20]. It is also possible to directly search for almost perfect finite codes using a Heuristic Algorithm for Finding almost Perfect Codes (HAFPC henceforth) we have developed. The HAFPC gives a code with the square of the modulus of its Fourier transform is close to a constant value. Also, a code with some other good properties like, for example, having a constant amplitude for the most of the subpulses in the middle and with a small number of subpulses having small correction amplitude at both ends can be found. In addition very long radar codes can be obtained by employing this algorithm. The calculation procedures in HAFPC may be summarized as follows: 1. Start with an arbitrary binary code with n length such that e n = (a 1 , a 2 , . . . , a n ), a n ′ ∈ {−1, 1}, n ′ = 1, 2, . . . , n.
2. Calculate the FFT of the code e n using sufficient length N . Since the original code is real (consisting only either -1 and 1), the real part of it's FFT will be even and the imaginary part will be odd. Denote the FFT of the code byê n . 3. Scaleê n so that |ê Pmax=1.0004 Pmin=0.99958 Figure 6. Perfect code made from the 13-bit Barker code. In the left panel it is truncated by leaving out pulses less than 10 −3 (the largest pulse is equal to 1). In the right panel truncation is made at level 2 × 10 −5 . In both cases the minimum and maximum values (P min and P max ) of the Fourier transform are very close to 1. In both panels the numbers displayed in a vertical direction show the scaled value of the amplitude of the code just below it for easy visualization of the decaying rate.
Note that still after the scaling the real and imaginary parts ofê n will be even and odd, respectively. 4. Calculate the inverse FFT of the scaled FFT of the codeê n and denote the result by e (p) n . Now e (p) n is a N -vector representing a perfect code and its amplitudes are no longer constants. It typically has about n subpulses which have high amplitude and the rest of them have low amplitude. Choose some threshold amplitude value A and classify the subpulses to high baud HB (placed in the middle of the code) and low baud LB according to the values of their amplitude using the chosen threshold value. 5. Set all the values of HB a n ′ to either 1 or −1 and i.e. a n ′ = sgn(a n ′ ), and leave the LB as they are. Denote this new N -binary code by e (1) n . In most cases a binary phase code having about n number of HB is obtained. 6. Truncate the N length code obtained in earlier step by including only a suitable number of LB from both sides of the HB and denote this number by l b . It is obvious that the perfectness of the code can be increased by increasing l b . The shortest possible codes are generally desired for practical applications. Next find the first (n ′ min ) and the last (n ′ max ) indices of the HB sequence and then denote the truncated code by e (t) n , which can be described by e (t) n = (a n ′ min −l b , a n ′ min −l b +1 , . . . , a n ′ max +l b ). 7. Choose a low amplitude value A t for the LB and then scale the amplitude of the HB to 1 and the amplitude of LB to A t .
8. Calculate the FFT of the scaled code obtained in step 8 and then scale the resulting amplitude to 1 and lastly determine its inverse FFT. 9. Repeat the calculation in steps 7, 8 and 9 until the result converges or blows up. This will take anything from couple of hundreds to couple of thousands of iteration cycles. Iterations will either converge to an almost perfect code with a very small noise enhancement factor 1 R or it may fail. The performance can be monitored by making use of the resulting noise enhancement factor in each iteration. HAFPC is completely a heuristic algorithm and it does not always create almost perfect codes. However, it is possible to use this algorithm in a try-and-see manner in order to obtain almost perfect codes, which can be more suitable for practical purpose than the ones obtained using equation (18)   7.1. Examples of almost perfect codes obtained by using HAFPC. We have carried out an extensive search for perfect codes by employing HAFPC and different types of almost perfect codes were found. FIGURE 7 displays two of such almost perfect codes obtained via HAFPC as an example. The vertically displayed numbers in both panels are the scaled values of the amplitude of the code displayed directly beneath it. The convolution of these codes with the corresponding matched filter yields a single peak without sidelobes. Also, one can see that the values of P max and P min are nearly one, which is a requirement for perfectness in our formulation. These codes have relatively small number of different amplitude sizes than the ones obtained by using equation (18), which is a highly desirable property for simplifying their practical implementation. One may also enhance this useful property further by manually adjusting the amplitude to the nearest suitable values. using 18, which shows that HAFPC in combination with hand tuning can indeed yield almost perfect codes that are suitable for practical implementation.
In FIGURE 9 we show the ambiguity function of the code displayed in the top panel of FIGURE 8 and we see that there is no range spreading effect for zero Doppler (note the width of the main peak is determined by baud length of the code and here we apply oversampling). In other words the unwanted sidelobes that appear in matched filtering as indicated in FIGURE 2, for example, are suppressed in this case as shown in the bottom panel. The contour display in the middle panel shows that this code is sensitive to Doppler shift and this is a problem that also exists in other pulse compression methods. HAFPC can also be used to find very long almost perfect codes, which may be needed in some applications. FIGURE 10 displays two such long codes and their performance. One can see that these codes have very good performance with the values of P max and P min approaching to 1. Lists of other almost perfect codes obtained by employing the HAFPC algorithm together with the corresponding performance parameters are presented in Table 1. 8. Comparison of codes. In this section we want to introduce a rigorous way of comparing perfect codes and almost perfect codes to each other. While it has been implied above that there is not much difference between a perfect code with |ê n (ω)| = 1 and an almost perfect code with |ê n (ω)| ≈ 1, this remains a vague statement and one may suspect the non-white nature of the filtered noise in the latter case might have some greater significance anyway. To make this more rigorous we state the following theorem: Theorem 8.1. Let us denote the minimum and maximum values of the spectrum of the code by P min = min ω∈[0,2π) |ê n (ω)| 2 and P max = max ω∈[0,2π) |ê n (ω)| 2 , respectively. It is possible to add independent simulated noise to the measurement  values so that the modified measurements are equivalent to measurements using a simple pulse of any power P ≤ P min . Also, it is possible to add independent simulated noise to a single-pulse measurement of power P ≥ P max so that the modified measurement is equivalent to the radar measurement coded with e n .
Proof. In the first case, consider a Gaussian stationary noise process ξ 1 independent of all the other processes considered. Adding this to our measurement values gives (19) z = e * µ + ξ + ξ 1 , which is equivalent to The spectrum of the noise P (|ξ 1 (ω)| 2 + 1)|ê(ω)| −2 is equal to a constant 1, if This is non-negative and thus specifies a Gaussian stationary process ξ 1 for any  Figure 10. Long codes obtained by using HAFPC algorithm.
With this choice the modified measurement equation corresponds to that of a single pulse of power P and normalized additive white noise, which proves the first part of the theorem. Similarly in the second case, adding a Gaussian stationary noise process ξ 2 independent of all the other processes considered to a simple-pulse measurement model, one gets which is equivalent to The spectrum of the noise 1 P |e(ω)| 2 (1 + |ξ 2 (ω)| 2 ) is equal to 1, if With this choice for the value of ξ 2 , equation 24 corresponds to the radar measurement coded with e n and normalized additive white noise and that proves the second part of the theorem.
The theorem above is a very strong statement about comparison of goodness of the different radar experiments. Having the values produced by the better experiment, it directly shows the way of producing (for example by some computer software) modified measurement values, which are distributed in the same way as the measurement values produced by the inferior experiment. Thus, it becomes impossible to make the betterness relationship questionable and it is also independent of any ways of analysis methods possibly applied: just transform the better measurement values first to what is proven possible by the theorem and then obviously any analysis method will produce equivalent results.
Formal theories for experiment comparison have been developed in [14,18]. Using the notation of [14] (assuming the variances x i of the scattering factors µ i are our unknown variables with any prior) we can write the following betterness relation where a single pulse code with unit power is denoted by with δ .,0 . The proof is a direct application of our theorem to the definition as presented in [14]. 9. Generalization from the simple discrete model. We have used the simple discrete model in [17] to introduce the perfect codes. This does not mean that they only work in that case. It is actually easy to see that for example in the fractional sampling model, convolution of the fractional samples with a filter where the inverse filter coefficients ê −1 i are spaced N f rac samples apart with zeroes in between will reduce our measurements to what would be produced by a single pulse transmission. If the code is perfect this filtering does not change the spectrum of the fractionally sampled signal at all. Thus, everything goes as in the simple sampling case.
In addition, if we consider a continuous (non-sampled) signal and a perfect code defined by ∆t, baud form q(t) and a subpulse coefficients e i , the proper inverse filter for the continuous signal is defined by the sum Again, convolving our original signal with this does not change the thermal white noise process and changes the response to that of a single pulse of the form q(t), see equation in [9]. Experiment comparison also easily generalizes to both of these cases. 10. Conclusions. A radar waveform is one of the key components of a radar system that has attracted the attentions of several scientists and engineers. The inventions of many kinds of radar waveforms and their implementations in a practical radar measurement have not only widened the applications of a radar system but also improved its performance substantially. An excellent review on the development of the most widely known radar waveforms and their applications has been published by [5]. A radar waveform may be modulated in various manner including frequency and phase modulations. The most widely known radar waveforms includes the linear frequency modulation chirp radar waveform [9] and the binary phase radar pulse [1]. The modulation of chirp waveform is carried out by sweeping the frequency linearly and binary phase coding is done by shifting the phase at an appropriate time intervals. These waveforms create unwanted sidelobes when they are decoded by means of a matched filter in order to maximize the SNR.
In the present paper we have presented a new method of finding infinitely long (but fast decaying) pulse compression codes, which do not create unwanted sidelobes via matched filtering. We have also found a technique to compare the truncated versions of such codes to single pulse measurements of slightly higher and slightly lower powers than the total power of the coded pulse. We have shown that a truncated version can be compared from both above and below with such single pulse experiment with only a very small difference between them, thus making them in every practical sense equivalent to a single pulse experiment. Also, we have presented a heuristic algorithm that can be used to design similar codes with even more desired properties (a constant amplitude value for the main subpulses and other amplitude values for small number of subpulses on tail for correction).
The impulse response of the inverse filter for this kind of perfect or almost perfect code is same as that of the matched filter and there is no performance penalty via increased thermal noise in using these codes. Thus these codes may be used in a radar measurement where the sidelobes in matched filtering is a substantial problem. Also, when using these kinds of codes complicated adaptive filter algorithms are not necessary as they do not bring any more accuracy to the results. While our results and motivations have been derived for the case of radar, it is obvious that these kinds of codes may also be useful in dealing with spread spectrum in communications. Our conclusions rely on the time-stationary range spread target model. Thus sidelobes will develop with a moving target as shown in the last figure in very much the same way as the matched filter sidelobes get worse for non-stationary targets. If the Doppler is point-like it is possible to correct it by multiplying the signal with the correct compensating phase terms. However, for Doppler-spread targets the perfect and almost perfect codes cannot be free from sidelobes.