Optimal binary phase codes and sidelobe-free decoding filters with application to incoherent scatter radar

This paper presents binary phase codes and corresponding decoding filters which are optimal in the sense that they produce no sidelobes and they maximise the signal-tonoise ratio (SNR henceforth). The search is made by investigating all possible binary phase codes with a given length. After selecting the code, the first step is to find a filter which produces no sidelobes. This is possible for all codes with no zeros in the frequency domain, and it turns out that most codes satisfy this requirement. An example of a code which cannot be decoded in this way is a code with a single phase, i.e. a long pulse. The second step is to investigate the SNR performance of the codes. Then the optimal code of a given length is the one with the highest SNR at the filter output. All codes with lengths of 3–25 bits were studied, which means investigating 33 554 428 binary phase codes. It turns out that all Barker codes except the 11-bit code are optimal in the above sense. It is well known that the performance of matched-filter decoding of Barker codes is better than decoding without sidelobes. In the case of the 7-bit Barker code, it is shown here that the SNR given by sidelobe-free decoding is nearly 30% worse than that of standard decoding, but for the 13-bit code sidelobe-free decoding is only about 5% worse. The deterioration of SNR should be evaluated against the benefits gained in disposing of the sidelobes, which, even for the 13-bit code, contribute by 7.1% to the total signal power from a homogeneous target. Thus, regions of weak scattering can be contaminated by the sidelobes from neighbouring layers of strong scattering, causing broadening of thin spatial structures and giving a lower spatial resolution than implied by the bit length. A practical example is shown where sidelobes mask a weak signal when the standard matched filter is used in the analysis. An improvement is achieved when sidelobe-free filtering is carried out.


Introduction
Perhaps very few radar systems, if any, use such a wide selection of radar modulations as incoherent scatter radars do.This is because the properties of the incoherent scatter radar target are strongly range-dependent and also because of the demand of measuring the full autocorrelation function (ACF henceforth) of the target, instead of mere reflectivity and Doppler shift.Combination of weak scattering power and demand of range resolutions down to a few hundreds of metres set further requirements for the performance of the modulation.
If simple pulses are used, improving the range resolution implies reduction of the pulse length.This leads to an uneconomical use of the radar duty cycle and a reduced mean received power.Furthermore, short pulses do not allow the measurement of the full length of the signal ACF.The first solution to this problem was given by multi-pulse codes, which improved the range resolution from tens of kilometres to a few kilometres (e.g.Farley, 1972;Zamlutti and Farley, 1975).A further improvement was obtained by phase modulation of the radar pulses.Barker codes (Barker, 1953) were first applied to single short pulses to obtain high-resolution power profiles (Ioannidis and Farley, 1972), and later to multipulses to obtain all lags of the ACF with the same high resolution (Turunen et al., 1985;Huuskonen et al., 1986).In addition, other codes like random codes (Sulzer, 1986) and alternating codes (Lehtinen and Häggström 1987;Sulzer 1989Sulzer , 1993) ) are capable of improving the range resolution.A drawback of alternating codes is that the ACF of the target should remain stationary during the transmission cycle.
Barker codes are used both in multipulses and in alternating codes for improving the range resolution.The analysis of Barker-coded measurements involves decoding, which is normally made by means of a matched filter.The sidelobes produced by this sort of decoding are distractive in some occasions.Key et al. (1959) showed that weighting networks to be placed after the standard matched filter can be designed which reduce the sidelobes to an arbitrary low level.
. Sulzer (1989) found out that, for each modulation pattern, it is possible to find a decoding filter which makes pulse compression without sidelobes, provided the modulation function has no zeros in the frequency domain.The impulse response of this filter has an infinite length.Lehtinen et al. (2002) have applied such a decoding in the analysis of experimental data.Sulzer also pointed out that a maximal SNR is not achieved by a sidelobe-free filter.The deterioration of SNR can be small for some codes, but very large in worst cases.This means that the best codes must be chosen if sidelobefree filtering is used.Other efforts of reducing the sidelobes have also been made.Mudukutore et al. (1998) showed that the range-time sidelobes can be suppressed by means of a suitable filter down to levels which are acceptable for operational and research applications.This work was based on a simulation procedure which was used to evaluate the performance of the filter.The simulation describes the signal returns from distributed weather targets by using pulse compression waveform coding.Methods of optimising the peakto-sidelobe ratio have also been presented by Blinchikoff and Zverev (1987) and Rihaczek and Golden (1971).
Another method for eliminating the sidelobes is provided by complementary codes (see e.g., Schmidt et al., 1979;Woodman, 1980).These codes are chosen to make the sidelobes of the set cancel out when added together.A drawback of complementary codes is that the correlation time of the target must be larger than the time between the two codes in the set.
In this paper we present optimal binary phase codes with lengths of 3-25 bits.We first find the transfer functions and impulse responses of the sidelobe-free decoding filters for all binary phase codes for which such filters exist.Next, we investigate the SNR at the filter output; optimal codes are those which maximise the SNR.The results are based on investigating millions of different phase codes.
A somewhat similar work has been made by Bell (1993), who used information theory to design radar waveform and receiver filter pairs that maximise the SNR at the filter output.He calculated optimal waveforms for different receiver filters and radar targets.In the present work, however, we maximise the SNR subject to the constraint that the decoding is sidelobe-free.

The principle of sidelobe-free decoding
Phase modulation is a principle which divides the radar pulse into a set of subpulses of equal duration and the phase of each subpulse is fixed.When two phase values with a phase difference of 180 • is used, the modulation is a binary code.Barker codes and alternating codes are examples of binary phase codes, which are widely used by incoherent scatter radars.Decoding of Barker coded measurements are carried out in amplitude domain (Ioannidis and Farley, 1972), whereas data collected by using alternating coded pulses are decoded in the power domain (Lehtinen and Häggström 1987).Binary codes can be described mathematically in terms of a coding filter in a manner analogous to that presented by Sulzer (1989).
Since our data analysis is based on discrete samples, the theory is presented in terms of discrete signals.This leads to results which can be used in programming.We investigate a code consisting of n B pulses (an n B -bit code).We also assume that the pulse length T p is a multiple of the sampling interval T , i.e.T p =n s T , where n s is an integer indicating the number of samples per bit.This means that the possibility of oversampling is taken into account.By choosing T as the time unit, an elementary pulse can be written as where δ is the discrete time-impulse (unit sample; not to be confused with the delta function) Accordingly, the impulse response of a coding filter of an n B -bit binary code can be written as where a j = ± 1 when j =0, 1, . . ., n B − 1.The sequence of numbers a j defines the binary code.We note that h c (n) is zero when n<0 or n>n s (n B −1).An example of p(n) and h c (n) with n s =3 and n B =5 is plotted in the top and middle panel of Fig. 1.The code is obtained by means of a convolution where * denotes the convolution.We note that (n) is zero when n<0 or n>n s n B −1.The bottom panel of Fig. 1 shows the convolution of the discrete elementary pulse and the impulse response of the coding filter in the upper two panels.
For designing a sidelobe-free decoding filter we first define the impulse response where the sequence of real numbers b j will be chosen to decode h c in Eq. (3).In addition, we need an impulse response q(n) for filtering the elementary pulse p(n).Thus, the complete structure of the sidelobe-free decoding filter for processing the echoes is given by Here we use a matched filter for p(n), i.e. q(n)=p(−n).For further discussions on the performance of different shapes of q(n), see Huuskonen et al. (1996).
The discrete-time Fourier transform of the code may be given by and the inverse Fourier transform is expressed by Fourier transforms in other cases are defined similarly.The decoding of a binary phase coded signal can be carried out by means of a decoding filter such that the convolution of the decoding filter h d (n), the filter matched to the elementary pulse q(n) and the code (n) is a function with a desired shape.This shape defines the range resolution.Mathematically, this means that The result of the convolution w(n) is a weight function, which determines the range resolution and the range ambiguity functions (for range ambiguity functions, see e.g.Lehtinen and Huuskonen, 1996).In the case of standard decoding of Barker codes, for instance, the impulse response of the decoding filter is a mirror image of the decoding filter itself and w(n) is a function with a triangular centre peak and a number of sidelobes on either side.Fourier transforms of convolutions are products of the Fourier transforms of the convoluted sequences and thus the Fourier transform of the weight function w(n) is given by the inverse Fourier transform of Eq. ( 10) gives Thus, the impulse response defined by Eq. ( 11) makes a sidelobe-free decoding filter producing exactly the same weight function to what would result from using no coding at all, just the elementary pulse p(n) and a filter q(n) matched to it.In particular, no sidelobes are produced.It is worth mentioning that we calculate w(n) presented later in this paper by using Eq. ( 10), not from Eq. ( 9).
The sidelobe-free decoding filter in Eq. ( 11) can only be found if the Fourier transform F D {h c (n)} has no zeros for ω∈[0, 2π].Also, the filter defined by Eq. ( 11) has infinitely many coefficients.One may be concerned about these facts and they may have prevented sidelobe-free decoding filters from becoming more popular.However, these problems are not serious in practice because of the following two reasons.
1) It is very improbable that the Fourier transform of an arbitrary finite sequence has any zeros.This Fourier transform is a sum of a few harmonic terms defined on ω∈[0, 2π ], making it a very smooth and infinitely many times differentiable function.The existence of zeroes can thus easily and reliably be checked by simple numerical approximations.
2) While the length of the sidelobe-free decoding filter is infinite, it turns out that the coefficients go to zero faster than the reciprocal of any polynomial of n.This is demonstrated in Fig. 2 by taking the base 10 logarithm of the absolute value of the normalised coefficients of a sidelobe-free decoding filter, displayed on the right middle panel of Fig. 3, and it can also be justified mathematically (e.g.Courant and Hilbert, 1968).Thus, it is possible to truncate the infinite filter to cause no more numerical errors than that which comes from other sources, like sampling accuracies or fidelity of the transmission waveforms.We also want to stress here that the effect of truncation is negligible on the SNR penalties studied later in this paper.
Equations ( 9) and ( 12) give a possibility to investigate whether filters can be found which give w(n) with a desired shape and width.There is a freedom in defining the shape of the weight function (i.e. the compressed pulse) by choosing different shapes of filters for q(n) in Eq. ( 12).Limitations are imposed by the coding filter rather than by the decoding filter, since the Fourier transform of the coding filter is not allowed to have zeros in the frequency domain.For example, if we use q(n)=n B p(−n) in Eq. ( 12), w(n) becomes a triangle with a height equal to the number of bits in the code such that we obtain decoding which is otherwise similar to standard matched filtering of a Barker code but produces no sidelobes.By combining Eqs. ( 6), ( 10), ( 12) in a proper manner, the mathematical expression for the transfer function of the complete sidelobe-free decoding filter that gives w(n) with a desired shape can be easily obtained and it is given by where and Finally, the impulse response of the sidelobe-free decoding filter is obtained by means of the inverse Fourier transform, which is One should notice that sidelobe-free decoding works for all kinds of codes which do not have zeros in frequency domain, including the Barker codes.
The impulse response of the standard matched filter that corresponds to the filter described by Eq. ( 17) is a mirror image of the code, i.e.
The corresponding weight function is Figure 3 demonstrates the sidelobe-free filtering in the case of the 13-bit Barker code.The top panel shows the code itself, sampled at a rate of 3 samples per bit.The middle left panel shows the impulse response of the corresponding matched filter, and the bottom left panel the weight function calculated from Eq. ( 19).The weight function has a middle peak with a height of 3×13=39 units and six side lobes on both sides with heights of three units.Indexing of the samples is changed to move the main peak to zero.
The two right-hand panels of Fig. 3 demonstrate the decoding of the 13-bit Barker code without sidelobes.The middle right panel shows the impulse response calculated according to Eq. ( 17).Its main structure resembles the impulse response of the matched filter, but the values are not exactly plus or minus unity.On both sides of the main structure, smaller values are encountered, which rapidly decrease towards zero, as already seen in Fig. 2. When the number of samples of q and h c used in calculating Q and H c is 1024, the absolute normalised value of the truncated impulse response at its ends is of the order of 10 −13 .If 2048 samples are used, this value drops down to 10 −16 − 10 −17 , which is the computer numerical accuracy.
The corresponding weight function is shown in the bottom right-hand panel of Fig. 3.It can be obtained numerically either by using the calculated impulse response in the convolution (9), or from samples of h d , q and by means of the inverse Fourier transform of Eq. ( 10).In both cases the weight function indeed consists of a single triangular peak with a height of 39 units and a total width of 6 units.A closer look reveals that the side lobes behave differently, however.In the case of Eq. ( 9), two nonzero sidelobes appear which decrease with height and drift away from the main peak with increasing number of samples.This is an end effect of the truncated impulse response.When the number of samples in λ and is 128, the height of the sidelobes is 0.87, while that of the main peak is 39.When 1024 samples are used, the highest values of the sidelobes are of the order of 10 −7 .No such sidelobes appear when Eq. ( 10) is applied.When the number of points in the Fourier transforms is 128 or higher, the values of w outside of the main peak are always down to the level of the computer numerical accuracy.This demonstrates the benefit of Eq. ( 10) in numerical calculations.
Figure 4 portrays similar calculations for an arbitrary 15bit code, which is not a Barker code.The left-hand panels demonstrate matched filtering done by means of a mirror image of the code.The result is that the weight function consists of a centre peak, as well as a set of six small negative sidelobes and one high positive sidelobe on both sides of it.The impulse response in the middle right-hand panel has an infinite length, but it decays rapidly on both sides of the main structure much in the same way as in the case of the Barker code.The weight function in the bottom right-hand panel obtained from Eq. ( 10) indicates that the side lobes are completely eliminated, even in this case.

SNR performance of a decoding filter
There is a decrease in SNR when one applies a sidelobefree compression filter instead of the standard matched filter.This drawback has been pointed out earlier, for example by Sulzer (1989).Blinchikoff and Zverev (1987) have also discussed in detail the degradation of SNR associated with filters which maximise the peak-to-sidelobe ratio.In this section the SNR performance of sidelobe-free decoding of different Barker codes is investigated by comparing it with that of the corresponding matched filter.
If the power spectral density of white noise entering a filter with a transfer function H (ν) is S(ν)=S n , the total output noise power is where ν is frequency and h(t) is the impulse response of the filter.In the case of a digital filter, this can be written as The power of the signal received from a point target is proportional to the maximum of the zero-lag range ambiguity function, i.e. to the square of the maximum value of the weight function w(n).Hence, the SNR given by the matched filter is where ŵm is the peak value of the weight function w m (n) of the matched filter and P is a scaling coefficient defining the received power.In a similar manner, the SNR value at the output of the sidelobe-free decoding filter is where ŵs is the peak value of the weight function w s (n) of the sidelobe-free decoding filter.
For comparison of the noise performance of different sidelobe-free filters we use Eq. ( 23) to define a parameter This parameter is actually a scaled signal-to-noise ratio with a scaling factor equal to P /S n .It is useful for comparison, since it depends only on the properties of the filter itself, not on the noise level or such things as the reflectivity of the target, the transmitted power and the antenna gain.
The noise performance of different sidelobe-free filters can be compared with that of the matched filter by calculating the ratio of the two signal-to-noise ratios.Since the sidelobe-free decoding filter is designed to give ŵs = ŵm (this is illustrated in Figs. 3 and 4), this parameter is The values of µ(n) and λ(n) needed in Eq. ( 25) are obtained from Eq. ( 18) and Eq. ( 17), respectively.A sufficient accuracy for comparison purposes is obtained by truncating λ at the points where its absolute values are below 10 −3 (see Fig. 2).Table 1 gives the values of R for Barker codes of different lengths.They illustrate the fact that sidelobe-free decoding of Barker codes degrades the SNR by about 5 − −30% relative to standard decoding.However, the degradation is smallest for the 5-bit and 13-bit Barker codes which are often used in incoherent scatter radar measurements.In the case of the 13-bit code, the loss is only about 5%.Hence, in this respect the 13-bit code is the optimal Barker code, as already pointed out by Sulzer (1989).

Optimal binary phase codes and corresponding sidelobe-free decoding filters
The problem of designing coding waveforms with spiky autocorrelation functions has long been an important problem in the field of radars and sonars.It is usually viewed as a problem of optimisation (e.g.Bernasconi, 1987;De Groot et al., 1992).In incoherent scatter radars, the coding waveforms usually employ binary phase codes and extensive work on these codes has been done in order to obtain measurements with a very high range resolution (e.g.Gray and Farley, 1973;Lehtinen andHäggström, 1987 andTurunen et al., 2002).Here we search for pairs of binary phase codes and corresponding receiver filters that maximise the SNR at the output of the filter without producing unwanted sidelobes.
Our search is restricted to binary phase codes with the number of bits within the range from 3 to 25.The number of possible bit patterns for an n B -bit code is 2 n B .However, changing the signs of all bits gives a code with the same behaviour.This reduces the number of codes to be investigated to 2 n B −1 .Actually, a mirror image of a code and the mirror image with changed signs are also essentially the same.Therefore, the true number of different codes to be investigated is even smaller but, from practical point of view, it is more convenient to go through all 2 n B −1 codes.Thus, in order to find the optimal codes with lengths extending from 3 to 25 bits, we have studied 33 554 428 different bit patterns.
The choice of an optimal code is based on the noise performance of the corresponding sidelobe-free decoding filter.The optimal code gives the smallest noise power at the filter output.Thus, we first calculate the side-lobe free impulse response λ(n) of each code and then, following Eq.( 21), compute the normalised output noise power The optimal code is found by selecting the minimum output noise power among all codes of the same length.
Choosing the optimal 5-bit code is demonstrated in Fig. 5.In the left-hand panels, only four out of the investigated 16  26), are written on each panel.The results indicate that + + + − + has the best performance (σ 2 is also greater for all 5-bit codes not shown in Fig. 5).This is the bit pattern of the 5-bit Barker code.Hence the Barker code has the best performance of all 5-bit codes, when sidelobe-free decoding is used.The code in the bottom panel is an example of a case when H c (ω) has a value very close to zero.Then the decrease in the impulse response is very slow.A similar study was made for all other codes and it turned out that sidelobe-free filters could be found for most of the bit patterns for all code lengths studied.The results of the search are displayed in Figs.6-10.It turns out that the optimal 3-, 4-, 5-, 7-and 13-bit binary codes are Barker codes.The 11-bit optimal binary phase code (R=0.80 and r=8.85) is, however, different from the 11-bit Barker code (R=0.71 and r=7.82).
The values of parameters R and r for the codes are shown in Fig. 11 as a function of the code length.The top panel indicates that sidelobe-free decoding can reduce the SNR even by 40% in comparison with matched filtering, but in many cases the reduction is less than 20%.The 13-bit code, which is also a Barker code, is the best one in this respect.The difference of the performances of the 11-bit optimal code and Barker code is also seen in the figure.It is interesting to notice that, at small code lengths, R contains a violent oscillation which is damped with increasing code length.The bottom panel indicates a general increasing trend in r, although in some cases a longer code has a worse performance.One should notice that R and r refer to the main peak of the weight function w(n).Since most of these codes are not Barker codes, a matched filter may produce large sidelobes (e.g. 3 times larger in the case of the 15-bit binary code displayed in the top panel of Fig. 4), which may greatly limit the applicability of matched filtering in these cases.

Practical demonstration of sidelobe-free pulse compression
In this section we demonstrate the advantage of a sidelobefree decoding technique over traditional matched filter using Barker-coded data from the EISCAT Svalbard radar (for detailed descriptions of the radar system, see Wannberg et al., 1997).The experiment was conducted on 16 November 1999.The data was collected by means of hardware connected to the standard radar receiver.This hardware stores the complex baseband data samples rather than the ACF estimates, which gives a great freedom in data analysis.The data collection system and the applied radar modulation are described in detail by Lehtinen et al. (2002).
The experiment applies two-phase codes transmitted at different frequencies.Only one of them, consisting of a basic phase pattern of 5 bits, is used in this paper.The transmission pattern is shown in Fig. 12.Each bit in the basic modulation is submodulated by a 5-bit Barker code with a 6-µs bit length.The sampling interval is 2-µs.This experiment allows us to compare the sidelobe-free decoding of the submodulation with standard Barker decoding.
The baseband complex signal samples containing data from both frequency channels are stored on hard disk.The off-line data processing consists of channel separation and clutter removal, and it produces a separate data stream for each channel.Detailed descriptions of the signal processing methods are presented by Lehtinen et al. (2002) and Damtie et al. (2002).The sidelobe-free decoding is carried out using the equation where y and y d are the measured and decoded sample profiles, is the transfer function of the decoding filter, and Q and H c are the Fourier transforms of q and h c .The length of the measured data profile is 2000.Notice that the impulse response of the decoding filter is not calculated when Eq. ( 27) is applied in decoding but, instead, Q and H c are calculated according to Eqs. ( 15) and ( 16), respectively.The left-hand panel of Fig. 13 portrays a power profile after decoding the 5-bit Barker submodulation.Two decoding methods have been used, the standard matched filter (blue) and the sidelobe-free filter (red).The integration time of the profile is 0.8 s.The corresponding standard deviation pro- This profile was chosen because it contains an echo from a point target, which is either a satellite, a space debris object or a meteor.Due to the basic 5-bit modulation, the echo is visible after decoding as five peaks in the power profile (the maximum power at the peaks is over 800 units).When the submodulation is decoded by means of a sidelobe-free filter, the power level between the peaks agrees with the power profile outside the peaks.This confirms the removal of the sidelobes.The results are different in the case of standard decoding.Between the two uppermost peaks the power level is approximately the same as the background profile, but between the four lowermost peaks it clearly exceeds the background power.This effect is due to the range ambiguity function of the basic modulation.Between the four lowest peaks the sidelobes of the individual peaks are located in such a manner that their sum is constant.Due to the pulse with opposite phase in the basic modulation, the sidelobes cancel between the two uppermost peaks, which gives no enhancement.
The high values of standard deviation at the five power peaks result from the fact that the point target is visible within the radar beam (or within its sidelobes) for a shorter period than the integration time of 0.8 s.Elsewhere in the profile the standard deviation is roughly constant and it is not greatly affected by the lower performance of the sidelobe-free filtering of the 5-bit Barker code.

Conclusion
In this paper we have presented the method of finding binary phase codes which produce a maximal SNR when decoded by means of a sidelobe-free filter.When applied to all possible phase patterns with lengths 3-25 bits, 23 optimal codes

Fig. 2 .
Fig. 2. The 10-based logarithm of the absolute values of the coefficients of the sidelobe-free compression filter that corresponds to the 13-bit Barker code sampled at a rate of 3 samples per bit.

Fig. 3 .
Fig. 3.The 13-bit Barker code sampled at a rate of 3 samples per bit (top).Left: The impulse response of the corresponding matched filter (middle) and the weight function (bottom).Right: The impulse response of the sidelobe-free compression filter (middle) and the weight function (bottom).

Fig. 4 .
Fig. 4. A 15-bit phase code sampled at a rate of 3 samples per bit (top).Left: The impulse response of the corresponding matched filter (middle) and their ambiguity function (bottom).Right: The impulse response of the sidelobe-free compression filter (middle) and the weight function (bottom).

Fig. 5 .
Fig.5.The left column shows, as an example, four different 5-bit binary phase codes and the right column portrays the impulse responses of the corresponding sidelobe-free compression filters.In the last panel in the right column we see one of the rare cases where H c (ω) has a zero and its discrete numerical approximation has a value very close to zero.This results in very high σ 2 values in the numerical calculations and filter coefficients which decay very slowly.

Fig. 10 .
Fig. 10.Left column: Bit patterns of optimal 23-bit, 24-bit and 25-bit codes.Right column: The impulse responses of the corresponding sidelobe-free decoding filters.

Fig. 11 .
Fig. 11.The performance of different optimal binary codes in terms of R (top panel) and r (bottom panel).In both figures the circle indicates the performance of Barker codes.

Table 1 .
SNR of the sidelobe-free decoding filters relative to that of matched filters for Barker codes of different lengths.