A Technical Deep Dive Into Signaloid's Uncertainty-Tracking Computation Platform

Fast and painless uncertainty quantification for your C/C++ applications through an easy-to-use cloud interface.

How we use data now

Imagine that every minute, a microcontroller instructs a connected temperature sensor to measure the current ambient temperature in the room and report it back. The resulting value and the aggregation of many over time are vital for both decision making and historical analysis, as they can inform future optimizations in some process or assist in diagnosing a problem.

Uncertainty in measurements

No sensor is ever 100% accurate, and even for ones that do achieve a high degree of accuracy, drift can still occur over long stretches of time, and all of these differences create uncertainty in the results that we get back. Many sensors, including the hypothetical temperature sensor from before, may employ a technique called oversampling which, for every output value, will take a number of input measurements before averaging them together and returning the result. However, this approach loses all the fidelity from the input values and is unable to report how confident the output value is. This problem is not limited to just environmental sensors either, as anything that reports repeated values over time is likely to suffer from the same dilemma.

Signaloid's platform

Instead of operating on singular values, Signaloid's technology stack allows for the tracking of many data points over time in order to generate a distribution of values without the need for heavy modifications to existing code. They accomplish this feat through a multifaceted approach.

The core of the platform is the Signaloid C0 Processor, and it is responsible for providing the massive performance uplift over traditional architectures for uncertainty tracking operations. In a typical RISC CPU, the core(s) and the floating-point unit(s) (FPU) each contain multiple registers that store values for current and soon-to-be-executed operations such as Add, Subtract, Multiply, Divide, and more. The C0 Processor extends these processing units with additional registers and ALU operations that can handle distributional data and write it back to specialized distributional memory. By moving these traditionally expensive statistical operations into dedicated hardware units, the C0 Processor can achieve orders of magnitude performance increases over non-extended CPU cores.

Because uncertainty tracking occurs as an extension of the instruction set architecture (ISA), existing programs can continue to operate without required, direct modifications. If the application needs access to the distributional data, there exists a virtualization layer and an accompanying API, which expose new CPU instructions for creating, querying, and operating on the data before returning it to the application via main memory.

Modeling resistor power dissipation more accurately

Resistors are one class of components that regularly involve a non-insignificant level of uncertainty, as the last color band on a through-hole footprint will indicate a tolerance of +/-0.05% all the way up to +/-10%. Because the actual resistance value is uncertain, it’s imprecise to treat how much power the resistor draws and how much heat it produces as a single number. In this example by Signaloid, we assume a resistor with a rated resistance of 1 kOhm and a tolerance of 5%. The range of potential values can be represented by a uniform distribution between 950 and 1050 Ohms. Next, we can represent a hypothetical input voltage of 3.3V with a standard deviation of 0.01 in a normal distribution since small variances are possible. Given the power equation P = V^2 / R, we get a single value of 0.01089 Watts along with a distribution output that helps visualize the range and likelihoods of potential values.

Signaloid Cloud and data ingestion

Applications, hosted on GitHub and imported as a Connected Repository, rely on data and the Signaloid Cloud Developer Platform makes it easy to access it. Data is brought into the execution environment as a Data Source that makes data available to the program via the filesystem at defined mount points (e.g., sd0) and programs can, e.g., use fopen to access the data. For example, a Data Source can be an integration with an S3 bucket containing sensor data. Data Drives aggregate various Data Sources together under a single mounting location. Data Sources can also be connected Signaloid Sensor Gateways, which enable edge devices to stream sensor data directly to Signaloid's IoT service and make it accessible to programs running on Signaloid Cloud.

The Ux Hardware API

Applications running on the C0 Processor can execute platform-specific instructions via Signaloid's Ux Hardware (UxHw) API. To insert new information into the distributional registers and eventually the distributional memory, UxHw provides several functions that create distributions from existing weighted or unweighted sample data arrays which can be multidimensional as well. Distributions can also be created as a mixture of two other distributions and from parametric mathematical definitions such as Exponential, Gaussian, Uniform, and more.

When it comes time to read back the uncertainty information from the stored distributions, UxHw exposes several querying functions that perform and return the results from a statistical operation. Some examples include Quantile, the Nth Mode of a distribution, and even a batch of random samples. There is also a dedicated Bayes-Laplace Rule function which performs in-hardware Bayesian inference and reduces the need for compute-intensive Monte Carlo simulations.

Example: thermal imaging

Cameras/sensors that peer into the infrared spectrum and report back what they observe have many uses, including industrial monitoring, search-and-rescue, and scientific data gathering. Although they undergo factory calibration, there are still regions with higher uncertainties or the accuracy as-a-whole across the entire image could be inadequate. In this example project provided by Signaloid, we can see how tracking these uncertainties can help increase the confidence in the image being processed.

The MLX90640 from Melexis is one such sensor that contains a 24x32 pixel array of IR detectors that, when combined, can form a low-resolution image of warmer and/or cooler regions within its field of view. And similar to many other sensors, the voltage levels coming from the IR receivers are quantized into digital values with an ADC, but due to small fluctuations in the sensor and a level of assumed inaccuracy, merely taking an average of a batch of readings will remove all of their uncertainty.

Traditionally, thermal imaging relies on knowing the emissivity, or ratio of a surface's ability to radiate heat compared to a blackbody, except this is normally a single value that is determined after several measurements. Instead, the C0 Processor executes a program which starts by constructing a uniform distribution of possible emissivity values before reading each pixel's raw ADC value. If quantization error tracking is enabled, as seen in the team's custom web app, then another uniform distribution can be created and used in the remaining calculations- all while uncertainty information is retained in the background.

This is especially helpful due to the MLX90640 having regions with differing accuracy values, so rather than considering regions of pixels, the Signaloid platform can track the uncertainty across each pixel individually and allow downstream algorithms to perform edge/anomaly detection.

A wide range of applications

The ability of the C0 Processor to both track uncertainty and increase distributional query efficiency several-fold over traditional ISAs opens a wide range of potential applications. The resistor modeling example showcased how small fluctuations in voltage readings can impact the heat output of a resistor, while the MLX90640 example demonstrated how multiple uncertain values can be combined into a single, more accurate value on a granular level. Beyond reading sensor values, the Signaloid platform's C0 Processor lineup and Cloud Engine API could be used in finance or other data analytics fields.

To go even further with the Signaloid platform, more information can be found here on the Signaloid website and in its documentation.

Evan Rust
IoT, web, and embedded systems enthusiast. Contact me for product reviews or custom project requests.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles