Main siteMain site  ForumForum  ForumSearch  Private messageEmail contact  RegisterRegister  Log inLog in 
Topic: RREvaluator
Reply to topic
Author Message
EMebane



Joined: Apr 15, 2019
Posts: 86

PostPosted: May 9, 2020 3:07 PM    Post subject: RREvaluator

Please describe how to work with the Detector. I've attached the Detector to a graph and I'm not seeing results that are helpful.

There's only one float listed in the Average Period [s] parameter but 3 moving averages. They are all the same length window? The docs say they are sequential. Can you explain more about how this algorithm works?

Is there a reason it is limited to 10ms accuracy?
jarek



Joined: Oct 22, 2007
Posts: 789

PostPosted: May 9, 2020 4:06 PM    Post subject:

The RRDetector is about detecting a peak. So a sequence of 3 average values is used so that when the middle is value higher than the other two, then we have a detection (maximum value). The averaging is in order to clean the noise. It is a really simple algorithm, it could be done with other elements.

The 10ms is the defaul time of each loop (configurable in design settings). It is also the most precise (smallest) time which Windows (or java) doesn't have a problem with.

If an element uses system time, then its precision depends on the SleepTime value in design settings. Some elements use sample count to measure time (if there is a reliable source from a device), in which case the precision can be down to a simple sample interval.
EMebane



Joined: Apr 15, 2019
Posts: 86

PostPosted: May 9, 2020 8:24 PM    Post subject:

Is this how the algorithm works?

Window1 = current time - .2 seconds
Window2 = ( current time - .2 seconds ) - (current time - .4 seconds)
Window3 = ( current time - .4 seconds ) - (current time - .6 seconds)

I also want to know how the second output, Detector, works. I connect it to a Polygraph or a Numeric Display and I'm not seeing anything useful.
jarek



Joined: Oct 22, 2007
Posts: 789

PostPosted: May 9, 2020 8:33 PM    Post subject:

I prefer using Debugger element to understand the output values.

There are 3 average values. Every value calculated 0.2 seconds later over the previou 0.2 second time period. And those values (amplitudes) are used to determine the peak: if a2 > a1 and a2 > a3 -> we have a peak.
Reply to topic