# How does 3D Lidar work?

It is a beginner question for most of you, I had Googled this question but I didn't find any satisfying answer. What is the returned raw data from lidar, the difference between 2d and 3d lidar? How we map with lidar? I need mathematical relations of this process.

Lidar, sonar, and radar all work generally the same:

1. Emit a pulse. For radar, this means briefly energizing an antenna. For sonar, it means briefly energizing a sound transducer/speaker. For lider, this is means briefly flashing a light (typically a laser).
2. As you emit the pulse, start a timer.
3. Wait for a reflection to return. For radar, this means an electrical pulse in your antenna. For sonar, it's an acoustic pulse at a microphone. For lidar, it's a light flash at a photosensor.
4. When you detect the reflection, stop the timer.
5. Calculate the distance traveled by your reflected pulse by dividing the speed of transmission by the elapsed time. For radar and lidar it's the speed of light, for sonar it's the speed of sound. These speeds will vary depending on the medium through which your pulses are propagating. For the speed of light, the variation may not be big enough to matter, but for sonar it will definitely matter. For underwater sonar things like salinity, temperature, etc. is enough to make a big impact.
6. The distance calculated in step 5 above determines how far the pulse traveled. Assuming the pulse transmitter and the receiver are co-located, this would be twice the distance to the obstacle because the pulse has to travel out to the object and then back to the receiver.
7. Associate the distance to the obstacle with the direction the transmitter was pointed. This should now give you a distance and heading of the object with respect to your transmitter's base frame. This is how scan data from a laser scanner is typically returned - as a distance and angle (i.e., polar coordinates).
8. Finally, once steps 1-7 are completed, the emitter is pointed in a new direction and the process repeats. For lidar systems, typically a laser points down at a mirror that is angled at 45 degrees. The mirror spins about the vertical axis and, in doing so, continuously re-aims the output of the laser. Radar systems use motors to spin the antenna/dish. Sonar systems (especially underwater sonar) actually tend to be constantly oriented and are towed/pulled along.

These are the essentials of how all of the detection and ranging systems work. Here are some finer points that were difficult for me to understand when I was trying to learn more about radar systems. These seemed to be points that were clearly understood by most authors, but nobody laid any of these points out in any singular text that I ever read:

1. You don't get any information about the width of the object that causes the return. Usually, for radar and sonar systems, it's assumed that the object that causes the reflection occupies the entire beam width at whatever the calculated distance is. This can cause smearing and poor resolution if the beam isn't narrow enough. For lidar systems the returns are generally treated as a single point in the center of the beam.
2. Following on the above, it's possible that the object doing the reflecting only occupies a portion of the "illuminated" or pulsed area, and it is possible (read:likely) to get a subsequent return from whatever is behind the first object. For lidar systems, rain, dust, etc. will frequently cause this. Whether or not you get the data about subsequent returns is generally referred to as whether or not the device has "multi echo" capability.
3. Also following on points 1 and 2, it's not possible to discriminate against a portion of the pulse that weren't intending to listen for. No device has perfect edges to the transmission beam, but highly reflective objects that are outside of the design beamwidth may be reflective enough to generate a detectable echo with the low-energy portion of the pulse. This creates a star- or plus-shaped "dazzling" pattern in the return data, like you can see below.
4. It is entirely possible for the device to receive signals that it did not generate and to treat those as valid returning pulses. This is known as "jamming" and happens if there is some external emitter that is (coincidentally or intentionally) transmitting a similar enough signal to be accepted by the receiver.
5. Following kind of on point 4 above, there are generally times when the receiver won't detect anything at all. For systems like radar and sonar, the aperture that generates the pulse is the same object that will do the detection and so there is some switching time where the residual motion/charge that is in the aperture needs to be adequately dissipated until the receiver can "listen" for the return. For lidar systems there may be a need to change the optical return path to change from the emitter->lens to lens->receiver. These switching times will determine the minimum range for the system.

Finally, regarding your question about 2D versus 3D, this generally refers to whether or not the device is detecting points along a single line (a single scan plane) or along multiple lines (multiple scan "planes" which, for non-zero "plane" angles, actually create scan cones).

:EDIT:

Forgot - here's a good picture from a synthetic aperture radar system showing some highly reflective objects - they make the + patterns in the data where they're creating a detectable reflection even though the radar isn't pointed directly at it. It's kind of like a lens flare, but not exactly the same mechanism.

• so, the things became clear, my goal is to build a sonar net(ultrasonic sensors) that -in an approximate manner- operates like lidar, i have to create a 3d point cloud from only ultrasonic sensors, does this necessity is achievable? the main purpose is to map the environment with -if it is possible - height information. How much can i separates between objects that are located at same beam angle of ultrasonic? Jun 20, 2019 at 17:29
• @MjdKassem - What you're describing is akin to a side-scan sonar array that builds a 3d point cloud of the ocean floor, so it's definitely achievable. The issue you're going to have is the physical size of the device. I would urge you to look at the governing equations.
– Chuck
Jun 20, 2019 at 17:48
• if we think to narrow the beam angel of sonar, or using multiple sensors in some configuration, can we get rough representation ob objects ? i don't know how to narrow the beam angle, i have the popular one " hc-sr04", for lidar it return the strength for each distance, how can we think like this manner, any mathematical formulas can help me Jun 20, 2019 at 18:02
• @MjdKassem - You get a narrower beam angle by increasing the size of the aperture relative to the operating wavelength. You can either increase frequency, for a shorter wavelength, or you can get a physically larger aperture. Sonar design is a field where people spend entire careers doing product design. Not to discourage you, but there's no short answer here to get you everything you need. I would suggest looking to your local university for guidance - classes, books, or both.
– Chuck
Jun 20, 2019 at 18:35