Thingspeak channel has fields with different sample rates - what is best way to deal with this?

2 次查看(过去 30 天)
Some fields come in to a channel from a device at intervals of 5 minutes, whilst others come in from another device at intervals of 15 minutes. The channel (consisting of several fields) has only one time stamp array. When data comes from different devices and/or at different rates, this gets messy. Lots of timestamps have no data for some fields, which makes processing more difficult and it also limits how much data can be read - eg the 8000 data point limit means you can't read as much real data as you could for a slow channel if it had its own slow timestamp - instead it has the fast timestamp and lots of wasted "empty" readings.
Ideally it would be nice if each field (or each group of fields from one device) would have their own timestamp. Are there any methods or tricks to deal with this issue?

回答(1 个)

Chetan
Chetan 2023-8-25
Hi Steven!!
As per as my understanding you are dealing with multiple fields coming from multiple devices at different rates.
There are several methods and tricks that can be used to address the issue:
  1. Interpolation: Use interpolation techniques to estimate values between known timestamps for fields that have different arrival rates.
  2. Resampling: Resample the data from different devices to a common time based by selecting a specific time interval and adjusting the data to fit within that interval.
  3. Time Alignment: Shift the timestamps of one device to align with the timestamps of another device based on a known time difference between them.
  4. Separate Timestamp Arrays: Modify the data acquisition process to include separate timestamps for each field or group of fields from one device.
You can refer the following article for more info & sample code:
Hope it helps!
  1 个评论
Steven Grobler
Steven Grobler 2023-8-29
I did not pose my question very well, but thanks for answering. All of those things can be done to data that is downloaded from Thingspeak, but I was looking for a way of it happening inside thingspeak so it did not have to be done after downloading.
This article below describes a way of doing what I wanted to do, but it requires the interpolated data to be written to another Thingspeak channel, so not ideal if you don't have lots of spare channels.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Visualize Data 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by