# Synthetic Aperture Radar (SAR). How to do Range Compression?

I am trying to perform range compression to a raw SAR image [fast times, sensor position], Dr in code. I have the transmitted signal (chirp), g in code, and literature says range compression is obtained by convoluting the time reverted conjugate of g along the rows. I use the following MATLAB code.

    h_compressed = conv2(conj(fliplr(g), 1, Dr, 'same');


Where 3003 is the number of columns of the RAW image. Nevertheless my output is the same as my input i.e. no range compression occurs. Any ideas on why?

After range compression I perform 1D matched filtering.

    for k = 1:Nr
R = sqrt(x_filter.^2 + SAR_data.r_ax(k).^2);
filter = exp(-1i*4*pi/lambda*R);
Dfr(:,k) = conv2(Drc(:,k),filter','same');
end


And obtain the following:

• Can you post the image you get? Are you also doing range/azimuth compression? Just doing range compression won’t really show you too much for SAR imagery. You’re on the right track though, range compression is simply the cross correlation of each received signal with the transmitted signal. Additionally, and this is an implementation note, you can accomplish cross correlation MUCH faster than that code; try using FFTs and exploiting some DFT properties! – matthewjpollard Jan 2 '20 at 19:45
• If I read your code correctly, then you're doing conv2 on one-dimensional data. Why? – Marcus Müller Jan 2 '20 at 20:07
• The SAR image dimensions are [Nrange,Nazimuth] and the signal is just a complex vector. – Ben Romarowski Jan 4 '20 at 2:02

What format is your input data in? It sounds like you have a phase history signal as it's often called. Assuming that the transmitted waveform was a linear FM chirp, has it already been deramped? Some receivers perform deramp-on-receive processing, which removes the chirped nature of the waveform. In that case, range compression is as simple as performing a 1-D FFT on each pulse return (which appears to be one per column in your example).

If you instead have a raw collection from the receiver that hasn't been deramped, then you expect to have an input signal that consists of many reflections of the transmitted waveform, separated in time according to the round-trip delay to the various reflectors in your scene. In this case, in order to perform range compression, you need to generate and apply a matched filter to each pulse return (again, a 1-D convolution of each column of your dataset with the matched filter).

• Yeah! That's exactly what I am trying to do, to dechirp the signal it should be a straightforward convolution along the columns but somehow it does not work. – Ben Romarowski Jan 4 '20 at 2:01