Comments (6)
I agree with the expectation that you will get one result per series. If I ask for MAX(PPA:1, PPA:2, PPA:3) where Timestamp between start and end
, I would expect 3 separate results.
Some additional requirements for things like MAX would be to have the ability to get the timestamp of when the max occured vs the timestamp of the time range you are looking at. For other aggregations such as StdDev I think a timestamp at end time of the range would make more sense.
For time based integration, I was thinking of a simple integration of (value * seconds) for each value in a time range. A specific examples would be to calculate the MWh value from a MW signal. In reality this might require a further level of expression to calculated the MW from phasors, but that is another topic.
// simple time integration
var values = GetValuesBetweenTimestamp(start, end, interval); //example query
double integrated_value = 0;
for (int ix = 1; ix < values.Length; ix++)
integrated_value += values[ix].Value * (values[ix].Timestamp - values[ix-1].Timestamp).TotalSeconds;
}
from openhistorian.
Some additional aggregations to consider:
- Total (sum)
- Range (max - min)
- Count (number of recorded values, helpful for detecting dropouts)
- Time based integration
- Derivative (change since last value, or change since last time slice)*
- Sample standard deviation & Population standard deviation (or at least clarify which is used by the implemented stddev function)
*Derivative is not a true aggregation function, but a manipulation of the stream of data. It may not belong in the same category, but I wanted to include it as it can be useful in many cases when looking at PMU or statistical data.
from openhistorian.
@EEParker - naturally all of these functions would reduce a per-point series of values down to a single value. I think we could easily start supporting such methods in expressions that like that might look like:
Max(PPA:12; PPA:14), StdDev(STAT:15; STAT:35), StdDevSamp(PPA:20), Range(PPA:19)
or
Count(FILTER ActiveMeasurements WHERE SignalType='VPHA'), TimeIntegration(FILTER ActiveMeasurements WHERE SignalType='VPHA')
With the caveat that, like in a SQL expression, all values must either be aggregated or not - and - in the case of filter expressions, all returned series based on the expression would be subject to the specified outer aggregation operand.
Would this properly fulfill the desired need?
I worry a little that people might be a little confused by:
Max(PPA:12; PPA:14)
Since this means return a max of `PPA:12' and a max of 'PPA:14' - same with filter expressions, you will get one value per series. But I guess they'd figure it out rather quickly.
from openhistorian.
Of course, not to confuse last point, but something like this might be interesting:
Max(Count(FILTER ActiveMeasurements WHERE SignalType='VPHA'))
In this case you receive a Count for each series value in expression - then return Max over all values in set.
The difference here being there would be "data" in the actual point ID returned, i.e., from call to call the value source could change.
from openhistorian.
Also, exactly what did you have in mind on time-based integration? I assume you mean an integral over series values which are already restricted to a given time range - but in this case are you wanting a versatile expression for the function(valueAtTimeT)?
from openhistorian.
Will be available in next nightly build per:
GridProtectionAlliance/gsf@e3e9219
from openhistorian.
Related Issues (20)
- API to query measurement details HOT 1
- Data missing on export data from openhistorian webmanager HOT 4
- ATMEGA2560 Modbus openHistorian display to Grafana HOT 8
- Full Documentation for OpenHistorian HOT 3
- Is there any mechanism to store Historian Data directly into any RDBMS like Oracle/SQL Server instead of Files HOT 3
- Update openHistorian Grafana Instance HOT 1
- Multiple indexes
- Service unexpected stop HOT 23
- Grafana and OH User Synchronization requires log-on HOT 2
- Trend/Export Measurements Timestamps HOT 1
- Adding New Device (hardware PMU) HOT 10
- Fix build tools to update version in SDK project files
- Reinstall under different service credentials does not overwrite HTTP reservations HOT 2
- How to disable openHistorian debug host automated start HOT 4
- lossless data compression HOT 4
- How to get openPDC data in openHistorian. HOT 2
- Error in Github Desktop when pulling Source/Libraries/PythonAPIModule' HOT 1
- How to connect openHistorian with other datasources
- Compression algorithm about the OpenHistoian HOT 2
- COMTRADE Export with fields that contain commas
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openhistorian.