Jump to content

norman47

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by norman47

  1. Hey Andrew,

    Thank you very much for the response! I did end up computing the error in the way you described, breaking it down step by step.

    Your reversal count also works really well. I just have one question - I tried to replace the $period with a daily periodic condition I already made that starts at 6AM, but then the formula does not run and says it is unbound. Is there a reason why trying to replace $period in the formula with an already made periodic condition breaks it?

    Edit: In addition, would that formula not also count anytime the signal still goes up? Say it goes from 5 -> 10 -> 15 -> 10. in that sequence, there is only 1 reversal, but I think the formula above would count a total of 3.

    Thank you,

    Norman

    • Like 2
  2. Hello,

    I am looking to calculate some metrics on a loop - error, total control output travel, and number of reversals/changes.

    Error: image.png.a10ceefea7d6e82afed480314699a031.png

    Total Travel: image.png.df78bd122d3b33394285c04cf7d0ca50.png

    The error needs to sum up the difference between two values over a time period and divide it by the total number of values used in that time period. 

    The total travel would sum up all the movements of a number over the day (for eg if a value went from 10->15->20 total travel would be 10).

    Number of reversals/changes is as stated how many times a signal changes direction/value.

    I noticed that for some signals, the total count can be different depending on how often the value changes. Is there a simple way to pull the value of a number at a specific time stamp? And then to continue on, to do that over a capsule period ie calculating average over a 1 day timeframe?

    Thank you,

    Norman

     

    Edit 1: I think I solved the total travel. I used a combination of running delta and running sum bounded within a capsule

    abs($cmfo.runningDelta()).runningSum($d)

    • Like 1
×
×
  • Create New...