# Costas code vs Barker code vs Frank code-difference between Costas code,Barker code and Frank code

This page compares Costas code vs Barker code vs Frank code and mention **difference between** Costas code, Barker code and Frank code.
These are used as digital pulse compression techniques in radar.

**Pulse Compression**: As we know pulse compression converts wide pulse into narrow pulse.
Energy of Wide pulse helps in detection while bandwidth of narrow pulse helps in range resolution.

The pulse compression techniques are classified as shown in the figure into analog pulse compression and digital pulse compression. The analog pulse compression is further categorized into correlation processing and stretch processing. The digital pulse compression is categorized into Costas codes, Barker codes and Frank codes.

## Costas Codes used for pulse compression in Radar

These are known as frequency codes.
In order to produce waveform in the costas codes following steps are followed:

• Long pulse of width T is divided into N sub-pulses which are contiguous.
T = N*T1, where in T1 is the width of sub-pulse and T is the width of main broad pulse.

• Frequency of sub-pulses are choosen from set of contiguous range from a band of frequencies ('B').

• N sub-pulses are referred as burst. Within each burst frequency of sub-pulses are assigned
in the steps of Δf.

➨ f1 = fo + n*Δf, n = 1,2,3,.....N

Where, fo = constant frequency

• The frequencies are assigned to sub-pulses as per predefined logic.
Frequencies are assigned randomly. The costas codes for length 10 is shown in the figure-1.

• As shown in the matrix, each row one frequency per time slot and in each column one frequency slot is
choosen.
The number of **costas codes** are less than N! for N x N matrix size.
Code density is defined as Nc/N! .

Example: For N = 3, costas codes (Nc) = 4

For N = 5, costas codes, Nc = 40.

## Barker Codes used for pulse compression in Radar

Barker codes are binary phase codes. Following steps are followed for generation of Barker codes:

• A long width pulse is first divided into N small pulses.
ΔT = T/N, where, ΔT is equal to width of sub-pulse and
T is the long pulse width.

• Each sub-pulses are choosen either as 0 or π radians randomly.
These are referenced relative to CW reference signal.

• As shown in the table below, each sub-pulse with 0 phase and amplitude of +1 volt is represented
by either '1' or '+'.
While sub-pulse with π phase and amplitude of -1 volt is represented by either '0' or '-'.

Code Symbol |
Code Length |
Code Elements |
Side Lobe Reduction (dB) |
---|---|---|---|

B2 | 2 | +- OR (10) ++ |
6.0 |

B3 | 3 | ++- OR (110) | 9.5 |

B4 | 4 | ++-+ OR (1101) +++- OR (1110) |
12.0 |

B5 | 5 | +++-+ OR (11101) | 14.0 |

B7 | 7 | +++--+- OR (1110010) | 16.9 |

B11 | 11 | +++---+--+- OR (11100010010) | 20.8 |

B13 | 13 | +++++--++-+-+ (111100110101) | 22.3 |

The **Barker codes** have autocorrelation property which is unique. Following are the advantages and disadvantages of barker codes.

**Advantages**:
They provide better resolution. It will generate waveform having constant sidelobe levels which is equal to unity.
Range leakage is very small.

**Disadvantages**: Compression ratios are small.
Largest code has only 13 bits. Best Sidelobe level of value -22.3 is very high.
It has limited signal security.

## Frank Codes used for pulse compression in Radar

**Frank codes** use harmonically related phases which are based on certain fundamental
phase increments. They are also known as poly phase codes.

Following steps are performed to generate Frank codes:

• Single pulse of width 'τ' is divided into N groups which are equal.

• Each of these N groups are further divided into N sub-pulses.
Each of these sub-pulses have wifth of Δτ.

• Total number of sub-pulses assigned per pulse is equal to N^{2}.
Here phase within each of the sub-pulse is kept constant with reference to CW signal.

• A Frank code with N^{2} sub-pulses is known as N-phase Frank code. The
first step in computing a Frank code is to divide 360 degree by N.
Here fundamental phase increment (Δφ) = 360 degree/N

• For N-phase Frank code, phase of each of the sub-pulses are taken from
following matrix as mentioned in equation(1):

Here each row expresses a group while each column expresses sub-pulses for that
group.

EXAMPLE: For 4 phase Frank codes will have N =4

The fundamental increment is Δφ = 36 degree/4 = 90 degree

This is mentioned in Equation-2 above.

Hence frank code having 16 elements are given by following vector:

F_{16} = { 1 1 1 1 1 j -1 -j 1 -1 1 -1 1 -j -1 j }

## RADAR RELATED LINKS

RADAR tutorial Doppler Radar FMCW RADAR RADAR BANDs RADAR SCOPE Weather Radar Ground Penetrating Radar System RADAR RANGE and RESOLUTION

## What is Difference between

difference between OFDM and OFDMA

Difference between SC-FDMA and OFDM

Difference between SISO and MIMO

Difference between TDD and FDD

FDMA vs TDMA vs CDMA

FDM vs TDM

CDMA vs GSM