# How to calculate the range bin size in FMCW radar?

In FMCW, we have range resolution calculated as delta_d = c/(2B), and dmax = fs * c/(2*S) where S is the slope. my understanding is numRangeBins = dmax / delta_d. However, in the post (range-doppler map to range-velocity map conversion), it says:

rangeAxis = (1:numRangeBins)*(c/(2*fs)) % Range bin size is c/(2*fs).


fs is the sampling rate in the fast time domain, which is different from RF bandwidth B. May I have an explanation on why fs is used in the above formula instead of the RF bandwidth B?

The main difference to be aware of is between DFT based and matched filter based range finding. The confusing part is that linear frequency modulated (LFM) waveforms can be used for both, but being absolutely necessary for the former. Perhaps I could have been more explicit about calling this out and how that determines the range bin size calculation.

To add to the confusion, there's actually two "resolutions" to consider:

1. The range bin size determined by the data collection scheme (sample rate, DFT size, etc.)
2. The achievable range resolution of the waveform. This is given by $$c/(2\beta)$$.

In the example where the sample rate $$f_s$$ is used, it was assumed that a matched filter was used to correlate with the return signal. In this case the sample rate establishes the range bin size. Typically $$f_s > \beta$$, so the range bin is smaller than the range resolution achievable by the waveform. This is fine since we want the bins to accommodate the waveform returns. In the case where $$f_s=\beta$$, which is not unreasonable for some systems, then either expression for the range bin size gives you the same answer.

Now, in DFT-based range finding as is done in FMCW radars, the relationship between $$f_s$$ and $$\beta$$ also determines the range bin size but in a different way. In this answer I go through the steps of how the waveform's range resolution and range bin size are related. The key is the frequency resolution of the DFT, which is determined by the inverse of the observation time $$T$$ of the signal. In other words

$$\delta f = \frac{1}{T}$$

We also know that for an N-point DFT, the frequency bin size is

$$\Delta f = \frac{f_s}{N}$$

If we collected the $$N$$ samples at the sample rate $$f_s$$ over the observation period $$T$$, which can be the sweep time, then

$$\Delta f = \frac{f_s}{N} = \frac{1}{T_sN} = \frac{1}{T}$$

Then reviewing the linked answer, you can see how that eventually establishes the range bin size calculation to use $$c/(2\beta)$$.