how does the non-slope part of the boxcar slope data compression algorithm work_.pdf

4
5/9/13 How does the non-slope part of the Boxcar Slope Data Compression algorithm work? support.aspentech.com/webteamcgi/SolutionDisplay_view.cgi?key=119019 1/4 Requested Technical Tip How does the non-slope part of the Boxcar Slope Data Compression algorithm work? Solution ID: 119019 Product(s): Aspen InfoPlus.21 Version(s): 6.0.1, 2004, 2004.1, 2004.2, 2006, 2006.5, V7.1, V7.2, V7.3 Primary subject: Overall Application Last Modified: 28-Mar-2012 Training Classes: Click here to see the training options for this product Applicable Version(s) All versions of Aspen InfoPlus.21 (IP.21) Problem Statement Although there are other options, the most common form of Data Compression used within IP.21 processing is the BoxCar Slope Algorithm. This is the one used by the standard database Definition records IP_AnalogDef and IP_DiscreteDef. Knowledge Base article 103491 gives an excellent description of the way the Numeric or 'Slope' Algorithm works with relation to the Value portion of an incoming sample or occurrence. There are two other important factors in deciding exactly which samples are stored when compression is turned on. There is the fact that IP_AnalogDef and IP_DiscreteDef not only contain a Value, but also a Quality Status such as Good, Bad, Initial, etc. There is also the fact that each Value/Status pair has an associated Timestamp. These may be regularly spaced as with scheduled GETs from an Aspen Cim-IO system, or they may be irregularly spaced as with Unsolicited. This article discusses the checks that the software performs with relation to Quality Status and Time. Solution Here are the exact steps the software performs followed by some real examples. First: · IP.21 obtains the maximum time interval from IP_DC_MAX_TIME_INT. · IP.21 obtains the last recorded time from the first occurrence of IP_TREND_TIME. · IP.21 obtains the 'previous' input value, 'previous' input quality status, and 'previous' input time from IP_INPUT_VALUE. IP_INPUT_QUALITY, and IP_INPUT_TIME. · IP.21 updates IP_INPUT_VALUE, IP_INPUT_TIME, and IP_INPUT_QUALITY with new data. · IP.21 obtains the 'new' input value, 'new' input quality status, and 'new' input time from IP_INPUT_VALUE, IP_INPUT_QUALITY, and IP_INPUT_TIME 1) Quality Status Test: If the new input quality status differs from the previous input quality status, two steps are performed : 1. IP.21 updates IP_VALUE, IP_VALUE_QUALITY, and IP_VALUE_TIME with the 'previous' input value, input quality status, and input time. This causes a new occurrence to shift into history. 2. IP.21 updates IP_VALUE, IP_VALUE_QUALITY, and IP_VALUE_TIME with the 'new' input value, input quality status, and input time. This causes a second new occurrence to shift into history. 2) Elapsed Time Test (1):

Upload: sybaritz

Post on 29-Oct-2015

176 views

Category:

Documents


13 download

DESCRIPTION

Aspentech

TRANSCRIPT

Page 1: How does the non-slope part of the Boxcar Slope Data Compression algorithm work_.pdf

5/9/13 How does the non-slope part of the Boxcar Slope Data Compression algorithm work?

support.aspentech.com/webteamcgi/SolutionDisplay_view.cgi?key=119019 1/4

Requested Technical Tip

How does the non-slope part of the Boxcar Slope Data Compression algorithm work?

Solution ID: 119019

Product(s): Aspen InfoPlus.21

Version(s): 6.0.1, 2004, 2004.1, 2004.2, 2006, 2006.5, V7.1, V7.2, V7.3

Primary subject: Overall Application

Last Modified: 28-Mar-2012

Training Classes: Click here to see the training options for this product

Applicable Version(s)

All versions of Aspen InfoPlus.21 (IP.21)

Problem Statement

Although there are other options, the most common form of Data Compression used within IP.21 processing is the BoxCar Slope Algorithm. This is the one used by the standard database Definition records IP_AnalogDef and IP_DiscreteDef.

Knowledge Base article 103491 gives an excellent description of the way the Numeric or 'Slope' Algorithm works with relation to the Valueportion of an incoming sample or occurrence.

There are two other important factors in deciding exactly which samples are stored when compression is turned on.

There is the fact that IP_AnalogDef and IP_DiscreteDef not only contain a Value, but also a Quality Status such as Good, Bad, Initial, etc.

There is also the fact that each Value/Status pair has an associated Timestamp. These may be regularly spaced as with scheduled GETsfrom an Aspen Cim-IO system, or they may be irregularly spaced as with Unsolicited.

This article discusses the checks that the software performs with relation to Quality Status and Time.

Solution

Here are the exact steps the software performs followed by some real examples.

First:

· IP.21 obtains the maximum time interval from IP_DC_MAX_TIME_INT.

· IP.21 obtains the last recorded time from the first occurrence of IP_TREND_TIME.

· IP.21 obtains the 'previous' input value, 'previous' input quality status, and 'previous' input time from IP_INPUT_VALUE.IP_INPUT_QUALITY, and IP_INPUT_TIME.

· IP.21 updates IP_INPUT_VALUE, IP_INPUT_TIME, and IP_INPUT_QUALITY with new data.

· IP.21 obtains the 'new' input value, 'new' input quality status, and 'new' input time from IP_INPUT_VALUE, IP_INPUT_QUALITY, andIP_INPUT_TIME

1) Quality Status Test:

If the new input quality status differs from the previous input quality status, two steps are performed :

1. IP.21 updates IP_VALUE, IP_VALUE_QUALITY, and IP_VALUE_TIME with the 'previous' input value, input quality status, and input time.This causes a new occurrence to shift into history.

2. IP.21 updates IP_VALUE, IP_VALUE_QUALITY, and IP_VALUE_TIME with the 'new' input value, input quality status, and input time.This causes a second new occurrence to shift into history.

2) Elapsed Time Test (1):

Page 2: How does the non-slope part of the Boxcar Slope Data Compression algorithm work_.pdf

5/9/13 How does the non-slope part of the Boxcar Slope Data Compression algorithm work?

support.aspentech.com/webteamcgi/SolutionDisplay_view.cgi?key=119019 2/4

2) Elapsed Time Test (1):

Note-1 The Elapsed Time Tests are not performed if the Quality Status Test was positive (i.e. resulting in recordings).

Note-2 The Elapsed Time Tests are not performed if the Slope Test was positive (i.e. resulting in a recording).

IP.21 calculates the difference between the new input time and the last recorded time.

If the maximum time interval exceeds zero but is less than the calculated time difference,

AND

IP_VALUE, IP_VALUE_QUALITY, and IP_VALUE_TIME are not already identical to the 'previous' input value, input quality status, and inputtime

THEN

IP.21 updates IP_VALUE, IP_VALUE_QUALITY, and IP_VALUE_TIME with the 'previous' input value, input quality status, and input time.This causes a new occurrence to insert into history.

3) Elapsed Time Test (2):

Note that the Elapsed Time Test(2) will always be performed after the Elapsed Time Test(1) - whether it had positive or negative results.

IP.21 calculates the difference between the new input time and the last recorded time (which may have changed after Elapsed Time Test (1).)

If the maximum time interval exceeds zero but is less than the calculated time difference:

THEN

IP21 updates IP_VALUE, IP_VALUE_QUALITY, and IP_VALUE_TIME with the 'new' input value, input quality status, and input time. Thiscauses a new occurrence to shift into history.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Real life examples

A) Data incoming regularly every 5 seconds and the incoming value never changes.

· Up to and including 00:01:05 the Qualityality Status was 'Good'

· From 00:01:10 onwards the Quality Status was 'Bad'

· From 00:02:20 onwards the Quality Staus was 'Good'.

Using the Quality Status Test above,

The Values stored in History would have a Quality and Timestamp of :-

Good 'the last time the Quality changed to Good'

Good 00:01:05

Bad 00:01:10

Page 3: How does the non-slope part of the Boxcar Slope Data Compression algorithm work_.pdf

5/9/13 How does the non-slope part of the Boxcar Slope Data Compression algorithm work?

support.aspentech.com/webteamcgi/SolutionDisplay_view.cgi?key=119019 3/4

Bad 00:01:10

Bad 00:02:15

Good 00:02:20

Good 'the last time before the Quality changed to Bad'

B) Data incoming regularly every 5 seconds. The incoming Value never changes. The incoming Quality Status never changes. The IP_DC_MAX_TIME_INT = 1 minute

Using the Elapsed Time Test(1) above,

Values stored in History would have Timestamps exactly one minute apart,

BUT, the value is not stored in History until the 'next' set of Value, Timestamp, and Quality appear in the 'input' value fields (i.e. 5 secondslater).

C) The incoming Value never changes. The incoming Quality Status never changes. The IP_DC_MAX_TIME_INT = 1 minute.

Data incoming at irregular time intervals as follows :-

00:00:00

00:00:30

00:01:15

00:02:30

00:05:00

· At 00:00:00 being the very first value it will be stlue it will be stored in History

· At 00:00:30 The IP_Input Fields will be updated with the new values but both Elapsed Time Tests will fail

· At 00:01:15 Elapsed Time Test (1) Will cause the value at 00:00:30 to be stored

· At 00:02:30 Elapsed Time Test (1) will cause the value at 00:01:15 to be stored, and, Elapsed Time Test (2) will cause the value at02:30 to be stored

· At 00:05:00 Elapsed Time Test (1) will fail. Elapsed Time Test (2) Will cause the value at 00:05:00 to be stored.

Keywords

Page 4: How does the non-slope part of the Boxcar Slope Data Compression algorithm work_.pdf

5/9/13 How does the non-slope part of the Boxcar Slope Data Compression algorithm work?

support.aspentech.com/webteamcgi/SolutionDisplay_view.cgi?key=119019 4/4

We would like to get your feedback: Click here to rate this solution and provide your comments

Upcoming Training for this Product in your Region

Course NameStartDate

EndDate

Location Price RegistrationTime-

AddressLanguage

PME101 Aspen InfoPlus.21: Real Time Information Management

Foundation

10-Jun-

2013

14-Jun-

2013Pune, India INR 41000 Register Now Logistics English

PME101 Aspen InfoPlus.21: Real Time Information Management

Foundation

08-Jul-

2013

12-Jul-

2013Singapore SGD 3700 Register Now Logistics English

PME305 Aspen InfoPlus.21: Advanced System Administration29-Jul-

2013

30-Jul-

2013Pune, India INR 16400 Register Now Logistics English

How do you rate this solution? (Not Helpful) 1 2 3 4 5 (Very Helpful)

Please add any additional comments regarding how this solution could be improved:

Submit

This document contains proprietary information of Aspen Technology, Inc. and is tendered subject to the condition that no copy or other reproduction be made in

whole or in part for use other than customer's internal use. Access to this document is strictly limited to customers of Aspen Technology, Inc. who are registered users

of the support web site; no access or further distribution to any third party, including contractors or other agents of customer, is permitted. No use may be made of

information herein except for which it is transmitted, without the express prior written consent of Aspen Technology, Inc.

Aspen Technology may provide information regarding possible future product developments including new products, product features, product interfaces, integration,

design, architecture, etc. that may be represented as "product roadmaps." Any such information is for discussion purposes only and does not constitute a commitment

by Aspen Technology to do or deliver anything in these product roadmaps or otherwise. Any such commitment must be explicitly set forth in a written contract between

the customer and Aspen Technology, executed by an authorized officer of each company.