4 Replies Latest reply on May 23, 2018 1:57 AM by Dan Fishman

    Adjusting inaccurate values with a performance equation?

    mcwthethird

      Hello everyone - I'm a new user / but excited to get help learning more about this powerful too - so thanks in advance.

       

      We have an in-line flow meter that is collected each minute and then totalized per hour at the PLC level. Each hour it resets and collection begins again for the next hour. This tag is collected by Pi and exported for reporting.  Occasionally there is an erroneous value that is generated (that cannot physically occur within the piping itself) that causes a flawed reading.  When reviewing the trend of totalization you can see the minute when the error occurred (so the value can be mathematically corrected on paper) but this is after the fact.  I was curious if there is anyway to use a performance equation/data point builder settings/ect that would assist in eliminating these errors.  We would know what the maximum increase per minute would be, if the totalizer ignored the error and then resumed with the next point it would be an improvement. Is it possible to have Pi correct these flaws as they occur? I can give additional details if needed

       

      Thanks in advance.

        • Re: Adjusting inaccurate values with a performance equation?
          igreguri

          This previously discussed can be useful...

          How to filter noise value

           

          Regards,

          Igor

          1 of 1 people found this helpful
          • Re: Adjusting inaccurate values with a performance equation?
            rschmitz

            Hi Marty,

             

            Thanks for reaching out to us on PI Square!

             

            If I understand you correct, it sounds like you're running into a sensor issue where it will report an erroneously high (or low) value for the total amount of flow through a pipe you're trying to filter out. I'm thinking something like the following might be what you're looking for. In my example below you would need to write the result of the Analysis back to another tag:

             

            Previewing the results, you can see only some of the values are being sent:

             

            Cheers,

            Rob

              • Re: Adjusting inaccurate values with a performance equation?
                mcwthethird

                Rob - Thanks for the reply.

                I had thought about a 2ndary tag that would basically "clean" the data for errored values.  The problem with the example above, is in the totalizing aspect of the data.  In the example above the individual "error" values may not be reported, but the total at the end would still be the same. Below is a fictious data set to describe the situation:

                The increase expressed between 5:29 and 5:30  (36K) is not possible.  The hourly total would be then improperly elevated 36K.  I would rather then total either a) ignore that increase and treat it as a 0, or use the previous 5 min average increase to replace it.  Neither of these methods recovers exactly what the true value for that 5:29-5:30 timeframe was (but it will be closer then the factor of 10+ it is presently.

                  • Re: Adjusting inaccurate values with a performance equation?
                    Dan Fishman

                    Perhaps logic similar to:

                    if 'PLC' - PrevVal('PLC','*') >100 then NoOutput() else 'PLC'-PrevVal('PLC','*')  + 'running total'

                     

                    output this to your 'running total' attribute and set it to trigger only on the PLC total tag.  Basically, this should ignore the large step, but work after a large value.  You will also need to reset the running total to zero at the start of each hour!  It might take some playing around to get this right.

                     

                    Dan