# 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 at 19:45
• If I read your code correctly, then you're doing conv2 on one-dimensional data. Why? – Marcus Müller Jan 2 at 20:07
• The SAR image dimensions are [Nrange,Nazimuth] and the signal is just a complex vector. – Ben Romarowski Jan 4 at 2:02