# How to interpret an Ambiguity function

I need to evaluate several different waveforms regarding their doppler tolerance, for use in a radar application. So I came across something called the Ambiguity function.

The following picture shows the Ambiguity function contour-plot of a Barker-Code with 7 Chips. My problem is that I don't fully understand how to read it.

If I take the 0Hz Doppler-cut, I get the expected, ideal barker autocorrelation. Now consider a target which moves with a fixed velocity. In order to calculate the doppler frequency $f_d$ I can apply the following formula:

$$f_d = \frac{\Delta v}{c} f_0$$

with $\Delta v$ being the (relative) velocity of the target, $c$ being the velocity of the medium (or the waves in the medium) and $f_0$ being the emitted frequency.

Now my problem is, that a barker code is not just built up by a single frequency which I could use as value for $f_0$. The barker code has a whole spectrum of frequencies (fft). This also means that I have to look at a bunch of doppler frequencies istead of looking just at one, right?....

So I cannot just take, for instance the 20kHz doppler cut, to see what correlation result I can expect for a target with a certain velocity.

What frequency of my signal-spectrum do I need to use to calculate the doppler frequency?

In my particular case I do a BPSK-Modulation of a 13x13 (nested) barker code, before sending it out and calculate the matched-filter response on the received signal. In order to get an idea of how the matched-filter output looks, I would like to take a "doppler cut" at $f_d = ..$. But should I take the carrier-frequency as $f_0$ ? Or should I take the maximal frequency that I have in my spectrum as $f_0$? ($f_0$ is needed to calculate $f_d$)

• Mathworks has a good primer on interpreting and using the ambiguity function to design and analyze a waveform. It uses some simple rectangular pulse and LFM pulse examples: mathworks.com/help/phased/examples/… – Envidia Jun 7 '17 at 16:25

The ambiguity function is used in radar systems to get the distance and the relative speed of a moving object with respect to the transmitter. Is called ambiguity because it also tells about the ability to distinguish objects that are close between them and with a similar vector velocity.

The ideal ambiguity function is a Delta function in both domains. However there is no waveform with this ambiguity function. With your Barker-Code, you could have troubles to identify different objects that are at a distance +/- <10us, and whose Doppler is +/- <10 kHz. But you could distinguish two objects that are at 5us, one with 5 KHz and the other with 27 kHz.

In order to estimate the Doppler and the delay, you first compute the ambiguity function between the Barker-Code and the reflected signal. You will get a noisy version of the above figure but shifted in both domains, depending on the delay and Doppler of the target. If there are more targets, you will obtain overlapped ambiguity functions, each one shifted in a different place on the correlation plane.

You then just find the position of the maximum. From the obtained Doppler you can get the speed with the equation you wrote.

• Ok, this helps me a bit. Although I thought it's the other way around. E.g. I could not detect a target at $f_d =27kHz$, because there's no clean maximum. Anyway, this still doesn't answer my initial question about what to take for $f_0$. I've edited the original question, to clarify it. – Dreamcooled May 20 '17 at 20:41
• I don't have Matlab now to show you some figures, so let me try to explain it again. The figure you shown is the auto-ambiguity function of a waveform. At 27kHz, tells how the waveform reassembles to a replica of himself with this Doppler, which is almost zero, that's good. A radar computes the cross-ambiguity function between the waveform and the received signal. If the target introduces fd=27kHz and a delay of 5us, you will see the same plot but the peak will be at [5us,27kHz], instead of [0us,0kHz]. Search for gps acquisition which is the same idea. – danipascual May 20 '17 at 22:53
• I think we are both right. The definition of an "ideal ambiguity function" depends on the point of view. You describe the case where you want to distinguish multiple targets at different velocities and for that you need to calculate the cross-ambiguity in the receiver and you therefore want a "thumbtack" like amb. function. On the other hand, one might prefer a more doppler tolerant waveform. In that case you want the doppler shift introduced by a target with unknown velocity not to prevent detection due to a weak response at the matched filter output. (this is what +luciano kruk mentioned) – Dreamcooled May 21 '17 at 8:31

I refer to the graph you presented at your original post. The interpretation of the graph is as follows: the wider the yellow part of the graph, the more immune to Doppler your system is. Normally it is desirable to have the system immune to the relative speed between source and target, for example when you do not know the targets speed. Therefore, the more yellow, the better.

I would look for the minus-3dB limits of the yellow part to perform any comparison among codes and algorithms. Assuming you do not know the relative speed, the wider, the better...

• Ok, I agree with you: The wider the yellow area on the doppler-axis, the better. (On the delay-axis you want to have a small yellow area, to get a nice correlation right?). I'm still confused about what to choose for $f_0$. I've edited the original question, to clarify it. – Dreamcooled May 20 '17 at 20:44
• Normally the ambiguity diagram has at the Y-axis the relation $f_d/B$, where $B$ is the bandwidth of your transmitted code. All carrier frequencies around $f_o$ are covered as well. – luciano kruk May 21 '17 at 21:12
• Even if I normalize the axis, I need to choose a $f_0$ right? Could you tell me what to choose for $f_0$ given my barker spectrum looks like this ? – Dreamcooled May 22 '17 at 8:11