Hacker News new | past | comments | ask | show | jobs | submit login
How Radar Works (daniellowengrub.com)
242 points by lowdanie 13 days ago | hide | past | web | favorite | 58 comments

The HB100 [0] and CDM324 [1] are very inexpensive little CW doppler radar modules at 10GHz and 24GHz respectively. Feed them 5v and send the mixer output to a small microphone amp/input jack and you can record the frequency beat of most objects in motion.

[0] https://www.amazon.com/dp/B00FFW4AZ4

[1] https://www.amazon.com/dp/B07WH67J9W

This is what it sounds like when you toss a quarter in front of an HB100. https://www.youtube.com/watch?v=8riretP8ylE

The bowtie looking part is the actual flight, the other part right after that is it bouncing off the counter.

Spinning same quarter - https://www.youtube.com/watch?v=5lnYvJoxRak

Shining it at parts of a ceiling fan - https://www.youtube.com/watch?v=tIiFvByf1CQ

It amazes me how cheap these application-specific chips have become - it opens up so many new potentials. I can only guess that something like this would cost $1000+ roughly 10 years ago?

I'm sure they are cheaper, but I don't think they were ever really expensive. They have been used for automatic doors, like at the grocery store, for quite some time.

No, not really, doppler radar based proximity sensors (used in e.g. baths) cost about 40 € more than 10 years ago. It's not complicated technology.

I don't know what they're doing in a bath, but small radar systems have been used as proximity fuses for anti-aircraft shells since WWII.

As light switches and such; PIR sensors don't really work in a shower room, for example.

What's an e.g. bath?

e.g. is https://en.wiktionary.org/wiki/exempli_gratia

which you can pretty much read as "for example, [example(s)]"

My mnemonic is ‘eggs ample’. :)

Commonly confused with i.e. (id est), which trasnslates to ‘that is’. The mnemonic there for me is ‘in other words’.

Sorry, I should have guessed my comment would be lost on those who don't know how to use "e.g." correctly.

Just assuming you were being earnest (perhaps learning english!) as there wasn't much to gain from interpreting it another way.

There actually isn’t much to these tbh, oscillator, mixer and pcb antennas. To use these in an application you would have to still process the analog waveform coming out. Fortunately the frequency is very low (audio range) allowing for all manner of inexpensive detection/measurement circuits.

This brings back a lot of memories. One of my proudest technical achievements was as an intern: an assignment to figure out how many unique emitters were in a field of data picked up by some antenna. The data was provided on a CD with not a lot of other info.

I ended up finding a program some college researcher had published for matching DNA patterns, and between a little data massaging and software hacking, I was amazed when results actually made sense.

As an intern, I never knew exactly who provided that CD or where the program went from there, but it was a fun problem to work on for a while.

These cross-domain hacks are very satisfying.

Is there a list somewhere about such hacks?

Thanks OP, this is a nice resource.

One note, though. The presentation of IQ demodulation seems to mix up the real and imaginary components of the analytic signal with the electric and magnetic fields. Even if you skip the analytic signal and just generate a straight up real signal (with zero imaginary component), there will still be a magnetic field.

This seems important because the current presentation suggests the complex signal representation is somehow specific to electromagnetic signals, while it is really just a mathematical convenience applicable to any signal (EM, sound, wave on jump rope, etc).

Thanks a lot for the comment - you are absolutely right.

Early nukes used an interesting radar design to trigger at a preset distance above ground: there was a long coil of cable inside the nuke, and the fuze would emit random electromagnetic noise towards the ground. The reflected noise would then be received by an antenna, and the original emitted signal would be delayed by the coil by a certain predetermined time delta. This allowed the nuke's fuze to compute autocorrelation (and therefore detect distance) using entirely analog methods, and in a way that's impossible to jam, because autocorrelation on random signal is pretty darn robust (it's a delta function for ideal white noise).

There was a good talk about how radar (and lasers) are weaponised by police to detect the speed of vehicles (and countermeasures to that) at defcon this year too.


Might be interesting too.

> how radar (and lasers) are weaponised by police to detect the speed of vehicles

How exactly is this process "weaponisation"?

If your radar gun is strong enough, it will push the car forwards. Once the plasma and gaseous metals have dissipated you can then ticket the driver for speeding even if they weren't speeding before you measured their speed.

I guess when I visit my doctor and he weighs me he's weaponizing gravity as well.

Once the police are done with it, it's a radar gun, clearly a weapon. Actually it isn't very pleasant to a uniformed police officer pointing one at you, at least in my opinion.

It's a good start, but stops short of the most interesting parts. The signal to noise section should at least mention the root of forth power in the radar equation, as this is one of the key limitations. Beam forming with mechanical scanning or phase arrays is also important from the practical standpoint, as so is the relationship between wavelength, antenna size and angular resolution. Finally, at least the concept of how the autocorelation function of a good pulse should look like is worth mentioning, with examples of complementary or pseudorandom sequences .

There is fantastic webinar (consisting of 5 videos) from TI which covers CW and FMCW radar techniques: https://training.ti.com/intro-mmwave-sensing-fmcw-radars-mod...

Wow, thanks!

Math went over my head, does anyone have a primer or intro for some of the math involved here?

Well, that's the deep end...

I'm having to translate it from TeX, so I don't know, but you might want The Scientist and Engineer's Guide to Digital Signal Processing By Steven W. Smith.


For the constant velocity case, the graphic shows the transmit pulse as having two cycles, and the received pulse as having four cycles of higher frequency, with the received pulse being the same length as the transmit pulse.

Shouldn't the received pulse have the same number of cycles as the transmit pules, and the received pulse be shorter than the transmit pulse (or longer in the case of the target moving away instead of toward the source)?

Or does something non-intuitive happen (probably because of special relativity) resulting in the received pulse gaining energy from the reflection, which is reflected (pun intended) as the pulse being longer than you'd expect classically?

You are right that the graphic is a highly simplified cartoon of what the actual received wave looks like - I should have stated that in the post.

Regarding the question, it is true that the received pulse will be shorter or longer than the transmitted one (depending on whether the object is moving towards or away from the sensor) but since we are assuming that the speed of the object is significantly less than the speed of light, we're making the simplifying assumption that this difference is negligible. People sometimes refer to this as the "stop and hop" assumption since in practice we are assuming that the object "stops" at point x when the radio wave is emitted and then "hops" to x + dt*v once the wave has been received dt seconds later.

Regarding the number of cycles, you are again correct that the image represents a gross oversimplification. One reason for this is that since the carrier frequency is so much higher than the doppler frequency, the true graph of the received wave would not be noticeably different than the transmitted one. It is easier to plot a realistic graph of the demodulated wave which you can see in the plot titles "samples of the demodulated pulse".

I know that this doesn't directly address the question you're asking, but to give an idea of the order of magnitude of the effect: the Doppler shift in frequency rounds to f_carrier * 2v/c. In the case of anything with "reasonable" speed, 2v/c is going to be very small (~10e-6 for Mach 1), and thus you would be talking about very minute differences between the transmitted and received pulse in terms of either overall pulse length or number of wavefronts received vs. sent (for what it's worth my intuition is that the pulse length actually shortens, but either way it's not measurable by the receiver).

To me, the maths of the radar are the easy part.

But the physics of it? That's something that seems entirely more complex to me.

Is it really? Could any of you explain how you emit the radio wave, and how you detect it back? In terms of hardware?

It starts with an oscillator circuit producing an alternating current sine wave at the desired frequency. The oscillator circuit often involves a crystal in order to generate an accurate and stable frequency.

The alternating current is then feed down a transmission line, which in the most basic case is just 2 wires side by side. Being side-by-side, the current going "up" in one wire is balanced by the current coming "down" in the other so that at a distance from the transmission line, the radiation from the two wires (mostly) cancel each other out. Often instead of side-by-side, one wire is often wrapped around the other with an insulator separating them (coax), but the same principal applies.

The transmission line then feeds into the antenna. A basic antenna is a piece of wire exactly 1/2 wavelength long. Electric pulses "bounce" off the wire's ends, sort of like how if you tether one end of a rope and then shake the other, the "waves" going down the rope will "bounce". The length of the wire being 1/2 wavelength is key because it takes a wave exactly one cycle to start from one end, bounce off the other, and return to the start. Just as the first wave is bouncing off the start end, it gets a new "bump" from the transmission line. This allows a lot of current to build up in the antenna, sort of like how a kid on a swing can use several small well timed kicks to swing himself much higher than just a single big one could. Of course, antennas can be much more complicated than just a dipole, for example, you could place several dipoles in a row and feed them in phase so that their transmitted signals add together at points perpendicular to the row, and cancel each other at points in line with the row. Or, you could use a parabolic dish to concentrate the signals in one direction.

In radar, the radio waves travel out, bounce off objects in the their path, and a small fraction of the original signal comes back to the antenna. Depending on the design the radar might have a separate receiving antenna, or it might receive on the same antenna it used for transmitting. From a radio perspective, a receiving antenna is exactly the same as a transmitting antenna, only, it's the radio waves coming in through space that cause it to resonate instead of the other way around in a transmitting antenna.

Finally, the signal comes down the transmission line and into a receiver circuit which analyzes and extracts whatever data (in the radar case, it deduces distance and speed by looking at the elapsed time and frequency shifts).

Small brained primate understanding: As I understand radiation happens when you subject a charged particle to an oscillating magnetic and electrical fields at right angles[1] to each other. The radiation is proportional to the cross product (I could be wrong).

Antenna's are generally resonant[2] structures that are designed to inflict that on electrons. And thus are able to efficiently convert electrical energy to radio waves and back. Works both ways.

[1] If the cross product is zero radiation is also zero. Which is why most random metal structures suck ass as antenna's.

[2] Being resonant is not a requirement. Non resonant antenna's work but aren't as efficient.

are you asking how to generate radio-waves...? get an oscillator and an antenna. hook them together and you'll get radio-waves. the physics are that a changing e-field induces a changing b-field (and vice-versa).

the same antenna, if attached to an amplifier instead of an oscillator, will receive said radio-waves.

i'm obviously glossing over enough detail to fill several library shelves worth of books.

> But the physics of it? That's something that seems entirely more complex to me.

If this interests you I recommend reading some electrodynmics books (A challenging but fascinating subject!)

I’ve always wanted a way to trigger the radar detractors that people use in their cars. I’ve noticed for a while that when a bunch of people suddenly move to the right lane there is usually a cop with a speed gun around, so sending a fake pulse periodically seems a sneaky way to clear the traffic ahead (but would only work when there was something solid to reflect the pulse back, sorry Kansas). I’ve not found anything on Google or Ali Express that looks like it might help me pull this off - nobody wants to build a Rasphberry Pi speed gun it seems.

Folks are using apps, like Waze, to share the location of police. I don't think radar detectors have been mainstream for years.

Law enforcement mostly uses lasers now. There are some detectors which pick up scattered laser light but they aren't very effective.

Back in the early 90’s, I did this in college. Mounted an X-band Gunn oscillator behind the front grill. Fun watching people hit their brake lights when I flipped the switch.

I don't think your allowed in the US to send fake pulses. Something FCC...

Otherwise I'd think you'd see a lot of radar dector jammers on the market.

Laser and radar jammers do exist and is usually targeted at high end car folks. It’s not legal obviously.

Radars jammers aren't legal (because radio waves are regulated by the FCC), but laser jammers are actually legal in most of the US (because light is regulated by the FDA):

https://youtu.be/vQtLms02PFM : popped out today on my YouTube feed, pretty relevant to this whole discussion (and also really worth talk)

Of course I knew that radar measured time of flight of radio frequencies, but it never occurred to me to actually look into the math. This was presented incredibly well.

While this is a good intro, a lot of radar work now relies not on square pulses but linear frequency modulated (LFM) waveforms. This greatly expands the number of image formation algorithms you can use, depending on system requirements.

Side note: Same technique can be used to track a cell phone, except GSM frequencies are higher so the tracking distance is considerably shorter then a normal radar. But still good enough to do a city wide track of a person of interest.

GSM frequencies (800, 1800 MHz) are about an order of magnitude lower than typical radar frequencies (~5-20 GHz).

Mode S is 1030/1090 MHz, and L-band/S-band Primary Surveillance Radars ('real' radars) are still quite in use, especially in ground-based surveillance or Air Traffic Management. In fact 4G and wimax were threatening civilian radar bands.

Thanks, this is a nice introduction.

Two typos in this sentence: One way to work around this problem is to use a non uniform spaceing of the pulses which is none as staggering. (spacing, known)

Even better:

One way to work around this problem is to use a non-uniform spacing of the pulses, which is called staggering.

Lovely introduction to pulsed radar systems. Would love a similar piece on continuous wave systems (fmcw, for example). Thanks for this!

Is CW used for radar applications? (I am only familiar with pulsed radar sets).

AFAIK not much in practice because it can only detect speed and has no real way of detecting distance. Most radar applications want to detect distance, usually enhanced to position, and speed as well. You can't really do that with CW.

FMCW (mentioned by 'itcrowd) can determine distance.

I've been watching a lot of those USS Nimitz UFO videos lately, so this is very timely

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact