5 Replies Latest reply on Mar 24, 2009 3:32 PM by cescamilla

    Gross Error Detection

    mhalhead

      I'm looking at creating a centralised system (obviously based on PI) that pulls data from our sites (about 17 operations ranging from concentrators to refineries - not all have PI yet). The purpose of the centralised system is detailed data analysis and production reporting. The current solution uses a process model that is housed in a custom developed RDB which is remarkably similar to AF; therefore we would migrate these models to AF. The size of the database is not huge; we're antisipating about 5000-10000 tags across the whole company. There are two areas that need to be addressed:

       

      1) Gross Error Detection

       

      2) Calculating rollup, KPI's and metrics

       

      Once these two items have been done then the data is ready for the statistical analysis and reporting. For this post I will cover the gross error detection (GED).

       

      What we want to do is run all the data through Gross Error Detection; the intention is to mark data that is "bad" using simple rules such as high/low limits, rate of change, not updating ... Not all data should be subjected to these rule (for example a equipment run signal).

       

      Talking to OSI there are a number of options but nothing directly out the box.

       

      1) We could setup a PE for each tag that needs validating and writing the validated data to a new tag. This has the advantage of being pretty high performance and triggered on event (therefore near real time validations). I have my doubts about the 5000-10000 PEs. The disadvantages are that the solution will be hard to maintain (you would have to alter all PEs if you change the validation techniques). The parameters are hardcode, as PE can't read parameters out of AF. You effectively double your tag count. Therefore, I don't believe that this is a real option.

       

      2) Write an ACE calculation that runs through the point on a schedule and performs the GED. The ACE module would have to read the parameters out of AF2 and use a state for the validation results. The advantage is that there is only a single version of the validation routine therefore it is easier to maintain. The disadvantage is that we would have to write the comparitively more complex code. The other disadvantage is that I have no idea how to make the system well integrated with AF2. I want a system that when the engineer creates the AF2 element the ACE module automatically includes the new points in the validation. I'm also concerned about the performance.

       

      I'm therefore looking for comments/suggestion from the community on what would be the best method of achieving this.

        • Re: Gross Error Detection
          merighm

          Hello mhalhead,

           

          You might want to have a look at Sigmafine if you can, and see if you want to use a similar approach to designing a solution (while AF is "the best part" of Sigmafine, Sigmafine is perhaps still the most interesting AF-based application).  How practical is this approach would depend on when OSI makes it easy to add custom Analysis Rules to AF.

           

          Perhaps, you might get better inspiration from PI-Notifications since it is based on AF2.

           

          I am replying to this message because I have had an interest in a solution such as this.  The closest thing I run into is described at the link below.  This approach lets you use analysis rules as graphical building blocks, which makes it easy to visualize the flow of data through the ARs (Sigmafine would look less daunting if it had a way to display the sequence of execution of its ARs):

           

          http://streambase.com/developers/docs/latest/gettingstarted/creatingfirstsbapp.html

           

          That led me to looking into Domain Specific Languages (DSL) since they offer a graphical approach to build applications.  One key technology used by DSL is T4, which basically generates code (e.g., c# or VB) within Visual Studio based on a template.  So if you have a VB project for a PI-ACE module, you can create a template that would run through your AF model and automatically generate validation code for all AF2 elements in specific templates.

           

          Moh& 

          • Re: Gross Error Detection

            Write an analysis rule so whenever it is run (or scheduled) it performs the validation you require.  What I don't think you will get away from is writing some form of code to interogate AF - unless someone out there already has an AF development that does this (GED) OR you hire someone to write the code.
            A consideration of where to put your validation, in PI or AF...beauty of AF is pulling data from any datasource via a data reference, so if you put the validation in PI as PE you limit what you validate i.e. only data on the PI server.

             

            Something to bare in mind with the current release of AF2, models/analysis are all "hidden" from Server Explorer, the functionality is there but you need code to build models, assign AR etc.  I am sure next release of AF will bring this back.

             

             

             

             

            • Re: Gross Error Detection
              mhalhead

              Thanks for the comments.

               

              Sigmafine is a definite option. I've spent a bit of time over the last two days look at sigmafine. My biggest reservation regarding Sigmafine is the AF1/AF2 issue. We're using PI Notifications (admittedly just starting) which runs under AF2. Sigmafine 4.4.x runs under AF1. To me this is a bit of a mess from the perspective that I can't use PI Nofications based on the SF model (without going via a PI tag) furthermore I would have to create two seperate models and more importantly maintain these models. The obvious solution would be to run sigmafine under AF2; however I have no idea how this would be achieved particularly as the ARs aren't exposed.