EdgeHub Archiver - Historical data calculation - 2.1.0
Changelog
| Version | Author | Update date | Comment |
|---|---|---|---|
| 2.1.0 | ITsung.Shen | 2024/05/03 | First Version |
1. Introduction
1.1 Overview
This article explains how EdgeHub Archiver handles historical data. Different types of data are processed in different ways, classified as follows:
- Numeric data (Number), which can be further divided into:
- Current type
- Cumulative type
- Discrete type
- Text type
1.2 Enabling Data Recording
When using EdgeHub, historical data recording is not enabled by default. To save historical data for a specific parameter, users need to enable the settings in any of the following locations:
-
Add / Edit Parameter
In the Add / Edit parameter screen, modify the Recording rate setting to select an option other than
Do not record.
-
Data Archiving
Use the Data Archiving feature and select an option other than
Do not recordfor the Recording rate setting of the parameter to be recorded.
Once these settings are modified, the Archiver will calculate and save the historical data for the specified parameter according to its data type for the following time intervals:
- RAWData (raw data of the parameter)
- Recording rate (one record per set frequency)
- Hour (one record per hour)
- Day (one record per day)
The following sections will explain the calculation methods for different data types.
2. Current Type (Number - Current)
2.1 Introduction
When the data of a parameter is randomly distributed, it can be configured as a current type, such as power, voltage, current, etc.
2.2 Calculation Range
When calculating historical data of the current type, the rule for data range used for different time intervals is as follows:
- Start time ** (Maximum change per min / 60 seconds), then the value is invalid.
Example:
- Maximum change per minute:
1
If the data comes in as follows:
| Time | Value |
|---|---|
| 00:00:00 | 1 |
| 00:01:00 | 2 |
| 00:02:00 | 10 |
| 00:03:00 | 11 |
| 00:04:00 | 12 |
Then:
- The period from 00:01:00 to 00:02:00 is invalid because Abs(10 - 2) / 60 = 8/60 is greater than 1 / 60. This period's data will be marked as having bad quality.
3.5.2 Negative Mode
In the recording settings for cumulative types, there is a setting for negative mode.

As described in section 3.1, under normal circumstances, using the cumulative type to record data means the data increases over time and does not show negative difference. Therefore, the default setting for this option is No. If negative difference occurs while this setting is applied, the difference for that period is marked as invalid.
Example:
- Negative mode = No
If the data comes in as follows:
| Time | Value |
|---|---|
| 00:00:00 | 1 |
| 00:01:00 | 2 |
| 00:02:00 | 3 |
| 00:03:00 | 2 |
| 00:04:00 | 3 |
Then:
- The period from 00:02:00 to 00:03:00 is invalid because 2 - 3 = -1 shows negative difference, which is against the rule. This period's data will be marked as having bad quality.
On the other hand, if the negative mode setting is adjusted to Yes, it means allowing negative difference data to be included in the calculations, and the data showing negative difference will not be marked as having bad quality.
Example:
- Negative mode = Yes
If the data comes in as follows:
| Time | Value |
|---|---|
| 00:00:00 | 1 |
| 00:01:00 | 2 |
| 00:02:00 | 3 |
| 00:03:00 | 2 |
| 00:04:00 | 3 |
Then:
- Although the period from 00:02:00 to 00:03:00 shows negative difference (2 - 3 = -1), since the negative mode is enabled, the difference for this period will not be marked as having bad quality.