# Metrics from RegisterMeasurementSeries, circular values

#1

How is it possible to make metrics that compute the speed of a object running on a circle from RegisterMeasurementSeries that store the position of the object on the circle. For example, for a circle of radius 1:
time0 = 0
time1 = pi/2
time2 = pi
time3 = 3 pi/2
time4 = 0

and is it possible to manage clockwise run:
time0 = 0
time1 = 3 pi/2
time2 = pi
time3 = pi/2
time4 = 0

That is the same as an issue we have with EMR:
reset of index (our index have 5,6 or 7 digits).
and index running negative (consumption index of a customer who is producing)

0 Likes

#2

Just to understand the problem correctly, the ask is that we want to project the speed of a circle on the x axis instead of time and there will be values corresponding to it? So essentially we’re saying that it is a space-series instead of a time series correct?

If that is the case, we don’t currently support that in the system but definitely something that we have been thinking about. We should file a request for new feature for us to explore further.

0 Likes

#3

I think hes asking for a velocity chart where x-axis is time and y-axis is speed in radians/second…

0 Likes

#4

Ah, if that is the ask, its just a matter of us adding a simple expression engine function for it

0 Likes

#5

they could also add such a thing by using MetricFunctionLibrary correct?

angularVelocity(input: Timeseries) : Timeseries js server
}

??

0 Likes

#6

that is correct, one could add any function as a MetricFunctionLibrary function, but this seems more like a platform feature

0 Likes

#7

The problem is that the original TimeSeries is not perfectly continuous.

Let’s imagine our circle of radius but with values limited to [0, 2pi [. The TimeSeries could look this:
0s : 0
1s : pi/2
2s : pi
3s: 3pi/2
4s : 0 <======== discontinuity
5s: pi/2

So, from Riley’s proposition, I will try

type ModuloFunctionLibrary mixes MetricFunctionLibrary {
moduloSeries(input: Timeseries) : Timeseries js server
}

with moduloSeries returning:
0s : 0
1s : pi/2
2s : pi
3s: 3pi/2
4s : 2pi
5s: 5pi/2

0 Likes

#8

How can I useangularVelocity in a metric, for example in
{
“id” : “CombinedElectricityConsumptionTotalHours_BillingAccount”,
“name” : “CombinedElectricityConsumptionTotalHours”,
“srcType” : “BillingAccount”,
“path” : “serviceAgreements.servicePoints.(resource.id == ‘electricity’).registerMeasurements.(origin == ‘combined’ && measurementType == ‘Consumption’ && mappedTouCode == ‘TOTAL_HOURS’)”,
“expression”: “sum(sum(normalized.data.quantity))”
}

0 Likes

#9

Your example doesn’t reference angular velocity, i’m confused.

0 Likes