Triangulation, Trilateration, or Multilateration? (EE Tip #125)

Local Positioning System (LPS) and GPS (not just the US system) both use several transmitters to enable a receiver to calculate its geographical position. Several techniques are possible, each with its advantages and drawbacks. The important thing in all these techniques is the notion of a direct path (line of sight, or LoS). In effect, if the transmitter signal has not taken the shortest path to the receiver, the distance between them calculated by the receiver will be incorrect, since the receiver does not know the route taken by the radio signal.

Three mathematical techniques are usually used for calculating the position of a receiver from signals received from several transmitters: triangulation, trilateration, and multilateration. The last two are very similar, but should not be confused.

Triangulation

Triangulation (Figure 1) is a very ancient technique, said to date from over 2,500 years ago, when it was used by the Greek philosopher and astronomer Thales of Miletus to measure (with surprising accuracy) the radius of the Earth’s orbit around the Sun.

Triangulation

Figure 1—Triangulation: you are at A, from where you can see B and C. If you know their geographical positions, you can find your own position with the help of a compass.

It allows an observer to calculate their position by measuring two directions towards two reference points. Since the positions of the reference points are known, it is hence possible to construct a triangle where one of the sides and two of the angles are known, with the observer at the third point. This information is enough to defi ne the triangle completely and hence deduce the position of the observer.

Using triangulation with transmitters requires the angle of incidence (angle of arrival, or AoA) of a radio signal to be measured. This can be done using several antennas placed side by side (an array of antennas, for example, Figure 2) and to measure the phase difference between the signals received by the antennas.

Antenna array

Figure 2—An antenna array makes it possible to measure the angle of incidence of a radio signal, and hence its direction.

If the distance between the antennas is small, the incident front of the signal may be considered as straight, and the calculation of the angle will be fairly accurate. It’s also possible to use a directional antenna to determine the position of a transmitter. The antenna orientation producing the strongest signal indicates the direction of the transmitter. All you then have to do is take two measurements from known transmitters in order to be able to apply triangulation.

Trilateration

This technique requires the distance between the receiver and transmitter to be measured. This can be done using a Received Signal Strength Indicator (RSSI), or else from the time of arrival (ToA)—or time of flight (ToF) Figure 3—of the signal, provided that the receiver and transmitter are synchronized — for example, by means of a common timebase, as in GPS.

Arrival time

Figure 3—The length of the arrows corresponds to the arrival time at receiver P of the signals broadcast by three transmitters A, B, and C. It forms a measurement of the distances between the transmitters and the receiver.

Thus, when receiving a signal from a single transmitter, we can situate ourselves on a circle (for simplicity, let’s confi ne ourselves to two dimensions and ideal transmission conditions) with the transmitter at the center. Not very accurate. It gets better with two transmitters — now there are only two positions possible: the two points where the circles around the two transmitters intersect. Adding a third transmitter enables us to eliminate one of these two possibilities (Figure 4).

Trilateration

Figure 4—2-D trilateration. In 3-D, another transmitter has to be added in order to determine a position unambiguously.

When we extend trilateration to three dimensions, the circles become spheres. Now we need to add one more transmitter in order to fi nd the position of the receiver, as the intersection of two spheres is no longer at two points, but is a circle (assuming we ignore the trivial point when they touch). This explains why a GPS needs to “see” at least four satellites to work.

Multilateration

Using a single receiver listening to the signals (pulses, for example) from two synchronized transmitters, it is possible to measure the difference between the arrival times (time difference of arrival, or TDoA) of the two signals at the receiver. Then the principle is similar to trilateration, except that we no longer fi nd ourselves on a circle or a sphere, but on a hyperbola (2D) or a hyperboloid (3D). Here too, we need four transmitters to enable the receiver to calculate its position accurately.

The advantage of multilateration is that the receiver doesn’t need to know at what instant the signals were transmitted—hence the receiver doesn’t need to be synchronized with the transmitters. The signals, and hence the electronics, can be kept simple. The LORAN and DECCA systems, for example, work like this.—Clemens Valens, “Geolocalization without GPS,” Elektor, February 2011.

Embedded Programming: Rummage Around In This Toolbox

Circuit Cellar’s April issue is nothing less than an embedded programming toolbox. Inside you’ll find tips, tools, and online resources to help you do everything from building a simple tracing system that can debug a small embedded system to designing with a complex system-on-a-chip (SoC) that combines programmable logic and high-speed processors.

Article contributor Thiadmer Riemersma describes the three parts of his tracing system: a set of macros to include in the source files of a device under test (DUT), a PC workstation viewer that displays retrieved trace data, and a USB dongle that interfaces the DUT with the workstation (p. 26).

Thaidmer Riemersma's trace dongle is connected to a laptop and device. The dongle decodes the signal and forwards it as serial data from a virtual RS-232 port to the workstation.

Thaidmer Riemersma’s trace dongle is connected to a laptop and DUT. The dongle decodes the signal and forwards it as serial data from a virtual RS-232 port to the workstation.

Riemersma’s special serial protocol overcomes common challenges of tracing small embedded devices, which typically have limited-performance microcontrollers and scarce interfaces. His system uses a single I/O and keeps it from bottlenecking by sending DUT-to-workstation trace transmissions as compact binary messages. “The trace viewer (or trace “listener”) can translate these message IDs back to the human-readable strings,” he says.

But let’s move on from discussing a single I/0 to a tool that offers hundreds of I/0s. They’re part of the all-programmable Xilinx Zynq SoC, an example of a device that blends a large FPGA fabric with a powerful processing core. Columnist Colin O’Flynn explores using the Zynq SoC as part of the Avnet ZedBoard development board (p. 46). “Xilinx’s Zynq device has many interesting applications,” O’Flynn concludes. “This is made highly accessible by the ZedBoard and MicroZed boards.”

An Avnet ZedBoard is connected to the OpenADC. The OpenADC provides a moderate-speed ADC (105 msps), which interfaces to the programmable logic (PL) fabric in Xilinx’s Zynq device via a parallel data bus. The PL fabric then maps itself as a peripheral on the hard-core processing system (PS) in the Zynq device to stream this data into the system DDR memory.

An Avnet ZedBoard is connected to the OpenADC. (Source: C. O’Flynn, Circuit Cellar 285)

Our embedded programming issue also includes George Novacek’s article on design-level software safety analysis, which helps avert hazards that can damage an embedded controller (p. 39). Bob Japenga discusses specialized file systems essential to Linux and a helpful networking protocol (p. 52).

One of the final steps is mounting the servomotor for rudder control. Thin cords connect the servomotor horn and the rudder. Two metal springs balance mechanical tolerances.

Jens Altenburg’s project

Other issue highlights include projects that are fun as well as instructive. For example, Jens Altenburg added an MCU, GPS, flight simulation, sensors, and more to a compass-controlled glider design he found in a 1930s paperback (p. 32). Columnist Jeff Bachiochi introduces the possibilities of programmable RGB LED strips (p. 66).

Two Campuses, Two Problems, Two Solutions

In some ways, Salish Kootenai College (SKC)  based in Pablo, MT, and Penn State Erie, The Behrend College in Erie, PA, couldn’t be more different

SKC, whose main campus is on the Flathead Reservation, is open to all students but primarily serves Native Americans of the Bitterroot Salish, Kootenai, and Pend d’Orellies tribes. It has an enrollment of approximately 1,400. Penn State Erie has roughly 4,300.

But one thing the schools have in common is enterprising employees and students who recognized a problem on their campuses and came up with technical solutions. Al Anderson, IT director at the SKC, and Chris Coulston, head of the Computer Science and Software Engineering department at Penn State Erie, and his team have written articles about their “campus solutions” to be published in upcoming issues of Circuit Cellar.

In the summer of 2012, Anderson and the IT department he supervises direct-wired the SKC dorms and student housing units with fiber and outdoor CAT-5 cable to provide students better  Ethernet service.

The system is designed around the Raspberry Pi device. The Raspberry Pi queries the TMP102 temperature sensor. The Raspberry Pi is queried via the SNMP protocol.

The system is designed around the Raspberry Pi device. The Raspberry Pi queries the TMP102 temperature sensor. The Raspberry Pi is queried via the SNMP protocol.

“Prior to this, students accessed the Internet via a wireless network that provided very poor service.” Anderson says. “We wired 25 housing units, each with a small unmanaged Ethernet switch. These switches are daisy chained in several different paths back to a central switch.”

To maintain the best service, the IT department needed to monitor the system’s links from Intermapper, a simple network management protocol (SNMP) software. Also, the department had to monitor the temperature inside the utility boxes, because their exposure to the sun could cause the switches to get too hot.

This is the final installation of the Raspberry Pi. The clear acrylic case can be seen along with the TMP102 glued below the air hole drilled into the case. A ribbon cable was modified to connect the various pins of the TMP102 to the Raspberry Pi.

This is the final installation of the Raspberry Pi in the SKC system. The clear acrylic case can be seen along with the TMP102 glued below the air hole drilled into the case. A ribbon cable was modified to connect the various pins of the TMP102 to the Raspberry Pi.

“We decided to build our own monitoring system using a Raspberry Pi to gather temperature data and monitor the network,” Anderson says. “We installed a Debian Linux distro on the Raspberry Pi, added an I2C Texas Instruments TMP102 temperature sensor…, wrote a small Python program to get the temperature via I2C and convert it to Fahrenheit, installed SNMP server software on the Raspberry Pi, added a custom SNMP rule to display the temperature from the script, and finally wrote a custom SNMP MIB to access the temperature information as a string and integer.”

Anderson, 49, who has a BS in Computer Science, did all this even as he earned his MS in Computer Science, Networking, and Telecommunications through the Johns Hopkins University Engineering Professionals program.

Anderson’s article covers the SNMP server installation; I2C TMP102 temperature integration; Python temperature monitoring script; SNMP extension rule; and accessing the SNMP Extension via a custom MIB.

“It has worked flawlessly, and made it through the hot summer fine,” Anderson said recently. “We designed it with robustness in mind.”

Meanwhile, Chris Coulston, head of the Computer Science and Software Engineering department at Penn State Erie, and his team noticed that the shuttle bus

The mobile unit to be installed in the bus. bus

The mobile unit to be installed in the bus.

introduced as his school expanded had low ridership. Part of cause was the unpredictable timing of the bus, which has seven regular stops but also picks up students who flag it down.

“In order to address the issues of low ridership, a team of engineering students and faculty constructed an automated vehicle locator (AVL), an application to track the campus shuttle and to provide accurate estimates when the shuttle will arrive at each stop,” Coulston says.

The system’s three main hardware components are a user’s smartphone; a base station on campus; and a mobile tracker that stays on the traveling bus.

The base station consists of an XTend 900 MHz wireless modem connected to a Raspberry Pi, Coulston says. The Pi runs a web server to handle requests from the user’s smart phones. The mobile tracker consists of a GPS receiver, a Microchip Technology PIC 18F26K22 and an XTend 900 MHz wireless modem.

Coulston and his team completed a functional prototype by the time classes started in August. As a result, a student can call up a bus locater web page on his smartphone. The browser can load a map of the campus via the Google Maps JavaScript API, and JavaScript code overlays the bus and bus stops. You can see the bus locater page between 7:40 a.m. to 7 p.m. EST Monday through Friday.

“The system works remarkably well, providing reliable, accurate information about our campus bus,” Coulston says. “Best of all, it does this autonomously, with very little supervision on our part.  It has worked so well, we have received additional funding to add another base station to campus to cover an extended route coming next year.”

The base station for the mobile tracker is a sandwich of Raspberry Pi, interface board, and wireless modem.

The base station for the mobile tracker is a sandwich of Raspberry Pi, interface board, and wireless modem.

And while the system has helped Penn State Erie students make it to class on time, what does Coulston and his team’s article about it offer Circuit Cellar readers?

“This article should appeal to readers because it’s a web-enabled embedded application,” Coulston says. “We plan on providing users with enough information so that they can create their own embedded web applications.”

Look for the article in an upcoming issue. In the meantime, if you have a DIY wireless project you’d like to share with Circuit Cellar, please e-mail editor@circuitcellar.com.

 

 

 

 

Great Plains Super Launch 2013

 

Pella, IA — Spectators, visitors and participants alike all erupted into cheerful applause and exclamation after watching the weather balloons launch successfully from the launch site at Vermeer on Saturday. The onlookers observed these hydrogen/helium filled balloons rising into the air until they faded from sight, approaching extremely high altitudes.  The launch was the start of an hour and a half that the balloon spent ascending, all the way into the Earth’s ozone layer.  Another thirty five or forty minutes later the balloon popped and parachutes back to Earth.

The balloons enable us to explore the region of the atmosphere called “near space”, which is above 60,000 ft., but below the accepted altitude of space- 328,000 ft. Cosmic radiation of near space is 100 times greater than it is at sea level. The large balloons are attached to a payload, which contains GPS tracking and various sensors. The payloads contain beacons which emit radio signals. Many of the payloads in this year’s super launch were made by students dedicated to exploring near space.

This sort of active involvement is what PENS strives for. PENS is Pella’s Exploring Near Space program. Mike Morgan, the president of PENS, enjoys and commits to getting kids involved and interested in science and technologies.

“The only thing that goes higher than our balloons are astronauts and satellites. The launch of a radio balloon isn’t something you see or do every day,” Morgan said.
The payload of the balloon also includes a camera so that you can get the view from the edge of space, along with other valuable information that the payload and sensors give. They are used to test things such as barometer, pressure, temperature, UV radiation and humidity. All of these are important factors in the study of aero science.

Bill Brown, founding father of Amateur Radio, participated in the Great Plains Super Launch on Saturday. From Alabama, Brown flew the first high altitude balloon with an amateur radio and video camera in 1987. Brown has flown 400 balloons in 20 states, but each launch presents new information and stimulating challenges. Brown explains that from the edge of space, “You can see the black sky and the curve of the Earth”.

For Nick Stich, the balloon that he launched was his 188th balloon. Balloons from all over the country were launched last Saturday, including radio balloons from Nebraska Stratospheric Amateur Radio, Edge of Space Sciences, DePauw University, and Iowa High Altitude Balloon. PENS, coordinated by Jim Emmert, hosted the conference for near space explorers and enthusiasts.

By Renee Van Roekel
The Chronicle

For more information on the super launch or radio ballooning, visit www.superlaunch.org .

This article was originally published by The Pella Chronicle on June 22, 2013, and is posted here with the permission of its publisher.

CC268: The History of Embedded Tech

At the end of September 2012, an enthusiastic crew of electrical engineers and journalists (and significant others) traveled to Portsmouth, NH, from locations as far apart as San Luis Obispo, CA,  and Paris, France, to celebrate Circuit Cellar’s 25th anniversary. Attendees included Don Akkermans (Director, Elektor International Media), Steve Ciarcia (Founder, Circuit Cellar), the current magazine staff, and several well-known engineers, editors, and columnists. The event marked the beginning of the next chapter in the history of this long-revered publication. As you’d expect, contributors and staffers both reminisced about the past and shared ideas about its future. And in many instances, the conversations turned to the content in this issue, which was at that time entering the final phase of production. Why? We purposely designed this issue (and next month’s) to feature a diversity of content that would represent the breadth of coverage we’ve come to deliver during the past quarter century. A quick look at this issue’s topics gives you an idea of how far embedded technology has come. The topics also point to the fact that some of the most popular ’80s-era engineering concerns are as relevant as ever. Let’s review.

In the earliest issues of Circuit Cellar, home control was one of the hottest topics. Today, inventive DIY home control projects are highly coveted by professional engineers and newbies alike. On page 16, Scott Weber presents an interesting GPS-based time server for lighting control applications. An MCU extracts time from GPS data and transmits it to networked devices.

The time-broadcasting device includes a circuit board that’s attached to a GPS module. (Source: S. Weber, CC268)

Thiadmer Riemersma’s DIY automated component dispenser is a contemporary solution to a problem that has frustrated engineers for decades (p. 26). The MCU-based design simplifies component management and will be a welcome addition to any workbench.

The DIY automated component dispenser. (Source: T. Riemersma, CC268)

USB technology started becoming relevant in the mid-to-late 1990s, and since then has become the go-to connection option for designers and end users alike. Turn to page 30 for Jan Axelson’s  tips about debugging USB firmware. Axelson covers controller architectures and details devices such as the FTDI FT232R USB UART controller and Microchip Technology’s PIC18F4550 microcontroller.

Debugging USB firmware (Source: J. Axelson, CC268)

Electrical engineers have been trying to “control time” in various ways since the earliest innovators began studying and experimenting with electric charge. Contemporary timing control systems are implemented in a amazing ways. For instance, Richard Lord built a digital camera controller that enables him to photograph the movement of high-speed objects (p. 36).

Security and product reliability are topics that have been on the minds of engineers for decades. Whether you’re working on aerospace electronics or a compact embedded system for your workbench (p. 52), you’ll want to ensure your data is protected and that you’ve gone through the necessary steps to predict your project’s likely reliability (p. 60).

The issue’s last two articles detail how to use contemporary electronics to improve older mechanical systems. On page 64 George Martin presents a tachometer design you can implement immediately in a machine shop. And lastly, on page 70, Jeff Bachiochi wraps up his series “Mechanical Gyroscope Replacement.” The goal is to transmit reliable data to motor controllers. The photo below shows the Pololu MinIMU-9.

The Pololu MinIMU-9′s sensor axes are aligned with the mechanical gyro so the x and y output pitch and roll, respectively. (Source: J. Bachiochi, CC268)