Now there is another part of our overall data compression
scheme and that is the compression test
and in this test what we're trying to do is store on disk
only those things that are meaningful and that will help us reproduce the trend
so now you may think well isnít everything meaningful, let me give an example
if you take a look at this illustration here
we've got, you know, time on the bottom here and temperature here
as values come into the system we will archive certain of those values
now each time a value
is presented to the snapshot
we don't automatically write that to the archive
because as you can see here
if we look at the overall trend,
just this vector that we see, is being made
by this data the overall vector of the data
allows us to store in just the first value
and just the last value, more or less the peaks and valleys
of the data and more or less reproduce
the entire trend just with those two points
I say more or less, because as you can see
there's a slight variation here
but it's a variation that the user decides whether or not that is something significant
to him that he would actually archive
each and every value
so it is up to you this is something you can turn off entirely if you want, you can archive
each and every value
by turning off what we call the compression test
in which case weíll store, each and every value
But, if you decide to go with compression and most of our customers do
and what youíll see
Well, youíll see drawing a straight lines like you see this dotted line here
straight lines between the peaks and valleys
and then, you know continuing on to the next peak and valley
and what that does is, it results in
storing data
that is accurate enough for almost all engineering purposes
now just as with the exception test
what controls the mechanism here, of the compression test, are some point attributes
the point attributes are going to be
the CompDev that's a compression deviation
that can also be specified as a percent of span
so you must,
you might also use CompDev percent
instead of CompDev
there's also an attribute called CompMax, that's a compression maximum time
and like the exception maximum, that basically indicates that
when that much time goes by, we will go and archive something whether it's gone outside
of the dead band or not
and here's a quick reminder
these are point attributes, the CompDev
and the CompMax, etc
they're attributes of a point like for example this
tag CDT158 it has
all these different attributes, including
compression deviation
and the compression maximum time you can see this is the maximum end time here
incidentally that minimum time does exactly the opposite of the maximum time
and that means that if you set this to say 5 minutes, then you would get no values stored
more closely together than once every 5 minutes
not a terribly
in demand future, but it is an option for those people who need
to throttle a tag that's storing too much data
here is an illustration
of how the compression test works
now each of the values that comes into the snapshot
we're going to apply that compression test to those values so
as these values come into the snapshot
we draw a dead band around those values
and the dead band is equivalent to the,
it's the last archive value
that you see right here
plus or minus disk compression deviations so,
Weíll take that last archive value plus and minus that compression deviation
we'll take the current value
plus or minus the exception, or the compression deviation
and we draw that dead band with this parallelogram
as values come in
we're going to extend that parallelogram
And,
it simply works this way if we have any values that fall outside the parallelogram
then we know we've got a value
that is, basically outside of that vector
and there we go, we have a value that's outside the parallelogram,
the vector has changed,
and when that happens what we archive
is the previous value
so as you can see, that's the value marked A for archived
now that's the value that we archived, that's what preserves the peaks and valleys
as you can see we don't really know when we've hit a peak or valley until weíve gone passed it
so that's going to go and
extend that from the last archived value to the current value
the most recent one that's been archived
and of course at this point the whole thing starts over again
we extend that parallelogram
anything that falls outside indicates there's a value that needs to be archived
so in that case, that previous value was archived
and in this case another value is archived
now here we have a sequence in which nothing goes outside this parallelogram
so we don't archived anything until
this value
forces many of the values to go outside the parallelogram
and then we archived the previous value
and that continues on and on
and there we go
still this vector, this parallelogram,
defines the vector that weíre looking for
as you can see the bigger you make this compression deviation, the wider the parallelogram will
be, and you will store fewer values
and here we go, at this point,
now we archive the previous value
and this is what we end up with in terms of archived data
at the end of this compression test
now you may well wonder, why are we covering this in this class, this is a class on using
the clients, well
it's very important to know, as, there are folks that depend on data,
that when you have values used in ProcessBook for example, that are being trended, and you need
to know exactly what happened at this point in time,
now what we're going to do is, if we drop a trend cursor on there, in ProcessBook
we're simply going to interpolate a value,
between here and here
and what you know about that value, that interpolated value that you see right here,
we know that the value could not have been
greater than that interpolated value, plus the deviation,
the compression deviation,
and that interpolated value minus the deviation,
so, weíve actually had customer that,
they find themselves in court and somebody asked them, well what was the value
at this point in time, right here
well you don't want to
answer by saying, well I have no idea what it was, I know what it was here, I know what it
was here, but I have no idea,
no you simply do a linear interpolation
add and subtract
the compression deviation and that's the range of possible values
now, letís do one last recap
and just take a look at what all this looks like
from beginning to finish, here's the raw data, as it was scanned and on the instrument system
and after the exception test we eliminate some of those values, so as you can see these
values here were
eliminated by the simple dead banding
and then now that's not good enough because we still have the opportunity
to remove more data to save space
and make this data more responsive and more quick to appear on your system's
by just gathering this peaks and valleys
and we do that through the compression test
and so this is what you see after the compression test, and again
if this is something you're not interested in, if you'd like to actually store every single
value scanned
that's not a problem just set,
you can configure
the exception and compression