5 Replies Latest reply on May 18, 2018 7:17 AM by Roger Palmen

    How to filter noise value

    YungSong

      Hello

       

      We collected data from OPC server , but it always include some noise value ,like pic

      How can I Filter it ?

       

      Thank

        • Re: How to filter noise value
          Roger Palmen

          Hi,

           

          The key question for this is how to determine if a pattern is noise or an actual signal?

          Typically you should suppress noise using the ExcDev settings on the PI Point that sets a deadband for the changes in value. In this case (i can't see the scale here so i use the grid) the setting for ExcDev should be >5.

          If you need to do post-filtering, then you could evaluate a similar rule in an AF Analysis (either ad-hoc or saved to a PI Point).

           

          And then you can use more advanced noise filtering options, like simply showing a moving average, which does not remove the noise but drops the amplitude of the noise.

            • Re: How to filter noise value
              YungSong

              Hi Roger,

              Thank for your reply

               

              If  value>0 and keep 10 mins will recorded value else will set to 0 , how can I evaluate in AF?

                • Re: How to filter noise value
                  Roger Palmen

                  If the value needs to be stable for 10 minutes and only then saved, the only practical way is to create an analysis that saves the data to a new PI Point. Create an Analysis like:

                  If ('attribute' > 0 AND TagAvg('attribute', ParseTime("*-10m"), ParseTime("*"))='attribute') Then 'attribute' Else 0.

                   

                  This checks if the value > 0 and if the Average equals the current value, which is an approximation of "keep 10 mins".

                  NOTE: Untested, written in freehand.

                  3 of 3 people found this helpful
                    • Re: How to filter noise value
                      goliveira

                      Roger's solution works with some reservations:

                      • the first valid event will not be saved on second tag
                      • the first event saved on second tag won't be 10 minutes later than first valid event on original tag, unless original tag values arrives in a period divisible by 10 minutes

                      Complex noises will require complex filter methods that AF might not help with.

                      In case your noises are just these spikes which amplitude are lower than actual signal you might be able to filter them, and just them, using an expression like: IF 'Attribute' > [Spike Amplitude] THEN 'Attribute' ELSE 0.

                      2 of 2 people found this helpful
                        • Re: How to filter noise value
                          Roger Palmen

                          Thanks for thinking along and finding the edge cases!

                          Agree, noise filtering is a tricky subject, but this might be a start. It depends on how critical the data is, if it does not need to be 100% correct, then the edge cases might not matter that much.

                           

                          My quote of the day: "Values that are accurate enough and on time are more valueable than values that are impossible to determine and too late"