radar is an important part of autonomous
vehicles because it allows the vehicle
to detect objects and estimate their
parameters from a distance which it can
then use to make decisions
and applications for automotive vehicles
range from blind spot detection and rear
collision warning and adaptive cruise
control up to tracking and classifying
objects like pedestrians and cyclists
and other vehicles
and for flying vehicles radar is used
for object avoidance and for measuring
altitude and there are a host of other
uses for commercial vehicle applications
but in order for radar to be a practical
solution for these applications it needs
to be relatively low power small form
factor and low cost
and part of how that is accomplished but
certainly not the complete story
is with frequency modulated continuous
wave radar or fmcw
and so what i want to do in this video
is talk just a little bit about why fmcw
is a good solution for autonomous
vehicle applications but mostly i want
to try to build up a little intuition
around how fmcw radar can measure range
and radial velocity for multiple targets
all at once i hope you stick around for
it i'm brian and welcome to a matlab
tech talk
to begin let's just look at the second
half of fmcw what is continuous wave
radar
and as the name suggests this is a type
of radar system that transmits a known
stable frequency continuously
that wave propagates out reflects off an
object and is received continuously by
the radar
now this is in contrast to pulsed radar
where short duration but high energy
pulses are emitted in series
with pulsed radar in its simplest form
determining range and radial velocity is
relatively intuitive i mean we can
determine the distance to an object by
timing how long it takes the pulse to
travel the round trip and then multiply
it by the speed of light to get the
distance and then divide by two to get
the one way distance
and we can measure radial velocity
simply by looking at the change in
distance between two successive pulses
now there are other more complex and
more accurate ways to determine these
measurements with pulsed radar but i
just wanted you to see that there is a
simple and easy to understand solution
on the other hand getting these
measurements isn't necessarily obvious
with continuous wave radar since there
is no start and end to a continuous
signal that we can use to time how long
it takes for the signal to travel the
round-trip distance
so why are we complicating matters by
using continuous wave radar
well it comes down to size weight and
power of the electronics and the
specific applications of where we're
going to use this radar
for example in pulsed radar the pulses
need to be relatively powerful so that
the return signal has enough energy to
be detected over the short duration
often just a microsecond or so and
handling these large peak power loads
can make the electronics larger and more
expensive than continuous lower power
loads
and another reason is that pulsed radars
have a minimum range that can be
detected of about half the length of the
pulse and this is because the trailing
edge of the pulse must be emitted before
the leading edge returns
and as an example the minimum detectable
range is about 150 meters for a one
microsecond pulse and since autonomous
vehicles usually need to measure objects
within a few meters and have cheaper and
smaller electronics then continuous wave
tends to be the best choice
now getting range and radial velocity
from continuous waves might not seem
obvious at first but this is where the
doppler effect beat frequency and
frequency modulation come into play
let's start with the doppler effect
imagine a radar sends out a signal at a
fixed frequency and if the radar and the
object it's detecting are both
stationary then the signal will reflect
off that object and come back to the
radar at the same frequency like
bouncing off a mirror
so here the black transmit frequency is
the exact same as the blue reflected
frequency
however if the object is moving towards
the radar then the reflected frequency
is higher than the transmit frequency
due to the fact that the later parts of
the signal don't have to travel as far
before being reflected
for example this peak reflects off the
object here
but the second peak only had to travel
to this spot before being reflected
since the object moved closer
therefore it's caught up a little bit to
the earlier peak of the signal that had
to travel further this increases the
frequency proportional to how fast the
object is moving
and the opposite is true if the object
is moving away then the reflected
frequency is lower
in this way the change in the frequency
of the received signal can provide an
estimate of the radial velocity of the
object and its direction
so the question now is how can we detect
these frequency changes
and the way that i have it drawn here
where the reflected signal is like half
the frequency of the transmitted signal
then there is a really obvious
difference between the two
however something to note is that
continuous wave radar is often in the
microwave range of the spectrum which
means transmit frequencies that are tens
of gigahertz
and for an object moving at a couple
hundred kilometers per second and slower
then the reflected frequency is only
shifted by tens of kilohertz
and so the frequency is only being
shifted by a hundred thousandth of a
percent
and not half or double like i've shown
here the two signals would be
indistinguishable from one another on
this screen if i drew them correctly
but detecting really tiny frequency
differences is made much easier by
looking at beat frequencies
and to show you how it works i made this
simple matlab app
the transmit frequency from the radar
i'm setting to 100 gigahertz the
received signal comes back at a
different frequency which i can adjust
with this slider so here i'm going to
just set it to 108 gigahertz which means
that the object is moving towards the
radar
and again this doppler shift is much
larger than anything an autonomous
vehicle will see but i want to be able
to show the beat frequency easily on
this screen
all right so at the radar we have a
known 100 gigahertz transmit signal and
we can compare it to the 108 gigahertz
receive signal
and notice initially these two peaks
line up with each other and then as time
progresses the faster frequency starts
to lead the lower one and eventually the
peaks are exactly out of phase
and if we keep going again the peaks
line up and then are out of phase and
then they line up again and so on
this is the beat frequency
and to find this frequency we can mix
these two signals together by
multiplying them and we get this
resulting waveform
and by the way multiplying two sinusoids
produces a signal that is composed of
two new sinusoids which we can see
clearly in this waveform
there's this high frequency component
which comes from adding the transmit and
receive frequencies together and then
this low frequency component that comes
from subtracting the transmit and
receive frequencies and this subtraction
produces the beat frequency
which you can see lines up with the in
phase and out of phase portions of our
two signals
and when we're talking about two signals
in the gigahertz
adding the transmit and receive
frequencies together produces something
that is extremely fast
however subtracting the two produces
just the shift to doppler which in this
example is 8 gigahertz but remember for
practical applications it would only be
in the kilohertz range
so we have a gigahertz signal
superimposed with a kilohertz signal and
we could easily separate out the beat
frequency with a low-pass filter
and as i increase the received signal
frequency you can see that the beat
frequency increases as well and
therefore by looking at the much slower
beat frequency we can determine the
radial velocity of the object
however there is a small problem with
how i've set this up if i toggle back
and forth between 120 gigahertz and 80
gigahertz you'll notice that the beat
frequency doesn't change the difference
is 20 gigahertz regardless
this is a radar system with just a real
stage a single transmit signal and with
this setup we can determine the speed of
the object but not the direction we
can't tell if it's coming towards the
radar or moving away
but this is where radar systems with
complex stages come into play
imagine that the radar sends out two
orthogonal signals that are separated by
90 degrees of phase so called iq signals
the iq comes from the fact that the real
component is called in phase and the
imaginary component is called quadrature
but by generating these complex signals
we can now determine the direction of
the object
when we mix the transmit and receive
signals we get another complex signal
where both the in phase and quadrature
components oscillate at the beat
frequency
but in addition to that notice that when
i toggle between 80 gigahertz and 120
gigahertz the in phase component doesn't
change just like we saw before
but the quadrature component does move
and therefore by checking which of the
signals is leading in phase we can
determine direction
as a quick recap we transmit iq signals
they get doppler shifted and then the
received signals are mixed with the
transmit signals to produce a beat
frequency and the beat frequency is
proportional to radial velocity of the
object and its direction is given by
which signal is leading in phase
and that's pretty awesome on its own
that we can get velocity from a
continuous signal but with autonomous
vehicles we want to measure range as
well as velocity and to do that we need
frequency modulation
distance doesn't cause a doppler shift
like velocity does instead it produces a
time shift because of the time it takes
for the signal to travel to the object
and back the further the object the more
time it takes
and with a fixed frequency signal we
can't detect this delay since again
there isn't a pulse or any other
defining characteristic we can use to
measure time
a delay of one period looks the same as
two periods and the same as three and
well you get the idea
we can see this more cleanly if we plot
the frequency of the transmit signal as
a function of time
with a fixed frequency this is just a
horizontal line
the doppler shift lowers the frequency
of the received signal if the object is
moving away from the radar and raises
the frequency if it's moving towards the
radar and we already know we can detect
this beat frequency and direction by
mixing the two iq signals
but for a stationary object at a
distance the received signal is just
shifted horizontally and therefore there
is no beat frequency between the
transmit and receive signals
so to get around this problem we can
modulate the frequency
for example with linear frequency
modulation we essentially ramp the
transmit frequency from some value like
77 gigahertz up to another one like 81
gigahertz and we do this over and over
again creating a sawtooth modulation
pattern
now when the received signal is delayed
in time
we do get two different frequencies at
any given moment and hence a beat that
can be measured
so we are able to determine range in a
very similar way as we do velocity by
mixing the transmit and receive signals
and measuring the beat frequency
unfortunately with this setup we have a
slight problem that we need to address
the problem is we can't determine
whether this beat frequency is caused by
a time shift like we see here
or by a doppler shift like this
and worse than that we can't tell if
there's a combination of doppler and a
time shift so we have two unknowns
doppler and time delay and just this
single beat frequency
another way to visualize this is on a
range doppler chart
again for a single beat frequency the
object could have zero range and some
doppler
zero doppler and some range or a
combination of the two
so the actual parameters of the object
fall somewhere on this line
and in order to resolve these two
unknowns we essentially need a second
beat frequency
and there are many ways to accomplish
this
for one
instead of a sawtooth modulation we
could use triangular modulation where
the frequency increases linearly and
then decreases linearly
now when an object is moving away from
the radar at zero range the received
frequency is lower and we get two beat
frequencies
one on the rising side of the triangle
which looks like a positive time delay
but then one on the falling side that
looks like a negative time delay
in this way the two time delays cancel
out and we can determine that range is
zero and therefore the beat frequency is
produced only by doppler
and when an object is at a distance but
not moving then both the rising and
falling sides are delayed in time and
this again produces two different beat
frequencies one that looks like a
positive doppler and one that looks like
a negative doppler
again those cancel out and we can
determine that the object is not moving
plus by looking at these two beat
frequencies we can separate doppler from
range with any combination of the two
back on the range doppler chart the beat
frequency for downward sloping
modulation produces a second possible
set of answers and the intersection of
the two is the true range and doppler of
the object
of course these aren't crisp lines
because the range resolution of the
radar and there's noise and interference
but conceptually this is how triangular
frequency modulation can determine range
and radial velocity of a single object
but again we have a problem here because
autonomous vehicles often encounter many
objects and sometimes there is more than
just one in the line of sight of the
radar beam
for example if there are two objects in
the radar beam then each object will
produce its own reflection which means
that there are two different beat
frequencies for the rising slope and two
for the falling slope so in total we
have four different beat frequencies
that we need to interpret
if we go back to the range and velocity
plot this is equivalent to two x's
centered over the real range and
velocity of the two objects one line for
each beat frequency
unfortunately when we do this we're
actually left with four intersections or
four potential objects and no clear way
to distinguish which of the two real
ones and which are two ghost objects
alright so now we need to get around
this problem and there are several
clever things that we could do
for one we could change the triangular
modulation such that it alternates
between two triangles of different
slopes
with this setup a doppler shift would be
the same for all four slopes
but if you apply a range shift the
apparent delay associated with the
steeper slope is less than the other one
and this provides us with additional
equations or additional beat frequencies
that we can use to solve for the
additional unknowns that come from ghost
detections
practically speaking essentially all
we're doing with the second triangle is
adding two more x's on our range doppler
chart at different slopes
and with this additional information we
can determine where the real objects are
versus the ghost objects you know as
long as they're separated enough that
they're outside of all of the fuzz
created by noise and interference and
all of that
and so with this multiple triangle
approach
you need in unique triangles for n
number of objects in the field of view
so if there's five objects then you need
five different sloped triangles
which can start to get pretty cluttered
but luckily this isn't the only way to
resolve multiple objects in the field of
view we can modulate the frequency of
the continuous wave signal in other ways
that can actually more easily separate
speed and distance for many targets at
once and i'm not going to go into them
here but i've left some really good
resources and matlab examples that show
you how to set up and interpret other
modulation schemes like multiple
frequency shift keying or mfsk and fast
chirp
and the idea behind all of them is that
through clever frequency modulation of a
continuous wave we can look at the beat
frequency that is generated when we mix
the transmit and receive signals
together to determine range and radial
velocity of multiple targets in the
field of view
all right so that's where i'm going to
leave this for now in this video we
talked about measuring range and
velocity of objects however for
autonomous vehicle applications we
usually want to know more than just that
we also want to know the object's
azimuth an elevation relative to the
radar to get a sense of where it is in
3d space and to have an understanding of
its size and shape
and that's what we're going to talk
about in the next video
so if you don't want to miss that or any
other future tech talk videos don't
forget to subscribe to this channel and
if you want to check out my channel
control system lectures i cover more
control theory topics there as well
thanks for watching and i'll see you
next time