# Motion detection with FMCW radar

I am studying the work of a microwave rangefinder and faced such a problem, but before that, a preface:

I have a microwave module that operates at 24GHz. I use a 1kHz triangle waveform as the modulating signal. Frequency deviation is 21.5 MHz. With this, I get a resolution of ~ 3.5m. Next, I look at the signal in the private area from the I output (after amplifying it).

If I understood everything correctly (if not, correct me), then if a stationary object is at a distance of 0-3.5 m from the rangefinder, I will see the beat frequency (from the I output) of 1 kHz. If a stationary object is at a distance of 3.5-7m, then I will see a beat frequency of 2 kHz, etc.

If the object moves at a distance of 0-3.5m from the rangefinder, then I will see the Doppler shift to the right and left of the 1kHz frequency. This displacement will be greater, the greater the speed of the moving object.

Further, in order to detect only moving objects, I put several digital notch filters at frequencies of 1 kHz, 2 kHz, etc. And to select the subzone (0-3.5m, 3.5-7m, etc.) in which the object is moving, I use a bandpass filter. For example, for the first subzone the notch is 995-1005Hz and the bandpass filter is 500-1500Hz. P.S. Before digitizing the signal, there is an amplifier and an analog low-pass filter with a cutoff frequency of 10 kHz. Sampling rate 48kHz.

Then I noticed the following problem: if, for example, at a distance of 7-10.5 m there is a large stationary object (for example, a metal fence), then near 3 kHz, namely 3005-3030 Hz and 2970-2995 Hz, I see some kind of signal. Moreover, I do not always see this signal, but only when I tune a certain angle where the microwave module is looking. That is, as if there is some kind of movement at a low speed. The fence is fixed, and it is only motionless. Perhaps this is a reflected signal from something moving, such as grass ...

Signal spectrum when directed to empty space: Signal spectrum when hiking 0-3.5 m:

if a stationary object is at a distance of 0-3.5 m from the rangefinder, I will see the beat frequency (from the I output) of 1 kHz. If a stationary object is at a distance of 3.5-7m, then I will see a beat frequency of 2 kHz, etc.

not quite right: The beat frequency is actually continuosly depending on the distance. Let's see:

first, let's imagine all of this happens only within the duration of the rising slope of your chirp.

Your 1 kHz triangle means you make 21.5 MHz in half a period of 1 ms, so that's a slope of 43 MHz/ms = 4.3·10⁹ Hz/s.

In the time it takes your radio wave to travel, say, to an object 1m away and back, 1 m / (3·10⁸ m/s) = 3.3 · 10⁻⁹ s, the local oscillator in your radar has hence gotten 3.3·4.3 Hz further; you mix the reflection with the local oscillator and hence get a beat frequency of 14.2 Hz.

Within the ambiguity range of your radar, for the duration of the rising slope that means your beat frequency is actually the distance in meters times 14.2 Hz. Simple as that! There's no steps involved here.

Further, in order to detect only moving objects, I put several digital notch filters at frequencies of 1 kHz, 2 kHz, etc. And to select the subzone (0-3.5m, 3.5-7m, etc.) in which the object is moving, I use a bandpass filter. For example, for the first subzone the notch is 995-1005Hz and the bandpass filter is 500-1500Hz. P.S. Before digitizing the signal, there is an amplifier and an analog low-pass filter with a cutoff frequency of 10 kHz. Sampling rate 48kHz.

Since there's no discrete steps, your notch filters aren't going to work. (they might, because they're not infinitely steep filters).

As explained above, in a FMCW radar, you can't filter by speed through fixed-frequency filters – the beat frequency continously depends on the range.

The way you can tell a change in beat frequency due to range from one due to Doppler (and hence, velocity) is that you look at the durations for which the beat frequency is positive – and when it's negative.

I cheated a bit above when I said "imagine this all happens during the the rising slope". Let's start with something simpler than your triangular wave, a sawtooth FMCW chirp. The following image(s) are taken from Radartutorial.eu because I can't draw them any better myself:

The red line is the instantaneous frequency of the transmit signal, the green the instantaneous frequency of the reflection. The beat frequency is the (vertical) difference between these two! As said, it will linearly grow with range.

Now, for the most part in that image, the red line is above the green line, but at a certain point it jumps, and for a while, the beat frequency becomes negative (and larger in magnitude). Note how the sum of the positive and the absolute of the negative beat frequency necessarily add up to your total frequency range (21.5 MHz in your case).

The point at which that beat frequency sign switch happens again depends on range – the further away object is, the sooner it happens; after all, the horizontal shift of the green relative to the red line is the time difference, so twice the distance divided by the speed of light. So, for a still target, the beat frequency and the duration of the negative-frequency part of a cycle are just multiples of each other, and contain the same info.

Now, introduce a Doppler shift: That shifts the green line up or down a bit – but it doesn't change the duration of the negative part! So, from the relationship of that duration to the beat frequency, you can infer the Doppler that must have occured. Now, you've taught your sawtooth-FMCW radar to be a range/velocity radar! Pretty cool, huh?

For the triangular-FMCW, things get even more beautiful: Just like in the sawtooth case, your beat frequency has two durations of constant frequency, but not a jump, but a falling and rising period to. From the difference of the two constants, you can directly read the doppler shift, and from their sum the distance. Nice!

However, as said above, you can't range- nor velocity-gate your observation with filters in either case.

• As I wrote above, I made an FFT of the signal from the I output of the microwave module and when directed into empty space, I see the amplitude at frequencies of 1 kHz, 2 kHz, etc. I just tried to get rid of them with notch filters. Then I stayed to make passes at a distance of 0-3.5 and saw a signal in the region of 1 kHz diverging in both directions. How much it diverges depended on the speed of movement. If I walk at a distance of 3.5-7m, then I see the same thing in the 2kHz region. Sep 4, 2021 at 16:27
• As I wrote, I tried to isolate this signal with 500-1500Hz and 1500-2500Hz bandpass filters for frequencies of 1kHz and 2kHz, respectively. I don't understand then what I saw ... Sep 4, 2021 at 16:27
• @red15530 re:triangle: read the complete answer. Sep 4, 2021 at 16:52
• I'm completely confused ... You gave an example of how to determine the distance and Doppler shift from the transmitted signal and the reflected one. But in reality I do not see these signals, but I already see their sum after the mixer, which I receive at the output of the I microwave module. Also, I do not understand what to do if there are several moving ones? My task is only to move the object at a certain distance. Its exact speed is not important to me. Sep 4, 2021 at 21:02
• The mixer doesn't give you a sum, but a product filtered such that you only observe the beat frequency signal! In a multiple-target scenario, well, you need to find the multiple frequency components of your beat frequency signal. If this is news to you, you honestly might do well refreshing your radar basics - the site I've linked to is quite OK. Sep 4, 2021 at 21:16