Once all wireless sensor nodes are developed and ready for use, a major milestone towards conducting multimodal experiments is achieved. But this is just the first step. Wireless sensor networks must ensure data consistency across all nodes. This is accomplished by precise fusion of data from different nodes. At this point, the issue of clock drifts comes into play quickly. Wireless sensor networks must deal with the impact of clock drifts and implement synchronization algorithms accordingly.
Series kickoff
This post is the kickoff for a whole series of posts. In this series, we want to share insights regarding clock drifts and synchronization from the development of our highly synchronized wireless sensor network maphera®. We will start with a general overview, followed by more detailed posts focusing on technical aspects.
We hope you enjoy this series as much as we do. In case you are an engineer like me, don’t worry: we got you covered. With the next post, we are going to have way more technical details, numbers, and some shiny diagrams!
Let’s talk about watches
Let’s go back a little bit in time, when a lot of watches were still analog. Every now and then, you check the current time of your watch just to see that it is slightly off. So you compare the time on your watch with a reference clock and correct for its deviation.
Microcontrollers suffer a similar fate. They have internal clocks, which are crucial for a variety of tasks like scheduling and communication. Like our analog watches, the accuracy of time is less important when considering a single individual. As soon as multiple people start making arrangements, a shared time base becomes crucial. In case of sensor networks made of multiple microcontrollers, where each is running at tens of megahertz, drifts of a few microseconds can break system integrity and corrupt recorded data.
maphera® — Drifts & synchronization in wireless sensor networks
Since much of the content in this series is based on the development of maphera®, we will use maphera for reference. But the general problem of drifts and synchronization is pretty much the same for all high-resolution wireless sensor networks that fuse data from multiple sources.
While maphera® can be used for a wide variety of applications, we primarily use it to record physiological data. In this domain, some signals need high time resolution, like data from ECG and IMU sensors. As maphera® is a universal platform, the requirements for the synchronization of recorded data are derived from challenging use cases. maphera® can synchronize up to seven wirelessly connected sensors with an accuracy well below 50 µs.
When two sensors are set up in a wired network, it is rather straightforward to implement time synchronization. However, as maphera® is designed for mobile applications with minimal constraints on subject mobility, the sensors are connected wirelessly. This is where things are getting interesting.
Synchronization in wireless sensor networks
Time synchronization in wireless sensor networks is tricky. Delivering messages wirelessly exposes them to external traffic. For maphera®, we use Bluetooth-Low-Energy (BLE) to send data. BLE is a great tool for low-power wireless applications. We are going to provide more details about synchronization when using BLE in a follow-up post, but here is a quick summary: BLE operates in the ISM band. What makes the ISM band special is that it is free to use in many countries. While this simplifies the portability of BLE around the world without getting into conflicts with local regulations, many other technologies like Wi-Fi operate in this band. Transmitting a message within the ISM band is like riding a bike on the main city road during rush hour. Put your helmet on and hope for the best!
BLE is like a dedicated bike lane for you to ride on. BLE does a great job at evading other traffic on the ISM band with methods like adaptive frequency hopping. It is a very reliable protocol, ensuring messages sent will arrive at the receiver; however, it is highly non-deterministic when it comes to latencies. Another Wi-Fi message might just crush into your BLE message, resulting in a retransmission.
In terms of our initial goal of achieving synchronization, it is not straight forward for a sender to know when a package will arrive at the receiving end. With wired connections the latency is usually constant and can be measured, which makes synchronization easier. In wireless sensor networks varying latencies in the range of tens of milliseconds are not unusual.
Can’t get enough of clock drifts?
“Methods for Ms-Accuracy Synchronization of Wireless Body Area Networks for Biosignal Acquisition Using Bluetooth Low Energy” by Dominik Weber and Norman Pfeiffer introduces two novel and easy-to-implement synchronization methods for µs-accuracy in Wireless Body Area Networks (WBANs) using BLE.
Read the preprint
Weber, Dominik & Pfeiffer, Norman. Methods for Ms-Accuracy Synchronization of Wireless Body Area Networks for Biosignal Acquisition Using Bluetooth Low Energy. Available at SSRN: http://dx.doi.org/10.2139/ssrn.5034871
What’s next?
We will continue this series with more details about how clock drifts can decrease the quality of recorded data. We will go on with a closer look at commonly used clock sources and how they affect actual drifts. With a good understanding of the issue, we will focus on different solutions to synchronize wireless sensor networks.
In case you want to know more about maphera®, do not hesitate to reach out to us!
See you!
Add comment