# beat2range

Convert beat frequency to range

## Syntax

``r = beat2range(fb,slope)``
``r = beat2range(fb,slope,c)``

## Description

example

````r = beat2range(fb,slope)` converts the beat frequency of a dechirped linear FMCW signal to its corresponding range. `slope` is the slope of the FMCW sweep.```
````r = beat2range(fb,slope,c)` specifies the signal propagation speed.```

## Examples

collapse all

Assume that an FMCW waveform sweeps a band of 3 MHz in 2 ms. The dechirped target return has a beat frequency of 1 kHz. Compute the target range.

```slope = 30e6/(2e-3); fb = 1e3; r = beat2range(fb,slope)```
```r = 9.9931 ```

## Input Arguments

collapse all

Beat frequency of dechirped signal, specified as an M-by-1 vector or M-by-2 matrix in hertz. If the FMCW signal performs an upsweep or downsweep, `fb` is a vector of beat frequencies.

If the FMCW signal has a triangular sweep, `fb` is an M-by-2 matrix in which each row represents a pair of beat frequencies. Each row has the form `[UpSweepBeatFrequency,DownSweepBeatFrequency]`.

Data Types: `single` | `double`

Slope of FMCW sweep, specified as a nonzero scalar in hertz per second. If the FMCW signal has a triangular sweep, `slope` is the sweep slope of the up-sweep half. In this case, `slope` must be positive and the down-sweep half is assumed to have a slope of `-slope`.

Data Types: `single` | `double`

Signal propagation speed, specified as a positive scalar in meters per second.

Data Types: `single` | `double`

## Output Arguments

collapse all

Range, returned as an M-by-1 column vector in meters. Each row of `r` is the range corresponding to the beat frequency in a row of `fb`.

Data Types: `single` | `double`

collapse all

### Beat Frequency

For an up-sweep or down-sweep FMCW signal, the beat frequency is FtFr. In this expression, Ft is the transmitted signal’s carrier frequency, and Fr is the received signal’s carrier frequency.

For an FMCW signal with triangular sweep, the upsweep and downsweep have separate beat frequencies.

## Algorithms

If `fb` is a vector, the function computes `c*fb/(2*slope)`.

If `fb` is an M-by-2 matrix with a row `[UpSweepBeatFrequency,DownSweepBeatFrequency]`, the corresponding row in `r` is ```c*((UpSweepBeatFrequency - DownSweepBeatFrequency)/2)/(2*slope)```.

This function supports single and double precision for input data and arguments.

 Pace, Phillip. Detecting and Classifying Low Probability of Intercept Radar. Artech House, Boston, 2009.

 Skolnik, M.I. Introduction to Radar Systems. New York: McGraw-Hill, 1980.