How to determine the uncertainty between sensors data using matlab ?

8 Ansichten (letzte 30 Tage)
Mohammed Lamine Mekhalfia
Mohammed Lamine Mekhalfia am 15 Nov. 2022
Beantwortet: Harsh am 24 Jul. 2025
Dear all.
I have the following problem, I have 6 sensors, one of them is fixed and the (5) others are with different positions.
my interest is to calculate the uncertainties in the sensors data vectors.
I tried to use dtw instruction to calculate the distance between them, but could not have a clear understanding on how to interpret the values obtained.
can any one suggest a solution to this problem? using matlab functions.
I would highly apreciate your help

Antworten (1)

Harsh
Harsh am 24 Jul. 2025
I understand that you're trying to figure out how much the readings from your five moving sensors differ from your fixed one, which is a great way to approach "uncertainty." You've tried using Dynamic Time Warping ("dtw"), and it's understandable why the results might be confusing in this context.
The "dtw" function is really good at comparing the shapes of two time series that might be out of sync, like comparing two speech patterns. The distance value it gives you is a measure of their dissimilarity after stretching and squeezing them to get the best possible alignment. While a low distance means the signals are very similar in shape, it doesn't directly tell you about the measurement uncertainty or error at each point in time.
A more straightforward way to think about uncertainty here would be to treat your fixed sensor as the "true" reference and then calculate how much the other sensors deviate from it. For each of the five moving sensors, you can compare its data vector to the reference sensor's data vector.
Here are a couple of common ways to do that in MATLAB:
  • Standard Deviation of the Difference: This is probably the most useful metric for what you're describing. It tells you how spread out the errors are, giving you a single number that represents the consistency (or lack thereof) of a sensor compared to your reference.
  • Mean Absolute Error (MAE): This will give you the average absolute difference between the sensor and the reference, which is easy to understand.
mean_abs_error = mean(abs(sensor1_data - ref_data));
By calculating these values for each of your five sensors, you'll get a clear, quantitative measure of how much each one deviates from your fixed reference, which is a practical way to define and compare their uncertainties.
Please use the following commands to refer to the documentation for the above mentioned functions
doc dtw std mean abs
doc uncertainty-analysis

Produkte


Version

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by