6 Replies Latest reply on Mar 14, 2018 8:15 AM by Olav

    AF Analysis recalculation with compression

    Olav

      Hi.

       

      I am running a recalculation of multiple analysis with dependencies. The output is a PI Tag. I found in the instructions in the OSISoft live library that this will cause out of order events and that these will be written with no compression. Are there any workarounds to enable the data to be written to the data archive with compression?

       

      from the library:

       

      https://livelibrary.osisoft.com/LiveLibrary/content/en/server-v9/GUID-D42F21F2-4850-47B1-B0C0-9C8B87792BF5#addHistory=true&filename=GUID-EFF24D7D-A73E-48ED-A925-2F82829FDAEB.xml&docid=GUID-D42F21F2-4850-47B1-B0C0-9C8B87792BF5&inner_id=&tid=&query=&scope=&resource=&toc=false&eventType=lcContent.loadDocGUID-D42F21F2-4850-47B1-B0C0-9C8B87792BF5

        • Re: AF Analysis recalculation with compression
          Dan Fishman

          Take a look at this post: PIarchss.exe reprocess, does compression get re-applied?

           

          There are a number of workarounds and none of them are pleasant.  Depending on what your calculations are doing, you can introduce your own custom to not write as often. I often don't like applying compression to my calculations when working with compliance data as it can make auditing slightly more challenging.  When I hit these compression issues, I usually reexamine the problem to see if my triggering schedule and my equation logic can be improved. 

          1 of 1 people found this helpful
            • Re: AF Analysis recalculation with compression
              Olav

              Thanks for your answer. I found the following solutions mentioned in that thread:

               

              1. Piconfig to save all the values, then delete all the values, then backfill the saved values. These will all pass through the snapshot again and be compressed with the new settings.

              2. PI to PI to a new server with the new compression settings. That snapshot will compress them appropriately, and then you can move the values back to the original server with piconfig or pi to pi.

              3. piconfig to save all the values, save them into a new tag with the desired compression settings. Either delete the old tag and use the new tag, or delete the values in the old tag and send the new values over to it.

              4. Use PI Analysis to output the data to a new tag (then back again with the delete option). This way you don't need to touch piconfig or command line utilities.

              PS! Make sure to apply compression settings before you run the "calculation"

               

              I am not sure how to do them all though. The last one sounds interesting, but I am not quite sure what is meant how to do it. With regards to modifying the calculation, the output is correct during normal operation, because then the compression is applied correctly. I would preferably like to not alter the calculation, because the backfill will be a one-time operation during startup of the calculation in question.

               

              In your opinion, which of these methods would be the least amount of work, and easiest to perform?

                • Re: AF Analysis recalculation with compression
                  Dan Fishman

                  Olav Vatne, I probably would try to use PI Analysis service similar to point number 4, but it really is what tool you are most comfortable with.  Not everyone has PI to PI due to its price!  Nearly all of the time, I just leave the back-filled tag as in. Typically, based off of my customer requirements, I turn compression off for calculated data. 

                   

                  One thing you could do, is delete all the values (or use a new tag), the then back-fill write into it.  That is fine if are you ok with recalculation history. Note, in many cases, recalculated values are not the same as "real-time" calculations due to interpolation between values and compression being applied to input tag. 

                   

                  I believe in point number 4, it is suggesting to backfill to a new tag to allow compression to be applied.  Now, using this new tag, perform a back-fill into the original tag with the option to delete all values within the time range.

                    • Re: AF Analysis recalculation with compression
                      Olav

                      I will eventually turn off the compression on the calculation and try to put the compression on the input signals instead. But I still need to compress the recalculation somehow. I'll try your suggestions.

                        • Re: AF Analysis recalculation with compression
                          Dan Fishman

                          Are you running your calculation periodic or event triggered.  What is interesting, for event triggered, analysis triggers off of uncompressed data or your real-time data will be written more often than the recalculated data (ignoring output tag compression) and of higher fidelity depending on your calculation logic!

                            • Re: AF Analysis recalculation with compression
                              Olav

                              Hi again.

                               

                              Actually, I realized that I have been looking at this issue totally wrong. What I really need is to filter the calculation to exclude peaks or freak values (noise). And after thinking this through, I realize i cannot do that with compression deviation. I guess what I really need is to include some kind of filtering in my calculation that can drop values from the data archive if they exceed a certain span.

                               

                              Edit: I will make a new thread with a new question.